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

CommunicationAndNetworking2-Chapter1-Part2

The document provides an overview of routing protocols, focusing on Autonomous Systems (AS), Intra-AS (IGP), and Inter-AS (EGP) protocols. It details the configuration and operation of OSPF (Open Short Path First) and EIGRP (Enhanced Interior Gateway Routing Protocol), including their metrics, administrative distances, and the importance of Link State Advertisements (LSA). Additionally, it discusses the structure of OSPF areas and the hierarchical design to manage large networks efficiently.

Uploaded by

Mohi Gpt4
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)
3 views

CommunicationAndNetworking2-Chapter1-Part2

The document provides an overview of routing protocols, focusing on Autonomous Systems (AS), Intra-AS (IGP), and Inter-AS (EGP) protocols. It details the configuration and operation of OSPF (Open Short Path First) and EIGRP (Enhanced Interior Gateway Routing Protocol), including their metrics, administrative distances, and the importance of Link State Advertisements (LSA). Additionally, it discusses the structure of OSPF areas and the hierarchical design to manage large networks efficiently.

Uploaded by

Mohi Gpt4
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/ 61

Examples of Routing Protocols

Pr. Hajar El Hammouti Communications & Networking 2 1


What is an Autonomous System?

Autonomous System: (AS): it is a collection of IP networks and routers under the control of a single
organization that follows a unified routing policy. Each AS is assigned a unique Autonomous System
Number (ASN) by the Internet Assigned Numbers Authority (IANA) through regional Internet registries
(ARIN (North America), RIPE (Europe, Middle East, and parts of Central Asia), APNIC (Asia-Pacific),
AFRINIC (AFRICA)) .

1. IANA assigns ASN ranges to Regional Internet Registries (RIRs) based on demand.
2. Network operators (ISPs, large enterprises, universities, etc.) request an ASN from their
respective RIR.
3. The applicant must prove the need for an ASN, typically by demonstrating that they operate a
distinct routing policy or need BGP (Border Gateway Protocol) peering with multiple providers.
4. If the request is approved, the RIR assigns a unique ASN from its allocated block.
5. The assigned ASN is publicly recorded in databases to prevent duplication.
6. ASN is between 0 and 65535

Pr. Hajar El Hammouti Communications & Networking 2 2


Intra AS and Inter AS are also called… IGP and EGP

Aggregate routers into regions known as “autonomous systems” (AS) (a.k.a.


“domains”)

Intra-AS (aka “intra-domain”)/ also called interior Inter-AS (aka “inter-domain”): / also called
gateway protocols (IGP) Exterior gateway protocols (EGP)
routing among routers within same AS routing among AS’es
(“network”) ▪ gateways perform inter-domain routing
▪ all routers in AS must run same intra-domain (as well as intra-domain routing)
protocol
▪ routers in different AS can run different intra-
domain routing protocols
▪ gateway router: at “edge” of its own AS, has
link(s) to router(s) in other AS’es

Pr. Hajar El Hammouti Communications & Networking 2 3


Scalable Routing

Examples of IGP and EGP protocols


Dynamic Routing

Intra-AS/IGP Inter-AS/EGP

EIGRP (Enhanced RIP (Routing BGP (Border


OSPF (Open
Interior Gateway Information Gateway
Short Path First)
Routing Protocol) Protocol) Protocol)

Pr. Hajar El Hammouti Communications & Networking 2 4


Scalable Routing

Comparison of Routing Protocols:

- Proprietary or not
- Category of routing protocols
- Metric of Calculation of the cost
- Administrative Distance (defined by each network equipment vendor (e.g., Cisco, Juniper,
Huawei) within their routing software to determine the trustworthiness of the routing protocol)
- Timers
- Load Balancing

Pr. Hajar El Hammouti Communications & Networking 2 5


Open Short Path First (OSPF)

Pr. Hajar El Hammouti Communications & Networking 2 6


Open Short Path First (OSPF)
• Introduction and LSA Flooding
• OSPF Areas
• Configuration of OSPF on Cisco routers
• Metric of cost calculation for OSPF

Pr. Hajar El Hammouti Communications & Networking 2 7


Open Short Path First (OSPF)
Introduction and LSA Flooding
OSPF Areas
Configuration of OSPF on Cisco routers
Metric of cost calculation for OSPF

Pr. Hajar El Hammouti Communications & Networking 2 8


OSPF (Open Short Path First)

- Open source protocol.

- Administrative distance (110)

- Link State

- It has two primary versions OSPF v2: IP4, OSPF v3 : IPv6 (v1 was never officially released, it was
a test version)

- Metric of calculation based on the Bandwidth (more accurately data rate in bps)

-It is standardized in RFC 2328, 1998 (Request for Comments (RFCs): a formal document
published by the Internet Engineering Task Force (IETF) and other organizations to define
standards, protocols, and best practices for the Internet and networking technologies).

Pr. Hajar El Hammouti Communications & Networking 2 9


OSPF (Open Short Path First)

Request for Comments (RFC)


It is a formal document published by the Internet Engineering Task Force (IETF) and the Internet Society
(ISOC) to describe standards, protocols, procedures, and technologies related to the Internet and
networking.

RFCs serve as:


• Technical Specifications: Define internet protocols (e.g., TCP/IP, HTTP, BGP).
• Best Practices: Provide guidelines for networking and system administration.
• Informational Documents: Explain research, experimental ideas, and proposed improvements.

Where to find RFCs:


•RFCs are publicly available and can be accessed for free at https://www.rfc-editor.org/
•Once published, an RFC never changes. If an update is needed, a new RFC is issued.
•RFC number for IP: 791, RFC number for BGP-4: 4271.

Pr. Hajar El Hammouti Communications & Networking 2 10


OSPF (Open Short Path First)

- Router exchange information about their interfaces (directly connected networks) so that each router
builds a map of the entire network topology.

- OSPF uses Link State Advertisement (LSA) and Link State Database (LSDB) for building the map.

- LSA: An OSPF message that contains routing information (the network range with this IP Address is
connected to Interface Intf0 on Router 1and here is the cost of this link).

- This information (LSA) is flooded every 30 min by default, however when there is a change it is
flooded immediately)

- LSDB: A database of LSAs that is located on each router. LSA LSA LSA
LSDB
LSA LSA LSA

Pr. Hajar El Hammouti Communications & Networking 2 11


OSPF (Open Short Path First)

LSA Flooding
1) A router Create LSA where it
advertises for each of its interfaces and 3) Each router records its own LSA plus
R1
the subnet that is connected to this the received LSAs into its own LSDB
interface

R2 LSA R4

LSA
4) After convergence, all the LSDBs at
R3 each routers are the same.
2) These LSA are sent to the neighbors,
and the neighbors will relay them to their
neighbors 5) Routers run Djikstra in order to find
optimal routes.

Pr. Hajar El Hammouti Communications & Networking 2 12


Open Short Path First (OSPF)
Introduction and LSA Flooding
OSPF Areas
Configuration of OSPF on Cisco routers
Metric of cost calculation for OSPF

Pr. Hajar El Hammouti Communications & Networking 2 13


OSPF (Open Short Path First)

OSPF Areas:

- Large networks can have the following problems:

* Large Link state database, which requires more memory on each router
* Frequent calculations over large datasets requires more processing power

- OSPF supports a hierarchical design areas to break a large network with one LSDB into smaller
areas with small separate LSDBs.

- Area: A group of links and routers that share the same LSDB.
* Single area OSPF: One area with the same LSDB
* Multiarea OSPF: multiple areas with separate LSDBs.

Pr. Hajar El Hammouti Communications & Networking 2 14


OSPF (Open Short Path First)

OSPF Areas:

Area 0 in a given
autonomous system

Pr. Hajar El Hammouti Communications & Networking 2 15


OSPF (Open Short Path First)

OSPF Areas:
- Routers in different areas A backbone router
have different LSDBs - It is recommended to
separate areas in a star
Area Border Area 0: backbone network
Router (ABR)
ABR creates
summary
information about
area 3
each subnet in an
area to advertise
into other areas, internal
“Summary LSA” area 1 routers
area 2

Pr. Hajar El Hammouti Communications & Networking 2 16


OSPF (Open Short Path First)

OSPF Areas:
- Backbone area (area0): Is a special area that all other areas must connect to
- Area Border Router (ABR): A router with interfaces connected to the backbone area and at least one other area

- ABR has an LSDB for each area.


- Creates summary information about each subnet in an area to advertise into other areas, “Summary
LSA”.
- It is recommended to connect ABR with two areas only (Backbone and other area)
- A backbone router: a router connected to the backbone area (including ABRs)
- Internal router: a router connected to one area (not backbone area)
- Autonomous system boundary router (ASBR): A router with at least one interface connected to an external
network.

- Intra area route: a route to a destination in the same area.


- Inter area route: a route to a destination in a different area.

Pr. Hajar El Hammouti Communications & Networking 2 17


OSPF (Open Short Path First)

OSPF Areas rules:

- Areas should be contigous (all parts of an area must be directly connected


without gaps or isolated segments), this ensures LSAs are propagated
seamlessly within the area.

- Interfaces in the same subnet must be in the same area.

- All nonbackbone areas must connect to the backbone area by having one ABR.

Pr. Hajar El Hammouti Communications & Networking 2 18


OSPF (Open Short Path First)

How OSPF works?

Activating OSPF on routers and interfaces

Enabling neighbors adjacency

Calculating routes

Pr. Hajar El Hammouti Communications & Networking 2 19


Open Short Path First (OSPF)
Introduction and LSA Flooding
OSPF Areas
Configuration of OSPF on Cisco routers
Metric of cost calculation for OSPF

Pr. Hajar El Hammouti Communications & Networking 2 20


OSPF (Open Short Path First)

OSPF Configuration

1/ Activating OSPF on routers globally (CISCO version)

Process ID: a value between <1-65535> which identifies an OSPF instance. Different
routers do not have to use the same process ID

Pr. Hajar El Hammouti Communications & Networking 2 21


OSPF (Open Short Path First)

OSPF configuration

2/ Activating OSPF on interfaces


Wildcard mask

Wildcard mask= 255.255.255.255-Subnet Mask

What is the wildcard mask of 10.0.0.0/30?

Pr. Hajar El Hammouti Communications & Networking 2 22


OSPF (Open Short Path First)

OSPF Configuration
2/ Activating OSPF on interfaces
Router1(config-router)# network 192.168.10.0 0.0.0.255 area 0
Router1(config-router)# network 10.10.0.0 0.0.0.3 area 0
Router2(config-router)# network 192.168.10.0 0.0.0.255 area 0
Router2(config-router)# network 10.10.0.0 0.0.0.3 area 0

Network command does the following:


- Enable OSPF on any interface that has an IP address with the specified range in the
specified area.
- Send and listen to hello messages through OSPF enabled interfaces.
- Advertise networks configured on OSPF enabled interfaces

Fa0/0 Fa0/1 Fa0/1 Fa0/0

.1 .2 10.10.0.0/30 .2 .1
192.168.10.0/24 192.168.11.0/24

Pr. Hajar El Hammouti Communications & Networking 2 23


OSPF (Open Short Path First)

OSPF Configuration

Assume we have this case; R1(config)#Network 192.168.10.1 0.0.0.0 area 0 ,


what does this command mean ?

Fa0/0 Fa0/1 Fa0/1 Fa0/0

192.168.10.0/24 .1 .2 10.10.0.0/30 .2 .1
192.168.11.0/24

Pr. Hajar El Hammouti Communications & Networking 2 24


OSPF (Open Short Path First)

OSPF configuration

Another way to activate OSPF on interfaces:

Pr. Hajar El Hammouti Communications & Networking 2 25


Open Short Path First (OSPF)
Introduction and LSA Flooding
OSPF Areas
Configuration of OSPF on Cisco routers
Metric of Cost Calculation for OSPF

Pr. Hajar El Hammouti Communications & Networking 2 26


OSPF (Open Short Path First)

Metric of Calculation of OSPF Cost

- How this metric is calculated based on the bandwidth?


- By default, the reference bandwidth is 100Mbps
𝑅𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ
Cost=
𝐼𝑛𝑡𝑒𝑟𝑓𝑎𝑐𝑒 𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ

- What are the costs in 1 Mbps


100
1 Mbps 100
that case?
- Let us assume that one of the
links is 1 Gbps, what is the
associated cost?
10
10 Mbps
- The associated cost is 0.1, however, - Solution: change the default
the protocol only takes integer numbers bandwidth to a higher number.
as a metric, so it rounds it up to 1=>
Confusing situation

Pr. Hajar El Hammouti Communications & Networking 2 27


Enhanced Interior Gateway
Routing Protocol (EIGRP)

Pr. Hajar El Hammouti Communications & Networking 2 28


Enhanced Interior Gateway Routing Protocol
(EIGRP)
Introduction
Messages exchanged in EIGRP
Configuration of EIGRP on Cisco routers
Metric of Cost Calculation for EIGRP

Pr. Hajar El Hammouti Communications & Networking 2 29


EIGRP (Enhanced Interior Gateway Routing Protocol)

- Proprietary protocol (Cisco).

- Enhanced distance vector (finds backup links, and converges quickly if a link goes down).

- Bandwidth, Delay, Reliability, Load balancing

- Support equal and unequal load balancing

- Administrative distance (90)

Pr. Hajar El Hammouti Communications & Networking 2 30


Enhanced Interior Gateway Routing Protocol
(EIGRP)
Introduction
Messages exchanged in EIGRP
Configuration of EIGRP on Cisco routers
Metric of Cost Calculation for EIGRP

Pr. Hajar El Hammouti Communications & Networking 2 31


EIGRP (Enhanced Interior Gateway Routing Protocol)

Message Type Purpose Sent To


Discover and maintain
Hello Multicast
neighbors
Confirm receipt of
Acknowledgment Unicast
reliable packets
Update Send routing updates Multicast/Unicast
Request routing
Query Multicast/Unicast
information
Reply Respond to Queries Unicast

• Hello messages are sent periodically without acknowledgment.


• Reliable packets (Update, Query, Reply) must be acknowledged.
• Hold Timer: Specifies how long a router should wait without receiving a Hello packet from a neighbor
before considering it as down (disconnected). Default Value:15 seconds for most networks.
• Hello Timer specifies how often a router sends Hello packets to its neighbors.Default Value:5 seconds
on most networks.

Pr. Hajar El Hammouti Communications & Networking 2 32


Enhanced Interior Gateway Routing Protocol
(EIGRP)
Introduction
Messages exchanged in EIGRP
Configuration of EIGRP on Cisco routers
Metric of Cost Calculation for EIGRP

Pr. Hajar El Hammouti Communications & Networking 2 33


EIGRP (Enhanced Interior Gateway Routing Protocol)

How to activate EIGRP on the routers?

AS Number: a value <1-65535> which identifies an EIGRP routers in the same AS: those in the same
AS should have the same AS number to be able to activate neighbor relationships.

How to activate on interfaces?

Router1(config-router)# network 192.168.10.0 0.0.0.255


Router1(config-router)# network 10.0.0.0 0.0.0.3

Pr. Hajar El Hammouti Communications & Networking 2 34


EIGRP (Enhanced Interior Gateway Routing Protocol)

How to activate on interfaces?

Router1(config-router)# network 192.168.10.0


Router1(config-router)# network 10.0.0.0

If no wildcard mask is specified the EIGRP will use the classful prefix by default.

Pr. Hajar El Hammouti Communications & Networking 2 35


EIGRP (Enhanced Interior Gateway Routing Protocol)

How to activate on interfaces? Auto-summary

Auto-summary command: enables advertisement for subnetworks. Sometimes, it is enabled by


default, then no need activate it, otherwise it is required to activate it for each subnetwork to
advertise .

Pr. Hajar El Hammouti Communications & Networking 2 36


Enhanced Interior Gateway Routing Protocol
(EIGRP)
Introduction
Messages exchanged in EIGRP
Configuration of EIGRP on Cisco routers
Metric of Cost Calculation for EIGRP

Pr. Hajar El Hammouti Communications & Networking 2 37


EIGRP (Enhanced Interior Gateway Routing Protocol)

Metric of Calculation of EIGRP


- How this metric is calculated based on Bandwidth, Delay, Reliability, Load balancing

𝐾2∗𝐵𝑊 𝐾5
Cost= 𝐾1 ∗ 𝐵𝑊 + + 𝐾3 ∗ 𝑑𝑒𝑙𝑎𝑦 ∗ ∗ 256
256−𝐿𝑜𝑎𝑑 𝐾4+𝑟𝑒𝑙𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦

107
With 𝐵𝑊 =
𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ

- By default, K1=1, K2=0, K3=1, K4=0, K5=0

Pr. Hajar El Hammouti Communications & Networking 2 38


EIGRP (Enhanced Interior Gateway Routing Protocol)

Metric of Calculation of EIGRP


- How this metric is calculated based on Bandwidth, Delay, Reliability, Load balancingTransmit Unit)?

𝐾2∗𝐵𝑊 𝐾5
Cost= 𝐾1 ∗ 𝐵𝑊𝑚𝑖𝑛 + + 𝐾3 ∗ 𝑑𝑒𝑙𝑎𝑦 ∗ ∗ 256
256−𝐿𝑜𝑎𝑑 𝐾4+𝑟𝑒𝑙𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦

Bandwidth: Data rate of the link


Delay: Size of the packet/Data rate
Reliability: probability estimation for the link to be up
Load balancing: By default is evenly distributed among router’s interfaces with the same path cost. In
the case where there is a best path and another path which is less prefered, load balancing is allowed
(in a proportional way) using the variance metric: Variance

If the cost of the path<= variance*


cost of the most prefered, the load
balancing is activated in a
proportional way.
Pr. Hajar El Hammouti Communications & Networking 2 39
Routing Information Protocol
(RIP)

Pr. Hajar El Hammouti Communications & Networking 2 40


RIP (Routing Information Protocol )

- Vector distance based protocol

- Metric of cost: the number of hops

- 2 commonly known versions RIPv1 and RIPv2

- Major inconvenients: Limited to 15 hops, slow to converge

- RIP v2 is an improvement of RIPv1, it supports variable subnettig of the network and is more
secure.

- Administrative distance of RIP: 120

Pr. Hajar El Hammouti Communications & Networking 2 41


Comparison between OSPF, EIGRP, RIP

Comparison between OSPF, EIGRP, RIP

OSPF EIGRP RIP


Type Link state Advanced Distance Distance Vector
Vector
Metric Cost based on Composite metric Number of hops
bandwidth
Maximum hop limit No limit No limit 15 hops (for v1 and v2)
Convergence speed Fast Faster Slow
Scalability Highly scalable Moderate scalbility Low scalability
Open/propietary Open Cisco Open (but outdated)
Best use case Large, complex Entreprise with Cisco Small networks
networks (ISPs,
entreprise, data
centers)

Pr. Hajar El Hammouti Communications & Networking 2 42


Cisco Packet Tracer

Cisco Packet Tracer : Router Configuration

1. Install Packet Tracer


2. Enter execution mode on the router
Router> enable
1. Enter configuration mode : Router # configure terminal
2. Check available interfaces : Router# show ip interface brief
3. Select a given interface: Router(config)# interface GigabitEthernet 0/0
4. Assign IP address and subnet mask: Router(config-if)# ip address 192.168.1.1 255.255.255.0
5. Verify configuration: Router# show ip interface brief
Ps: Sometimes interfaces are shutdown, you enable them by: Router(config-if)# no shutdown.

Pr. Hajar El Hammouti Communications & Networking 2 43


Border Gateway Protocol (BGP)

Pr. Hajar El Hammouti Communications & Networking 2 44


Inter-AS routing: Intradomain forwarding

▪ Suppose router in AS1 receives AS1 inter-domain routing must:


datagram destined outside of AS1: 1. learn which destinations reachable
• router should forward packet to through AS2, which through AS3
gateway router in AS1, but 2. propagate this reachability info to all
which one? routers in AS1

3c other
3a 2c
3b 2a networks
2b
1c
AS3
other 1a 1b AS2
networks
1d
AS1

Pr. Hajar El Hammouti Communications & Networking 2 45


BGP: Border Gateway Protocol

Border Gateway Protocol (BGP) is the protocol used for exchanging routing information between
different autonomous systems (ASes) on the Internet.

• It is a path vector protocol that makes routing decisions based on paths, rules, and network
policies.

• Routing decisions are made using attributes such as AS path, Next-Hop, and Local Preference.

• A typical BGP table may contain millions of prefixes.

• BGP is the protocol of the Internet (The Internet being a collection of thousands of interconnected
networks (AS), each managed by organizations like ISPs, data centers, and enterprises).

• Uses TCP (Port 179) to establish a connection and exchange routing updates.

• It is an open-source standard networking protocol.

• It is defined in Request for Comments (RFCs) by the Internet Engineering Task Force (IETF) RFC
4271.
Pr. Hajar El Hammouti Communications & Networking 2 46
BGP: Border Gateway Protocol

2b

2a ∂
2c
1b 3b
2d
1a 1c ∂
3a 3c
AS 2
1d 3d

AS 1 eBGP connectivity AS 3
iBGP connectivity

1c gateway routers run both BGP and IGP protocols

Pr. Hajar El Hammouti Communications & Networking 2 47


BGP: Border Gateway Protocol

Path Vector Routing Protocol

Router 1 wants to Network 100.100.0.0 is Network 100.100.0.0 is Network 100.100.0.0 is


advertise for reachable through AS reachable through AS reachable through AS
Network: 100.100.0.0 64700 64800 64700 64900 64800 64700
in AS 1

Router 1 Router 2 Router 3 Router4


AS: 64700 AS: 64800 AS: 64900 AS: 65000

Pr. Hajar El Hammouti Communications & Networking 2 48


BGP: Border Gateway Protocol

Loop Prevention

Whenever a router sees its own AS number in the route update it will drop that route/path

Network 100.100.0.0 is
Router 1 Router 2
Router 1 finds out that its reachable through AS
AS: 64700 AS: 64800
64700
own AS number is in the
advertised route, so it
drops this route.

Network 100.100.0.0 is Network 100.100.0.0 is


reachable through AS reachable through AS
64900 64800 64700 64800 64700

Router 3
AS: 64900

Pr. Hajar El Hammouti Communications & Networking 2 49


BGP: Border Gateway Protocol

BGP (Border Gateway Protocol): BGP Tables

Neighbor Table:

Information about all the list of manually defined neighbors are managed in the neighbor table.
# show ip bgp neighbors

BGP Database table (before selecting the best path):

The list of all possible networks learnt by BGP is stored along with their attributes in this table

#show ip bgp
Routing table (after selecting the best path):

The list of only the best path is available in the IP routing table
# show ip route

Pr. Hajar El Hammouti Communications & Networking 2 50


BGP: Border Gateway Protocol

BGP (Border Gateway Protocol):

BGP Neighborhood
- BGP Neighbor router is also called BGP Peer.
- Neighbors are manually defined (unlike other routing protocols that form routing protocols
automatically).
- TPC connection is used to retransmit lost data, avoid duplicate data, etc..

Basic configuration of BGP routers

To enable BGP on a given router


Router(config)#router bgp <Autonomous number>

To manually configure neighbors


Router(config-router)#neighbor <IP-Address> remote as <AS number>

Which means the router with this IP Address is neighbor and belongs to AS number..

Pr. Hajar El Hammouti Communications & Networking 2 51


BGP: Border Gateway Protocol

Example of configuration using Cisco routers

Router A Router B
AS: 100 Network AS: 200
Network Network
192.168.1.0/24
10.10.10.0/24 is 192.168.1.2 20.20.20.0/24 is
192.168.1.1 between the two
connected to connected to
routers
router A routerB
Router configuration
RouterA(config)# router bgp 100 (enabling BGP on router A)
RouterA(config-router)# neighbor 192.168.1.2 remote-as 200 (manually configure router 2
interface as neighbor and belongs to AS 200)
RouterA(config-router)# network 10.10.10.0 mask 255.255.255.0 (advertise network
10.10.10.0 as being attached to Router A)

Check if BGP neighbors relationship is established


RouterA# show ip bgp summary (shows that Router B (192.161.1.0 is neighbor to Router A)
Check if BGP routes are advertised
RouterA# show ip bgp (shows networks, ip address of next hop and the path in terms of AS)

Pr. Hajar El Hammouti Communications & Networking 2 52


BGP: Border Gateway Protocol
BGP message types
1/ Open messages:
Used to initiate BGP session between two routers, it includes:
- BGP version
- Sender AS number
- Hold time (cisco default 180 seconds)

2/ Keep alive messages:


- Messages used to maintain BGP session between two BGP peers.
- It will be sent in one third the hold time (cisco every 60 seconds)

3/ Update:
- Sent if any new route is added or existing route is deleted
- or if any of the path attributes is updates

4/ Notification:
- To advertise for error messages such as (« BGP version is not supported»)

Pr. Hajar El Hammouti Communications & Networking 2 53


BGP: Border Gateway Protocol
BGP path attributes
1/ Weight:
- It is CISCO proprietary attribute
- It is a number with a value ranges from 0 to 65535 that is assigned to the interface in the local router.
- The weight is not exchanged between BGP routers.
- The path with the highest value is preferred.

2/ Local Preference:
- It is used within the autonomous system
- It is exchanged between the BGP routers within the same AS
- It is used to choose the outbound BGP path which has the highest local preference.
- The default local preference value is 100
3/ AS path:
- It helps reaching the target destination using the shortest path
- or if any of the path attributes is updates

4/ Multi Exit discriminator (MED): 5/ Lowest Router ID:


- MED is used when an AS has multiple exit points. - If all attributes are equal, BGP selects the router with the
- Lower MED is preferred, lowest preferred route.
Pr. Hajar El Hammouti Communications & Networking 2 54
BGP: Border Gateway Protocol

Policy based routing

• BGP gateway receiving route advertisement uses import policy to accept/decline path (e.g., never route through
AS Y, because we do not truct or what so ever).
• AS policy also determines whether to advertise path to other neighboring ASes
AS 3 3b
AS 1 1b 3a 3c
1a 1c AS 2 3d X
2b
1d AS3, X
AS2,AS3,X 2a 2c

2d
▪ AS2 router 2c receives path advertisement AS3,X (via eBGP) from AS3 router 3a
▪ based on AS2 policy, AS2 router 2c accepts path AS3,X, propagates to all AS2 routers
▪ based on AS2 policy, AS2 router 2a advertises (via eBGP) path AS2, AS3, X to AS1 router 1c
Pr. Hajar El Hammouti Communications & Networking 2 55
BGP: Border Gateway Protocol
AS 3 3b
AS 1 1b
AS3,X
AS3,X 3a 3c
1
AS3,X
1a 1c AS 2 3d X
2 2b
local link AS3,X
2 1 AS3, X
interfaces 1d
at 1a, 1d AS2,AS3,X 2a 2c

2d

dest interface ▪ recall: 1a, 1b, 1d learn via iBGP from 1c: “path to X goes through 1c”
… …
1c 1 ▪ at 1d: OSPF intra-domain routing: to get to 1c, use interface 1
X 1 ▪ at 1d: to get to X, use interface 1
… …

Pr. Hajar El Hammouti Communications & Networking 2 56


BGP: Populating forwarding table
AS 3 3b
AS 1 1b 3a 3c
1
1a 1c AS 2 3d X
2 2b
1d
2a 2c

2d

dest interface
… … ▪ recall: 1a, 1b, 1d learn via iBGP from 1c: “path to X goes through 1c”
1c 2
▪ at 1d: OSPF intra-domain routing: to get to 1c, use interface 1
X 2
… … ▪ at 1d: to get to X, use interface 1
▪ at 1a: OSPF intra-domain routing: to get to 1c, use interface 2
▪ at 1a: to get to X, use interface 2
Pr. Hajar El Hammouti Communications & Networking 2 57
Hot Potato Routing

AS 3 3b
AS 1 1b 3a 3c
1a 1c AS 2 3d X
2b 112
1d AS1,AS3,X AS3,X
2a 2c
201 263

2d
OSPF link weights

▪ 2d learns (via iBGP) it can route to X via 2a or 2c


▪ hot potato routing: choose local gateway that has least intra-
domain cost (e.g., 2d chooses 2a, even though more AS hops to X):
don’t worry about inter-domain cost!
Network Layer: 5-58
Pr. Hajar El Hammouti Communications & Networking 2 58
Why different Intra-, Inter-AS Routing?

Policy:
▪ inter-AS: admin wants control over how its traffic routed, who routes
through its network
▪ intra-AS: single admin, so policy less of an issue
Scale:
▪ hierarchical routing saves table size, reduced update traffic
Performance:
▪ intra-AS: can focus on performance
▪ inter-AS: policy dominates over performance

Pr. Hajar El Hammouti Communications & Networking 2 59


Summary

Policy:
▪ inter-AS: admin wants control over how its traffic routed, who routes
through its network
▪ intra-AS: single admin, so policy less of an issue
Scale:
▪ hierarchical routing saves table size, reduced update traffic
Performance:
▪ intra-AS: can focus on performance
▪ inter-AS: policy dominates over performance

Pr. Hajar El Hammouti Communications & Networking 2 60


Software Defined Network (SDN)

Internet network layer: historically implemented via distributed, per-router control approach:
monolithic router contains switching hardware, runs proprietary implementation of
Internet standard protocols (IP, RIP, IS-IS, OSPF, BGP) in proprietary router OS (e.g., Cisco
IOS)
different “middleboxes” for different network layer functions: firewalls, load balancers,
NAT boxes, ..
~2005: renewed interest in rethinking network control plane

Pr. Hajar El Hammouti Communications & Networking 2 61

You might also like