You are on page 1of 5

C4.

Objectives
Identify the role of the Network Layer, as it describes communication from one end device to another end device Understand the fundamentals of routes, next hop addresses and packet forwarding to a destination network

Routing

When a packet leaves a host, where the packet go depends on the location of the destination host.
Done by examining the network portion of the destination address. If the destination host is on the same network, the packet will be sent to the local network. If the destination host is on a different network, the packet will be delivered to the gateway router.

The gateway (also called default gateway) is a door between the local network and the outside network.

Routing

Routing
In traveling from the source host to the destination host, a packet may cross many networks through many routers.
At each router, the router must make a forwarding decision. Decide where to forward the packet next. This process is also known as routing.

The packet is then forwarded to the next-hop router.


The packet forwarding then becomes the responsibility of the next router.

The process is repeated until the packet arrives at the destination host.

Gateway Gateway
The gateway is a router with one of its interfaces connected to the local network.
This interface will have an IP address that has its network portion equal to the network portion of the addresses of the other hosts in the local network.

The default gateway must be configured in every hosts in the network.


On a Windows computer, the Internet Protocol (TCP/IP) Properties tools are used to enter the default gateway address.

Route
Each host and router must have routes specified for packets to be forwarded.
A route is defined in terms of the next-hop router. For a particular destination address, the packet will be forwarded accordingly based on the route specified on the device. Without a route, the packet cannot be forwarded and may have to be discarded.

Route

The routes are stored in the devices routing table. The routing process will use the destination IP address to identify the proper route to be used.
Done by referring to the network portion of the destination IP address.

Route
By default, a device knows the route to the network that it is directly connected to.
The network directly attached to the devices network interface.

Route

All other routes, however, must be configured or acquired via a routing protocol.
These are routes to remote networks.

Routes in a routing table have three main features:


Destination network Next-hop Metric

10

Route
When a packet comes in, the router will check whether the destination network is specified in the routing table.
If it is, the packet will be forwarded to the next-hop router specified by that route. If not, the packet will be forwarded to a default route. The default route needs to be configured into the router.

Route
A host also has its own routing table.
This table is used to forward packets originating from that host.

The hosts routing table is derived automatically from the connected network and the configuration of the default gateway.
The default gateway acts like the local default route.

If there exists multiple paths to the same destination, the metric is used by the routing process to decide which route will appear in the routing table.

The routing table of the host contains:


Its direct connection or connections to the network. Its own default route to the gateway.

11

12

Route

Routing tables
The destination network shown in the routing table represents a range of host addresses or a range of network and host addresses. The hierarchical nature of IP address allows one entry to represent a large general network and another entry to represent a subnet in that same network. When forwarding a packet, the router will take the most specific route.
A packet may match two entries in the table, one for a subnet, one for a larger, general network. In this case, the route for the subnet will be chosen.

13

14

Packet forwarding Routing tables


If a specific subnet is not in the routing table but the larger network that holds the subnet is known, the router will send the packet to the larger network.
Trusting that another router will find the subnet.

Routing is done packet-by-packet and hop-by-hop. Each packet is treated independently in each router along the path. At each hop, the router examines the destination IP address for each packet and then checks the routing table for forwarding information. The router will do one of three things to the packet:
Forward it to the next-hop router Forward it to the destination host Drop it

If none of the entry in the routing table matches the destination address, the default route will be chosen. If no default route is configured, the packet has to be dropped.

15

16

Packet forwarding

Packet forwarding

17

18

Packet forwarding

Static Routing
If the internetwork structure changes or if new networks become available, these changes have to be manually updated on the routers involved.
Static routing has a high administrative cost. Network administrator has to actively monitor the network to see whether the configured routes are still valid and up-to-date.

If updating is not done in a timely fashion, the routing information may be incomplete or inaccurate.
This will result in packet delays and possible packet loss.

In static routing, routes to remote networks are manually configured in the router.
Default routes are normally statically configured.

The decision on routes to be taken must be made by the network administrator.


19 20

Static Routing

Dynamic Routing
In dynamic routing, routers learn routes automatically from other routers in the same internetwork.
Routers send routing updates to each other.

Routing messages are sent using a routing protocol. Dynamic routing has higher processing and bandwidth overhead.
Due to the need send, receive and process routing messages. However, once configured, the routers can manage routes themselves with little intervention from network administrators.

21

22

Dynamic routing Routing Protocols


Routing protocol is a set of rules by which routers dynamically share their routing information. When a router detects any change in the network, it will update its routing table and pass this information to the other routers.
The change can be in the form of link failures, the availability of a new network, change in link metric, etc.

The other routers will receive this update information and in turn will update their routing tables as well. The goal is to make sure all routers in the network to have an up-to-date information about the network.
23 24

Routing Protocols
Routing protocols commonly used in the Internet are:
Routing Information Protocol (RIP) Open Shortest Path First (OSPF) Enhanced Interior Gateway Protocol (EIGRP)

All routers in the network must be using the same routing protocol. Regardless of the routing protocol used, they all do pretty much the same functions:
To distribute updated network information. To update the routing table entries of a router.

25

You might also like