ASCII.jp Let's try the basics of routing "Static routing"

The default gateway is a convenient mechanism, but worse is a "round throw", so a waste packet may occur.So, let's set the routing to the router as a way to transfer the packet for the purpose instead of a round throw.

Set the destination properly

Similarly, in the network in Fig. 1, 192.168.1.0/24 From the network side 192.168.3.Suppose you send a packet to an address that is not connected to Router B as in 3.

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

The router A who received this packet is the destination of an IP address that is not directly connected to himself, so it will be transferred unconditionally to Router B.This time, Router B received this packet, but this is not directly connected to himself, so I send it back to Router A.TTL (Time to Live) is set on the packet, so either router will be destroyed (screen 1).

You can see that the screen 1 TTL has reached 0 and the packet has been destroyed

Nevertheless, this is a meaningless exchange that istes the network bandwidth, and the router is burdensome.In other words, if the number of routers is small and the connected network is grasped, it is better to set it to the router.By doing so, you can reduce unnecessary exchanges.

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

So how do you set it specifically?First, let's look at Router A.

The only packet that Router A has to transfer to Router B is the only network that has the destination connected to Router B.In the network listed in this example, 192.168.2.Only packets for 0/24.So, change the settings like screen 2.

Screen 2 Delete the default gateway and add information on the new network that has been connected to Router B.If you set an IP address on the interface, you can use the GUI

In this state, 192.168.1.To 0/24 or 192.168.2.Even if you receive a packet that is not addressed to 0/24, there is no transfer destination in the routing table, so you should return some error.When I tried it with the ping command, the PC was displayed like screen 3.Since it is a network address that is not registered in the Router A routing table, we are notifying errors to the source without transferring as expected.

Screen 3 Return an error because it cannot be transferred to a network not on the routing table

On the other hand, the router B also requires the same setting as the router A.This is 192.168.1.10 packets to 0/24.0.0.10 from the interface of 2.0.0.1 If you send it to 1 (screen 4).

Screen 4 Router B side setting.If you forget this, the packet will not come back

What I have tried so far is "static routing" that allows all routing tables.If the number of routers is small and there are not so many networks to be housed, there is no problem with static routing.However, as the number of routers and the number of networks to be managed increases, it may take time to change the settings, and there may be accidents such as the input mistake that the packet is not routed.

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