How to assign static ip address to the server having solaris 10. i.e. nge0

hi,
how to assign static ip address to the server having solaris 10. assign static ip to nge0 which will sustain across reboots which will include all settings including gateway setting etc..

Add host entries in the /etc/hosts file
touch /etc/hostname.nge0 -put the hostname
add the netmask in the /etc/netmasks with the correct subnet
touch /etc/defaultrouter -> put in the gateway IP

Then...
EXAMPLE
#ifconfig nge0 plumb
#ifconfig nge0 10.10.12.1 netmask 255.255.255.0 broadcast + up

#init 6 -to reboot

#ifconfig -a
#dladm show-dev -> verify that link is up and running

1 Like

How to assigne static ip to a interface that will sustain a boot:
Add host entry to /etc/hosts
add hostname to the file /etc/hostname.interface (hostname.nge0 for you) (you can also put in the ip here, if you dont want to add the host entry into /etc/hosts)
add netmask to /etc/netmasks
add defaultrouter ip in /etc/defaultrouter
init 6
ifconfig -a to check config is correct
netstat -rn to check defaultrouter is correct.

Just using ifconfig commands will not make the setting stay across reboots.