Linuxnetwork

Routing Table Entry

1. Introduction

We will start this article, introducing you firstly in the networking area. Working in the networking area you need to have a solid knowledge about routing, how the packages are moving between networks, how to configure a firewall, basic skills about operating systems and so on. In a local network routing tables are important because they maintain a map of the connected networks.

Knowing that it will be easy for you to understand and learn the concepts provided by a cloud platform.

2. Understanding Routing Tables?

Routing tables also known as routing information base (RIB) contains a data table that will be stored in the router or network host. Routing tables contain information about the topology of the network.

Having in place a routing table is the primary goal of routing protocols. Defining static routes are entries in the routing tables added not automatically, which means are fixed rather than being the result of routing protocols and associated network topology.

A routing table is a set of rules that can be visible in a table format. With this you can determine where the data packets are moving over an Internet Protocol (IP). All devices that have an IP, including routers and switches use routing tables. It determines the best route for forwarding packets based on the information stored in the routing tables.

Every computer that is connected to the network requires some type of routing instruction for network TCP/IP packets after it leaves the localhost.

You can find more information about routing tables here.

3. Routing Table Entries

In this section we will discuss about routing tables in Linux/Unix systems.

Firstly we will start defining the term gateway. A gateway is a device that connects two networks, this is often called router. A router is a device, with the role to forward the packets to the destination.

Secondly we will discuss about networking in Linux. The packets are sent over the network on a local network or to some other, remote network.

Before we continue with routing decisions and components we will look over how packets make their way to the correct host on a network. The TCP/IP network model has five layers that describe the mechanism necessary to move data packets from one host to another. The layers are:

  • Application Layer: Message
  • Transport Layer: TCP Segment
  • Internet Layer: Packet
  • Data link Layer: Frame
  • Physical Layer: Bits

Routing decision:

  • If the destination host is on the local network, the data will be sent directly to the destination host.
  • In case the destination host is on the remote network reachable through a local gateway that is presented in the routing table, the date will be sent to the explicitly defined gateway.
  • For destination hosts that are on the remote network that has no routes defined in the routing table the data will be sent to the default gateway.

In case all of the above route decisions will fail because there is no match, the packets will be sent to the default gateway.

3.1. Type of components of Routing Table Entries

The type of components that you can find in the routing tables are:

  • Network destination. The destination subnet.
  • Gateway address. The next hope, where your packets will go. This is the address of the next station to which the packet will be sent to its final destination.
  • Network mask. The netmask for the given network destination.
  • Quality of service associated with the route. This indicates if the route is up (U). The G stands for default gateway.
  • Metric. This is referring to the routing metric of the path to send the packet.
  • Interface. The name of the outbound NIC (Network Interface Card). For hosts that are also routers there will be two or more NICs used.

In the next section you will see a screenshot with the above mentioned components.

3.2. Example of a Routing Table Entry

Running this command on the Linux you will see the default configuration for the routes:

route -n # n parameter will show the addresses as numerical 
The default routes that can be shown on the Linux system.

4. Types of Routing Table Routes

Routing is a process that happens at layer 3 (network layer) of the TCP/IP network layer. In the routing area, there are two methods of populating routing tables with routes: static, default, and dynamic.

4.1. Static Routing

This term refers to a case when you added any route in the routing table manually. In case the network routing requirements are very simple, you can add manually the routes to the host to provide all the connectivity requirements.

Advantages.

  • There is no overhead for the router CPU, which a cheaper router can easily add to do routing.
  • It adds an extra layer of security because only administrators can allow routing to a particular network.
  • No bandwidth with usages between routers.

Disadvantages.

  • It has limitations when the networks become large.
  • As the number of routes increases it becomes difficult to maintain.
  • In case the networks have different values that route can become unavailable, causing routes to be unstable.

4.2. Default Routing

This is the default that routers come with which will send all packets towards a single router (next hop). This configuration will not take into consideration to which network the packet belongs, it will forward out to the router where it is with configuration for default routing (stub routers). A stub is a router that has only one route to reach all networks.

4.3. Dynamic Routing

Dynamic Routing comes up with applying routing protocols to communicate information about the status of routes and interfaces. This dynamic routing uses protocols to discover network destinations and the routes to reach them. RIP(Routing Information Protocol) and OSPF(Open Shortest Path First) are the best examples of routing protocols. In case of an unknown/down route there will be automatic adjustments to reach the destination network.

A dynamic protocol has the following features:

  • The routes should have the same dynamic protocol to run to exchange routes.
  • If the router finds a change in the topology then the router advertises it to all other routers. 

Advantages.

  • Easy to configure.
  • More performant to select the best route to the destination remote network and also able to discover remote networks.

Disadvantages.

  • Consume more bandwidth to communicate with other neighbors.
  • Not so secure as static routes.

5. Conclusion

This article helps you to understand the basic concept about Routing tables, and the importance of this. We will present you how these table entries are, and some examples with this. Besides that we dive into the concept of components and types.

To sum up, the Routing tables are the most important thing from the network because it will help you to forward the packages to the right destination due to the reason that it keeps a map of the connected networks.

Iulian Timis

My name is Iulian and I graduated Faculty of Electronics, Telecommunications, and Information Technology. My master's degree was in Computer Science, Information Security. I am passionate about technology and the security area. During my career I was working as a Java Developer, on the backend and frontend side, sometimes doing some DevOps tasks.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button