Linux — Routing Protocol

Advanced Linux network troubleshooting knowledge

Tony
Geek Culture

--

In my last Linux networking article: “ICMP and Ping”, I talked about how ping command works and the underline ICMP protocol it is using. Let’s talk about Linux network routing today.

How to Configure Static Routing?

From my previous articles, you should already know that a router is a network device with multiple network cards. When an ingress network packet is sent to a router, it uses a local forwarding information base to decide how to forward the traffic correctly. This forwarding information base is often referred to as a routing table.

There are multiple routing rules in a routing table. Each rule contains at least these three pieces of information.

  • Destination Network: Where does this package want to go?
  • Export equipment: which network device to use?
  • Gateway: The address of the next router.

For example, below is the output of the route command:

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default ip-172-31-0-1.e 0.0.0.0 UG 0 0 0 eth0
instance-data.e 0.0.0.0 255.255.255.255 UH 0 0…

--

--