LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Setting ip settings on boot (https://www.linuxquestions.org/questions/solaris-opensolaris-20/setting-ip-settings-on-boot-4175479744/)

austinramsay 10-05-2013 05:36 PM

Setting ip settings on boot
 
How can I tell solaris 11 to set my net0 ip settings to 192.168.200.100 netmask 255.255.255.0 on boot? Also what do I need to edit to set my default route to 192.168.200.105? I've been doing route add default 192.168.200.105 after each reboot.

kbp 10-05-2013 06:49 PM

I'm a Solaris newb but this may work (happy to be corrected):

Code:

# unconfigure and remove any dhcp info
ifconfig net0 unplumb
rm -f /etc/dhcp.*
ifconfig net0 plumb

# set IP
cat << EOF > /etc/hostname.net0
192.168.200.100/24 broadcast up
EOF

# add subnet to known networks
cat << EOF >> /etc/netmasks
192.168.200.0    255.255.255.0
EOF

# set default gateway
echo "192.168.200.105" > /etc/defaultrouter

You'll need to this from the console not via ssh

jlliagre 10-06-2013 05:50 AM

Solaris 11 new IP stack obsoleted most of the previous way to configure networking.

You should now use dladm, netadm, ipadm, route and the likes to do it if you really want locally configured addresses.

It is however much simpler to rely on a dhcp server (i.e. use ncp Automatic profile).

See http://www.oracle.com/technetwork/ar...g-1632927.html


All times are GMT -5. The time now is 04:44 AM.