0% found this document useful (0 votes)
18 views44 pages

1routing 1

The new distance vector for R3 is: R5 6 - R1 R2 R3 R4 R5 7 6 0 2 6 R3 receives updated DV from R2. R3 recalculates its own DV: So the correct option is: R1 7 R2 6 R3 0 R4 2 R5 6 R1 7 (7 + 0) R2 6 (6 + 0) R3 0 R4 2 (2 + 0) R5 6 (6 + 0)
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views44 pages

1routing 1

The new distance vector for R3 is: R5 6 - R1 R2 R3 R4 R5 7 6 0 2 6 R3 receives updated DV from R2. R3 recalculates its own DV: So the correct option is: R1 7 R2 6 R3 0 R4 2 R5 6 R1 7 (7 + 0) R2 6 (6 + 0) R3 0 R4 2 (2 + 0) R5 6 (6 + 0)
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Routing

Type of Routes

 Static Routes
 Default Routes
 Default Gateway
 Backup Routes
 Load-Balancing
 Dynamic Routes
Routers

 L3 device
 Separate L2 Broadcast domain
 Route traffics between subnets (Forward traffic from one network to
another)
 Select best routes and forward traffic

 Routing:
 Is the process of forwarding packets from network to network based on
destination L3 address
Routing Table

 Routing Table is a table that contains entries for all networks known by the
router. The router will use its routing table to determine which way to
forward traffic
 Routers achieve its job using two process
 Routing which is about building maps and giving directions
 Forwarding which is about moving packets between interfaces according to
the provided directions.
 Routers has RIB and FIB tables for routing and forwarding processes
correspondingly
RIB vs FIB

 Routing Information Base (RIB) table


 Every router has at least one RIB table
 Every routing protocol has its own RIB to use for selecting
the best candidate route to be inserted in the global RIB
(ip routing table)
 Several alternative paths may exist.
 Forward Information Base (FIB) table
 It is derived from RIB table.
 Stores best next-hop
 It is used for the actual forwarding process
Type of Routes

 Directly Connected Routes


 Default Route
 Default Gateway
 Static Routes
 Dynamic Routes
Routing Terminology

 Connected Networks/Interfaces
 Default Gateway
 Next Hop
 Control Plane and Data Plane
Router Planes

 Control Plane
 controls how data is forwarded
 Data Plane
 Forward the datagram from one interface (ingress) to another (egress)
Router | Data Flow Methods

 Process switching
 Relays on processor and therefore very slow (works for light traffics)
 Fast Switching
 Use caching to improve the packet forwarding performance
 Cisco Express Forwarding (CEF)
 Provide better performance
Data Flow with Process Switching
Data Flow with Fast Switching
Data Flow with Cisco Express Forwarding
Routing Terminology

 Router A has 3 connected Networks (3 directly


connected subnets)
 172.16.1.0/24
 172.17.1.0/24
 172.18.1.0/24
 Next-hop identifies the next router the traffic should
forwarded to
Static Routes

 Route information is provided by administrators


 Pros
 Easily support backup multiple interfaces/links
 Suitable for small networks with not to slowly changing topology
 Easy to configure
 No overhead on the router CPU
 More secure (no one can see or manipulate the routing table unless they get an
administrative access to the router)
 Cons
 Network changes require manual reconfiguration
 Is not scalable for large topologies
Static Routes | Cisco Router | Example

R1(config)# ip route 172.31.10.0 255.255.255.0 10.10.10.2

Destination network Next-hop address Administrative distance


for prioritizing routes
R1(config)# ip route 172.31.10.0 255.255.255.0 10.10.20.2 250
Lower is better
R1(config)# ip route 10.0.0.0 255.0.0.0 192.168.10.2 Default value is 1

R2(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.1


R2(config)# ip route 0.0.0.0 0.0.0.0 10.10.20.1 250
All other networks
Static Routes | Administrative Distance

 Administrative Distance Route Source Default AD


 Indicates the trustworthiness of a route Connected Interface 0
 0 is best and 255 is worst. Static Route 1
 255 means the route will not be used External BGP 20
EIGRP 90
OSPF 110
RIP 120
External EIGRP 170
Internal BGP 200
Unknown 255
Default route

 Default route indicate the next-hop the packet is sent to if the router has
no routing information for its destination.
 Example: R2(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.1
 0.0.0.0 with netmask of 0.0.0.0 indicates all networks, 10.10.10.1 is the decided
default next-hop address
 Default route is used in Routers
 Default gateway is similar to default route in function but it is used in Hosts
Matching with FIB Table
Example:
 FIB table has entries for the destination network addresses of
Destination address perform
0.0.0.0/0, 10.8.0.0/16, 10.9.0.0/16, 10.9.1.0/24, 10.20.0.0/16.
“AND” operation with every
 One packet received with a destination address of 10.9.1.2. netmask in FIB table
 What FIB entry will be used for forwarding traffic?
Answer:
The resulted addresses are
compared with FIB entries.
10.9.1.2
Mask result
The corresponding FIB entry
0.0.0.0/0
with the longest match will be
FIB Table Entry with longest 10.9.0.0/16 used for forwarding
match result
10.9.1.0/24
Dynamic Routing Protocols

 Functions  Purpose
 Share information between routers  Discover remote networks
 Update routing table when topology changes  Maintain up to date routing information
 Determine best path to a destination  Find best path to destinations
Routing Protocols Classification

Dynamic Routing Protocols

Interior Gateway Protocols (IGP) Exterior Gateway Protocols (EGP)

Algorithms Distance Vector Hybrid Link State Routing Path-Vector Routing


Routing Protocols Protocols Protocols Protocols

RIPv1 IGRP
Routing
Protocols Advanced DV
RIPv2 Routing Protocol EIGRP OSPF IS-IS BGP
Distance Vector vs. Link State
Distance-Vector Routing Protocols

 Routers periodically broadcast their entire


route tables.
 Route Invalidation Timers: a route will be
considered unreachable if no update
received before the expiration of the timer.
 A route pointing back to the router from
which packets were received is called
a reverse route. Split horizon is a technique
for preventing reverse routes between two
routers.
Distance-Vector

A router receives distance


vector from a neighbors
𝐶(𝑥, 𝑣) : Cost from 𝑥 to neighbor 𝑣.
𝐷𝑥(𝑦) : Estimated least Distance cost from 𝒙 to 𝒚.
𝐷𝑥(𝑦) = min{ 𝐶(𝑥, 𝑣) + 𝐷𝑣(𝑦), 𝐷𝑥(𝑦) } Saves the most recently
For each neighbor 𝑣, 𝑥 maintains 𝐷𝑣 = [𝐷𝑣(𝑦): 𝑦 ∈ 𝑁 ] received distance vector (DV)

Link Failure

Yes Received DV is
Recalculates its distance vector
different?

A router transmits its distance


vector to each of its neighbors
in a routing packet.
Distance Vector Example
R3 Routing Table
R1 To Cost via
Exercise: R1 R2 R3 R4 R5 R1 7 R2
If C(2,3)=2 then R3 new distance R1 0 1 7 8 4 1 R2 6 -
vector is (Choose one): 0
R2 1 0 6 7 3 R3 -
R1 R2 R3 R4 R5 R3 7 6 0 2 6 R4 2 -
R2
(A) R3 3 2 0 2 5 R4 8 7 2 0 4
R5 6 R2
(B) R3 3 2 0 2 6
3 6
R5 4 3 6 4 0
(C) R3 7 2 0 2 5
(D) R3 7 2 0 2 6 R5 R3
Directly connected 4 2
Calculated least costs R4
Distance Vector

 Main Issue is Routing Loops (due to periodic timers)


 It causes Count to Infinity Issue
 Occurs when a link goes down or two routers send updates at the same time

 Solutions:
 Route poisoning
 Sends route with infinity cost (16 in RIP)

 Split Horizon
 blocks information about routes from being advertised by
a router on any interface from which that information originated.
Link State Routing Protocols

 Also known as Shortest Path First Protocols


 built around Edsger Dijkstra’s shortest path first (SPF) algorithm
 More complex than distance vector
 Efficient bandwidth usage
 Calculate the routing table when have the full topology
Link-State | Step 1:
Link State of Learned Networks

Links’ State
Link 1 Link 2 Link 3 Link 4
Network 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16 10.4.0.0/16
IP 10.1.0.1 10.2.0.1 10.3.0.1 10.4.0.1
Network Type Ethernet Serial Serial Serial
Link Cost 2 20 5 20
Neighbors None R2 R3 R4
Link-State | Step 2:
Discover Neighbors

 Neighbors are only considered so if they run same link-state protocol.


 Discovered neighbors are added to the adjacency table.
Link-State | Step 3:
Building Link State Packet (LSP)

 R1’s LSP contains the following info


 R1; Ethernet network 10.1.0.0/16; Cost 2
 R1 -> R2; Serial point-to-point network; 10.2.0.0/16; Cost 20
 R1 -> R3; Serial point-to-point network; 10.3.0.0/16; Cost 5
 R1 -> R4; Serial point-to-point network; 10.4.0.0/16; Cost 20
 <Sequence number>
 <Aging info>
Link-State | Step 4:
Flooding LSP

 Each router sends its LSP to its neighbor


 Each received LSP will be immediately sent to all receivers’ neighbors.
 LSP is sent only at
 Initial startup of router process
 Topology change

 As a result network converges fast


Link-State | Step 5:
Building Link State Database

 All received LSPs are stored in the link-state database.


 Link state database is used to
 Construct a complete map of the topology
 Compute the best path to each destination network
Link-State | Step 5:
Building SPF Tree & Routing Table

 Link State Database is used to find shortest path and add it to the routing table
Link-State | Event-Driven Updates

 If topology changes, an LSP (with information of affected links only) is flooded.


Link State vs. Distance Vector |
Advantages
Link State Distance Vector
Update Event-driven Periodically
Keep-alive Short hello messages Full Routing table
Network types Multicast Broadcast
Topology Knows entire network topology NA
Cost Link Cost RIP uses Hop count
Convergence Method Immediately Flood LSP Update its routing table before flooding it
Convergence Fast Slow
Prone to loops No yes
Scalability High Limited
Hierarchical design Support the Concept of Areas NA
Link State vs. Distance Vector |
Disadvantages

Link State Distance Vector


Memory Routing table, Adjacency, Link routing table and routing database
state database, and SPF tree.
(require more memory)
CPU High Low
Bandwidth Very high for unstable networks high
requirements only
Configuration Difficult Easy
Terminologies

 Autonomous System (AS)


 Is a group of routers under the control of single authority
 IGP: Used for routing inside an AS
 EGP: Used for routing between Ases
 Classful routing: Don’t send subnet mask in routing updates
 Classless routing: Send subnet mask in routing updates
 Convergence: is defined as when all routers’ RIB are in
a state of consistency (EIGRP and OSPF have
faster convergence than RIP and IGRP)
 Summarization: suppernetting.
 Redistribution:
IGP vs BGP
Metrics

 Hop count
 Bandwidth
 Cost
 Delay
 Load
 Reliability
Best Path Selection Metrics

 RIP selects the path with the lowest hop count.


 OSPF selects the path with the lowest cost (derived from the bandwidth).
 EIGRP selects the path with the highest bandwidth and lowest delay.
Load Balancing Routes

 If AD and metric of two routes are similar then the router will load balance
between the two routes.
Redistribution
Summarization
DVR | RIP

Corp#config t
Corp(config)#router rip
Corp(config-router)#network 10.0.0.0 Connected networks
Corp(config-router)#network 172.16.0.0 to be advertised
Corp(config-router)#version 2
Corp(config-router)#no auto-summary Disable auto summarization
Convergence

You might also like