0% found this document useful (0 votes)
15 views

CSNETWK 06 Routing Forwarding Summary

Routing_Forwarding_Summary
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)
15 views

CSNETWK 06 Routing Forwarding Summary

Routing_Forwarding_Summary
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/ 26

SUMMARY

Routing and Forwarding


NETWORK (IP) LAYER
• At the Network Layer, protocols facilitate the forwarding of
Transport Layer Protocol Data Units (PDUs) between hosts.
These PDUs are known as packets at the Network Layer,
which oversees the delivery of packets from host to host.
• At this layer, segments are transferred using the services
provided by the Data Link Layer. The Network Layer
protocol encapsulates these segments and adds its own
protocol information to create a packet. Upon reaching its
destination, this process is known as decapsulation or de-
encapsulation.
• The Data Link Layer manages communication over a specific
link (node-to-node communication), while the Transport
Layer ensures logical end-to-end transport or
communication between processes (process-to-process
communication).
SERVICES AND PROTOCOLS
mobile network
1. The Network Layer at the sending host retrieves
national or global ISP segments from its Transport Layer.
2. It encapsulates each segment into datagrams.
application 3. These datagrams are then sent to the nearest router.
transport
network
link
4. At the receiving host, the Network Layer accepts
physical datagrams from its nearby router.
network network
link
physical
link
physical
5. It extracts the Transport Layer segments from the
received datagrams.
network
link network
6. Finally, the Network Layer delivers these segments up
physical link
physical network
to the Transport Layer at the receiving host.
link datacenter
physical network In every host and router within the network, there is an
important component of the Network Layer. Routers
application
with truncated protocol stacks—lacking upper layers such
transport as Transport and Application Layers—do not implement
network
enterprise link Application- and Transport-Layer protocols.
network physical
TWO KEY NETWORK-LAYER
FUNCTIONS
• Forwarding: This involves transferring a packet from an incoming link to
an outgoing link within a single router.
• Data plane: This refers to the local, per-router actions of forwarding or
moving a datagram from an input link to an output link at a router.

• Routing: Involves all routers in the network, whose collective interactions


via routing protocols determine the paths that packets take from source to
destination nodes.
• Control plane: This manages the network-wide process that provides an
end-to-end view of routing packets from one edge of the network to the
other. It involves coordinating and managing all devices interconnected on
the Internet.
TWO KEY NETWORK-LAYER
FUNCTIONS
• A packet arrives at a router
with a header field value of
Routing 0111.
Algorithm
control
plane • The router consults its
data forwarding table and identifies
plane that the output link interface
for this packet is interface 2.
• The routing algorithm
values in arriving
packet header
calculates and updates the
0111 1
values that are to be inserted
2
into the router's forwarding
3
tables.
STATIC ROUTING
• Routing involves selecting and defining paths for IP packet traffic across an
internetwork, from source to destination.

• Routers are responsible for transferring packets between different


networks.

• Routers learn about remote networks through either dynamic routing


protocols or manual configuration with static routes:
• Static Routing is the manual configuration of network routers.
• For full connectivity, a static route to every network must be configured on every
router.
• Static routes to network destinations are unchangeable, making static routing not
fault-tolerant. Any changes to the routing infrastructure require manual intervention.
STATIC ROUTING
PROS CONS
• No CPU cycles are used on route calculation • Proper implementation requires complete
and communication. knowledge of the network topology.
• There is no CPU or memory overhead. • Configuration and maintenance requires
administrator intervention, which is highly
• Static routing avoids bandwidth consumption
time-consuming.
since routers do not exchange route updates.
• Security is enhanced as static routes are not
advertised over the network.
• Implementation is straightforward in small
networks.
• The route to the destination remains constant.
• No dynamic routing algorithm is necessary.
STATIC ROUTING
Static routing has three primary uses:
1. Predictable Network Traffic: It is ideal for environments where
network traffic patterns are consistent and predictable.
2. Simple Network Design: Static routes are beneficial for smaller
networks with straightforward designs, particularly those with a
single path to an external network.
3. Routing to Stub Networks: It efficiently handles routing to and from
stub networks. A stub network is accessed via a single route, and
the router typically connects to only one neighbor.
STATIC ROUTING
Two Types of Static Routes:
1. Standard Static Route: This type is used to connect to a specific remote network. It
is commonly used for connecting to stub networks but can also be configured to
connect to any network.
2. Default Static Route: This route applies to all packets and specifies the gateway IP
address to which the router forwards IP packets that do not match any learned or
static routes. A default static route is defined by the destination IPv4 address 0.0.0.0/0.
Configuring a default static route establishes a Gateway of Last Resort.
• Default static routes are used:
• When no other routes in the routing table match the packet destination IP address.
• When a more specific match does not exist.
• When a router is connected to only one other router, a condition known as a stub router.
STATIC ROUTING
Configuring static routes requires the following parameters:
• Network address of the destination remote network
• Subnet mask of the destination remote network
• Next-hop router IP address is the IP address of the router OR;
• Exit interface which is the exit point interface on the router
DYNAMIC ROUTING
• Dynamic Routing involves routers continuously exchanging
network status updates and dynamically sharing routing information.

• Routing updates are transmitted by routing protocols.

• A routing protocol consists of processes, algorithms, and messages


that enable routers to exchange routing information. It dynamically
selects the best path available or adjusts to changes in the routing
infrastructure, facilitating the exchange of routing information
between routers.
DYNAMIC ROUTING
The purpose of dynamic routing protocols include:
• Discovering remote networks.
• Maintaining current routing information.
• Determining the best path to destination networks.
• Automatically finding an alternative best path if the current path
becomes unavailable.
DYNAMIC ROUTING
• Routing protocols enable routers to dynamically exchange
information about remote networks and automatically update their
routing tables with this information. These protocols determine the
best path or route to each network, which is then added to the
routing table.

• A key advantage of dynamic routing protocols is their ability to


facilitate automatic information exchange among routers in response
to changes in network topology. This capability allows routers to
discover new networks and identify alternative paths in the event of a
link failure to an existing network.
DYNAMIC ROUTING
PROS CONS
• Applicable to all topologies requiring • Initial implementation can be more
multiple routers. complex.
• Generally independent of network • Less secure due to broadcast and
size. multicast routing updates, requiring
• Automatically adjusts the network additional security configuration
topology to reroute traffic as settings.
necessary. • Requires additional resources such as
CPU, memory, and link bandwidth.
DYNAMIC ROUTING
Most routing protocols are classified into two main categories:
Distance Vector or Link State.
Distance Vector routing involves advertising routes with
two main characteristics: 172.16.3.0/24
• Distance: This indicates the distance to the R1 S0/0/0 R2
destination network and is measured using metrics
such as hop count, cost, bandwidth, delay, etc. If hop R1: 1 7 2 .1 6 .3 .0 /2 4 i s one hop aw ay
count is used as the metric, each router through (distance) a n d c a n be reached through
which a packet passes is counted as one hop. The R2 via S 0 / 0 / 0 interface (vector)
route with the fewest hops is considered the best
route.
• Vector: This specifies the direction (next-hop router
or exit interface) to reach the destination network.
DYNAMIC ROUTING
• A router using a distance vector protocol lacks knowledge of the
entire path to a destination network or an actual map of the
network topology. Instead, it broadcasts its entire routing table to
directly connected neighbors.

• These protocols treat routers as signposts along the path to the


destination network. The only information a router has about a
remote network is the distance or metric to reach it and which
path or interface to use.
DYNAMIC ROUTING
The following describes the characteristics, operations, and functionality
of distance vector routing protocols:
• Distance vector routing protocols exchange updates with neighboring
routers. Some distance vector protocols, like RIP, send periodic
updates to all neighbors (e.g., RIP updates every 30 seconds).
• Neighbors are routers that share a link and are configured with the
same routing protocol.
• A router using distance vector routing knows only the network
addresses of its own interfaces and the remote network addresses
reachable through its neighbors.
• Routers using distance vector routing protocols are not aware of the
entire network topology.
DYNAMIC ROUTING
• In contrast to distance vector routing protocols, a
router configured with a link state routing
protocol can create a complete view of the
network topology by gathering information from R4
all other routers.

• Unlike distance vector routing protocols, where


routers act as signposts along the path, in link
state routing protocols, all routers use an identical
map of the network. Link update
fromR2R1
• A link state router uses the gathered link state
information to create a detailed topology map and
to determine the best paths to all destination
networks within the topology.
Link update
172.16.3.0/24
froRm1 R1 R3
ROUTING PROTOCOL METRICS
• In some scenarios, a routing protocol may discover multiple routes to the same
destination.

• To determine the best path among these routes, the routing protocol evaluates
and distinguishes between them using routing metrics.

• Routing metrics are measurable values assigned by the routing protocol to


different routes based on their perceived quality or efficiency.

• When multiple paths to the same remote network exist, routing metrics are used
to calculate the overall 'cost' of each path from source to destination. Routing
protocols select the best path by choosing the route with the lowest cost.
ROUTING PROTOCOL METRICS
Routing protocols employ various metrics that are • Both RIP and OSPF routing protocols are
specific to each protocol. These metrics are not directly enabled on R1.
comparable across different routing protocols, which
means that two different protocols may choose • RIP determines the best route based on the
different paths to reach the same destination. For fewest number of hops. Therefore, when a packet
instance, consider the scenario where PC1 needs to arrives at R1 destined for PC2, it would choose
send a packet to PC2: to send it directly to R2, even though this link
172.16.1.0/24 may be slower than others.
PC2 • In contrast, OSPF selects the best route based on
the highest available bandwidth. Thus, when a
packet arrives at R1 for PC2, OSPF would direct
OSPF
RI

it to R3, which then forwards it to R2 via a faster


P

R2 link.
56kbps • In summary, RIP prioritizes the shortest hop
PC1 OSP
count path, while OSPF prioritizes faster links.
R1 R3
F
172.16.3.0/24
ROUTING INFORMATION
PROTOCOLS
• RIPv1 broadcasts updates to all its neighbors using the all-hosts IPv4
address 255.255.255.255.

• In contrast, RIPv2 uses multicast addresses to ensure that only


relevant neighbors receive updates. Additionally, RIPv2 supports an
authentication mechanism to secure routing table updates exchanged
between neighbors.
LINK STATE PROTOCOLS
The following describes the characteristics, operations, and functionality
of link state routing protocols:
• Link state routing protocols, also known as shortest path first
protocols, are based on Dijkstra’s shortest path first (SPF)
algorithm. This algorithm calculates the accumulated costs along
each path from source to destination to determine the total route
cost.
• Although link state routing protocols are often perceived as more
complex than distance vector counterparts, their basic functionality
and configuration are straightforward.
LINK STATE PROTOCOLS
Shortest Path for host on R2 LAN to reach host on R3 LAN:
This means the total cost for
R2 to R1 (20) + R1 to R3(5) + R3 to LAN (2) = 27
the shortest path from R2 to
send packets to the LAN
attached to R3 is 27. Each
router independently
determines its own cost to each
destination in the topology
using the SPF (Shortest Path
First) algorithm. In other words,
each router calculates the
shortest path based on its own
perspective.
LINK STATE UPDATE PROCESS
• Link State Updates (LSUs) are the packets used for OSPF routing
updates.

• In link state routing protocols, a 'link' refers to an interface on a


router.

• Information regarding the status of these links is referred to as 'link


states'.
LINK STATE UPDATE PROCESS
All routers in an OSPF area will complete the following generic link state routing
process to reach a state of convergence:
1. Each router learns about its own links, its own directly connected network.
2. Each router is responsible for meeting its neighbors on directly connected
networks.
3. Each router builds an LSP containing the state of each directly connected link.
4. Each router floods the LSP to all neighbors, who then store all LSPs received in
a database.
5. Each router uses the database to construct a complete map of the topology
and computes the best path to each destination network.

Eventually, all routers receive an LSP from every other link state router in the
routing area. These LSPs are stored in the link state database.
SHORTEST PATH (FROM R1)
10.5.0.0/16
Destination Shortest Path Cost Using link state
2 10.5.0.0/16 R1 → R2 22 information from all
10.6.0.0/16 R1 → R3 7 other routers, R1 begins
10.2.0.0/16
R2
10.7.0.0/16
10.8.0.0/16
R1 → R3
R1 → R3→R4
15
17
constructing an SPF tree
10 10.9.0.0/16
20 10.9.0.0/16 R1→R2 30 of the network. The SPF
10.6.0.0/16 10.11.0.0/16 10.10.0.0/16 R1 → R3→R4 25 algorithm initially
2 5 2 10.11.0.0/16
R1 → R3→R4
→R5 27 examines each router's
R1 10.3.0.0/16 R3 2 R5 Link State Packet (LSP) to
10.1.0.0/16 10 Each router within identify networks and
20 10 10.7.0.0/16
10.10.0.0/16 the OSPF routing their associated costs. It
10.4.0.0/16
area utilizes the link then computes the
shortest paths to each
R4
state database and network, resulting in the
2 SPF (Shortest Path creation of the SPF tree.
10.8.0.0/16 First) algorithm to
construct the SPF
tree.

You might also like