Routing
To see the routing
table used by the system, you can use the Netstat tab of the Network Utility application, click the Display routing table information radio button, and then hit the Netstat button, as shown in Figure 11-7. This outputs the same routing table information as the netstat -r
command, shown in Example 11-5.
Example 11-5. The routing table as displayed by netstat -r
$ netstat -r
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.79.1 UGSc 19 13 en0
192.168.79 link#4 UCS 6 0 en0
192.168.79.1 0:0:d1:f0:67:9 UHLW 5 0 en0 1178
192.168.79.9 127.0.0.1 UHS 0 0 lo0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 13 259841 lo0
169.254 link#4 UCS 0 0 en0
Internet6:
Destination Gateway Flags Netif Expire
::1 link#1 UHL lo0
fe80::%lo0/64 fe80::1%lo0 Uc lo0
fe80::1%lo0 link#1 UHL lo0
ff01::/32 ::1 U lo0
ff02::/32 ::1 UC lo0
Figure 11-7. Using Network Utility to examine routing information
There are two parts to the routing table: the first is the Internet table for routing packets to IPv4-based networks; the second is the Internet6 table for routing packets to IPv6-based networks. Each part contains a set of entries. Here’s what the first few entries in the Internet table mean:
The first line indicates that the default destination for all packets is 192.168.79.1, a router to the Internet. The packets should be sent via the
en0interface. ...