Routing basics Let's try "static routing"

Routing basics Let's try "static routing"

The default gateway is a convenient mechanism, but at worst, it is a "round throw", so useless packets may occur. Therefore, let's set the routing on the router as a method to properly forward the packet for the purpose instead of throwing it round.

Set the destination properly

As in the previous time, suppose that the network shown in Fig. 1 sends a packet from the 192.168.1.0/24 network side to an address that is not connected to Router B, such as 192.168.3.3.

Figure 1 This experimental environment using two Yamaha routers "RTX1100"

Upon receiving this packet, Router A unconditionally forwards it to Router B because its destination is an IP address that is not directly connected to itself. This time, Router B receives this packet, but since it is not directly connected to itself, it sends it back to Router A. Since TTL (Time To Live) is set for the packet, one of the routers will discard it (Screen 1).

Screen 1 TTL becomes 0 and you can see that the packet was dropped

However, this is a nonsensical exchange that wastes network bandwidth and also puts a strain on the router. In other words, if the number of routers is small like this time and you know the network to connect to, it is better to set each router properly. By doing so, useless exchanges can be reduced.

ルーティングの基礎「静的ルーティング」を試してみよう

So how do you specifically set it? Let's start with Router A.

The only packets that Router A must forward to Router B are those on the network destined for Router B. In the network given in this example, only packets addressed to 192.168.2.0/24 are available. Therefore, change the settings as shown in screen 2.

Screen 2 Delete the default gateway once and add the information of the network newly connected to Router B.You can use the GUI by setting the IP address for the interface.

In this state, even if you receive a packet that is not addressed to 192.168.1.0/24 or 192.168.2.0/24, it should return some error because the forwarding destination is not in the routing table. When I tried it with the ping command, it was displayed on the PC as shown in screen 3. Since it is a network address that is not registered in the routing table of Router A, it does not forward as expected and notifies the source of the error.

Screen 3 Returns an error because it cannot be forwarded to a network that is not in the routing table

One of the routers B needs the same settings as the router A. This can be set to send packets addressed to 192.168.1.0/24 from the 10.0.0.2 interface to 10.0.0.1 (Screen 4).

Screen 4 Settings on the router B side.If you forget this, the packet will not come back

What I've tried so far is "static routing", which sets the routing table manually. If the number of routers is small and the number of networks accommodated is not so large, static routing is not a problem. However, as the number of routers and the number of networks to be managed increase, it takes time and effort to change settings, and an accident may occur in which packets are not routed due to an input error.

So next time, I would like to try "dynamic routing" that automatically updates the routing table while increasing the number of routers and complicating the network.