SlideShare a Scribd company logo
Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Hierarchical Routing
 All routers run the same routing

Algorithm?
… not true in practice

Scale: With millions of
destinations:
 Can’t store all destinations

in routing tables
 Exchange of Routing
updates would swamp links!

Administrative Autonomy
 Internet = network of

networks
 Each network administrator
may want to control routing
in its own network
Hierarchical Routing
Gateway Routers
 One or more of the
into “Autonomous
routers in an AS will
Systems” (ASs).
have the added task of
 Routers in same
administrative domain
forwarding packets to
destinations outside
 Routers in same AS run
the AS.
same routing protocol
 Routers are organized





The routing algorithm
within an autonomous
system is called an
“intra-AS” routing
protocol
Routers in different AS
can run different intraAS routing protocol

1c
1a
1d

1b

AS1
Interconnected ASs

3c
3b

3a

2a

AS3

1c
1a
1d

2c
2b
AS2

1b

AS1

1b, 1c, 2a and 3a are Gateway Routers
Inter-AS tasks

AS1 must:
1. Learn which destinations are
reachable through AS2, which
through AS3
2. Propagate this reachability
information to all routers in
AS1.

Configure Forwarding table
Job of inter-AS routing protocol!

 Suppose router in AS1

receives datagram destined
outside of AS1:
 Router should forward
packet to gateway
router, but which one?

3c
3a
3b AS3

1a

2a

1c
1d

1b

Intra-AS
Routing
algorithm

AS1
Inter-AS
Routing
algorithm

Forwarding
table

2c
AS2

2b
Example: Setting forwarding table in router 1d
 Suppose AS1 learns (via inter-AS protocol) that

network x reachable via AS3 (gateway 1c) but not via
AS2.
 Inter-AS protocol propagates reachability info to all
internal routers.
 Router 1d determines from intra-AS routing info that
its interface I is on the least cost path to 1c.
 installs forwarding table entry (x,I)

x
3c

3a
3b
AS3
1a

2a

1c
1d

1b AS1

2c

2b
AS2
Example: Choosing among multiple ASs
 Now suppose AS1 learns from inter-AS protocol

that a network x is reachable from AS3 and from
AS2.
 To configure forwarding table, router 1d must
determine towards which gateway it should forward
packets for dest x.
 Hot Potato Routing: Send packet towards closest of
two routers.
x

3c

3a
3b
AS3
1a

2a

1c
1d

1b

2c
AS2

AS1

2b
Example: Choosing among multiple ASs

Learn from inter-AS
protocol that network
x is reachable via
multiple gateways

Use routing info
from intra-AS
protocol to
determine
costs of least-cost
paths to each
of the gateways

Hot potato routing:
Choose the
gateway
that has the
smallest least cost

Determine the
interface I that leads
to least-cost gateway.
Enter (x,I) in
forwarding table

Steps in adding an outside AS destination in a routers forwarding Table
Routing Protocols
Path Vector Routing
Path Vector Routing
Loop Prevention
If a router receives a message, checks
to see if its autonomous system is in the
path list to the destination.
If it is, looping is involved and the

message is ignored.
Policy Routing
If one of the path in the path vector is
against the policy it can ignore that
path and does not update its routing
table.
Inter-AS Routing in Internet: BGP
 BGP (Border Gateway Protocol)
 BGP provides each AS a means to:
1. Obtain subnet reachability information from
neighboring ASs.
2. Propagate reachability information to all ASinternal routers.
3. Determine “good” routes to subnets based on
reachability information and policy.

 Allows subnet to advertise its existence to

rest of Internet: “I am here”
BGP Basics
 Pairs of routers (BGP peers) exchange routing info over TCP

connections using port 179.
 For each TCP connection, the two routers at the end of the
connection are called BGP Peers
 The TCP connection along with all the BGP messages sent over
the connection is called a BGP Session
 Internal (IBGP) neighbours
 A pair of BGP speakers within the same AS



External (EBGP) neighbours

 Two BGP speakers from two different AS

eBGP session

3c
3a
3b
AS3
1a
AS1

iBGP session

2a

1c

1d

1b

2c
AS2

2b
BGP Basics
 BGP allows each AS to learn which destinations

are reachable via its neighboring ASs.
 Destinations are not hosts but instead are
CIDRized prefixes.


E.g. AS1 has four subnets attached to it
It will aggregate the prefixes of these four and will
advertise the single prefix

 AS1 and AS2 send reachability information

trough their gateway routers 1b and 2a.
 When a gateway router receives e-BGP learned
prefixes, the gateway router uses iBGP sessions
to distribute the prefixes to other routers in
the AS.
Distributing Reachability info
 Using eBGP session between 3a and 1c, AS3 sends

prefix reachability info to AS1.
 1c can then use iBGP do distribute new prefix
info to all routers in AS1
 1b can then re-advertise new reachability info
to AS2 over 1b-to-2a eBGP session
 When router learns of new prefix, it creates entry
for prefix in its forwarding table.
eBGP session

3c
3a
3b
AS3
1a
AS1

iBGP session

2a

1c

1d

1b

2c
AS2

2b
Path Attributes & BGP Routes
 In BGP an AS is recognized by its

globally unique Autonomous System
Number (ASN).
 Assigned by ICANN Regional
Registries.
 Advertised prefix includes BGP
attributes.
 prefix + attributes = “route”
 Two important attributes:
 AS-PATH and NEXT-HOP
Path Attributes & BGP Routes
 AS-PATH

 Contains

ASs through which prefix
advertisement has passed.
 When a prefix is passed into an AS, the As
adds its ASN to the AS-PATH attribute.
E.g suppose that the prefix
138.16.64.0/24 is first advertised from
AS2 to AS1.
If AS1 then advertises the prefix to
AS3, AS-PATH would be AS2 AS1.
 Detect and prevent looping advertisements
Routing Loop Prevention
AS2

[ Net1, (AS3,AS4) ]

[ Net1,
(AS2,AS3,AS4)]

AS3

AS1

[Net1, (AS4)]
AS4
Net1

[ Net1,
(AS1,AS2,AS3,AS4)]
AS3 won’t forward this further

More Related Content

PPTX
Week15 lec1
PPTX
Week16 lec1
PPTX
Week13 lec2
PPTX
Week14 lec2
PPTX
Week13 lec1
PDF
Routing
PPT
Routing, Different types of forwarding technique
Week15 lec1
Week16 lec1
Week13 lec2
Week14 lec2
Week13 lec1
Routing
Routing, Different types of forwarding technique

What's hot (20)

PPTX
Distance Vector & Link state Routing Algorithm
PPT
Zaharaddeen karami lawal distance vector routing
PPTX
Routing algorithm
PPSX
OSPF - Routing Protocol
PPTX
Distance Vector Routing Protocols
PPT
Routing protocols-network-layer
PPT
Routing table and routing algorithms
PPT
PPT
Routing
DOCX
How packet data travel over network
PPT
Networkdevices by Jetarvind kumar madhukar
PPTX
Presentation Routing algorithm
PPT
Evolution of Routing Techniques
PPTX
Ch 20 UNICAST ROUTING SECTION 2
PPTX
Introduction to backwards learning algorithm
PPTX
Routing Technique Table Type by Umar danjuma maiwada.ppt
PPTX
Network Routing | Computer Science
PPT
Dynamic routing under_sec
DOCX
Dsdv
Distance Vector & Link state Routing Algorithm
Zaharaddeen karami lawal distance vector routing
Routing algorithm
OSPF - Routing Protocol
Distance Vector Routing Protocols
Routing protocols-network-layer
Routing table and routing algorithms
Routing
How packet data travel over network
Networkdevices by Jetarvind kumar madhukar
Presentation Routing algorithm
Evolution of Routing Techniques
Ch 20 UNICAST ROUTING SECTION 2
Introduction to backwards learning algorithm
Routing Technique Table Type by Umar danjuma maiwada.ppt
Network Routing | Computer Science
Dynamic routing under_sec
Dsdv
Ad

Viewers also liked (15)

PDF
Stregthen collaboration
PDF
Mischool newsletter pacaralr
PPTX
運を引き寄せる
PPT
Questionnaire analysis
PDF
What can Lard Oil do for your company?
DOCX
Taller técnicas efectivas de cobranza
PPT
Russell Drake Miami
PDF
Teaser Deck CodersTrust
DOCX
Relatório de snell
PPTX
Analysing magazines
PPTX
What did you learn from audience feedback
PDF
Alta gastronomia Masia Notari 2014
PPTX
Question 3
PDF
Поговорим о различных версиях .NET
PPTX
Tugas materi5 van
Stregthen collaboration
Mischool newsletter pacaralr
運を引き寄せる
Questionnaire analysis
What can Lard Oil do for your company?
Taller técnicas efectivas de cobranza
Russell Drake Miami
Teaser Deck CodersTrust
Relatório de snell
Analysing magazines
What did you learn from audience feedback
Alta gastronomia Masia Notari 2014
Question 3
Поговорим о различных версиях .NET
Tugas materi5 van
Ad

Similar to Week14 lec1 (20)

PPT
16 bgp
 
PDF
CS6551 COMPUTER NETWORKS
PPT
bgp(border gateway protocol)
PPTX
PDF
Wrou01
PDF
E rou01 routing_basics
PDF
BGP security tuning: pull-up route
PDF
BGP troubleshooting: route origin
PDF
Routing Protocols
PPT
bgp.ppt
PDF
Internal BGP tuning: Mesh peering to avoid loop
PPTX
15 coms 525 tcpip - border gateway protocols
PDF
BGP tuning: Peer with loopback
PDF
U5CSS2 (1).pdf
PPT
bgp1 cryptogrphy and network security.ppt
PDF
Policies
PPTX
Advaced Computer Networks_Routing 2-Edited-1.pptx
PPT
PPT
PPT
11Chapter8R_InternetRoutingProtocols.ppt
16 bgp
 
CS6551 COMPUTER NETWORKS
bgp(border gateway protocol)
Wrou01
E rou01 routing_basics
BGP security tuning: pull-up route
BGP troubleshooting: route origin
Routing Protocols
bgp.ppt
Internal BGP tuning: Mesh peering to avoid loop
15 coms 525 tcpip - border gateway protocols
BGP tuning: Peer with loopback
U5CSS2 (1).pdf
bgp1 cryptogrphy and network security.ppt
Policies
Advaced Computer Networks_Routing 2-Edited-1.pptx
11Chapter8R_InternetRoutingProtocols.ppt

More from syedhaiderraza (20)

PPTX
Week11 lec2
PPTX
Week11 lec1
PPTX
Week10 lec1
PPTX
Week9 lec1
PPTX
Week8 lec2-bscs1
PPTX
Week8 lec1-bscs1
PPTX
Week5 lec3-bscs1
PPTX
Week5 lec2-bscs1
PPT
Week5 lec1-bscs1
PPTX
Week4 lec2-bscs1
PPTX
Week4 lec1-bscs1
PPTX
Week3 lec3-bscs1
PPTX
Week3 lec 2
PPTX
Week3 lec 1
PPTX
Week2 lec3-bscs1
PPTX
Week2 lec2-bscs1
PPTX
Week2 lec1-bscs1
PPT
Week1 lec2-bscs1
PPT
Week1 lec1-bscs1
PPTX
Week16 lec2
Week11 lec2
Week11 lec1
Week10 lec1
Week9 lec1
Week8 lec2-bscs1
Week8 lec1-bscs1
Week5 lec3-bscs1
Week5 lec2-bscs1
Week5 lec1-bscs1
Week4 lec2-bscs1
Week4 lec1-bscs1
Week3 lec3-bscs1
Week3 lec 2
Week3 lec 1
Week2 lec3-bscs1
Week2 lec2-bscs1
Week2 lec1-bscs1
Week1 lec2-bscs1
Week1 lec1-bscs1
Week16 lec2

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Trump Administration's workforce development strategy
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Types and Its function , kingdom of life
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
A systematic review of self-coping strategies used by university students to ...
Microbial disease of the cardiovascular and lymphatic systems
GDM (1) (1).pptx small presentation for students
Anesthesia in Laparoscopic Surgery in India
Trump Administration's workforce development strategy
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Weekly quiz Compilation Jan -July 25.pdf
Final Presentation General Medicine 03-08-2024.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Types and Its function , kingdom of life
O5-L3 Freight Transport Ops (International) V1.pdf
Final Presentation General Medicine 03-08-2024.pptx
human mycosis Human fungal infections are called human mycosis..pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
A systematic review of self-coping strategies used by university students to ...

Week14 lec1

  • 1. Chapter 4 Network Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 2. Hierarchical Routing  All routers run the same routing Algorithm? … not true in practice Scale: With millions of destinations:  Can’t store all destinations in routing tables  Exchange of Routing updates would swamp links! Administrative Autonomy  Internet = network of networks  Each network administrator may want to control routing in its own network
  • 3. Hierarchical Routing Gateway Routers  One or more of the into “Autonomous routers in an AS will Systems” (ASs). have the added task of  Routers in same administrative domain forwarding packets to destinations outside  Routers in same AS run the AS. same routing protocol  Routers are organized   The routing algorithm within an autonomous system is called an “intra-AS” routing protocol Routers in different AS can run different intraAS routing protocol 1c 1a 1d 1b AS1
  • 5. Inter-AS tasks AS1 must: 1. Learn which destinations are reachable through AS2, which through AS3 2. Propagate this reachability information to all routers in AS1.  Configure Forwarding table Job of inter-AS routing protocol!  Suppose router in AS1 receives datagram destined outside of AS1:  Router should forward packet to gateway router, but which one? 3c 3a 3b AS3 1a 2a 1c 1d 1b Intra-AS Routing algorithm AS1 Inter-AS Routing algorithm Forwarding table 2c AS2 2b
  • 6. Example: Setting forwarding table in router 1d  Suppose AS1 learns (via inter-AS protocol) that network x reachable via AS3 (gateway 1c) but not via AS2.  Inter-AS protocol propagates reachability info to all internal routers.  Router 1d determines from intra-AS routing info that its interface I is on the least cost path to 1c.  installs forwarding table entry (x,I) x 3c 3a 3b AS3 1a 2a 1c 1d 1b AS1 2c 2b AS2
  • 7. Example: Choosing among multiple ASs  Now suppose AS1 learns from inter-AS protocol that a network x is reachable from AS3 and from AS2.  To configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x.  Hot Potato Routing: Send packet towards closest of two routers. x 3c 3a 3b AS3 1a 2a 1c 1d 1b 2c AS2 AS1 2b
  • 8. Example: Choosing among multiple ASs Learn from inter-AS protocol that network x is reachable via multiple gateways Use routing info from intra-AS protocol to determine costs of least-cost paths to each of the gateways Hot potato routing: Choose the gateway that has the smallest least cost Determine the interface I that leads to least-cost gateway. Enter (x,I) in forwarding table Steps in adding an outside AS destination in a routers forwarding Table
  • 11. Path Vector Routing Loop Prevention If a router receives a message, checks to see if its autonomous system is in the path list to the destination. If it is, looping is involved and the message is ignored. Policy Routing If one of the path in the path vector is against the policy it can ignore that path and does not update its routing table.
  • 12. Inter-AS Routing in Internet: BGP  BGP (Border Gateway Protocol)  BGP provides each AS a means to: 1. Obtain subnet reachability information from neighboring ASs. 2. Propagate reachability information to all ASinternal routers. 3. Determine “good” routes to subnets based on reachability information and policy.  Allows subnet to advertise its existence to rest of Internet: “I am here”
  • 13. BGP Basics  Pairs of routers (BGP peers) exchange routing info over TCP connections using port 179.  For each TCP connection, the two routers at the end of the connection are called BGP Peers  The TCP connection along with all the BGP messages sent over the connection is called a BGP Session  Internal (IBGP) neighbours  A pair of BGP speakers within the same AS  External (EBGP) neighbours  Two BGP speakers from two different AS eBGP session 3c 3a 3b AS3 1a AS1 iBGP session 2a 1c 1d 1b 2c AS2 2b
  • 14. BGP Basics  BGP allows each AS to learn which destinations are reachable via its neighboring ASs.  Destinations are not hosts but instead are CIDRized prefixes.  E.g. AS1 has four subnets attached to it It will aggregate the prefixes of these four and will advertise the single prefix  AS1 and AS2 send reachability information trough their gateway routers 1b and 2a.  When a gateway router receives e-BGP learned prefixes, the gateway router uses iBGP sessions to distribute the prefixes to other routers in the AS.
  • 15. Distributing Reachability info  Using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1.  1c can then use iBGP do distribute new prefix info to all routers in AS1  1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session  When router learns of new prefix, it creates entry for prefix in its forwarding table. eBGP session 3c 3a 3b AS3 1a AS1 iBGP session 2a 1c 1d 1b 2c AS2 2b
  • 16. Path Attributes & BGP Routes  In BGP an AS is recognized by its globally unique Autonomous System Number (ASN).  Assigned by ICANN Regional Registries.  Advertised prefix includes BGP attributes.  prefix + attributes = “route”  Two important attributes:  AS-PATH and NEXT-HOP
  • 17. Path Attributes & BGP Routes  AS-PATH  Contains ASs through which prefix advertisement has passed.  When a prefix is passed into an AS, the As adds its ASN to the AS-PATH attribute. E.g suppose that the prefix 138.16.64.0/24 is first advertised from AS2 to AS1. If AS1 then advertises the prefix to AS3, AS-PATH would be AS2 AS1.  Detect and prevent looping advertisements
  • 18. Routing Loop Prevention AS2 [ Net1, (AS3,AS4) ] [ Net1, (AS2,AS3,AS4)] AS3 AS1 [Net1, (AS4)] AS4 Net1 [ Net1, (AS1,AS2,AS3,AS4)] AS3 won’t forward this further