What is a Router in Networking and How Does it Work?

What is a Router in Networking and How Does it Work?

Alexander

Devices that transmit IP packets from one network to another are called routers. Router devices play a role in switching addresses between networks and perform this switching according to logical addresses.

Basically, routers consist of the following components;

  • ROM
  • RAM
  • Motherboard
  • CPU

In addition to these components, there are interfaces for communicating with the network environment. There are also AUX and Console ports that allow us to configure the Router.

A rollover cable is required to configure the router using the console port. This cable usually comes with the device.

The AUX port is also used for configuration. However, the router is also configured remotely via a modem to be connected to the aux port if necessary.

Routers use the routing tables on the incoming packets. These tables contain the target network and the interface to which the packet will be routed to reach the target network.

Routers are the gateways of the networks to which they are connected through their interfaces. Since communication between different networks is provided through routers, packets to other networks are sent over routers and therefore routers become gateways to the networks in which they are located.

Packages to be routed through routers can be filtered through the access control lists to be created. I will discuss the Access list in detail in the following articles.

To view the routing table on the Cisco router

When in Privileged exec mode, we need to use the ip show ip route ”command.

When we view the routing table with the help of the command;

Devices that transmit IP packets from one network to another are called routers. Router devices play a role in switching addresses between networks and perform this switching according to logical addresses.

Basically, routers consist of the following components;

  • ROM
  • RAM
  • Motherboard
  • CPU

In addition to these components, there are interfaces for communicating with the network environment. There are also AUX and Console ports that allow us to configure the Router.

A rollover cable is required to configure the router using the console port. This cable usually comes with the device.

The AUX port is also used for configuration. However, the router is also configured remotely via a modem to be connected to the aux port if necessary.

Routers use the routing tables on the incoming packets. These tables contain the target network and the interface to which the packet will be routed to reach the target network.

Routers are the gateways of the networks to which they are connected through their interfaces. Since communication between different networks is provided through routers, packets to other networks are sent over routers and therefore routers become gateways to the networks in which they are located.

Packages to be routed through routers can be filtered through the access control lists to be created. I will discuss the Access list in detail in the following articles.

To view the routing table on the Cisco router

When in Privileged exec mode, we need to use the ip show ip route command.

For example, in the following example, the routing table on the router is displayed with the command ip show ip route ”. According to this output;

Part 1 is the way in which the router learns the route information, and part 2 is the gateway to which the packet will go to the learned network.

Routers can access the target networks in many ways. The aim is to find and select the most suitable route to the target network by various methods and add it to the routing table. The methods used vary according to the routing protocol running on the router. I will discuss them in detail in the following sections.

The entries in the routing table vary. If we explain them with a sentence;

Directly Connected: It refers to the networks connected directly to the router.

Static Routing: It is the manual entry of the route to the destination network by admin.

Dynamic Routing: Learning the target routes using routing protocols.

Default Route: Route information used to send data to unknown networks other than statically or dynamically learned networks.

The default route is the route information used for packets to be sent to networks other than learned networks. The IP address is 0.0.0.0 and the mask is 0.0.0.0. When a packet arrives on the router, the router tries to match the networks on the routing table with the destination address on the packet to send the packet to the destination network. If it does not find any matching networks, it sends the packet to the destination using the default route information at the bottom of the routing table.

Routers use a variety of values ​​to learn the shortest routes to destination networks. These values ​​are Bandwidth, delay, hop count and cost. Apart from these, it can be used as an option with different values.

For example, consider the following figure, network A to B network can be accessed in two different ways. Some routing protocols are based on Bandwidth, while others are based on the number of routers between two networks called Hop Count.

Since hop count based routing protocols pass through fewer routers when accessing the target network, they prefer 56KB/s as follows.

Some routing protocols prefer the wide path with bandwidth. For this, they take into account the metric values. Bandwith is wide means that the metric is low. Cost is the metric value of the line. The sum of the costs of the lines going to the target network gives the total metric value of the line that provides access to the target network.

Delay delays on the way during packet transmission. Too many routers on the line will increase switching times. This creates a delay during packet transmission. Routing tables are minimized by techniques such as summarization to reduce delay. This minimizes the delay during switching.

Routing Protocols:

Routers use various protocols to dynamically share route information. These protocols are called routing protocols.

Routing protocols are of three types;

  • Distance Vector Routing Protocols
  • Link State Routing Protocols
  • Hybrid Routing Protocols

Distance Vector Routing Protocols:

Distance vector routing protocols send routing tables directly to each other when sharing routing information. In this way, each router shares the network information that it has directly connected with the neighboring routers. As a result of this sharing process, all routers in the environment become aware of all networks. This is called ver convergence ası when all routers are aware of all networks. The faster routers reach convergence in an organization, the better the network is designed.

Distance vector protocols are;

  • RIP (Industry standard)
  • EIGRP (Developed by Cisco)

Link State Routing Protocols:

Link-state routing protocols do not send routing tables to each other as routing information. They send line status information. This line information they send is called LSA (Link state advertisement). They send LSAs not only to their neighbors but to all routers on the network. They use multicast addresses when sending these LSAs. This is because all routers in the environment send LSA packages to all other routers in the environment. Since routers receive LSA information from all routers in the environment, each router knows the topology of the network.

Routers accumulate incoming LSAs in the link-state database. With these accumulated LSAs, each router puts itself at the top and forms a tree structure. In this way, it extends the topology table by branching. Then, the shortest paths to the target networks are determined by SPF (shortest path first) algorithm that is run on this topology table and these routes are processed into the routing table.

Link-state routing protocols reach convergence more quickly. However, there are some disadvantages. They use the processing power of the routers until they reach Convergence, and because each router must send LSA packets to all routers in the environment, they generate a lot of traffic on the network.

Once the Convergence is reached, only the changes are sent to other routers in the environment with LSA packages.

Examples of link-state routing protocols are;

  • OSPF
  • IS-IS

Hybrid Routing Protocols:

EIGRP is an example of this group. Because as a routing update, it sends routing tables to its neighbors. But when sending routing tables, it only sends the changing parts of the routing table. Metric values ​​are also used by EIGRP to select the route to the destination network. The hybrid protocol is called because it acts as both distance vector and link-state routing protocols.

References

Report Page