Route table items
IPv4 Route Table===========================================================================Active Routes:Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 10.12.0.1 10.12.32.47 20 10.12.0.0 255.255.192.0 On-link 10.12.32.47 276 10.12.32.47 255.255.255.255 On-link 10.12.32.47 276 10.12.63.255 255.255.255.255 On-link 10.12.32.47 276 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 192.168.56.0 255.255.255.0 On-link 192.168.56.1 276 192.168.56.1 255.255.255.255 On-link 192.168.56.1 276 192.168.56.255 255.255.255.255 On-link 192.168.56.1 276 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.56.1 276 224.0.0.0 240.0.0.0 On-link 10.12.32.47 276 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.56.1 276 255.255.255.255 255.255.255.255 On-link 10.12.32.47 276===========================================================================Persistent Routes: None
Ping two types of errors: not reachable, request timeout;
1. The path is not reachable. Search all entries and no matching network is found.
For example, delete the default gateway.
route delete 0.0.0.0
Ping Output Error of 1.2.3.4 again
2. The request times out and finds the matching entry. However, after an ICMP packet is sent to the matching entry, no response is received at the specified time.
For example, add a default gateway
route add 0.0.0.0 mask 0.0.0.0 10.12.0.1
Ping 1.2.3.4 and the output times out.
Route Selection
When TCP/IP needs to initiate a communication to an IP address, it evaluates the route table to determine how to send packets.
The evaluation process is as follows:
(1) TCP/IP uses the destination IP address to communicate with and the network mask of each route entry in the routing table for phase and calculation. If the phase and result match the network address of the corresponding route entry, this route entry is recorded.
(2) After all route entries in the route table are calculated, the longest matching route entry in the route entry under the TCP/IP Selection Record (the network mask contains a route entry with a maximum of "1) to communicate with the destination IP address.
(3) If there are multiple longest matching routes, select a route entry with the lowest number of hops.
(4) If there are multiple longest matching routes with the lowest hops, then:
(4.1) If a response packet is sent and the source IP address of the packet is the IP address of an interface with the longest matching route, select the longest matching route.
(4.2) in other cases, the binding priority of the network interface corresponding to the longest matching route is determined in the advanced settings of the network connection.
Bridged networking topology
Nat Topology
Host-only Topology
Refer:
1. Understand the route table and default gateway in Windows
2 virtual box Virtual Network Mode
3 Broadcast Data Transmission