PDA

View Full Version : How to print the complete routing table?




crenz
Nov 6, 2003, 03:16 PM
How can I print the complete routing table on X.2/X.3? I'm trying to track down a weird routing problem and need some more information than what I get from "route -v get hostname".



jeremy.king
Nov 6, 2003, 03:33 PM
Does
traceroute -v hostname

help?

daveL
Nov 6, 2003, 03:53 PM
netstat -r or netstat -nr, depending on whether you want host names or ip addresses, respectively.

This is the output of netstat -nr on my machine:

[david]> netstat -nr
Routing tables

Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.1.1.100 UGSc 18 4 en1
10.1.1/24 link#5 UCS 2 0 en1
10.1.1.2 0:5:5d:da:c9:6f UHLW 2 181713 en1 660
10.1.1.6 127.0.0.1 UHS 0 0 lo0
10.1.1.100 0:5:5d:ee:be:a6 UHLW 18 513 en1 944
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 8 13637 lo0
169.254 link#5 UCS 0 0 en1

Internet6:
Destination Gateway Flags Netif Expire
::1 ::1 UH lo0
fe80::/64 fe80::1 Uc lo0
fe80::1 link#1 UHL lo0
fe80::/64 link#5 UC en1
fe80::230:65ff:fe0a:5ec2 0:30:65:a:5e:c2 UHL lo0
ff01::/32 ::1 U lo0
ff02::/32 ::1 UC lo0
ff02::/32 link#5 UC en1
[david]>

HTH