Routing Tables

A router interprets network traffic and makes a decision, depending on its programming, as to where to send that traffic.

Routers are layer-3 switching devices, they work at layer 3 of the OSI model.

1. Physical
2. Data-Link
3. Network
4. Transport
5. Session
6. Presentation
7. Application

A Router is a layer-3 device, a switch or bridge are layer-2 devices and hubs are layer-1 devices. Hubs, like a network cable, are purely physical, they do no interpretation or deciding, they just echo the network packets. A switch or bridge, on the other hand, works at the data-link layer, in the case of a switch they use the MAC address to intelligently determine which physical wire needs a packet.

A layer 3 device deals with network addresses, or IP addresses instead of MAC addresses. The MAC (Media Access Control) address is part of every NIC and switch in the world. A switch probably has between 4 and 16 MAC addresses. The Router has MAC addresses, generally for every port. The layer two device, the switch for example, connects devices at layer 2, MAC to MAC. The layer 3 device works with network addresses. If a router is using IP, and it gets a packet addressed to (for example) 111.22.33.4, it will try to get the packet to the computer with that IP address.

Routers usually do not connect to a lot of other devices, rather the internet is made up of a lot of routers. When a router receives a packet, it does not actually send it directly to your computer, it sends it to a router closer to your computer. This is called a hop.

Routing tables.

A routing table is programmed into the router. A routing table has two main fields for each entry: An address, and a connection. So if computer A is sending a packet to computer B, at some point a Router is encountered that sends that packet to the US.

A -> R1 -> R2(US) -> B
|
V
R3

0 Replies to “Routing Tables”

Leave a Reply

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