0% found this document useful (0 votes)
29 views67 pages

Ch5 Lect 10,11,12

The document discusses the network layer control plane. It describes how autonomous systems (AS) are used to make routing scalable in large networks like the Internet. Each AS has its own intra-domain routing protocol to route traffic within the AS, while inter-domain routing protocols route traffic between different ASes. The most commonly used inter-domain routing protocol is the Border Gateway Protocol (BGP).

Uploaded by

moyy777555
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views67 pages

Ch5 Lect 10,11,12

The document discusses the network layer control plane. It describes how autonomous systems (AS) are used to make routing scalable in large networks like the Internet. Each AS has its own intra-domain routing protocol to route traffic within the AS, while inter-domain routing protocols route traffic between different ASes. The most commonly used inter-domain routing protocol is the Border Gateway Protocol (BGP).

Uploaded by

moyy777555
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 67

Chapter 5

Network Layer:
The Control Plane

A note on the use of these Powerpoint slides:


We’re making these slides freely available to all (faculty, students, readers).
They’re in PowerPoint form so you see the animations; and can add, modify,
and delete slides (including this one) and slide content to suit your needs.
They obviously represent a lot of work on our part. In return for use, we only
ask the following: Computer
 If you use these slides (e.g., in a class) that you mention their source
(after all, we’d like people to use our book!)
Networking: A Top
 If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this
Down Approach
material.
7th edition
Thanks and enjoy! JFK/KWR
Jim Kurose, Keith Ross
All material copyright 1996-2016 Pearson/Addison Wesley
J.F Kurose and K.W. Ross, All Rights Reserved April 2016
Network Layer: Control Plane 5-1
Chapter 5: outline
5.1 introduction
 Control Plane
 Autonomous Systems
5.2 routing protocols
 link state
 distance vector
5.3 intra-AS routing in the Internet:
 RIP
 OSPF
5.4 inter-AS routing in the Internet: B

Network Layer: Control Plane 5-2


Network-layer functions
Recall: two network-layer functions:
 forwarding: move packets
from router’s input to data plane
appropriate router output
 routing: determine route
taken by packets from source control plane
to destination

Two approaches to structuring network control plane:


 per-router control (traditional)
 logically centralized control (software defined networking)

Network Layer: Control Plane 5-3


Per-router control plane

Individual routing algorithm components in each and every


router interact with each other in control plane to compute
forwarding tables

Routing
Algorithm
control
plane

data
plane

Network Layer: Control Plane 5-4


Making Routing
Scalable
our routing study thus far - idealized
 all routers identical
 network “flat”
… not true in practice
All routers know all the other routers in the whole world

scale: with billions of administrative autonomy


destinations:  internet = network of
 can’t store all destinations networks
in routing tables!  networks -> autonomous
 routing table exchange entities
would swamp links!  each network admin
controls routing and other
functions in its own network
Network Layer: Control Plane 5-5
Internet approach to scalable routing
aggregate routers into regions known as “autonomous
systems” (AS) (a.k.a. “domains”)
 an autonomous system (AS) is a region of the Internet that is
administered by a single entity (one administrator) and that has a
unified routing policy
 each autonomous system is assigned an Autonomous System
Number (ASN). Each ASN is 32bits
• ASN assigned by Regional Internet Registries
• example ASNs
– U of Ts campus network (AS239)
– Sprint (AS1239, AS1240, AS 6211, …)

Network Layer: Control Plane 5-6


Number of Autonomous Systems
The number of unique autonomous networks
in the routing system of the Internet exceeded 5,000 in 1999,
30,000 in late 2008, 35,000 in mid-2010, 42,000 in late 2012,
54,000 in mid-2016 and 60,000 in early 2018

7
Autonomous Systems terminology
 Stub AS: has connection to only one other AS, only
carries local traffic. It can connect to other private
networks that are not seen by the Internet. (E.g.,
UC and CalState network - CENIC)
 Multi-homed Stub AS: has connection to more than
one AS, but only carries local traffic
 Transit AS: has connection to more than one AS
and carries transit traffic, e.g., ISPs
 local traffic: traffic with source and destination in
AS
 transit traffic: traffic that passes through the AS

8
Stub and Transit Networks
Private
Network:
Invisible to
Internet

AS 1 AS 2

AS 4

AS 3

AS 5
 AS 1 is a multi-homed stub network
 AS 3 and AS 4 are transit networks
 AS 2 and AS 5 are stub networks

9
Routing and Autonomous Systems

intra-AS routing inter-AS routing


 routing among hosts, routers  routing among AS’es
in same AS (“network”)  there is at least one dedicated
 all routers in AS must run router in each AS that
same intra-domain routing handles interdomain traffic –
protocol gateway router(s)
 routers in different AS can run  gateways perform inter-
different intra-domain routing domain routing (as well
protocol as intra-domain routing)
 gateway router: at “edge” of
its own AS, has link(s) to
router(s) in other AS’es

10
Interdomain and Intradomain routing

AS 2 AS 5

AS 1

AS 6
AS 7
AS 3
AS 4

 routing protocols used inside an AS, referred to as intradomain routing, are


called interior gateway protocols (IGP)
• objective: shortest path, only operate within an AS

 routing protocols used between ASs, referred to as interdomain routing, are


called exterior gateway protocols (EGP)
• objective: satisfy policy of the ASs, not always shortest path 11
Interdomain and Intradomain Routing
Intradomain Routing Interdomain Routing

 protocols for Intradomain  protocols are collectively called


routing are collectively called Exterior Gateway Protocols
Interior Gateway Protocols or or EGP’s.
IGP’s.  popular protocols are:
 popular protocols are: • Border Gateway Protocol
• RIP (open source, simple, (BGP) v4 current
rarely used anymore)
• OSPF (open source,
complex, popular)
• IGRP Interior Gateway
Routing Protocol (Cisco
proprietary for decades,
until 2016)

12
EGP and IGP

AS 1
2 AS 2

EGP (e.g., BGP)


IGP (e.g., OSPF)
IGP (e.g., RIP)

 Interior Gateway Protocol (IGP)


• routing is done based on metrics
• routing domain is one AS
 Exterior Gateway Protocol (EGP)
• routing is done based on policies
• routing domain is the entire Internet

13
Interconnected ASes and forwarding

3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a
1d
1b AS1  IP forwarding table
configured by both intra- and
inter-AS routing algorithm

Intra-AS
Routing
Inter-AS
Routing
• intra-AS routing
algorithm algorithm determine entries for
destinations within AS
Forwarding
table • inter-AS & intra-AS
determine entries for
external destinations

Network Layer: Control Plane 5-14


Inter-AS tasks
 suppose router in AS1 AS1 must:
receives datagram 1. learn which destinations
destined outside of AS1: are reachable through
• router should forward AS2, and which through
packet to gateway AS3
router, but which one? 2. propagate this
reachability info to all
routers in AS1
job of inter-AS routing!
3c
3a
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d

Network Layer: Control Plane 5-15


Multiple Routing Protocols
 multiple routing protocols can run on the same router
 but only one IGP protocol will be in operation in an AS
 if a router is an exterior gateway router then usually one IGP and
one EGP protocol will be in operation
 each routing protocol updates the routing table accordingly

RIP BGP OSPF


Process Process Process
routing routing
protocol protocol
routing table updates

routing
table

routing table
lookup

IP
incoming IP Forwarding outgoing IP
datagrams datagrams 16
Chapter 5: outline
5.1 introduction
5.2 routing protocols
 link state
 distance vector
5.3 intra-AS routing in the Internet:
 RIP
 OSPF
5.4 inter-AS routing in the Internet: BGP

Network Layer: Control Plane 5-


17
Routing protocols

Routing protocol goal: determine “good”


paths (equivalently, routes), from sending host to
receiving host, through network of routers
 path: sequence of routers packets will traverse
in going from given initial source host to given
final destination host
 “good”: “ least cost”, “fastest”, “least
congested”

Network Layer: Control Plane 5-18


Components of a Routing Algorithm
 a procedure for sending and receiving reachability
information about a network to other routers
 a procedure for calculating optimal routes
• Routes are calculated using a shortest path algorithm (least
“cost”) => best path
 a procedure for reacting to and advertising => update the information

topology and network condition/status changes

19
Routing algorithm classification

Q: global or local information? Q: quasi-static or


global: dynamic?
 all routers have complete quasi-static:
topology, link cost info
 routes change slowly over
 “link state” algorithms time the admin change every router manually
 Every router make the routing table alone and then
send it to the rest of the other routers • topology driven
local: dynamic:
 router knows physically-  routes change more
connected neighbors, link quickly
costs to neighbors • periodic update
 iterative process of • in response to link cost
computation, exchange of changes
info with neighbors
 “distance vector” algorithms
 Every router send what it knows to other routers
Network Layer: Control Plane 5-20
Two Shortest Path IGP Routing Algorithms
Distance Vector Routing
 each node knows the distance (cost) to its directly connected
neighbors
 a node periodically sends a list of routing updates to its neighbors
 if all nodes update their distances to destinations using neighbor
information, the routing tables eventually converge

Link State Routing


 each node knows the distance (cost) to its directly connected
neighbors
 the distance information is flooded to all nodes in the network
 each node calculates the routing tables independently using a network
map (topology) created by the node using the global information it
received

21
Chapter 5: outline
5.1 introduction
5.2 routing protocols
 link state
 distance vector
5.3 intra-AS routing in the Internet:
 RIP
 OSPF
5.4 inter-AS routing in the Internet: BGP

Network Layer: Control Plane 5-


22
Routing Information Protocol (RIP)
 uses distance vector algorithm
• each node only knows link cost to neighbors
• cost usually hop count
• route computation using Bellman Ford’s algorithm
• disseminates full routing table to all neighbors
 router advertisements/updates sent to all its
neighbors
• carried in RIP messages over UDP
• routing table entries give cost from that node
(source) to all other nodes (destinations) in AS

Network Layer: Control Plane 5-23


RIP: Basic principles
 Send information Periodically and triggered by a
change, every router sends to its neighbors a
complete list of its routes to all destinations within
an AS
 list contains pairs of: destination, distance (hop
count)
 receiver replaces/updates entries in its routing table
if routing through a neighbor costs less than the
current route in its table

Triggered means that if any link dropped will tell all neighbors
Rip Example
assume:
• link cost is “1” on all hops
• all updates occur simultaneously
• initially each router only knows its directly
connected interfaces --> cost = 0
After First Update
After Second Update
After Third Update
Last Update for Convergence
Realiastic Example of RIP

Network Layer 4-30


RIP Summary and demise

low overhead – fully distributed … BUT……


 slow convergence
 limited to 15 hops (max path cost  infinity =16)
 only uses local information from immediate
neighbors for routing decisions - relies on
propagation of information for global view of
network – cycle formations
……….
 no longer used – Rest in Peace (RIP)
OSPF (Open Shortest Path First)
 uses link-state algorithm
• link state packet dissemination
• topology map at each node
• route computation using Dijkstra’s algorithm
 router floods OSPF link-state advertisements
to all other routers in entire AS
• carried in OSPF messages directly over IP (rather
than TCP or UDP – protocol type 89 have a specific protocol
• link state: for each attached link

Network Layer: Control Plane 5-32


OSPF: Basic principles
 routers establish a relationship (“adjacency”) with neighbors
 each router generates link state advertisements (LSAs) which are
distributed to all “adjacent” routers (after routers have established
adjacencies).
LSA = (link id, state of the link, cost, neighbors of the link)
 each router maintains a database - topological database or link
state database (LSDB).
 LSDB consists of all received LSAs with a corresponding seq#
(used to verify age of update), which describe the current network
topology as a graph with weighted edges
 each router uses its link state database to run a shortest path
algorithm (Dijikstra’s algorithm) to find the shortest path to each
router

Network Layer: Control Plane 33


Operation of a Link State Routing protocol

Received Dijkstra’s
LSAs Link
Algorithm
IP Routing
State
Table
Database

LSAs are flooded


to other interfaces

Network Layer: Control Plane 5-34


LSA updates
 link-state routing protocols generate routing updates only
when a change occurs in the network topology
 when a link changes state, the device that detected the
change creates a link-state advertisement (LSA)
concerning that link and sends it to all neighboring
devices using a special multicast address
 each routing device reads the LSA
• the LSA has a sequence number that allows the router
to check to see if it has already seen that update (all
link info is stored with a seq#)
• if old, it is discarded (ignore) , if new, LSDB info updated
and LSA “flooded” to neighbors (controlled flooding
- not sent in direction LSA was received from).
Network Layer: Control Plane 5-35
Flow Chart

Network Layer: Control Plane 5-36


OSPF Link State Packets
There are five types of Link-State Packets (LSPs).
1. hello: are used to establish and maintain adjacency with other
OSPF routers. They are also used to elect the Designated
Router (DR) and BackupDesignated Router (BDR) on multi-
access networks.
2. database description (DBD or DD): contains an abbreviated
list (links and seq#) of the sending router’s LSDB and is used
by receiving routers to check against their local LSDB to make
sure it has the latest information (seq# indicates age of info).
3. link-state request (LSR): used by routers to request more
information about any entry in the DBD
4. link-state update (LSU): used to reply to LSRs as well as to
announce new information (updates). LSUs can contain 7
different types of Link-State Advertisements (LSAs)
5. link-state acknowledgement (LSAck): sent to confirm receipt
of an LSU message (note OSPF does not use TCP)
Network Layer: Control Plane 5-37
OSPF Packet Format

IP header OSPF Message

OSPF Message
Header Body of OSPF Message

OSPF packets are not


carried as UDP or TCP
payload!
Message Type
Specific Data
LSA LSA ... ... LSA

OSPF has its own IP


protocol number: 89
LSA LSA
TTL: set to 1 (in most cases) Header Data

Destination IP: neighbor’s IP address or multicast address for a


broadcast environment:
224.0.0.5 (ALLSPFRouters) or 224.0.0.6 (AllDRouters: (designated
and backup designated only) 5-38
IP addressing
Unicast : edge to edge
Class A 0 to 127
Class B 128 to 191
Class C 129 to 223

Multicast :edge to more than one edge


Start with octet 224

Broadcast : edge to all edges in the network


Start with octet 255

Network Layer 4-39


OSPF “advanced” features
 security: all OSPF messages authenticated (to prevent
malicious intrusion)
 multiple same-cost paths allowed (only one path in
RIP)
 for each link, multiple cost metrics for different TOS
(e.g., satellite link cost set low for best effort traffic;
but high for real-time services, such as video)
 integrated uni- and multi-cast support:
• Multicast OSPF (MOSPF) uses same topology
data base as OSPF
 hierarchical OSPF in large domains.
TOS : Type Of Service => when UDP or TCP

Network Layer: Control Plane 5-40


Hierarchical OSPF
boundary router
backbone router

backbone
area
border
routers

area 3

internal
routers
area 1
area 2

Network Layer: Control Plane 5-41


Hierarchical OSPF
 two-level hierarchy: local area, backbone
• link-state advertisements only flooded within an
area (local or backbone)
• each router in an area (local or backbone) has:
• detailed area topology;
• direction (shortest path) to networks in other areas
obtained from border routers.
 backbone & local area routers: only use OSPF internal
to their area
 area border routers:
• “summarize” distances to networks in own area
• advertise to other Area Border routers to share with routers
in their area
 boundary (aka gateway) routers: connect to other
5-42
AS’es
Chapter 5: outline
5.1 introduction
5.2 routing protocols
 link state
 distance vector
5.3 intra-AS routing in the Internet:
 RIP
 OSPF
5.4 inter-AS routing in the Internet BGP

Network Layer: Control Plane 5-


43
Internet inter-AS routing: BGP
 BGP (Border Gateway Protocol): the de facto inter-
domain routing protocol (v4)
• “glue that holds the Internet together”
 BGP provides each AS a means to:
• e(xternal)BGP: obtain destination (network) reachability
information from neighboring ASes
• i(nternal)BGP: propagate reachability information to all
AS-internal routers.
• determine “good” routes to other networks based on
reachability information and policy
 allows a network to advertise its existence to rest of
Internet: I am here
 uses TCP for reliable communications to transmit
routing messages opening a session
Network Layer: Control Plane 5-44
eBGP, iBGP connections

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 eBGP and iBGP protools

Network Layer: Control Plane 5-45


BGP basics
 BGP session: two BGP routers (“peers”) exchange BGP
messages over semi-permanent TCP connection:
• BGP is a “path vector” protocol: routers advertise paths to
different destination networks
 when AS3 gateway router 3a advertises path AS3,X to AS2
gateway router 2c:
• AS3 promises to AS2 it will forward datagrams towards
network X
AS 3 3b
AS 1 1b
3a 3c
1a 1c
AS 2 2b 3d X
1d
BGP advertisement:
2a 2c AS3, X

2d
Network Layer: Control Plane 5-46
Path attributes and BGP routes
 advertised network (referred to as prefix in BGP)
includes BGP attributes
• prefix + attributes = “route”
 three important attributes:
• ORIGIN: advertising AS
• AS-PATH: list of ASes through which advertisement has
passed
• NEXT-HOP: indicates specific internal-AS router to next-
hop AS
 Policy-based routing:
• gateway receiving route advertisement uses import policy to
accept/decline path (e.g., never route through AS Y).
• AS export policy also determines whether to advertise path
to other neighboring ASes
Network Layer: Control Plane 5-47
BGP path advertisement
AS3 3b
AS1 1b
3a 3c
1a 1c
AS2 2b 3d X
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 import policy, AS2 router 2c accepts path AS3,X, and
propagates (via iBGP) to all AS2 routers
 based on AS2 export policy, AS2 router 2a advertises (via eBGP) path
AS2, AS3, X to AS1 router 1c
Network Layer: Control Plane 5-48
BGP path advertisement
AS3 3b
AS1 1b AS3,X
3a 3c
1a 1c
AS2 2b 3d X
1d AS3,X
AS2,AS3,X
2a 2c

2d

gateway router may learn about multiple paths to destination:


 AS1 gateway router 1c learns path AS2,AS3,X from 2a
 AS1 gateway router 1c learns path AS3,X from 3a
 Based on policy, AS1 gateway router 1c chooses path AS3,X, and
advertises path within AS1 via iBGP
Network Layer: Control Plane 5-49
BGP, OSPF, forwarding table entries
Q: how does router set forwarding table entry to distant prefix?

AS3 3b
AS1 1b AS3,X
1 AS3,X
3a 3c
1a 2 1c
local link AS2 2b 3d X
interfaces 2 1d 1 AS3,X
at routers AS2,AS3,X
1a, 1d 2a 2c
physical link
2d

dest interface  recall: 1a, 1b, 1d learn about dest X via iBGP
… … from 1c: “path to X goes through 1c”
X 1  1d: OSPF routing: to get to 1c, forward over
… … outgoing local interface 1

Network Layer: Control Plane 5-50


BGP, OSPF, forwarding table entries
Q: how does router set forwarding table entry to distant prefix?

AS3 3b
AS1 1b
1
3a 3c
1a 2 1c
AS2 2b 3d X
1d
2a 2c

2d

dest interface  recall: 1a, 1b, 1d learn about dest X via iBGP
… … from 1c: “path to X goes through 1c”
X 2  1d: OSPF intra-domain routing: to get to 1c,
… … forward over outgoing local interface 1
 1a: OSPF routing: to get to 1c, forward
over outgoing local interface 2
Network Layer: Control Plane 5-51
BGP route selection
 gateway router may learn Advertise path to
about more than one route AS 1 10.0.1.0/24 AS 2
to destination AS, selects Local pref = 10
Local pref
= 100 path to
route based on: AS 51
AS
Advertise
10.0.1.0/24
Advertise path to
1. local preference value 10.0.1.0/24
Local pref = 50 Local pref = 80
attribute: policy decision
2. shortest AS-PATH AS 3 Advertise path to
AS 4
10.0.1.0/24
3. closest NEXT-HOP AS 1 Source
internal router: hot potato
routing Cost=20
AS 1 Cost=5
4. additional criteria AS 3 High bandwidth network

 shortest AS-PATH may not mean


shortest router/hop path AS 4 AS 2

Low bandwidth network

 best cost intra path may not mean AS 2 AS 5

best cost overall


Destination
AS 6

Network Layer: Control Plane 5-52


Selective transit Private
Network
Example:
 AS 3 carries traffic
between AS 1 and AS 4 AS 1 AS 2
and between AS 2 and AS
4
 But AS 3 does not carry
traffic between AS 1 and
AS 2 AS 3
• The example shows a routing
policy. In other words, AS3 is
perfectly capable of carrying
AS1 -> AS2 traffic, but a
policy decision prevents AS1
and AS2 from using AS3 to
reach each other. (maybe
AS 4
private network connects AS1
and AS2?)
53
Customer/Provider and Peers
AS 2
Customer/
Provider

peers AS 4 AS 5
Customer/
Customer/ Customer/ Provider
Provider Provider

peers AS 6 AS 7 AS 8

 a stub network typically obtains access to the Internet through a transit


network. E.g., AS7 –> AS5 –> AS 8
 a transit network that is a provider may be a customer of another
network (provider) – AS4 is a customer of AS2 as is AS5.
 customer pays provider for service
54
Customer/Provider and Peers
peers
AS 1 AS 2 AS 3
(ISPs, lv Peers Peers
2) Customer/ Customer/ Customer/
Provider Provider Provider

peers AS 4 AS 5 AS 6
(ISPs, lv1)
Customer/Provider
Customer/
Provider

AS 7
peers
(stubs)
AS 8

 stubs can have peer relationships – direct link, carries no transit


 transit networks can have a peer relationship
 peers provide transit between their respective customers
 peers do not provide transit between peers, i.e., traffic from AS1 to AS3
cannot go through AS2.
 peers have to go up one layer to reach another peer if not directly connected
 peers normally do not pay each other for service 55
BGP: achieving policy via
advertisements
legend: provider
B network
X
W A
customer
C network:

Y
Suppose an ISP only wants to route traffic to/from its customer
networks (does not want to carry transit traffic between other ISPs)
 A advertises path AW to B and to C
 W is not B’s customer, B gets no “revenue” for routing
any of its traffic.
 B does not advertise (selective transit) BAW to X:
 B uses import and export policy to make this decision, wont take
(import) from A (or C) re W and won’t send (export) to X)
 C will route W traffic and will let customers X and Y know
about path CAW
BGP: achieving policy via
advertisements
legend: provider
B network
X
W A
customer
C network:
Y
Suppose an ISP only wants to route traffic to/from its customer
networks (does not want to carry transit traffic between other ISPs)
 A,B,C are provider networks (transit AS)
 X,W,Y are customer (of provider networks) - stub networks, i.e.,
originate/terminate traffic only
 X is dual-homed: attached to two networks
 policy to enforce: X cannot route traffic from B to C via itself (X
is a stub network)
 .. so X will not advertise to B a route to C (export policy)
 … whereas X does accept routes from C (import policy) and possibly
other routes from B (import policy)
Import and Export Policies
Best entry is
entered in
Based on IP routing
Policies attributes
Policies
table

Apply Import Select Best Update IP Apply Export


Rules Route routing table Rules

BGP BGP
updates IP routing updates
table depart
arrive

Network Layer 4-58


Why different Intra-, Inter-AS routing ?
policy:
 inter-AS: manager of an AS wants control over how
its traffic is routed externally, and who routes through
its net (not applicable for STUB networks).
 intra-AS: single admin, so no policy decisions needed
scale:
 hierarchical routing saves table size, reduced update
traffic
performance:
 intra-AS: can focus on performance (e.g., cost)
 inter-AS: policy may dominate over performance

Network Layer: Control Plane 5-59


BGP interactions
 BGP is executed between two routers
• BGP session
• BGP peers
AS 1
 procedure:
1. establishes TCP connection (port 179) to
BGP peer
2. exchange all BGP routes BGP Session
3. as long as connection is alive:
Periodically send incremental updates

 Note: Not all autonomous systems need to


run BGP. On many stub networks, the route AS 2
to the provider can be statically configured

60
BGP Message Types
 BGP messages exchanged between peers over TCP session
 BGP messages:
• OPEN (Type 1): opens TCP connection to remote BGP peer
(port 179) and authenticates sending BGP peer
• UPDATE (Type 2): advertises new path (or withdraws old)
• KEEPALIVE (Type 3): keeps connection alive in absence
of UPDATES; also ACKs OPEN request
• NOTIFICATION (Type 4): reports errors in previous msg;
also used to close connection

Network Layer: Control Plane 5-61


BGP route updates
 BGP route advertisement is sent in a BGP UPDATE
message

 a route is announced as a Network Prefix, e.g.,


10.0.1.0/24, and Attributes

 Attributes specify details about a route:


• Mandatory attributes:
ORIGIN
AS_PATH
NEXT_HOP
• many other attributes
62
ORIGIN attribute
 originating domain sends a route to a network (here 10.0.1.0/24) with
ORIGIN attribute (AS number)

Network Prefix
10.0.1.0/24,
10.0.1.0/24, AS 2 AS 4 ORIGIN {1}
ORIGIN {1}
10.0.1.0/24,
ORIGIN {1}

10.0.1.0/24 AS 1 AS 5

10.0.1.0/24,
ORIGIN {1} AS 3 10.0.1.0/24,
ORIGIN {1}

63
AS-PATH attributes
 each AS that propagates a route prepends its own AS number
• AS-PATH creates a full path to reach the network prefix 10.0.1.0/24
 path information prevents routing loops from occurring
 path information also provides information on the length of a path (no. of
ASes enroute, by default, a shorter route is preferred)
 Note: BGP aggregates routes according to CIDR rules

10.0.1.0/24,
10.0.1.0/24, AS 2 AS 4 AS-PATH {4,2,1}
AS-PATH {1}
10.0.1.0/24,
AS-PATH {2,1}

AS 1 AS 5

10.0.1.0/24, AS 3
AS-PATH {1} 10.0.1.0/24,
AS-PATH {3,1} 64
NEXT-HOP attributes
 each router that sends a route advertisement, includes its own IP
address of the forwarding port in a NEXT-HOP attribute
 the attribute provides information for the routing table of the receiving
router in the next AS on the path

128.100.11.1 128.143.71.21

AS 1 AS 5
AS 3

10.0.1.0/24, 10.0.1.0/24,
NEXT-HOP {128.100.11.1} NEXT-HOP {128.143.71.21}

65
Putting it all together

Where R1, R2, R3 are the IP interfaces of the BGP routers


in each AS facing the exterior, i.e., next hops
Network Layer 4-66
BGP NEXT-HOP -> IGP information
E.g., how does R1 learn about route to 10.0.1.0/24???
128.100.11.1/24 192.0.1.2

AS 1 eBGP
IGP router
AS 3 R1

10.0.1.0/24,
iBGP
10.0.1.0/24,
NEXT-HOP {128.100.11.1} NEXT-HOP {128.100.11.1}

At R1: Combined Routing table


IGP Routing table
At R1
Dest. Next hop
Dest. Next hop
128.100.11.0/24 192.0.1.2
128.100.11.0/24 192.0.1.2
iBGP info 10.0.1.0/24 192.0.1.2
Dest. Next hop
10.0.1.0/24 128.100.11.1
67

You might also like