Solaris 10 Network Config
How to config e1000g0 IP address:
1. Edit /etc/hostname.nxge0
# vi /etc/hostname.nxge0
Format: IP-address netmask + netmask
Example: 192.168.10.1 netmask + 255.255.255.0
2. Edit /etc/inet/hosts and /etc/inet/ipnodes
Add IP-address hostname
Example: 192.168.10.1 test-server
3. reboot
How toadd and configure other NICs:
dladm – configure data-link interfaces, to list the NICs
# dladm show-link
List activated NICs
# ifconfig –a
To enable a NIC:
Example, enable nxge2
# ifconfig nxge2 plumb
To inactive a NIC:
Example, inactivate nxge2
# ifconfig nxge2 unplumb
To add an IP address:
# ifconfig nxge2 192.168.10.2 netmask 255.255.255.0 broadcast 192.168.10.255
Bring up the network card:
# ifconfig nxge2 up
Save the network configuration:
Make a new file in /etc with format hostname.interface
# vi /etc/hostname.nxge2
and edit /etc/inet/hosts and /etc/inet/ipnodes
Reboot
How to add routing:
# route –p add default your-gateway
# route –p add default 192.168.2.1
-p = persistence over reboot
Register a default gateway for the PC, to add another routing:
# route –p add –net network-address –gateway gateway-address
–p so routing wont be flushed when reboot.
Add gateway in /etc/defaultrouter
To check your routing you can type:
# netstat –rn
To flush your routing:
# route flush