AMZ DIGICOM

Digital Communication

AMZ DIGICOM

Digital Communication

Routing table: structure and creation

PARTAGEZ

Routing refers to the transmission paths and interfaces through which data packets are sent in a network. For efficient transmission of data packets, a routing table with dynamic or static entries consisting of specific routing information is used. The more complex a network, the more complete the routing table.

What is a routing table?

A routing table, in English “Routing Table”, designates a set of directives and routing information for networks, routers and terminals compatible with Internet Protocol based networking. The information provided in table form determines the rules for transporting data packets between the network, routers and terminals.

Both routers and switches (interfaces) and end devices such as computers, laptops, printers or scanners use routing tables in order to deliver data as efficiently as possible. The more instances a network has, the larger the routing table. Additionally, devices usually create their own routing table for each routing protocol used. If network nodes use multiple protocols, there are also different routing tables.

What is the content of a routing table?

Entries in a routing table include specific information about the traveled and desired path of data packets. When a packet is received by an intermediate instance such as a router or an interface, it compares the information with its own routing table. In this way, it is possible to know where the starting point of the packet is and which data transmission path is suitable for broadcast as efficiently as possible. To do this, the data packets are provided with the IP and the corresponding destination address. The table provides the device on which the packet is received with important guidance on which hops are suitable for transport over the network.

  • Destination address/IP address range/subnet mask: information about the IP address, destination address and IP address range for the destination of the respective data packet.
  • Interfaces: details about the respective switches (interfaces) in the network, through which packets are sent across the network to reach the destination address.
  • Nearest jumps/bridges: IP addresses of the hops and interfaces to which packets are transported; Most of the time, the router addresses are the routers closest to the IP level or, in the case of BGP entries, the edge routers.
  • Routing metrics: they make it possible to determine the best possible route (among others with the lowest connection costs or the lowest bandwidth) on the basis of as low a factor or preference as possible. However, metrics only play a role when multiple routes are available for a delivery path. The route with the smallest metric distance is therefore the most efficient. If the metric values ​​are the same for different routes, there is balancing of data transmissions on routes of the same level.
  • Transportation routes: Entries include routes in connected or indirect subnets that can be reached by hops. There are also standard routes for specific traffic or in case of lack of information. Among the route entries, one can distinguish between directly connected routes, static routes and dynamic routes.

Structure of a routing table: example

The structure of a routing table contains necessary entries regarding target network address, subnet masks, gateways (routers), interfaces as well as metrics such as number of hops or routing effort. Below is an example routing table to illustrate what a rudimentary table looks like. This can be displayed using the “netstat -r” command in the Windows command prompt.

A routing table in Windows Command Prompt
Depending on the system, the local routing table can be displayed with commands like « netstat -r » on Windows.

Differences between routing table entries

There are three types of entries in a routing table as well as specific routing information for accessible networks. The main difference is how switches, routers, and endpoints learn to create network paths and corresponding routing table entries.

The three types of routing table entries include:

Static/manual inputs

Manual entries are static table information created directly by an administrator. A change to the entries must therefore also be active and manual. The protocols used are RIP, OSPF, BGP, IGP and EIGRP. Static inputs are advantageous because defined routes are difficult to modify from the outside. However, they only work when it comes to easy-to-manage entrances and networks. In the case of very large and complex tables, manual entries can quickly lead to security breaches or network errors.

Dynamic inputs

If these are dynamic entries, the table is populated automatically using routing protocols such as BGP, IGP, RIP, EIGRP or OSPF. Connected devices collect the necessary routing and network information using routing protocols and automatically generate entries in the table. Even networks directly connected to routers can thus be automatically entered into the routing table. Dynamic entries can react to changes in networks as well as failures of network nodes and switches, choose a new route and enter it into the table. Additionally, it is possible to identify information about network status and high load. It is possible to define routing priorities to prevent different paths leading to the same destination from contradicting each other.

Entries relating to directly connected routes

Networks directly connected to routers are automatically transferred into the routing table, provided that a computer interface IP configuration has been carried out.

Inputs with special functions

In addition to the entries mentioned, there are routing table entries with special functions. These include entries relating to a standard route which can be identified by the subnet mask « 0.0.0.0 ». Data packets without matching route entries are automatically forwarded to the device default gateway via this entry. Entries marked « 127.0.0.0 » refer to a loopback address of the local network interface. Packets destined for this address remain in the local network. Other separate entries include the IP ranges “224.0.0.0” or “255.255.255.255”. A load balancer is used for routes with identical metrics.

How to create a routing table

During dynamic routing, the respective routing protocols are automatically applied to create a routing table. The protocols fulfill the following objectives:

  • Border Gateway Protocol (BGP): establishes online connections between autonomous systems (AS).
  • Enhanced Interior Gateway Routing Protocol (EIGRP): enables efficient communication between routers.
  • Interior Gateway Protocol (IGP): exchanges routing information in autonomous systems.
  • Open Shortest Path First (OSPF): determines the most efficient path for data packets.
  • Routing Information Protocol (RIP): serves as a standard protocol in standalone IP networks.

The necessary entries are automatically read and completed by the respective terminals, routers and interfaces. The nodes thus know which hops a data packet has already made and thanks to which hops it arrives most quickly at its destination. Depending on the network extent or in case of subnet, administrators can manually create the routing table with corresponding entries. It is also possible to add specific static routes to a dynamic routing table.

Looking for secure, fast and scalable web hosting? Consider an IONOS web hosting package.

How to consult a routing table?

Depending on the operating system and Internet protocol version you are using, you can view your routing table as follows:

With IPv4:

  • Windows: Type the ((Netstat command|server/tools/netstat-commands/)) “netstat -r” in the command prompt. Alternatively, the « route print » or « route -4 print » commands also work.
  • macOS: type the command “netstat -nr” in the terminal.
  • Unix/Linux systems: use the command “netstat -r” or, on Linux, “iproute2” or “iproute”.

With IPv6:

  • Windows: type the command “netsh interface ipv6 show route” or “route -6 print”.
  • Linux: use the command “route -6” or “ip -6 route”.
  • Unix systems: type the command “netstat -A inet6 –r” or “route -A inet6”.

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact