Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Switching from DHCP to Static IP

807557Jun 8 2007 — edited Jul 28 2008
Hi, I'm trying to switch my Solaris 10 box from DHCP to static IP. It worked out of the box with DHCP. I've read through the forums and googled, and I think I'm almost there, but not quite.
My network interface is bge0; the desired IP is 192.168.2.5 with hostname server2; and the router is 192.168.0.1.

So far, what I've done is:

- Renamed /etc/dhcp.bge0 to /etc/dhcp.bge0.backup
- Added the line "192.168.2.5 server2" to both /etc/hosts and /etc/inet/ipnodes, and deleted the line generated by dhcp.
- Made a new file '/etc/nodename' and put the word server2 in it.
- Made a new file /etc/defaultrouter' and put the router address 192.168.0.1 in it.
- Edited the empty file '/etc/hostname.bge0' and put the address 192.168.2.5 in it.

After rebooting, 'ifconfig bge0' gives the following output
bge0: flags=1000843<up, BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.2.5 netmask ffffff00 broadcast 192.168.2.255 ether 0:1b:24:1d:f3:1c
Thanks for any help!

Edit: Changed some wording, added output of ifconfig
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2008
Added on Jun 8 2007
7 comments
264 views