The following are general guidelines for troubleshooting network connectivity and configuration issues.
One of the first signs of trouble on a network is loss of communications by one or more of the systems. If a system does not to come up the first time that it is added to the network, the problem might be a faulty NIC or a problem with a network daemon that is managed by SMF.
If a single system that previously was connected to the network suddenly develops a network problem, the problem could be its network interface configuration. If the systems on a network can communicate with each other, but not with other networks, the problem could be the router. Or, the problem could be with the other network.
You can troubleshoot network configuration problems with a single system by using the dladm and ipadm commands. These two commands, when used without any options, provide useful information about your current network configuration. The output of both commands displays information about the current state of the link, IP interface, and IP address, respectively.
The following are some of the ways in which you can use these commands to troubleshoot configuration issues:
Use the dladm command to display general information about all of the datalinks that are on a system:
# dladm LINK CLASS MTU STATE OVER net0 phys 1500 up --
Display information about the mapping between the datalinks, their generic names, and the corresponding network device instances as follows:
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1000 full e1000g0
Use the ipadm command to display general information about all of the IP interfaces that are on a system:
# ipadm NAME CLASS/TYPE STATE UNDER ADDR lo0 loopback ok -- -- lo0/v4 static ok -- 127.0.0.1/8 lo0/v6 static ok -- ::1/128 net0 ip ok -- -- net0/v4 static ok -- 203.0.113.10/24
Use the ipadm show-if interface command to display information about a specific IP interface:
# ipadm show-if net0 IFNAME CLASS STATE ACTIVE OVER net0 ip ok yes --
Display information about all of the interfaces on a system as follows:
# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip ok yes --
Display information about all of the IP addresses on the system as follows:
# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 static ok 192.0.2.3/24
Use the ipadm show-addr interface command to display information about a specific interface's IP address:
# ipadm show-addr net0 ADDROBJ TYPE STATE ADDR net0/v4 dhcp ok 203.0.113.10/24
Display the properties of a specific IP address as follows:
# ipadm show-addrprop net0/v4 ADDROBJ PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE net0/v4 broadcast r- 203.0.113.10 -- 126.96.36.199 -- net0/v4 deprecated rw off -- off on,off net0/v4 prefixlen rw 24 -- 8 1-30,32 net0/v4 private rw off -- off on,off net0/v4 reqhost r- -- -- -- -- net0/v4 transmit rw on -- on on,off net0/v4 zone rw global -- global --
See the ipadm(8) man page.
You can verify the current status of the SMF network services that are running on the system as follows:
$ svcs -x service-name
The output of this command shows all of the services that are in a maintenance state.
To investigate further, check the log file as follows:
$ svcs -Lv service-name-from-svcs-x-output
Or, use the following command to check the log file:
$ view `svcs -L service-name-from-svcs-x-output
You can use either of the following commands to check whether the network SMF service is online or in a degraded state:
$ svcs '*network*' | grep -v online
$ svcs '*network*' | egrep 'maint|degrade|off|disable
Use the following command to obtain more information about the state of the svc:/network/loopback:default SMF service:
$ svcs -xv svc:/network/loopback:default svc:/network/loopback:default (loopback network interface) State: online since Thu Dec 05 19:30:54 2013 See: man -M /usr/share/man -s 1M ifconfig See: /system/volatile/network-loopback:default.log Impact: None.
Less obvious causes of network problems are those that degrade network performance. If the network is having problems, you can run a series of software checks to diagnose and fix basic problems. For example, you can use the ping command to quantify problems, such as the loss of packets by a system. Or, you can use the netstat command to display routing tables and protocol statistics. For more information about the various methods that you can use to troubleshoot these types of networking problems, see Using Observability Tools to Monitor Network Traffic Usage and Resources for Monitoring and Detecting Problems on a TCP/IP Network.
Third-party network diagnostic programs also provide a number of tools for troubleshooting network issues. Refer to the third-party product documentation for specifics.
The following are some of the methods that you can use to perform basic network software checking:
The netstat command displays a variety of useful information for troubleshooting network connectivity issues. The type of information that is displayed depends on the options that you specify. See Monitoring and Analyzing the Network in Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.4 and the netstat(8) man page.
See the hosts(5) man page.
Try to connect to the local system by using the telnet command.
See the telnet(1) man page.
# /usr/bin/pgrep inetd 883
The previous output indicates that the inetd daemon is running on the system with the process ID 883.
# svcs ndp STATE STIME FMRI online Apr_20 svc:/network/routing/ndp:default
The previous output indicates that the svc:/network/routing/ndp SMF service is enabled.
Check the system's router and routing information.
Display a system's persistent route as follows:
# route -p show
Display the configuration that is in the routing table as follows:
# netstat -nr
You use the route command to manage the network routing tables and to add, modify, and remove persistent routes. Always specify the –p option to ensure that any changes you make to the network routing tables persist across system reboots.
Check whether a route already exists in the persistent configuration as follows:
# route -p show persistent: route add default 203.0.113.1 -ifp net0
If the route already exists in the persistent configuration, the information that is in the network routing tables (which is not persistent) might differ from the persistent configuration.
The following example illustrates this point further. In this example, an attempt is made to add a persistent route to the net1 interface. However, the command fails because that persistent route already exists for the net0 interface, per the previous example's output.
# route -p add default 203.0.113.1 -ifp net1 add net default: gateway 203.0.113.1 add persistent net default: gateway 203.0.113.1: entry exists Warning: persistent route might not be consistent with routing table.
Running the route –p show command again reveals that the persistent route did not change and is still configured for net0, as shown in the following output:
# route -p show persistent: route add default 203.0.113.1 -ifp net0
However, the command did change the routing tables in the kernel to use net1, as shown in the following output:
# netstat -nr Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- ------------------- ----- ---- --- --------- default 203.0.113.1 UG 2 1 net1 203.0.113.0 203.0.113.78 U 3 0 net1 127.0.0.1 127.0.0.1 UH 2 466 lo0 . . .
Therefore, it is always a best practice to delete any existing persistent route configuration prior to adding a new route. See Creating Persistent (Static) Routes in Configuring an Oracle Solaris 11.4 System as a Router or a Load Balancer.