Routing
Routing
T Haiduwa
LEARNING OUTCOMES
Understand:
• Routing concept
• Concept of switching in networks
• Path Determination (Routers, Routing Principles, Routing
Algorithms, and Routing metrics)
INTRODUCTION TO ROUTING
• A route is a path along which packets are sent from the source to the destination.
• A process of finding the best path to send data units (packets) is called Routing.
• Routing is a fundamental concept in computer networking that involves determining the best
path for data packets to travel from a source to a destination across a network.
• Routing occurs at the network layer, and it is done using routing algorithms.
• Routing involves two basic activities: determining optimal routing paths and transporting
• Packets - data units that are transmitted at the Network layer of the OSI model. It typically includes a header and payload. The header contains routing
information, such as the source and destination IP addresses, while the payload carries the actual data.
• Fragments- Fragments are smaller pieces of a packet. If packets are larger than the maximum size(lower Maximum Transmission Unit (MTU)), each packet
is divided into smaller pieces of data called fragments. Routers can fragment and reassemble packets as they traverse networks with different MTUs
• Frames – These are data units at the Data-Link Layer. They are small parts of a message in the network used to identify data and determine the way it should
be decoded and interpreted. It consists of a frame header, payload, and frame trailer. The header contains source and destination MAC addresses, while the
trailer often includes error-checking information like a cyclic redundancy check (CRC).
• Segments- are data units in the Transport Layer. They are broken pieces of a packet with a TCP header in each of them. They are created when data from the
application layer is divided into manageable pieces for transmission. Segments have a header with information like source and destination port numbers and
sequence numbers.
• Datagram –The term "datagram" can refer to different things depending on context.
• In the transport layer, a datagram is essentially a segment of data encapsulated in a transport layer header.
• In the network layer, a datagram refers to an independent, self-contained unit of data that is routed across a network.
PATH DETERMINATION
• Path Determination refers to finding the best path to send packets.
• Routers communicate with one another and maintain their routing tables through the transmission
of a variety of messages.
• Routers select the best paths according to some parameters. E.g.,
1. Longest Match
2. Administrative Distance
3. Metric.
• The best path is selected by a routing protocol based on the value or metric.
• Routing protocols use metrics to evaluate what path will be the best for a packet to travel.
• A metric is a quantitative value of measurement used to measure the distance to a given network.
• Routers use routing algorithms (i.e., Dijkstra shortest path algorithm) to aid the process of path
determination(find the best route to a destination).
ROUTING METRICS
• Routers use various metrics to evaluate the best path.
• Common metrics include:
1.Hop Count: The number of routers a packet must traverse(pass through) to
reach its destination.
2.Bandwidth: The available data rate on a network link.
3.Latency: The delay experienced when transmitting data across a link.
4.Cost: A value assigned to a link to indicate its desirability.
ROUTING ALGORITHMS
• Routing algorithms are used by routers to determine the optimal path for data
packets.
• Routing algorithms initialize and maintain routing tables.
• Routing Tables store these routes (route information).
• Common routing algorithms include:
1. Static Routing: Manual configuration of routes by a network administrator.
Suitable for small networks with simple topologies.
2. Dynamic Routing: Automated routing based on algorithms and network
conditions. Examples include RIP, OSPF, and BGP.
ROUTING DECISIONS
• A primary function of a router is to determine the best path to use to send
packets.
• To determine the best path, the router searches its routing table for a
network address that matches the destination IP address of the packet.
LOGIC FLOWCHART OF PACKET-FORWARDING DECISION PROCESS
THREE DIFFERENT ALTERNATIVES OF PATH DETERMINATIONS
• Directly connected network: If the destination IP address of the packet belongs to a device
on a network that is directly connected to one of the interfaces of the router, that packet is
forwarded directly to the destination device.
• Remote network: If the destination IP address of the packet belongs to a remote network,
then the packet is forwarded to another router.
• No route determined: If the destination IP address of the packet does not belong to either a
connected or remote network, the router determines if there is a Gateway of Last Resort
available. Data is sent to the default route if are there any default route or gateway of last
resort. If there is no default route or gateway of last resort, the packet is dropped.
TYPES OF ROUTING
• Types of Routing
1.Unicast Routing: Routing data from one source to one specific destination.
2.Multicast Routing: Routing data from one source to multiple destinations.
3.Broadcast Routing: Routing data from one source to all destinations in the network.
INTERNET ROUTING
• The global internet uses a complex hierarchy of routers and routing protocols.