You can use various commands to troubleshoot IPv4 to diagnose a problem; the most common ones are ifconfig , ping , and traceroute . These commands are each discussed briefly below. ifconfigUse the ifconfig -a command to view the current network interface configuration. The output from the command includes all physical and logical interfaces that are configured as shown here, where there are two logical interfaces: #ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.28.28 netmask ffffff00 broadcast 192.168.28.255 ether 8:0:20:b3:41:13 hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.28.128 netmask ffffff00 broadcast 192.168.28.255 hme0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.28.29 netmask ffffff00 broadcast 192.168.28.255 This output shows the status of each interface, in the flags= section. You can also verify that you are using the correct IPv4 address for each interface. pingUse the ping command to verify that you can contact the network interface and that it is responding to network requests . The following example contacts the logical interface hme0:2 : #ping 192.168.28.29 192.168.28.29 is alive tracerouteThe traceroute command is extremely useful when you're trying to establish why you cannot contact a remote host; it identifies the path taken to reach a remote host. The following example traces the route, across the Internet, to the Web site www.example.com . It lists all the routers that are used to establish contact: #traceroute www.example.com Tracing route to www.example.com [192.0.34.166] over a maximum of 30 hops: 1 9 ms 10 ms 8 ms 10.25.0.1 2 11 ms 9 ms 9 ms gsr01-st.blueyonder.co.uk [62.30.65.1] 3 13 ms 12 ms 14 ms 172.18.6.69 4 27 ms 14 ms 13 ms tele1-azt-pos.telewest.net [194.117.136.2] 5 13 ms 12 ms 14 ms pos50402hsd-gsr2-linx.cableinet.net [194.117.154.190] 6 14 ms 14 ms 12 ms 166.63.222.37 7 104 ms 103 ms 105 ms dcr1-loopback.Washington.cw.net [206.24.226.99] 8 106 ms 105 ms 108 ms bpr1-so-0-0-0.VirginiaEquinix.cw.net [208.173.52.113] 9 105 ms 105 ms 106 ms bpr2-ae0.VirginiaEquinix.cw.net [208.173.50.253] 10 105 ms 106 ms 106 ms 208.173.50.146 11 137 ms 100 ms 95 ms p16-1-0-0.r21.asbnva01.us.bb.verio.net [129.250.5.21] 12 108 ms 107 ms 106 ms p16-5-0-0.r01.mclnva02.us.bb.verio.net [129.250.2.180] 13 108 ms 105 ms 108 ms p16-7-0-0.r02.mclnva02.us.bb.verio. net [129.250.5.10] 14 166 ms 166 ms 184 ms p16-0-1-2.r20.plalca01.us.bb.verio.net [129.250.2.192] 15 169 ms 168 ms 169 ms p64-0-0-0.r20.snjsca04.us.bb.verio.net [129.250.2.71] 16 169 ms 167 ms 171 ms xe-0-2-0.r21.snjsca04.us.bb.verio.net [129.250.2.73] 17 180 ms 214 ms 162 ms p16-1-1-1.r21.lsanca01.us.bb.verio.net [129.250.2.186] 18 167 ms 182 ms 163 ms ge-3-0-0.a02.lsanca02.us.ra.verio.net [129.250.29.131] 19 164 ms 166 ms 166 ms ge-1-2.a01.lsanca02.us.ra.verio.net [129.250.46.93] 20 162 ms 165 ms 165 ms ge-2-3-0.a02.lsanca02.us.ce.verio.net [198.172.117.163] 21 164 ms 164 ms 165 ms lngw2-isi-1-pos.ln.net [130.152.80.29] 22 164 ms 164 ms 164 ms 207.151.118.18 23 165 ms 166 ms 165 ms www.example.com [192.0.34.166] Trace complete. The output shows a successful trace of the route between two hosts . When there are problems, or there is no route, traceroute displays a * character instead. |