fbpx

Routing table

Facebook
Twitter
LinkedIn
WhatsApp
Telegram

General concepts

The routing table is a fundamental data structure used in routers to store information about connected and remote networks. Each routing table entry contains a series of fields, including the destination network address, subnet mask, next-hop address, and a metric.

The destination network address indicates the IP address of the network you want to access. The subnet mask is used to define which part of the IP address represents the network and which part represents the host. The next hop address is the IP address of the next device to which packets will be sent to reach the destination network.

Routing table information is the most important information that routers use to determine how to forward packets they receive. When a packet arrives at a router, the router examines the packet's destination address and looks for a corresponding entry in the routing table.

If the routing table does not contain a corresponding entry, the router does not know how to forward the packet and can discard it or send it to a default route. If the information in the routing table is incorrect, traffic will be forwarded incorrectly and may not reach its final destination.

Therefore, it is crucial that the routing table is kept up to date and configured correctly to ensure that traffic is routed correctly. Routers can obtain routing table information from various sources, including dynamic routing protocols such as OSPF or BGP, or by manually configuring static routes.

Routing Table Usage Examples

The following are practical examples of using the routing table in network connectivity:

  1. Suppose you have an enterprise network that consists of two subnets: 192.168.1.0/24 and 192.168.2.0/24, connected by a router. If you want devices on the 192.168.1.0/24 subnet to communicate with devices on the 192.168.2.0/24 subnet, you will need to configure an entry in the router's routing table that indicates that any traffic destined for the 192.168.2.0 subnet /24 is routed through the router interface that is connected to that subnet.

  2. Another practical example is using static routes to route traffic to a web server located on a remote network. If the web server has an IP address of 203.0.113.10 and is located on the 203.0.113.0/24 subnet, you will need to add an entry to your router's routing table indicating that any traffic destined for the IP address 203.0.113.10 will be route through the default gateway of the remote network. This will allow users on your network to access the web server efficiently and without connectivity problems.

Examples using a routing table in RouterOS

Suppose you have a network consisting of two subnets: 192.168.1.0/24 and 192.168.2.0/24, connected by a MikroTik router. You want to allow devices on the 192.168.1.0/24 subnet to communicate with a server that is on the 192.168.2.0/24 subnet, but you do not want devices on the 192.168.2.0/24 subnet to communicate with the 192.168.1.0 subnet .24/XNUMX.

To achieve this, you will need to configure an entry in your MikroTik router's routing table. To do so, follow the following steps:

  1. Access the console of your MikroTik router.
  2. Navigate to the “IP” tab and click “Routes.”
  3. Click the “+” button to add a new route.
  4. In the window that appears, enter the following information:
    • In the “General” section, enter the remote network address (192.168.2.0/24) in the “Dst. Address”.
    • In the “Gateway” section, enter the IP address of the router interface that is connected to the 192.168.1.0/24 subnet in the “Gateway” field.
    • In the “Advanced” section, enter a lower metric value for this route than for the default route (for example, 5).
  5. Click “Apply” and then “OK.”

With this configuration, any traffic destined for the 192.168.2.0/24 subnet would be routed through the router interface that is connected to the 192.168.1.0/24 subnet. This way, devices on subnet 192.168.1.0/24 could communicate with the server on subnet 192.168.2.0/24, while devices on subnet 192.168.2.0/24 could not communicate with subnet 192.168.1.0/ 24.

MikroTik RouterOS routing table in version 6
MikroTik RouterOS routing table in version 7

Botton line

The routing table is essential for the operation of routers and network connectivity. It contains information about connected and remote networks, and provides the information that routers need to forward packets correctly. It is important to keep the routing table updated and configured correctly to avoid connectivity problems.

Do you want to suggest a topic?

Every week we post new content. Do you want us to talk about something specific?
Topic for the next blog

Leave a comment

Your email address will not be published. Required fields are marked with *

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011