Changing the state of the token-ring network interface to up, down, and detach can have various effects on the output of the netstat command.
The output of the netstat command showing the configured interface and route table before the token-ring interface is changed from active to inactive is as follows:
# netstat -i Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lo0 16896 link#1 340 0 341 0 0 lo0 16896 127 localhost 340 0 341 0 0 lo0 16896 ::1 340 0 341 0 0 en0 1492 link#2 8.0.5a.f8.d6.cc 39 0 5 0 0 en0 1492 192.168.0 192.168.3.1 39 0 5 0 0 tr0 1492 link#3 0.4.ac.61.73.ee 6542 0 509 0 0 tr0 1492 9.3.1 sv1050a.itsc.aust 6542 0 509 0 0 # netstat -rn Routing tables Destination Gateway Flags Refs Use If PMTU Exp Groups Route Tree for Protocol Family 2 (Internet): default 9.3.1.74 UG 0 0 tr0 - - 9.3.1/24 9.3.1.141 U 2 60 tr0 - - 127/8 127.0.0.1 U 4 111 lo0 - - 192.168.0/16 192.168.3.1 U 0 4 en0 - - Route Tree for Protocol Family 24 (Internet v6): ::1 ::1 UH 0 0 lo0 16896 - #
Changing the state of the token-ring interface configuration from active to inactive does not have much effect on the netstat command output:
# ifconfig tr0 down # netstat -i Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lo0 16896 link#1 338 0 339 0 0 lo0 16896 127 loopback 338 0 339 0 0 lo0 16896 ::1 338 0 339 0 0 en0 1492 link#2 8.0.5a.f8.d6.cc 39 0 5 0 0 en0 1492 192.168.0 192.168.3.1 39 0 5 0 0 tr0* 1492 link#3 0.4.ac.61.73.ee 5954 0 434 0 0 tr0* 1492 9.3.1 sv1050a 5954 0 434 0 0 Routing tables Destination Gateway Flags Refs Use If PMTU Exp Groups # netstat -rn Route Tree for Protocol Family 2 (Internet): default 9.3.1.74 UG 0 0 tr0 - - 9.3.1/24 9.3.1.141 U 2 731 tr0 - - 127/8 127.0.0.1 U 4 337 lo0 - - 192.168.0/16 192.168.3.1 U 0 4 en0 - - Route Tree for Protocol Family 24 (Internet v6): ::1 ::1 UH 0 0 lo0 16896 - #
However, if the token-ring interface is removed from the network interface list, the token-ring entries no longer exist in the interface configuration and route table of the netstat command output:
# ifconfig tr0 detach # netstat -i Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lo0 16896 link#1 789 0 790 0 0 lo0 16896 127 loopback 789 0 790 0 0 lo0 16896 ::1 789 0 790 0 0 en0 1492 link#2 8.0.5a.f8.d6.cc 39 0 5 0 0 en0 1492 192.168.0 192.168.3.1 39 0 5 0 0 Routing tables Destination Gateway Flags Refs Use If PMTU Exp Groups # netstat -rn Route Tree for Protocol Family 2 (Internet): 127/8 127.0.0.1 U 3 378 lo0 - - 192.168.0/16 192.168.3.1 U 0 4 en0 - - Route Tree for Protocol Family 24 (Internet v6): ::1 ::1 UH 0 0 lo0 16896 - #
Simply configuring the token-ring interface state to up is not enough to return the network back to the original status as the route for the default gateway needs to be defined also.
# ifconfig tr0 9.3.1.141 netmask 255.255.255.0 up # netstat -i Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lo0 16896 link#1 991 0 992 0 0 lo0 16896 127 localhost 991 0 992 0 0 lo0 16896 ::1 991 0 992 0 0 en0 1492 link#2 8.0.5a.f8.d6.cc 39 0 5 0 0 en0 1492 192.168.0 192.168.3.1 39 0 5 0 0 tr0 1492 link#3 0.4.ac.61.73.ee 76 0 18 0 0 tr0 1492 9.3.1 sv1050a.itsc.aust 76 0 18 0 0 # netstat -rn Routing tables Destination Gateway Flags Refs Use If PMTU Exp Groups Route Tree for Protocol Family 2 (Internet): 9.3.1/24 9.3.1.141 U 0 22 tr0 - - 127/8 127.0.0.1 U 3 380 lo0 - - 192.168.0/16 192.168.3.1 U 0 4 en0 - - Route Tree for Protocol Family 24 (Internet v6): ::1 ::1 UH 0 0 lo0 16896 - # route add -net 0 9.3.1.74 9.3.1.74 net 0: gateway 9.3.1.74 # netstat -rn Routing tables Destination Gateway Flags Refs Use If PMTU Exp Groups Route Tree for Protocol Family 2 (Internet): default 9.3.1.74 UG 0 0 tr0 - - 9.3.1/24 9.3.1.141 U 2 189 tr0 - - 127/8 127.0.0.1 U 3 380 lo0 - - 192.168.0/16 192.168.3.1 U 0 4 en0 - - Route Tree for Protocol Family 24 (Internet v6): ::1 ::1 UH 0 0 lo0 16896 - #