
In order to send packets to destination which is not within this ip range, the packets will be forwarded to a default gateway, which decides further routing for that packet. If you don’t know what ARP is, you should first understand how ARP protocol works. When packets are sent within this IP range, then the MAC address of the destination is found through ARP Protocol and the packet will be sent to the MAC address. The above command shows that if the destination is within the network range 192.168.1.0 – 192.168.1.255, then the gateway is *, which is 0.0.0.0. In this example, the ip-address of the system where the route command is being executed is 192.168.1.157 $ routeĭestination Gateway Genmask Flags Metric Ref Use Iface Route command by default will show the details of the kernel routing table entries. We’ll first explain how routing is done with some basic route command examples, and then we’ll explain using a sample network architecture about how to setup routes in your network. In this article we will see how to manipulate the routing tables in Linux using route command.

It is primarily used to setup static routes to specific host or networks via an interface. Route command is used to show/manipulate the IP routing table.

In the 1st part of the IP Routing series, we learned the fundamentals of Linux IP Routing.
