What are the files required for a persistent IP address configuration ?
To be able to have a persistent IP address configuration across reboots, make sure you edited the mentioned file below :
/etc/hostname.[interface] -- Add IP address/hostname for interface /etc/netmasks -- add netmasks for the networks being used to configure IP address /etc/hosts -- Add IP address and hostname
How to check the routing table ?
To list all the routing table entries :
# netstat -nrv
How to add a persistent static route ?
To add a non-persistent route we just use the route add command without the option -p. Note that these routes get flushed if you reboot the system. Below are 2 examples of adding a route (192.168.1.1) for the network 192.168.1.0/24 :
# route add 192.168.1.0 -netmask 255.255.255.0 192.168.1.1 # route add 192.168.1.0/24 192.168.1.1
To make the same routes persistent add them using the -p option :
# route -p add 192.168.1.0 -netmask 255.255.255.0 192.168.1.1 # route -p add 192.168.1.0/24 192.168.1.1
For more examples on routing refer the post :
How to add a default route persistently ?
To add a persistent default route (192.168.1.1) :
# route -p add default 192.168.1.1
How to display persistent routes ?
# route -p show persistent: route add 192.168.1.0/24 192.168.1.1
How to configure a DNS client ?
To be able to configure a DNS client we have to edit below files :
/etc/resolv.conf --- add search domain and DNS server IPs /etc/nsswitch.conf --- Specify the order in which name lookup is done (DNS first and then hosts file) /etc/hosts --- host and IP address of the DNS client.
Network Utilities : snoop, netstat, tcpdump
How to capture network traffic on a specific interface ?
To find all the packets in and out from a specific interface :
# snoop -d hme0
Find more examples at :
How to check network traffic through a interface using netstat ?
# netstat -i Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue lo0 8232 loopback localhost 83505 0 83505 0 0 0 hme0 1500 geeklab geeklab 21775 0 53541 0 0 0
How to use tcpdump utility to capture network traffic through an interface ?
tcpdump is a third party software which can be used to sniff network traffic. To list the interfaces that can be sniffed using tcpdump :
# tcpdump -D
To sniff network traffic on interface ce0 :
# tcpdump -i ce0 -s 65535 -w ce0.out
-s 65535 – max size available
-w ce0.out – outputs captured information to the specified file (ce0.out)
Use ctrl+c to stop the capture.
How to check the interface speed, duplex/autoneg settings and status using ndd and kstat ?
Example of dladm (Solaris 10 only)
# dladm show-dev nxge0 link: up speed: 1000 Mbps duplex: full nxge1 link: up speed: 1000 Mbps duplex: full
Example of kstat :
# kstat -p | grep link_ | grep ce
# kstat -p hme:0::link_up hme:0:hme0:link_up 1 ( 1 = online, 0 = offile)
Example of ndd :
# ndd /dev/bge0 link_duplex 2 # ndd /dev/bge0 link_autoneg 1 # ndd /dev/bge0 link_status 1 # ndd /dev/bge0 link_speed 1000
Whats the maximum number of virtual (logical) interfaces (ce0:1, ce0:2 etc..) allowed to be configured per physical interface ?
By default Solaris OS allows to setup 255 virtual (logical) addresses per interface. The command “ndd -set /dev/ip ip_addrs_per_if [1-8192]” will allow you to configure as many as your addressing structure will permit.
# ndd -set /dev/ip ip_addrs_per_if [1-8192]
The maximum ip_addrs_per_if value of 8192 allows up to 8191 virtual interfaces.
IPMP and link aggregation
Whats the difference between link based and probe based IPMP ?
– in.mpathd daemon sends out ICMP probe messages on test address to one or more target systems on the same subnet.
– in.mpathd daemon determines the available target systems to probe dynamically. It uses a “all hosts” multicast (22.214.171.124) address to determine the target systems to probe.
examples of target systems :
1. all default routes on same subnet.
2. all host routes on same subnet. (configured with “route -p add” command)
– All test addresses should be in the same subnet.
Link based IPMP
– The mpathd daemon uses the interface kernel driver to check the status of the interface.
– in.mpathd daemon observes the changes to IFF_RUNNING flag on the interface to determine failure.
– No test addresses required for failure detection.
– Enabled by default (if supported by the interface).
– One of the advantage of link based IPMP is it does not depend on external sources to send ICMP reply to ensure the link status and it also saves IP addresses as it is not require any test addresses for failure detection
How to change the failure detection time in IPMP ?
The mpathd daemon uses the configuration file /etc/default/mpathd to set various IPMP parameters. We can set the failure detection time by editing the FAILURE_DETECTION_TIME in this file. The default value for this parameters is 10000 ms (10 sec). To change this value :
# vi /etc/default/mpathd ## (change the FAILURE_DETECTION_TIME in the file) # pkill -HUP in.mpathd ## (force the in.mpathd daemon to re-read the configuration file)
How to test IPMP failover ?
We can test the IPMP failover with if_mpadm command :
# if_mpadm -d ce0 (detach the interface ce0) # if_mpadm -r ce0 (reattache the interface ce0)
What is the meaning of various flags in IPMP like deprecated, -failover, standby etc.. ?
You would see flags such as NOFAILOVER, DEPRECATED, STANDBY etc.. in the output of “ifconfig -a” command. The meanings of these flags and parameters to enable them are:
deprecated -> can only be used as test address for IPMP and not for any actual data transfer by applications. -failover -> does not failover when the interface fails standby -> makes the interface to be used as standby
How to configure Link Aggregation ?
To configure a link aggregation (aggr1) using the interface e1000g0 and e1000g1 :
# dladm create-aggr -l e1000g0 -l e1000g1 1 # ifconfig aggr1 plumb 10.0.2.25/24 up
The key 1 will automatically create aggregation named aggr1. The key can be any random number, which will decide the name of the aggregation accordingly. Make sure you add the IP address or hostname in /etc/hostname.aggr1 file for persistent configuration.
How to check the status of Link aggregation ?
To check the status of link aggregation :
# dladm show-aggr # dladm show-aggr -L
How to remove an interface from the aggregation ?
To remove the interface e1000g0 from the aggregation – aggr1 :
# dladm remove-aggr -d e1000g1 1
How to add an interface to the aggregation ?
To add the removed interface e1000g0 back again to aggregation :
# dladm add-aggr -l e1000g2 1
Advanced configuration and troubleshooting
How to configure Link based IPMP in Solaris 10 ?
Refer the post for detailed post :
How to configure probe based IPMP in Solaris 10 ?
Refer the post for detailed post :
How to troubleshoot various IPMP configuration and failure issues ?
Refer the post for detailed post :
Hope this post was informative. Do comment below if you have some more questions to add to this list.