SlideShare a Scribd company logo
1 of 53
4-1
Network Layer
Network Layer 4-2
What is mobility?
 spectrum of mobility, from the network perspective:
no mobility high mobility
mobile user, using
same access point
mobile user, passing
through multiple
access point while
maintaining ongoing
connections (like cell
phone)
mobile user,
connecting/
disconnecting
from network
using DHCP.
Network Layer 4-3
Mobility: Scenario
home network: permanent
“home” of mobile
(e.g., 128.119.40/24)
Permanent address:
address in home
network, can always be
used to reach mobile
e.g., 128.119.40.186
wide area
network
correspondent
Network Layer 4-4
How do you contact a mobile friend:
 search all phone
books?
 call her parents?
 expect her to let you
know where he/she is?
I wonder where
Alice moved to?
Consider friend frequently changing
addresses, how do you find her?
Network Layer 4-5
Mobility: approaches
 Let routing handle it: routers advertise permanent
address of mobile-nodes-in-residence via usual
routing table exchange.
 routing tables indicate where each mobile located
 no changes to end-systems
 Let end-systems handle it:
 Ask help from some agents (parents)
Network Layer 4-6
Mobility: approaches
 Let routing handle it: routers advertise permanent
address of mobile-nodes-in-residence via usual
routing table exchange.
 routing tables indicate where each mobile located
 no changes to end-systems
 let end-systems handle it:
 Ask help from some agents (parents)
not
scalable
to millions of
mobiles
Network Layer 4-7
Mobility: Vocabulary
home network: permanent
“home” of mobile
(e.g., 128.119.40/24)
Permanent address:
address in home
network, can always be
used to reach mobile
e.g., 128.119.40.186
home agent: entity that will
perform mobility functions on
behalf of mobile, when mobile
is remote
wide area
network
correspondent
Network Layer 4-8
Mobility: more vocabulary
Care-of-address: address
in visited network.
(e.g., 79,129.13.2)
wide area
network
visited network: network
in which mobile currently
resides (e.g., 79.129.13/24)
Permanent address: remains
constant (e.g., 128.119.40.186)
foreign agent: entity in
visited network that
performs mobility
functions on behalf of
mobile.
correspondent: wants
to communicate with
mobile
Network Layer 4-9
Mobility: registration
End result:
 Foreign agent knows about mobile
 Home agent knows location of mobile
wide area
network
home network
visited network
1
mobile contacts
foreign agent on
entering visited
network
2
foreign agent contacts home
agent home: “this mobile is
resident in my network”
Network Layer 4-10
Mobility via Indirect Routing
wide area
network
home
network
visited
network
3
2
4
1
correspondent
addresses packets
using home address
of mobile
home agent intercepts
packets, forwards to
foreign agent
foreign agent
receives packets,
forwards to mobile
mobile replies
directly to
correspondent
Network Layer 4-11
Forwarding datagrams to remote mobile
Permanent address:
128.119.40.186
Care-of address:
79.129.13.2
dest: 128.119.40.186
packet sent by
correspondent
dest: 79.129.13.2 dest: 128.119.40.186
packet sent by home agent to foreign
agent: a packet within a packet
dest: 128.119.40.186
foreign-agent-to-mobile packet
Network Layer 4-12
Indirect Routing: comments
 Mobile uses two addresses:
 permanent address: used by correspondent (hence
mobile location is transparent to correspondent)
 care-of-address: used by home agent to forward
datagrams to mobile
 foreign agent functions may be done by mobile itself
 triangle routing: correspondent-home-network-
mobile
 inefficient when
correspondent, mobile
are in same network
Network Layer 4-13
Indirect Routing: moving between networks
 suppose mobile user moves to another
network
 registers with new foreign agent
 new foreign agent registers with home agent
 home agent update care-of-address for mobile
 packets continue to be forwarded to mobile (but
with new care-of-address)
 Mobility, changing foreign networks
transparent: on going connections can be
maintained!
Network Layer 4-14
Mobility via Direct Routing
wide area
network
home
network
visited
network
4
2
4
1
correspondent
requests, receives
foreign address of
mobile
correspondent forwards
to foreign agent
foreign agent
receives packets,
forwards to mobile
mobile replies
directly to
correspondent
3
Network Layer 4-15
Mobility via Direct Routing: comments
 overcome triangle routing problem
 non-transparent to correspondent:
correspondent must get care-of-address
from home agent
 What happens if mobile changes networks?
Network Layer 4-16
Mobile IP
 RFC 3220
 has many features we’ve seen:
 home agents, foreign agents, foreign-agent
registration, care-of-addresses, encapsulation
(packet-within-a-packet)
 three components to standard:
 agent discovery
 registration with home agent
 indirect routing of datagrams
Network Layer 4-17
Mobile IP: agent discovery
 agent advertisement: foreign/home agents advertise
service by broadcasting ICMP messages (typefield = 9)
RBHFMGV
bits
reserved
type = 16
type = 9 code = 0
= 9
checksum
= 9
router address
standard
ICMP fields
mobility agent
advertisement
extension
length sequence #
registration lifetime
0 or more care-of-
addresses
0 8 16 24
R bit: registration
required
H,F bits: home
and/or foreign agent
Network Layer 4-18
Mobile IP: registration example
visited network: 79.129.13/24
home agent
HA: 128.119.40.7
foreign agent
COA: 79.129.13.2
COA: 79.129.13.2
….
ICMP agent adv.
Mobile agent
MA: 128.119.40.186
registration req.
COA: 79.129.13.2
HA: 128.119.40.7
MA: 128.119.40.186
Lifetime: 9999
identification:714
….
registration req.
COA: 79.129.13.2
HA: 128.119.40.7
MA: 128.119.40.186
Lifetime: 9999
identification: 714
encapsulation format
….
registration reply
HA: 128.119.40.7
MA: 128.119.40.186
Lifetime: 4999
Identification: 714
encapsulation format
….
registration reply
HA: 128.119.40.7
MA: 128.119.40.186
Lifetime: 4999
Identification: 714
….
time
Network Layer 4-19
A Link-State Routing Algorithm
Dijkstra’s algorithm
 net topology, link costs
known to all nodes
 accomplished via “link
state broadcast”
 all nodes have same info
 computes least cost paths
from one node (‘source”) to
all other nodes
 gives routing table for
that node
Notation:
 c(i,j): link cost from node i
to j. cost infinite if not
direct neighbors
 D(v): current value of cost
of path from source to
dest V
 p(v): predecessor node
along path from source to
v, that is next v
 N: set of nodes whose
least cost path definitively
known
Network Layer 4-20
Dijkstra’s algorithm, more discussion
 Why the algorithm is correct ?
 Is this algorithm always correct ?
A
B
C
1
1
-3
Network Layer 4-21
Distance Vector Routing Algorithm
iterative:
 continues until no nodes
exchange info.
 self-terminating: no
“signal” to stop
asynchronous:
 nodes need not exchange
info/iterate in lock step!
distributed:
 each node communicates
only with directly-
attached neighbors
Key Idea
 Given my distance to a
neighboring node
 Given the distances from the
neighboring nodes to remote
nodes
 My distances to remote nodes
Network Layer 4-22
Distance Vector Routing Algorithm
Distance Table data structure
 each node has its own
 row for each possible destination
 column for each directly-
attached neighbor to node
 example: in node X, for dest. Y
via neighbor Z:
D (Y,Z)
X
distance from X to
Y, via Z as next hop
c(X,Z) + min {D (Y,w)}
Z
w
=
=
D ()
Y
Z
Y
1
7
Z
2
5
X
via
Network Layer 4-23
Distance table gives routing table
D ()
A
B
C
D
A
1
7
6
4
B
14
8
9
11
D
5
5
4
2
E
cost to destination via
A
B
C
D
A,1
D,5
D,4
D,2
Outgoing link
to use, cost
Distance table Routing table
Network Layer 4-24
Distance Vector Routing: overview
Iterative, asynchronous:
each local iteration caused
by:
 message from neighbor: its
least cost path change
from neighbor
Distributed:
 each node notifies
neighbors only when its
least cost path to any
destination changes
 neighbors then notify
their neighbors if
necessary
wait for (msg from neighbor)
recompute distance table
if least cost path to any dest
has changed, notify
neighbors
Each node:
Network Layer 4-25
Comparison of LS and DV algorithms
Message complexity
 LS: with n nodes, E links,
O(nE) msgs sent each
 DV: exchange between
neighbors only
 convergence time varies
Speed of Convergence
 LS: O(n2) algorithm requires
O(nE) msgs
 may have oscillations
 DV: convergence time varies
 may be routing loops
 count-to-infinity problem
Robustness: what happens
if router malfunctions?
LS:
 node can advertise
incorrect link cost
 each node computes only
its own table
DV:
 DV node can advertise
incorrect path cost
 each node’s table used by
others
• error propagate thru
network
Network Layer 4-26
Chapter 4 roadmap
4.1 Introduction and Network Service Models
4.2 Routing Principles
4.3 Hierarchical Routing
4.4 The Internet (IP) Protocol
4.5 Routing in the Internet
4.6 What’s Inside a Router
4.7 IPv6
4.8 Multicast Routing
4.9 Mobility
Network Layer 4-27
Hierarchical Routing
 aggregate routers into
regions, “autonomous
systems” (AS)
 routers in same AS run
same routing protocol
 “intra-AS” routing
protocol
 routers in different AS
can run different intra-
AS routing protocol
 special routers in AS
 run intra-AS routing
protocol with all other
routers in AS
 also responsible for
routing to destinations
outside AS
 run inter-AS routing
protocol with other
gateway routers
gateway routers
a
b
b
a
a
C
A
B
d
A.a
A.c
C.b
B.a
c
b
c
a
b
b
b
a
a
a
C
A
B
d
A.a
A.a
A.a
A.c
A.c
A.c
C.b
C.b
C.b
B.a
B.a
B.a
c
c
b
b
c
c
c
Network Layer 4-28
Intra-AS and Inter-AS routing
Gateways:
•perform inter-AS
routing amongst
themselves
•perform intra-AS
routers with other
routers in their
AS
inter-AS, intra-AS
routing in
gateway A.c
network layer
link layer
physical layer
a
b
b
a
a
C
A
B
d
A.a
A.c
C.b
B.a
c
b
c
Network Layer 4-29
Intra-AS and Inter-AS routing
Host
h2
a
b
b
a
a
C
A
B
d c
A.a
A.c
C.b
B.a
c
b
Host
h1
Intra-AS routing
within AS A
Inter-AS
routing
between
A and B
Intra-AS routing
within AS B
 We’ll examine specific inter-AS and intra-AS
Internet routing protocols shortly
Network Layer 4-30
DHCP: Dynamic Host Configuration Protocol
Goal: allow host to dynamically obtain its IP address
from network server when it joins network
 Allows reuse of addresses (only hold address while
connected an “on”
 Support for mobile users who want to join network
Network Layer 4-31
DHCP client-server scenario
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2
223.1.3.1
223.1.3.27
A
B
E
DHCP
server
arriving DHCP
client needs
address in this
network
 host broadcasts “DHCP discover” msg
 DHCP server responds with “DHCP offer” msg
 host requests IP address: “DHCP request” msg
 DHCP server sends address: “DHCP ack” msg
Network Layer 4-32
DHCP client-server scenario
DHCP server: 223.1.2.5 arriving
client
time
DHCP discover
src : 0.0.0.0, 68
dest.: 255.255.255.255,67
yiaddr: 0.0.0.0
transaction ID: 654
DHCP offer
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
yiaddrr: 223.1.2.4
transaction ID: 654
Lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
yiaddrr: 223.1.2.4
transaction ID: 655
Lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
yiaddrr: 223.1.2.4
transaction ID: 655
Lifetime: 3600 secs
Network Layer 4-33
Internet AS Hierarchy
Intra-AS border (exterior gateway) routers
Inter-AS interior (gateway) routers
Network Layer 4-34
Intra-AS Routing
 Also known as Interior Gateway Protocols (IGP)
 Most common Intra-AS routing protocols:
 RIP: Routing Information Protocol
 OSPF: Open Shortest Path First
 Border : Interior Gateway Routing Protocol
(Cisco proprietary)
Network Layer 4-35
RIP ( Routing Information Protocol)
 Distance vector algorithm
 Included in BSD-UNIX Distribution in 1982
 Distance metric: # of hops (max = 15 hops)
 Can you guess why?
 Distance vectors: exchanged among neighbors every
30 sec via Response Message (also called
advertisement)
 Each advertisement: list of up to 25 destination nets
within AS
Network Layer 4-36
RIP: Example
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B 7
x -- 1
…. …. ....
w x y
z
A
C
D B
Routing table in D
Network Layer 4-37
RIP: Example
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B A 7 5
x -- 1
…. …. ....
Routing table in D
w x y
z
A
C
D B
Dest Next hops
w - -
x - -
z C 4
…. … ...
Advertisement
from A to D
Network Layer 4-38
RIP: Link Failure and Recovery
If no advertisement heard after 180 sec -->
neighbor/link declared dead
 routes via neighbor invalidated
 new advertisements sent to neighbors
 neighbors in turn send out new advertisements (if
tables changed)
 link failure info quickly propagates to entire net
 poison reverse used to prevent ping-pong loops
(infinite distance = 16 hops)
Network Layer 4-39
RIP Table processing
 RIP routing tables managed by application-level
process called route-d (daemon)
 advertisements sent in UDP packets, periodically
repeated
physical
link
network forwarding
(IP) table
Transprt
(UDP)
routed
physical
link
network
(IP)
Transprt
(UDP)
routed
forwarding
table
Network Layer 4-40
RIP Table example (continued)
Router: giroflee.eurocom.fr
 Three attached class C networks (LANs)
 Router only knows routes to attached LANs
 Default router used to “go up”
 Route multicast address: 224.0.0.0
 Loopback interface (for debugging)
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
127.0.0.1 127.0.0.1 UH 0 26492 lo0
192.168.2. 192.168.2.5 U 2 13 fa0
193.55.114. 193.55.114.6 U 3 58503 le0
192.168.3. 192.168.3.5 U 2 25 qaa0
224.0.0.0 193.55.114.6 U 3 0 le0
default 193.55.114.129 UG 0 143454
Network Layer 4-41
OSPF (Open Shortest Path First)
 “open”: publicly available
 Uses Link State algorithm
 LS packet dissemination
 Topology map at each node
 Route computation using Dijkstra’s algorithm
 OSPF advertisement carries one entry per neighbor
router
 Advertisements disseminated to entire AS (via
flooding)
 Carried in OSPF messages directly over IP (rather than TCP
or UDP
Network Layer 4-42
OSPF “advanced” features (not in RIP)
 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;
high for real time)
 Integrated uni- and multicast support:
 Multicast OSPF (MOSPF) uses same topology data
base as OSPF
 Hierarchical OSPF in large domains.
Network Layer 4-43
Hierarchical OSPF
Network Layer 4-44
Hierarchical OSPF
 Two-level hierarchy: local area, backbone.
 Link-state advertisements only in area
 each nodes has detailed area topology; only know
direction (shortest path) to nets in other areas.
 Area border routers: “summarize” distances to nets
in own area, advertise to other Area Border routers.
 Backbone routers: run OSPF routing limited to
backbone.
 Boundary routers: connect to other AS’s.
Network Layer 4-45
Inter-AS routing in the Internet: BGP
Figure 4.5.2-new2: BGP use for inter-domain routing
AS2
(OSPF
intra-AS
routing)
AS1
(RIP intra-AS
routing) BGP
AS3
(OSPF intra-AS
routing)
BGP
R1 R2
R3
R4
R5
Network Layer 4-46
Internet inter-AS routing: BGP
 BGP (Border Gateway Protocol): the de facto
standard
 Path Vector protocol:
 similar to Distance Vector protocol
 each Border Gateway broadcast to neighbors
(peers) entire path (i.e., sequence of AS’s) to
destination
 BGP routes to networks (ASs), not individual
hosts
 E.g., Gateway X may send its path to dest. Z:
Path (X,Z) = X,Y1,Y2,Y3,…,Z
Network Layer 4-47
BGP operation
Q: What does a BGP router (gateway) do?
 Receiving and filtering route advertisements from
directly attached neighbor(s).
 Route selection.
 To route to destination X, which path )of
several advertised) will be taken?
 Sending route advertisements to neighbors.
Network Layer 4-48
Why different Intra-/Inter-AS routing ?
Policy:
 Inter-AS: admin wants control over how its traffic
routed, who routes through its net.
 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
 Inter-AS: policy may dominate over performance
Network Layer 4-49
Why different Intra-/Inter-AS routing ?
Shaw
Bell
Telus
Network Layer 4-50
Internet inter-AS routing: BGP
Suppose: gateway X send its path to peer gateway W
 W may or may not select path offered by X
 cost, policy (don’t route via competitors AS), loop
prevention reasons.
 If W selects path advertised by X, then:
Path (W,Z) = w, Path (X,Z)
 Note: X can control incoming traffic by controlling it
route advertisements to peers:
 e.g., don’t want to route traffic to Z -> don’t
advertise any routes to Z
Network Layer 4-51
BGP: controlling who routes to you
Figure 4.5-BGPnew: a simple BGP scenario
A
B
C
W
X
Y
legend:
customer
network:
provider
network
 A,B,C are provider networks
 X,W,Y are customer (of provider networks)
 X is dual-homed: attached to two networks
 X does not want to route from B via X to C
 .. so X will not advertise to B a route to C
Network Layer 4-52
BGP: controlling who routes to you
Figure 4.5-BGPnew: a simple BGP scenario
A
B
C
W
X
Y
legend:
customer
network:
provider
network
 A advertises to B the path AW
 B advertises to X the path BAW
 Should B advertise to C the path BAW?
 No way! B gets no “revenue” for routing CBAW since neither
W nor C are B’s customers
 B wants to force C to route to w via A
 B wants to route only to/from its customers!
Network Layer 4-53
BGP messages
 BGP messages exchanged using TCP.
 BGP messages:
 OPEN: opens TCP connection to peer and
authenticates sender
 UPDATE: advertises new path (or withdraws old)
 KEEPALIVE keeps connection alive in absence of
UPDATES; also ACKs OPEN request
 NOTIFICATION: reports errors in previous msg;
also used to close connection

More Related Content

Similar to UNIT II (3) - NETWORK LAYER, DATA LINK LAYER

Similar to UNIT II (3) - NETWORK LAYER, DATA LINK LAYER (20)

WIRELESS NETWORK
WIRELESS NETWORKWIRELESS NETWORK
WIRELESS NETWORK
 
Mobile internet protocol
Mobile internet protocolMobile internet protocol
Mobile internet protocol
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 
It2402 mobile communication unit 4
It2402 mobile communication unit 4It2402 mobile communication unit 4
It2402 mobile communication unit 4
 
MOBILE IP,DHCP,ADHOC ROUTING PROTOCOLS
MOBILE IP,DHCP,ADHOC ROUTING PROTOCOLSMOBILE IP,DHCP,ADHOC ROUTING PROTOCOLS
MOBILE IP,DHCP,ADHOC ROUTING PROTOCOLS
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
UNIT-IV.pptx
UNIT-IV.pptxUNIT-IV.pptx
UNIT-IV.pptx
 
Mobileip 161105154557
Mobileip 161105154557Mobileip 161105154557
Mobileip 161105154557
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 
Mobileip 161105154557
Mobileip 161105154557Mobileip 161105154557
Mobileip 161105154557
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
mobile ip, Mobile COmmunication Internet Protocol
mobile ip, Mobile COmmunication Internet Protocolmobile ip, Mobile COmmunication Internet Protocol
mobile ip, Mobile COmmunication Internet Protocol
 
NetworkProtocols.ppt
NetworkProtocols.pptNetworkProtocols.ppt
NetworkProtocols.ppt
 
Mobile IP - UNIT 4 part1.pptx
Mobile IP - UNIT 4 part1.pptxMobile IP - UNIT 4 part1.pptx
Mobile IP - UNIT 4 part1.pptx
 
C08-Network_Protocols.ppt
C08-Network_Protocols.pptC08-Network_Protocols.ppt
C08-Network_Protocols.ppt
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 
ACN.pptx
ACN.pptxACN.pptx
ACN.pptx
 
implementation of sinkhole attack on DSR protocol
implementation of sinkhole attack on DSR protocolimplementation of sinkhole attack on DSR protocol
implementation of sinkhole attack on DSR protocol
 
Unit 3
Unit 3Unit 3
Unit 3
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 

UNIT II (3) - NETWORK LAYER, DATA LINK LAYER

  • 2. Network Layer 4-2 What is mobility?  spectrum of mobility, from the network perspective: no mobility high mobility mobile user, using same access point mobile user, passing through multiple access point while maintaining ongoing connections (like cell phone) mobile user, connecting/ disconnecting from network using DHCP.
  • 3. Network Layer 4-3 Mobility: Scenario home network: permanent “home” of mobile (e.g., 128.119.40/24) Permanent address: address in home network, can always be used to reach mobile e.g., 128.119.40.186 wide area network correspondent
  • 4. Network Layer 4-4 How do you contact a mobile friend:  search all phone books?  call her parents?  expect her to let you know where he/she is? I wonder where Alice moved to? Consider friend frequently changing addresses, how do you find her?
  • 5. Network Layer 4-5 Mobility: approaches  Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange.  routing tables indicate where each mobile located  no changes to end-systems  Let end-systems handle it:  Ask help from some agents (parents)
  • 6. Network Layer 4-6 Mobility: approaches  Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange.  routing tables indicate where each mobile located  no changes to end-systems  let end-systems handle it:  Ask help from some agents (parents) not scalable to millions of mobiles
  • 7. Network Layer 4-7 Mobility: Vocabulary home network: permanent “home” of mobile (e.g., 128.119.40/24) Permanent address: address in home network, can always be used to reach mobile e.g., 128.119.40.186 home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote wide area network correspondent
  • 8. Network Layer 4-8 Mobility: more vocabulary Care-of-address: address in visited network. (e.g., 79,129.13.2) wide area network visited network: network in which mobile currently resides (e.g., 79.129.13/24) Permanent address: remains constant (e.g., 128.119.40.186) foreign agent: entity in visited network that performs mobility functions on behalf of mobile. correspondent: wants to communicate with mobile
  • 9. Network Layer 4-9 Mobility: registration End result:  Foreign agent knows about mobile  Home agent knows location of mobile wide area network home network visited network 1 mobile contacts foreign agent on entering visited network 2 foreign agent contacts home agent home: “this mobile is resident in my network”
  • 10. Network Layer 4-10 Mobility via Indirect Routing wide area network home network visited network 3 2 4 1 correspondent addresses packets using home address of mobile home agent intercepts packets, forwards to foreign agent foreign agent receives packets, forwards to mobile mobile replies directly to correspondent
  • 11. Network Layer 4-11 Forwarding datagrams to remote mobile Permanent address: 128.119.40.186 Care-of address: 79.129.13.2 dest: 128.119.40.186 packet sent by correspondent dest: 79.129.13.2 dest: 128.119.40.186 packet sent by home agent to foreign agent: a packet within a packet dest: 128.119.40.186 foreign-agent-to-mobile packet
  • 12. Network Layer 4-12 Indirect Routing: comments  Mobile uses two addresses:  permanent address: used by correspondent (hence mobile location is transparent to correspondent)  care-of-address: used by home agent to forward datagrams to mobile  foreign agent functions may be done by mobile itself  triangle routing: correspondent-home-network- mobile  inefficient when correspondent, mobile are in same network
  • 13. Network Layer 4-13 Indirect Routing: moving between networks  suppose mobile user moves to another network  registers with new foreign agent  new foreign agent registers with home agent  home agent update care-of-address for mobile  packets continue to be forwarded to mobile (but with new care-of-address)  Mobility, changing foreign networks transparent: on going connections can be maintained!
  • 14. Network Layer 4-14 Mobility via Direct Routing wide area network home network visited network 4 2 4 1 correspondent requests, receives foreign address of mobile correspondent forwards to foreign agent foreign agent receives packets, forwards to mobile mobile replies directly to correspondent 3
  • 15. Network Layer 4-15 Mobility via Direct Routing: comments  overcome triangle routing problem  non-transparent to correspondent: correspondent must get care-of-address from home agent  What happens if mobile changes networks?
  • 16. Network Layer 4-16 Mobile IP  RFC 3220  has many features we’ve seen:  home agents, foreign agents, foreign-agent registration, care-of-addresses, encapsulation (packet-within-a-packet)  three components to standard:  agent discovery  registration with home agent  indirect routing of datagrams
  • 17. Network Layer 4-17 Mobile IP: agent discovery  agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages (typefield = 9) RBHFMGV bits reserved type = 16 type = 9 code = 0 = 9 checksum = 9 router address standard ICMP fields mobility agent advertisement extension length sequence # registration lifetime 0 or more care-of- addresses 0 8 16 24 R bit: registration required H,F bits: home and/or foreign agent
  • 18. Network Layer 4-18 Mobile IP: registration example visited network: 79.129.13/24 home agent HA: 128.119.40.7 foreign agent COA: 79.129.13.2 COA: 79.129.13.2 …. ICMP agent adv. Mobile agent MA: 128.119.40.186 registration req. COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification:714 …. registration req. COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification: 714 encapsulation format …. registration reply HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 encapsulation format …. registration reply HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 …. time
  • 19. Network Layer 4-19 A Link-State Routing Algorithm Dijkstra’s algorithm  net topology, link costs known to all nodes  accomplished via “link state broadcast”  all nodes have same info  computes least cost paths from one node (‘source”) to all other nodes  gives routing table for that node Notation:  c(i,j): link cost from node i to j. cost infinite if not direct neighbors  D(v): current value of cost of path from source to dest V  p(v): predecessor node along path from source to v, that is next v  N: set of nodes whose least cost path definitively known
  • 20. Network Layer 4-20 Dijkstra’s algorithm, more discussion  Why the algorithm is correct ?  Is this algorithm always correct ? A B C 1 1 -3
  • 21. Network Layer 4-21 Distance Vector Routing Algorithm iterative:  continues until no nodes exchange info.  self-terminating: no “signal” to stop asynchronous:  nodes need not exchange info/iterate in lock step! distributed:  each node communicates only with directly- attached neighbors Key Idea  Given my distance to a neighboring node  Given the distances from the neighboring nodes to remote nodes  My distances to remote nodes
  • 22. Network Layer 4-22 Distance Vector Routing Algorithm Distance Table data structure  each node has its own  row for each possible destination  column for each directly- attached neighbor to node  example: in node X, for dest. Y via neighbor Z: D (Y,Z) X distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)} Z w = = D () Y Z Y 1 7 Z 2 5 X via
  • 23. Network Layer 4-23 Distance table gives routing table D () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2 E cost to destination via A B C D A,1 D,5 D,4 D,2 Outgoing link to use, cost Distance table Routing table
  • 24. Network Layer 4-24 Distance Vector Routing: overview Iterative, asynchronous: each local iteration caused by:  message from neighbor: its least cost path change from neighbor Distributed:  each node notifies neighbors only when its least cost path to any destination changes  neighbors then notify their neighbors if necessary wait for (msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node:
  • 25. Network Layer 4-25 Comparison of LS and DV algorithms Message complexity  LS: with n nodes, E links, O(nE) msgs sent each  DV: exchange between neighbors only  convergence time varies Speed of Convergence  LS: O(n2) algorithm requires O(nE) msgs  may have oscillations  DV: convergence time varies  may be routing loops  count-to-infinity problem Robustness: what happens if router malfunctions? LS:  node can advertise incorrect link cost  each node computes only its own table DV:  DV node can advertise incorrect path cost  each node’s table used by others • error propagate thru network
  • 26. Network Layer 4-26 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol 4.5 Routing in the Internet 4.6 What’s Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • 27. Network Layer 4-27 Hierarchical Routing  aggregate routers into regions, “autonomous systems” (AS)  routers in same AS run same routing protocol  “intra-AS” routing protocol  routers in different AS can run different intra- AS routing protocol  special routers in AS  run intra-AS routing protocol with all other routers in AS  also responsible for routing to destinations outside AS  run inter-AS routing protocol with other gateway routers gateway routers a b b a a C A B d A.a A.c C.b B.a c b c a b b b a a a C A B d A.a A.a A.a A.c A.c A.c C.b C.b C.b B.a B.a B.a c c b b c c c
  • 28. Network Layer 4-28 Intra-AS and Inter-AS routing Gateways: •perform inter-AS routing amongst themselves •perform intra-AS routers with other routers in their AS inter-AS, intra-AS routing in gateway A.c network layer link layer physical layer a b b a a C A B d A.a A.c C.b B.a c b c
  • 29. Network Layer 4-29 Intra-AS and Inter-AS routing Host h2 a b b a a C A B d c A.a A.c C.b B.a c b Host h1 Intra-AS routing within AS A Inter-AS routing between A and B Intra-AS routing within AS B  We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly
  • 30. Network Layer 4-30 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network  Allows reuse of addresses (only hold address while connected an “on”  Support for mobile users who want to join network
  • 31. Network Layer 4-31 DHCP client-server scenario 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E DHCP server arriving DHCP client needs address in this network  host broadcasts “DHCP discover” msg  DHCP server responds with “DHCP offer” msg  host requests IP address: “DHCP request” msg  DHCP server sends address: “DHCP ack” msg
  • 32. Network Layer 4-32 DHCP client-server scenario DHCP server: 223.1.2.5 arriving client time DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs
  • 33. Network Layer 4-33 Internet AS Hierarchy Intra-AS border (exterior gateway) routers Inter-AS interior (gateway) routers
  • 34. Network Layer 4-34 Intra-AS Routing  Also known as Interior Gateway Protocols (IGP)  Most common Intra-AS routing protocols:  RIP: Routing Information Protocol  OSPF: Open Shortest Path First  Border : Interior Gateway Routing Protocol (Cisco proprietary)
  • 35. Network Layer 4-35 RIP ( Routing Information Protocol)  Distance vector algorithm  Included in BSD-UNIX Distribution in 1982  Distance metric: # of hops (max = 15 hops)  Can you guess why?  Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement)  Each advertisement: list of up to 25 destination nets within AS
  • 36. Network Layer 4-36 RIP: Example Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B 7 x -- 1 …. …. .... w x y z A C D B Routing table in D
  • 37. Network Layer 4-37 RIP: Example Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B A 7 5 x -- 1 …. …. .... Routing table in D w x y z A C D B Dest Next hops w - - x - - z C 4 …. … ... Advertisement from A to D
  • 38. Network Layer 4-38 RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead  routes via neighbor invalidated  new advertisements sent to neighbors  neighbors in turn send out new advertisements (if tables changed)  link failure info quickly propagates to entire net  poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)
  • 39. Network Layer 4-39 RIP Table processing  RIP routing tables managed by application-level process called route-d (daemon)  advertisements sent in UDP packets, periodically repeated physical link network forwarding (IP) table Transprt (UDP) routed physical link network (IP) Transprt (UDP) routed forwarding table
  • 40. Network Layer 4-40 RIP Table example (continued) Router: giroflee.eurocom.fr  Three attached class C networks (LANs)  Router only knows routes to attached LANs  Default router used to “go up”  Route multicast address: 224.0.0.0  Loopback interface (for debugging) Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 127.0.0.1 127.0.0.1 UH 0 26492 lo0 192.168.2. 192.168.2.5 U 2 13 fa0 193.55.114. 193.55.114.6 U 3 58503 le0 192.168.3. 192.168.3.5 U 2 25 qaa0 224.0.0.0 193.55.114.6 U 3 0 le0 default 193.55.114.129 UG 0 143454
  • 41. Network Layer 4-41 OSPF (Open Shortest Path First)  “open”: publicly available  Uses Link State algorithm  LS packet dissemination  Topology map at each node  Route computation using Dijkstra’s algorithm  OSPF advertisement carries one entry per neighbor router  Advertisements disseminated to entire AS (via flooding)  Carried in OSPF messages directly over IP (rather than TCP or UDP
  • 42. Network Layer 4-42 OSPF “advanced” features (not in RIP)  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; high for real time)  Integrated uni- and multicast support:  Multicast OSPF (MOSPF) uses same topology data base as OSPF  Hierarchical OSPF in large domains.
  • 44. Network Layer 4-44 Hierarchical OSPF  Two-level hierarchy: local area, backbone.  Link-state advertisements only in area  each nodes has detailed area topology; only know direction (shortest path) to nets in other areas.  Area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers.  Backbone routers: run OSPF routing limited to backbone.  Boundary routers: connect to other AS’s.
  • 45. Network Layer 4-45 Inter-AS routing in the Internet: BGP Figure 4.5.2-new2: BGP use for inter-domain routing AS2 (OSPF intra-AS routing) AS1 (RIP intra-AS routing) BGP AS3 (OSPF intra-AS routing) BGP R1 R2 R3 R4 R5
  • 46. Network Layer 4-46 Internet inter-AS routing: BGP  BGP (Border Gateway Protocol): the de facto standard  Path Vector protocol:  similar to Distance Vector protocol  each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS’s) to destination  BGP routes to networks (ASs), not individual hosts  E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z
  • 47. Network Layer 4-47 BGP operation Q: What does a BGP router (gateway) do?  Receiving and filtering route advertisements from directly attached neighbor(s).  Route selection.  To route to destination X, which path )of several advertised) will be taken?  Sending route advertisements to neighbors.
  • 48. Network Layer 4-48 Why different Intra-/Inter-AS routing ? Policy:  Inter-AS: admin wants control over how its traffic routed, who routes through its net.  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  Inter-AS: policy may dominate over performance
  • 49. Network Layer 4-49 Why different Intra-/Inter-AS routing ? Shaw Bell Telus
  • 50. Network Layer 4-50 Internet inter-AS routing: BGP Suppose: gateway X send its path to peer gateway W  W may or may not select path offered by X  cost, policy (don’t route via competitors AS), loop prevention reasons.  If W selects path advertised by X, then: Path (W,Z) = w, Path (X,Z)  Note: X can control incoming traffic by controlling it route advertisements to peers:  e.g., don’t want to route traffic to Z -> don’t advertise any routes to Z
  • 51. Network Layer 4-51 BGP: controlling who routes to you Figure 4.5-BGPnew: a simple BGP scenario A B C W X Y legend: customer network: provider network  A,B,C are provider networks  X,W,Y are customer (of provider networks)  X is dual-homed: attached to two networks  X does not want to route from B via X to C  .. so X will not advertise to B a route to C
  • 52. Network Layer 4-52 BGP: controlling who routes to you Figure 4.5-BGPnew: a simple BGP scenario A B C W X Y legend: customer network: provider network  A advertises to B the path AW  B advertises to X the path BAW  Should B advertise to C the path BAW?  No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers  B wants to force C to route to w via A  B wants to route only to/from its customers!
  • 53. Network Layer 4-53 BGP messages  BGP messages exchanged using TCP.  BGP messages:  OPEN: opens TCP connection to peer and authenticates sender  UPDATE: advertises new path (or withdraws old)  KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request  NOTIFICATION: reports errors in previous msg; also used to close connection