How do I check my routing table in linux?



  • There are couple of ways you can check the network routes on linux:

    # route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    10.83.20.0      0.0.0.0         255.255.255.0   U     0      0        0 bond0
    169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 bond0
    0.0.0.0         10.83.20.3      0.0.0.0         UG    0      0        0 bond0
    

    or

    # netstat -rn
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    10.83.20.0      0.0.0.0         255.255.255.0   U         0 0          0 bond0
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 bond0
    0.0.0.0         10.81.20.3      0.0.0.0         UG        0 0          0 bond0
    

Log in to reply
 

© Lightnetics 2024