Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 58

CHAPTER II

ROUTING PROTOCOLS CONCEPTS


CONTENTS

 Concepts of Routing
 Routing Protocols and Algorithms
 Exterior Routing Protocols
 The Border Gateway Protocol (BGP)

 Interior Routing Protocols


 Routing Information protocol (RIP)
 The Open Shortest Path First Routing Protocol (OSPF)
 The Enhanced / Interior Gateway Routing Protocol (IGRP/ EIGRP)

 Routing with Bridges


 Fixed Routing

 Congestion Control
 Multicasting
What’s Routing

Routing - path finding from one end to the other


 Routing occurs at layer 3
 Bridging occurs at layer 2
Application layer Application layer
Presentation layer Presentation layer
Session layer Session layer
Transport layer Transport layer
Network layer Network layer Network layer
Data link layer Data link layer Data link layer
Physical link Physical link Physical link

Network A Network B

3
IP Routing

 IP performs:
 search for a matching host address
 search for a matching network address
 search for a default entry
 Routing done by IP router, when it searches the routing table and decide which
interface to end a packet out.

incoming

which interface ?

4
Routing Tables
 Routing is carried out in a router by consulting/accessing a routing table.
 Routing algorithms uses the most similar path (i.e., a path with the highest
similarity to the given network by its prefix) to route a packet.
 No unique format for routing tables, typically table contains:
 address of a destination
 IP address of next hop router
 network interface to be used
 subnet mask for the this interface
 distance to the destination

Pre: preference value of a protocol.


D: download to Forwarding Information Based (FBI)
5
R: relay
Routing Components

 Three important routing elements :


 algorithm
 database
 protocol
 Algorithm : can be differentiate based on several key characteristics
 Database : table in routers or routing table
 Protocol: the way information for routing to be gathered and distributed

6
Routing Algorithm

Design goals

Optimality - compute the best route


Simplicity/low overhead - efficient with a minimum software and utilization
overhead
Robustness/stability- perform correctly in the face of unusual circumstances
Rapid convergence- responds quickly when the network changes
Flexibility- accurate adapt to a variety of network

7
Routing Protocols

 Routing protocol : protocol


to exchange of information between routers
about the current state of the network
 Routing protocol jobs
 create routing table entries
 keep routing table up-to-date
 compute the best choice for the next hop router

Routing Metrics
 How do we decide that one route is better than another?
 Solution : using a metric as a measurement to compare routes
 Metrics may be distance, throughput, delay, Hop count, error rate, bandwidth, Load and
Reliability.

8
Routing Algorithm Types

Static V.S. Dynamic


Source routing V.S. Hop-by-hop
Centralize V.S. Distributed
Distance vector V.S. Link state

9
Routing Algorithm: Static Route

 Manually configuration routing table


 Can’t react dynamically to network change such as router’s crash
 Work well with small network or simple topology
 Unix hosts use command route to add an entry

point to point
connection

route to this
way only, no need
for update

10
Dynamic Routing Protocols

 Function(s) of Dynamic Routing Protocols:


-Dynamically share information between routers.
-Automatically update routing table when topology changes.
-Determine best path to a destination.

 The purpose of a dynamic routing protocol is to:


-Discover remote networks
-Maintaining up-to-date routing information
-Choosing the best path to destination networks
-Ability to find a new best path if the current path is no longer
available

11
Dynamic Routing Protocols

 Components of a routing protocol


Algorithm
 In the case of a routing protocol algorithms are used for facilitating routing information and best path determination
Routing protocol messages
 These are messages for discovering neighbors and exchange of routing information

•Advantages of static routing


-It can backup multiple interfaces/networks on a
router
-Easy to configure for small networks
-No extra resources are needed
-More secure

•Disadvantages of static routing


-Network changes require manual reconfiguration
-Does not scale well in large topologies

12
Internet Routing Architecture

Autonomous
System
EGP/BGP
IGP EGP/BGP
IGP
IGP

Autonomous BGP4 BGP4


Autonomous
System
System
BGP4
IGP IGP

EGP/BGP EGP/BGP EGP/BGP EGP/BGP Autonomous


System
IGP IGP IGP
IGP
Autonomous
System

13
Gateway Protocol

 Interior gateway protocol


 exchange routing information between routers within a single AS
 RIP, RIP II, OSPF, IS-IS, EIGRP (CISCO proprietary)

 Exterior gateway protocol


 collect network-reachability information for the AS
 EGP, BGP

 Use different metrics.


 RIP (one hop count, how many networks a packet crosses), Networks are treated equally
 BGP (depend on the policy, set by administrator)
 OSPF (TOS, minimize delay, maximize throughput)

14
Exterior Routing Protocols

Problems:
Topology: The Internet is a complex mesh of different AS’s with very little
structure.
Autonomy of AS’s: Each AS defines link costs in different ways, so not
possible to find lowest cost paths.
Trust: Some AS’s can’t trust others to advertise good routes (e.g. two
competing backbone providers), or to protect the privacy of their traffic (e.g.
two warring nations).
Policies: Different AS’s have different objectives (e.g. route over fewest hops;
use one provider rather than another).

15
Autonomous System
 AS is a collection of LANs and WANs and the interconnecting routers which under the control of one
management authority
 The same AS runs the same Interior Gateway Protocol
 Why setting up AS? - establish a direct link to each other rather than route through the core Internet
 Usually under single ownership, trust and administrative control
 How to select AS? - register and get the AS number from Internet Architecture Board (IAB
 Collection of networks with same routing policy
 Single routing protocol AS 100

16
Border Gateway Protocol

 Routing Protocol used to exchange routing information between networks


 exterior gateway protocol
 Runs over TCP: it support triggered update instead of periodic update just like other
dynamic routing algorithm.
 Path Vector Protocol
 Incremental Updates
 Many options for policy enforcement
 Classless Inter Domain Routing (CIDR)
 Support MPLS/VPN applications and transits VPN routes.
 It support route summarization and dampening/suppressing functions to prevent route
flapping, enhancing network stability.

17
Border Gateway Protocol (BGP-4)

 BGP is not a link-state or distance-vector routing protocol.


 BGP advertises complete paths (a list of AS’s). It select a route based on
the path attributes.
 Example of path advertisement:
“The network 171.64/16 can be reached via the path {AS1, AS5, AS13}”.
 Paths with loops are detected locally and ignored.
 Local policies pick the preferred path among options.
 When a link/router fails, the path is “withdrawn”.

18
BGP (continued)

 Messages are sent over TCP connections on port 179.


 Functional procedures
 Neighbor acquisition (open message, acceptance through Keepalive message)
 Neighbor reachability (periodic Keepalive messages)
 Network reachability (broadcast an update message)
 Each routers maintains a database of networks that can be reached
 + preferred route to this network.

 RFC does not address


 How a router knows the address of another router.
 Up to network admin.
19
BGP peer relationship

 The router that first starts BGP initiates a TCP connection.


 After the three-way handshake is complete, R1 &R2 send
Open messages carrying parameters to each other to establish
a peer relationship.
 After the negotiation, R1 & R2 send keep-alive message to
each other, the two routers establish a peer relationship.
 R1 & R2 periodically send keep-alive messages to maintain
the connection.
 The Open message carries the following information:
 My AS
 Hold Time: a time to send keep-alive message
 BGP Identifier: indicates the router ID of the local
router.
Internal BGP Peering (iBGP)

 Topology independent
 Each iBGP speaker must
peer with every other iBGP AS 100
speaker in the AS D
A
 BGP peer within the same AS B
 Not required to be directly
connected
 iBGP speakers need to be fully
meshed
 they originate connected networks E
 they do not pass on prefixes learned
from other iBGP speakers

21
External BGP Peering (eBGP)

AS 100 AS 101
C

 Between BGP speakers in different AS


 Should be directly connected
 Do not run an IGP between eBGP peers

22
Interior Routing Protocols

 RIP
Uses distributed Bellman-Ford algorithm.
Updates sent every 30 seconds.
No authentication.
Originally in BSD UNIX.

 OSPF
Link-state updates sent (using flooding) as and when required.
Every router runs Dijkstra’s algorithm.
Authenticated updates.
Autonomous system may be partitioned into “areas”.

23
RIP timers

 Periodic timer: control advertising of regular update messages (25-35 sec)

 Expiration timer: governs the validity of a route (180 sec)


 Every time an update (on a 30 sec average) is received the timer is reset
 If no update received within this timer the metric is set to 16

 Garbage timer: 120 sec


 A route can be advertised with a 16 metric for 120 sec before it get purged
 Allow neighbors to have knowledge of the invalidity of a route

24
OSPF (type of links)

25
Open Shortest Path First (RFC 1247)

 Uses IP, has a value in the IP Header (8 bit protocol field)

 Special routers (autonomous system boundary routers) or backbone routers responsible to dissipate
information about other AS into the current system.

 Divides an AS into areas

 Metric based on type of service


 Minimum delay (rtt), maximum throughput, reliability, etc..

26
Congestion Control at Network Layer
 Congestion in the network layer is a situation when many datagrams are present in the Internet.
 Congestion may occur if the number of datagrams sent by source computers is beyond the
capacity of the network or routers.
 Congestion at the network layer is related to two issues, throughput and delay (processing,
propagation and queue delays).

Ayenew Y. Ibrahim 27
Congestion control cont….

 Congestion control is a mechanism for improving performance of the entire network by


resolving issue of congestion in the network.
 Congestion control mechanisms have two broad categories:
 open-loop congestion control (prevention) and
 closed-loop congestion control (removal).

Ayenew Y. Ibrahim 28
Open-loop congestion control

 Policies are applied to prevent congestion (either in the source or in the


destination) before it happens. Some of the policies are:
 Retransmission Policy
 Window Policy
 Acknowledgment Policy
 Discarding Policy
 Admission Policy

Ayenew Y. Ibrahim 29
Closed-loop congestion control
 Closed-loop congestion control mechanisms try to alleviate congestion after it happens. Several
mechanisms have been used by different protocols.

Backpressure
 Backpressure is a node-to-node congestion control that starts with a node and propagates, in
the opposite direction of data flow, to the source.
 The backpressure technique can be applied only to virtual circuit networks.

Ayenew Y. Ibrahim 30
Closed-loop cont…..
Choke Packet
 A choke packet is a packet sent by a node to the source to inform it of congestion.
 When a router in the Internet is overwhelmed with IP datagrams, it may discard some of them,
but it informs the source host, using a source quench ICMP message.

Ayenew Y. Ibrahim 31
Closed-loop cont…..

Implicit Signaling
 In implicit signaling, there is no communication between the congested node or nodes and the
source. The source guesses that there is congestion somewhere in the network from other
symptoms.
For example:
 missing of acknowledgment,
 delay and other indicators.

Explicit Signaling
 The node that experiences congestion can explicitly send a signal to the source or destination.
 This method, however, is different from the choke-packet method. In the choke-packet method,
a separate packet is used for this purpose; in the explicit-signaling method, the signal is included
in the packets that carry data (piggybacking).
 Explicit signaling can occur in either the forward or the backward direction.
Ayenew Y. Ibrahim 32
Closed-loop cont……
Multicasting Techniques and Protocols

 It is a way of sending a packet from a source to the members of a multicast address group.
 In multicasting, there is one source and a group of destinations.
 The group address defines the members of the group.

Ayenew Y. Ibrahim 34
Multicasting cont.…..

 P2MP services can be carried in unicast, multicast or broadcast mode. However, some
inherent problems occur if unicast or broadcast is used to carry P2MP services.

Source: Huawei Academy


Multicasting cont.…

 A multicast network can be divided into three parts:


 Source end networks
 Multicast forwarding network
 Receiver end network
Multicast cont.….

Multicast data packet structure


 The structure of a multicast data packet is similar to that of unicast packet, but the destination MAC address and
destination IP address of a multicast data packet are different from those of a unicast packet.
 The destination IP address of a multicast packet is a multicast IP address.
 The destination MAC address of a multicast packet is a multicast MAC address, which is mapped from a multicast IP address.
Multicasting cont….

 A multicast address defines a group of recipients. If a new group is formed with some active
members, an authority can assign an unused multicast address to this group to uniquely define
it.
 A host which is a member of n groups, actually has (n + 1) addresses.
 Multicast addresses in IPv4 belong to a large block of addresses that are specially designed for
this purpose.
 In classful addressing, all of class D was composed of these addresses;
 Classless addressing used the same block, but it was referred to as the block 224.0.0.0/4
(from 224.0.0.0 to 239.255.255.255).
 Four bits define the block; the rest of the bits are used as the identifier for the group.
 The multicast address selection depends on the type of application.

Ayenew Y. Ibrahim 38
Multicasting cont….
 The number of addresses in the multicast block is huge (2 28). However, the block is divided into several
subblocks.

 The following gives some of the common subblocks:


 Local Network Control Block (224.0.0.0/24): it is assigned to a multicast routing protocol to be used inside a
network.

 Administratively Scoped Block (239.0.0.0/8): the addresses in this block are used in a particular area of the
Internet. The packet whose destination address belongs to this range is not supposed to leave the area.

 GLOP Block (233.0.0.0/8): this block defines a range of addresses that can be used inside an autonomous
system (AS). One can insert the AS number as the two middle octets (233.x.y.0 to 233.x.y.255), in which x.y is
the AS number.

 Internetwork Control Block (224.0.1.0/24): it is assigned to a multicast routing protocol to be used in the whole
Internet, which means that the packet with a destination address in this range can be forwarded by a router.

 Source-Specific Multicast (SSM) Block (232.0.0.0/8)


Ayenew Y. Ibrahim 39
Converting IP Multicast Address to Data-Link Layer
Multicast Address
 In order to deliver the packet to the destination host we need a data-link layer multicast addresses.
 Most LANs support physical multicast addressing. For example Ethernet
 An Ethernet physical address (MAC address) is six octets (48 bits) long. If the first 25 bits in an
Ethernet address are 00000001 00000000 01011110 0, this identifies a physical multicast address
for the TCP/IP protocol (i.e. 01:00:5E:00:00:00 to 01:00:5E:7F:FF:FF).
 The remaining 23 bits can be used to define a group. To convert an IP multicast address into an
Ethernet address, the multicast router extracts the least significant 23 bits of a multicast IP address
and inserts them into a multicast Ethernet physical address.

Ayenew Y. Ibrahim 40
Multicast service models

 When receiving a multicast data, multicast group members can select multicast data sources.
Therefore, two multicast service models area available: any-source multicast (ASM) and
source-specific multicast (SSM)
Multicast data forwarding

Challenges
Multicast data forwarding cont.….

 Multicast data forwarding include all unicast forwarding information and add multicast source and inbound
interface.
 Then the device forwards only the multicast data received from the specified inbound interface, preventing
problems such as loops, sub-optimal routes and duplicate packets (partially) during multicast forwarding.
 For the same multicast source, the device can determine the unique inbound interface of multicast traffic
through the reverse path forwarding (RPF) check.
Collecting Information about Groups
 Creation of forwarding tables in multicast routing involves two steps:

1. A router needs to know to which destinations it is connected.


2. Each router needs to propagate information obtained in the first step to all other routers.
 The collection of multicast information is not automatic because of two reasons:
 First, a router does not know which host in the attached network is a member of a particular group based on IP address.
 Second, the membership is not a fixed attribute of a host.

 A router needs help to find out which groups are active in each of its interfaces. Then a router can propagate
the membership to any other router using a multicast routing protocol,

Ayenew Y. Ibrahim 44
Routing Tree in Multicasting
 Two different approaches in multicast routing have been developed these are:

Source-Based Tree Approach


 Each router needs to create a separate tree for each source-group combination.
 In other words, if there are m groups and n sources in the internet, a router needs to create (m ×
n) routing trees. In each tree, the corresponding source is the root, the members of the group
are the leaves, and the router itself is somewhere on the tree.

Group-Shared Tree Approach


 The designate router to act as the phony source for each group.
 The designated router, which is called the core router (rendezvous point router), acts as the
representative for the group. Any source that has a packet to send to a member of that group
sends it to the core center (unicast communication) and the core center is responsible for
multicasting.
 The core center creates one single routing tree with itself as the root and any routers with active
members in the group as the leaves.
Ayenew Y. Ibrahim 45
Routing Tree in Multicasting cont….

 Source-based tree is used in both PIM-DM and PIM-SM.


 Group-shared trees are used in PIM-SM.
Internet Group Management Protocol (IGMP)
 It is the protocol that used today for collecting information about group membership.
 IGMP is a protocol defined at the network layer, which is considered part of the IP. IGMP
messages are encapsulated in an IP datagram.
 There are two types of messages in IGMP version 3, query and report messages:
 A query message is periodically sent by a router to all hosts attached to it to ask them to
report their interests about membership in groups.
 A report message is sent by a host as a response to a query message.

Ayenew Y. Ibrahim 47
IGMP cont…

Query Message
 There are three versions of query messages:
 A general query message
 A group-specific query message
 A source-and-group-specific query message

Report Message
 A report message is sent by a host as a response to a query message.
 The message contains a list of records in which each record gives the identifier of the
corresponding group (multicast address), and
 Addresses of all sources that the host is interested in receiving messages from (inclusion) and
the source addresses from which the host does not desire to receive a group message
(exclusion).

Ayenew Y. Ibrahim 48
Multicast routing protocol
Multicast routing protocol cont.….

 A multicast network needs to establish forwarding paths based on multiple multicast protocols.
 Protocols workings on the multicast forwarding network includes PIM, MOSPF, MSDP, MBGP etc.
 PIM is mainly used to generate MDTs in an AS.
 MSDP is mainly used to generate inter-AS MDTs.
 MBGP is used to perform RPF check on inter-AS multicast traffic.
Protocol Independent Multicast (PIM)

 It is the name given to a common protocol that needs a unicast routing protocol
for its operation, but the unicast protocol can be either a distance-vector or a
link-state protocol.
 PIM can work in two different modes: dense and sparse.
 The term dense here means that the number of active members of a group
in the internet is large.
 The term sparse means that only a few routers in the internet have active
members in the group.
 When the protocol is working in the dense mode, it is referred to as PIM-DM;
when it is working in the sparse mode, it is referred to as PIM-SM.

Ayenew Y. Ibrahim 51
PIM routing entries

 There are two types of routing entries on PIM network.


 (S,G) routing entries are mainly used to establish SPTs on a PIM-DM or PIM-SM networks.
 (*, G) routing entries area mainly used to establish RPTs on a PIM-SM network.
PIM-Dense Mode (PIM-DM)

 PIM-DM is mainly used on a network with small number of densely distributed group members.
PIM-DM uses the flooding-prune mechanism to establish an MDT.
 In addition to the flooding and prune mechanisms, PIM-DM involves the neighbor discovery,
graft, assert and state-refresh mechanisms.

Ayenew Y. Ibrahim 53
PIM-DM messages
MDT establishment

 In PIM-DM, an MDT is established for the first time based on the flooding, prune, assert and DR election
mechanisms.
 Flooding: multicast packets are flooded to all PM neighbors and multicast routers generate multicast routing
entries.
 Assert: when a multi-source network exists during multicast traffic forwarding, a multicast forwarding
router needs to be elected to prevent duplicate multicast packets.
 Prune: if a multicast router has no multicast receiver, the multicast forwarding path from the source to the
multicast router is pruned.
Protocol Independent Multicast-Sparse Mode (PIM-SM)

 PIM-SM uses a group-shared tree approach to multicasting. The core router in PIM-SM is called
the rendezvous point (RP).
 Multicast communication is achieved in two steps:
 Any router that has a multicast packet to send to a group of destinations first encapsulates the
multicast packet in a unicast packet (tunneling) and sends it to the RP.
 The RP then decapsulates the unicast packet and sends the multicast packet to its destination.

 For each multicast group the routers select one RP (i.e. for m groups we need m RPs)
 After the RP for each group is selected, each router creates a database and stores the group
identifier and the IP address of the RP for tunneling multicast packets to it.
 PIM-SM uses a spanning multicast tree rooted at the RP with leaves pointing to designated
routers connected to each network with an active member.

Ayenew Y. Ibrahim 56
PIM-SM cont…..

Ayenew Y. Ibrahim 57
CHAPTER III
MPLS

Ayenew Y. Ibrahim 58

You might also like