Use command: route
The route command displays and sets the Linux routing table
-A: Set the address type;
-C: Print the route cache of the Linux kernel;
-V: detailed information mode;
-N: Do not perform DNS reverse lookup, directly display the digital form of IP address;
-e:netstat format displays the routing table;
-net: The routing table to a network;
-host: The routing table to a host.
Add: Adds the specified route record;
Del: Deletes the specified route record;
Target: Destination network or destination host;
GW: Set default gateway;
MSS: Set the maximum block length of TCP (MSS), in megabytes;
window: Specifies the TCP window size of the TCP connection through the routing table;
Dev: The network interface represented by the route record.
Instance:
[Email protected] ~]# route-ekernel IP Routing tabledestination Gateway genmask Flags MSS Window irtt Iface10.0.0.0*255.255.255.0U0 0 0Eth0link-local *255.255.0.0U0 0 0Eth0default10.0.0.2 0.0.0.0Ug0 0 0Eth0
What the column information represents
Destination: Destination network or host.
Gateway address.
Genmask: Network mask for the target network. "255.255.255.255" represents a host. "0.0.0.0" represents the gateway.
Flags: Tags
U up indicates that this route is currently in the boot state.
H host, which indicates that the gateway is a host.
G Gateway, which indicates that this gateway is a router.
R reinstate route, which uses dynamic routing to reinitialize the route.
D dynamically, this route is dynamically written.
M Modified, this route is dynamically modified by the routing daemon or the director.
! Indicates that this route is currently in a closed state.
Linux routing table information-route command