Routing
Telemática
Routing
• One of the most complex and fundamental aspects in data networks is everything related to
routing.
• In general terms, the main goal of a packet-switched network is to accept packets coming from a
host and send them to the destination network.
• It's important to remember that the main objective of the network layer is to provide end-to-end
communication between end systems (hosts).
• Thus, in simple terms, the objective of the network layer is to move a packet from a source host
to a destination host.
• For this purpose, it is necessary to determine a route for the packet to reach its destination.
Telemática
Important Aspects of the Routing Process
• Here are the most important aspects to consider for routing in networks:
• Destination network.
• Neighboring routers.
• Possible routes to all destination networks.
• The best route to reach remote networks.
• How to keep route information updated and verified.
• Routing is understood as the process of selecting the best route for a packet leaving a source
to reach a destination.
• Host.
• Routers.
Telemática
Important Aspects in the Process
• In order to move a packet from the source to the destination, two important aspects at the network
layer must occur:
• Forwarding: This happens when a packet arrives at a router's interface. What should happen is that the router
moves the packet from the incoming interface to an outgoing one.
• Routing: The router must determine the route or path the packet should take to reach its destination. This
way, the packet travels from one router to another until it reaches its destination.
• Each router along the path selects the "next hop" (next router) to which the packet should be sent.
• For this, it is necessary for each router to build and use a routing table.
• The routing table can be constructed in two ways: statically or dynamically.
Telemática
IP Routers
Dimensions:
• Physical Size
• Number of Ports
• Bandwidth
Telemática
Routers Definitions
N: Number of Ports
R: speed (“line rate”) of port
Router Capacity: NxR
N=4, R= 100Mbps
N=1, R=1Gbps
Total capacity: 0.4Gbps + 1Gbps = 1.4 Gbps
Telemática
Evolution of Router’s Capacity
Telemática
What is Inside of Router?
Router Architecture
Telemática
What is Inside of Router?
Telemática
Packet Forwarding
Telemática
Routing
Telemática
Static vs Dynamic
Routing can be classified in two ways:
• Static
• Dynamic
Telemática
Translation: Process of Routing an IP Packet
Telemática
Static Routing
• It is implemented manually by the network administrator.
• This means that the network administrator is responsible for determining the routes between
hosts.
• It implies that in each router belonging to the network topology, static routes must be entered.
• When talking about static routing, there is no communication between routers to exchange
routing information.
• When the network is small, the process is relatively simple. Aspects to consider:
• Static routes are not advertised to other routers.
• Static routing uses less bandwidth compared to dynamic routing.
• Since it is manual, its configuration is prone to errors.
• It requires the intervention of the network administrator if a change needs to be made to any route.
• It does not scale well as the network grows.
• It requires broad knowledge of the network topology
Telemática
Routing Table
Telemática
Dynamic Routing
• Dynamic routing allows routers to automatically
discover paths between networks.
• For this, it uses routing protocols.
• Routing protocols can be classified as Interior
Gateway Protocol (IGP) or Exterior Gateway
Protocol (EGP).
• This classification is based on whether they are
executed within or outside an autonomous system.
• An autonomous system (routing domain) is defined
as a collection of networks or routers under the
same network administration
Telemática
Clasification of Routing Protocols
• IGP:
• Routing Information Protocol
(RIP v1, RIP v2)
• Open Shortest Path First
(OSPF).
• Enhanced Interior Gateway
Protocol (EIGRP)
• EGP:
• Border Gateway Protocol
Telemática
Characteristics of Dynamic Routing
• It fits well for any type of topology involving multiple routers.
• It is used regardless of the size of the network.
• It automatically adjusts to changes in network topology.
• It is much more complex to implement than static routing.
• Less secure. Updates are sent.
• It consumes memory, CPU, and bandwidth.
Telemática
Routing Protocols
• They are used to facilitate the
exchange of routing information
between routers.
• Includes:
• Processes, algorithms, messages.
• They allow:
• Discovering remote networks.
• Keeping routing information up-to-
date.
• Choosing the best path to the
destination network.
• Finding a better path or route in
case of a current route failure.
Telemática
Classification of Routing Protocols
• IGP:
• Distance Vector:
• RIP v1, RIP v2, EIGRP
• Link State:
• OSPF
• EGP:
• Path Vector:
BGP
Telemática
Distance Vector Algorithm
• Basics:
• Basic routing algorithm used in computer networks.
• Also known as Bellman-Ford Algorithm.
• Features:
• Iterative.
• Asynchronous
• Distributed
• Working Principle:
• Each router maintains a table of distances to all destinations.
• Initially, each router only knows its directly connected neighbors.
• Routers exchange information periodically with neighbors (directly attached).
• Distance Vector Table:
• Each router maintains a distance vector table.
• Contains destination nodes and their respective distances.
• Updated based on information received from neighbors
Telemática
Bellman-Ford Equation
• 𝑑𝑥 𝑦 = 𝑚𝑖𝑛𝑣 𝑐 𝑥, 𝑣 + 𝑑𝑣 𝑦
• Let dx(y) be the cost of the least-cost path from node x to
node y
• 𝑚𝑖𝑛𝑣 in the equation is taken over all of x’s neighbors.
• We must begin by traveling to some neighbor v…
• Indeed, after traveling from x to v, if we then take the least-
cost path from v to y, the path cost will be 𝑐 𝑥, 𝑣 + 𝑑𝑣 𝑦
Telemática
Distance Vector Algorithm (3)
Telemática
Distance Vector Routing Protocols
• RIP (Routing Information Protocol)
• It is an Interior Gateway Protocol (IGP) designed to operate within autonomous systems.
• It is known as a distance-vector protocol.
• Specified in RFC 1058 / RFC 2453.
• It has two versions:
• V1. Does not support subnetting/VLSM.
• V2. Supports subnetting/VLSM.
• RIP as a protocol is encapsulated over the UDP transport layer protocol.
• RIP specifies two types of packets: Request packets. Response packets.
• The routing table in RIP is sent periodically every 30 seconds.
• It can also be sent to a router that requests it through a request packet
Telemática
Metric and RIP Packets
• Request: These messages are used to ask the
neighboring router to send an update of its
routing table.
• Response: These messages carry an update
regarding the routing tables.
• Metric: The metric for the RIP routing
protocol is the hop count. A value of 1 in the
metric indicates that it is a directly connected
network. A value of 16 indicates that this
network is unreachable
Telemática
Operación de RIP
1. Initialization: When a router with RIP enabled starts up, it sends request messages through all its
interfaces enabled for the RIP protocol. These messages solicit other routers to send their routing
tables.
2. Information Exchange: Routers exchange RIP messages to share their routing tables. These
messages contain information about the networks they can reach and the associated metrics for
those networks.
3. Routing Table Update: Each router updates its routing table using the information received in RIP
messages. It uses the Bellman-Ford algorithm to calculate the best routes to destination
networks.
4. Timing: RIP operates in regular update cycles. Every 30 seconds, routers send routing updates
through all their interfaces. If a router does not receive updates from a neighbor for a specific
period of time, it marks it as unreachable.
5. Convergence: As routers exchange information and update their routing tables, the RIP system
converges toward a consistent view of the network topology. This process may take time,
especially in large or complex networks
Telemática