How do packets and routing tables forward data in the network? Learn in one minute

How do packets and routing tables forward data in the network? Learn in one minute

1. Routing Table

When the frame reaches the router's interface, the router checks the destination address in the frame. If the destination address is the router's interface address or the broadcast address, the router strips the packet from the frame and passes it to the Network Layer. The destination address in the packet is then checked, followed by the protocol field, and finally sent to the appropriate process. If the packet is routable, the router searches its own routing table for the corresponding routing entry.

1. Two important elements in the routing table:

  • Destination address, this address is the address that the router can reach,
  • The direction to the target address is called the next hop.

2. The router matches the address to the maximum extent during the address matching process, and the addresses are arranged in descending order of accuracy.

  • Host Address
  • Subnet
  • Summary address
  • Primary network number
  • Supernet
  • Default address

If the address cannot be matched with any entry in the routing table during the address matching process, the packet will be discarded.

[An ICMP message named Destination Unreachable will be sent back to the source address]

2. Static routing configuration

  • Determine the address for each link (including subnet address and network address)
  • For each router, identify the link address of the indirect link
  • Write out routing statements for each router that does not directly connect to the address (writing out statements for directly connected addresses is not necessary)

  1. Piglet(config)#ip route 192.168.1.0 255.255.255.224 192.168.1.193  
  2. Piglet(config)#ip route 192.168.1.64 255.255.255.224 192.168.1.193  
  3. Piglet(config)#ip route 10.4.6.0 255.255.255.0 192.168.1.193  
  4. Piglet(config)#ip route 10.4.7.0 255.255.255.0 192.168.1.193

Set a static route with a slightly larger management distance than the normal route. For example, set the management distance of a route to 50. When the normal link goes down, the backup link set as the floating route is enabled.

  1. Piglet(config)#ip route 10.4.7.0 255.255.255.0 192.168.1.193 50

Load balancing can be based on the destination address or on the so-called opportunistic destination address of each packet. This means that if there are two paths to the destination address, the first packet will reach the first destination device through the first link, the second packet will reach the second destination device through the second link, the third packet will reach the third destination device through the first link, and so on. When Cisco routers work in the default switching mode, Fast Switching mode, they use this type of load balancing.

4. How Fast Switching works:

When the router processes the first packet to be sent to the destination address, it first checks the routing table and selects the egress interface, then obtains the information that makes up the frame (such as the ARP table query) and encapsulates it before transmitting it. The previously obtained routing and data link information will be stored in the fast switching cache.

Next, when there is a packet that is destined for the same destination address as the first packet, the packet can be directly exchanged without querying the routing table and ARP table.

Fast switching reduces CPU usage and processing time, and means that packets destined for a certain destination are routed out of the same router interface. When there are packets destined for different hosts on the same network, the router may route these packets through another link.

Therefore, the best a router can do is to balance the load of the target address. Packet-based load balancing means that if there are two paths to the target address, the first packet will reach the target device through the first link, the second packet will reach the target device through the second link, the third packet will reach the target device through the first link, and so on (here we consider equivalent balanced load).

<<:  How much room do operators have for increasing speed and reducing fees?

>>:  Share a few DOS commands that are not outdated. Please save them if you need them.

Recommend

Can this be considered? TCP is awesome.

Hello everyone, I am Xiaolin. I saw an old man as...

In the 5G era, what is the United States worried about?

Today I want to talk to you about a technical top...

These 8 technologies may disrupt 2018

As 2018 begins, many of the biggest tech trends a...

5 Fast-Developing Technology Trends in the Network Industry in 2017

At the start of every new year, experts and forec...

What is 5G? How fast is 5G? Learn about 5G in one article

Recently, the world's first 5G railway statio...

Dingxiang Chen Shuhua: Security can also be shared? You read that right!

[51CTO.com original article] The latest data in 2...

A detailed introduction to the difference between WiFi5 and WiFi6 network speeds

I believe that most of my friends will fully cons...

The truth about 5G speed, is your 5G package worth it?

[[326825]] We'll cover the different 5G speed...