View
225
Download
0
Category
Preview:
Citation preview
8/14/2019 4 Network Layer
1/68
Network Layer 4-1
Chapter 4
Network Layer
8/14/2019 4 Network Layer
2/68
Network Layer 4-2
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles
4.3 Hierarchical Routing
4.4 The Internet (IP) Protocol4.5 Routing in the Internet
4.6 Whats Inside a Router
8/14/2019 4 Network Layer
3/68
Network Layer 4-3
Network layer functions
transport packet fromsending to receiving hosts
network layer protocols ineveryhost, router
three important functions: path determination:route
taken by packets from sourceto dest. Routing algorithms
forwarding:move packets
from routers input toappropriate router output
call setup:some networkarchitectures require routercall setup along path before
data flows
networkdata linkphysical
networkdata link
physical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata link
physical
networkdata linkphysical
applicationtransportnetworkdata linkphysical
application
transportnetworkdata linkphysical
8/14/2019 4 Network Layer
4/68
Network Layer 4-4
Network service model
Q: What servicemodelfor channeltransporting
packets from senderto receiver?
guaranteed bandwidth? loss-free delivery? in-order delivery? congestion feedback to
sender?
???
virtual circuitor
datagram?
The most importantabstraction provided
by network layer:
servicea
bstraction
8/14/2019 4 Network Layer
5/68
Network Layer 4-5
Virtual circuits
call setup, teardown for each call beforedata can flow each packet carries VC identifier (not destination host ID) everyrouter on source-dest path maintains state for
each passing connectionr transport-layer connection only involved two end systems
link, router resources (bandwidth, buffers) may beallocatedto VCr to get circuit-like perf.
source-to-dest path behaves much like telephonecircuitr performance-wiser network actions along source-to-dest path
8/14/2019 4 Network Layer
6/68
Network Layer 4-6
Virtual circuits: signaling protocols
used to setup, maintain teardown VC not used in todays Internet
applicationtransportnetworkdata linkphysical
applicationtransport
networkdata linkphysical
1. Initiate call 2. incoming call
3. Accept call4. Call connected5. Data flow begins 6. Receive data
8/14/2019 4 Network Layer
7/68
Network Layer 4-7
Datagram networks: the Internet model
no call setup at network layer routers: no state about end-to-end connections
r no network-level concept of connection
packets forwarded using destination host address
r packets between same source-dest pair may takedifferent paths
applicationtransportnetworkdata linkphysical
application
transportnetworkdata linkphysical
1. Send data 2. Receive data
8/14/2019 4 Network Layer
8/68
Network Layer 4-8
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles
r Link state routingr
Distance vector routing4.3 Hierarchical Routing
4.4 The Internet (IP) Protocol
4.5 Routing in the Internet
4.6 Whats Inside a Router
8/14/2019 4 Network Layer
9/68
Network Layer 4-9
Routing
Graph abstraction forrouting algorithms:
graph nodes arerouters
graph edges arephysical linksr link cost: delay, or
congestion level
Goal: determine good path(sequence of routers) thru
network from source to dest.
Routing protocol
A
ED
CB
F
2
2
1 3
1
1
2
53
5
good path:r typically means minimum
cost pathr other defs possible
8/14/2019 4 Network Layer
10/68
Network Layer 4-10
Routing Algorithm classification
Global or decentralizedinformation?
Global: all routers have complete
topology, link cost info link state algorithms
Decentralized: router knows physically-
connected neighbors, link
costs to neighbors iterative process of
computation, exchange ofinfo with neighbors
distance vector algorithms
Static or dynamic?Static: routes change slowly
over time
Dynamic: routes change more
quicklyr periodic updater in response to link
cost changes
8/14/2019 4 Network Layer
11/68
Network Layer 4-11
Distance Vector Routing: overview
Iterative, asynchronous:each local iteration causedby:
local link cost change message from neighbor: its
least cost path changefrom neighbor
Distributed: each node notifies
neighbors onlywhen itsleast cost path to anydestination changesr neighbors then notify
their neighbors ifnecessary
waitfor (change in local linkcost of msg from neighbor)
recompute distance table
if least cost path to any desthas changed, notifyneighbors
Each node:
8/14/2019 4 Network Layer
12/68
Network Layer 4-12
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles
4.3 Hierarchical Routing
4.4 The Internet (IP) Protocol4.5 Routing in the Internet
4.6 Whats Inside a Router
8/14/2019 4 Network Layer
13/68
Network Layer 4-13
Hierarchical Routing
scale: with 200 milliondestinations:
cant store all dests in
routing tables! routing table exchange
would swamp links!
administrative autonomy internet = network of
networks
each network admin maywant to control routing in itsown network
Our routing study thus far - idealization all routers identical network flat
nottrue in practice
8/14/2019 4 Network Layer
14/68
Network Layer 4-14
Hierarchical Routing
aggregate routers intoregions, autonomoussystems (AS)
routers in same AS run
same routing protocolr intra-AS routing
protocolr 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 alsoresponsible for
routing to destinationsoutside ASr run inter-AS routing
protocol with othergateway routers
gateway routers
8/14/2019 4 Network Layer
15/68
Network Layer 4-15
Intra-AS and Inter-AS routing
Gateways:perform inter-ASrouting amongstthemselvesperform intra-AS
routers with otherrouters in theirAS
inter-AS, intra-ASrouting ingateway A.c
network layer
link layerphysical layer
a
b
b
aaC
A
B
d
A.a
A.c
C.b B.a
c
b
c
8/14/2019 4 Network Layer
16/68
Network Layer 4-16
Intra-AS and Inter-AS routing
Hosth2
a
b
b
aa
C
A
Bd c
A.a
A.c
C.bB.a
c
bHosth1
Intra-AS routingwithin AS A
Inter-ASroutingbetweenA and B
Intra-AS routingwithin AS B
Well examine specific inter-AS and intra-ASInternet routing protocols shortly
8/14/2019 4 Network Layer
17/68
Network Layer 4-17
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles4.3 Hierarchical Routing4.4 The Internet (IP) Protocol
4.5 Routing in the Internet4.6 Whats Inside a Router
8/14/2019 4 Network Layer
18/68
Network Layer 4-18
The Internet Network layer
forwardingtable
Host, router network layer functions:
Routing protocols
path selectionRIP, OSPF, BGP
IP protocoladdressing conventionsdatagram formatpacket handling conventions
ICMP protocolerror reportingrouter signaling
Transport layer: TCP, UDP
Link layer
physical layer
Networklayer
ICMP : Internet Control Message Protocol
8/14/2019 4 Network Layer
19/68
Network Layer 4-19
IP Addressing: introduction
IP address: 32-bitidentifier for host,router interface
interface:connection
between host/routerand physical linkr routers typically have
multiple interfacesr host may have multiple
interfacesr IP addresses
associated with eachinterface
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.2223.1.3.1
223.1.3.27
223.1.1.1 = 11011111 00000001 00000001 00000001
223 1 11
8/14/2019 4 Network Layer
20/68
Network Layer 4-20
IP Addressing
IP address:r network part (high
order bits)r host part (low order
bits)
Whats a network ?(from IP addressperspective)r device interfaces with
same network part ofIP addressr can physically reach
each other withoutintervening router
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.2223.1.3.1
223.1.3.27
network consisting of 3 IP networks(for IP addresses starting with 223,first 24 bits are network address)
LAN
8/14/2019 4 Network Layer
21/68
Network Layer 4-21
IP Addressing
How to find thenetworks? Detach each
interface from
router, host create islands of
isolated networks
223.1.1.1
223.1.1.3
223.1.1.4
223.1.2.2223.1.2.1
223.1.2.6
223.1.3.2223.1.3.1
223.1.3.27
223.1.1.2
223.1.7.0
223.1.7.1
223.1.8.0223.1.8.1
223.1.9.1
223.1.9.2
Interconnectedsystem consisting
of six networks
8/14/2019 4 Network Layer
22/68
Network Layer 4-22
IP Addresses
0network host
10 network host
110 network host
1110 multicast address
A
B
C
D
class
1.0.0.0 to127.255.255.255
128.0.0.0 to191.255.255.255
192.0.0.0 to223.255.255.255
224.0.0.0 to239.255.255.255
32 bits
given notion of network, lets re-examine IP addresses:class-full addressing:
8/14/2019 4 Network Layer
23/68
Network Layer 4-23
IP addressing: CIDR
Classful addressing:r inefficient use of address space, address space exhaustionr e.g., class B net allocated enough addresses for 65K hosts,
even if only 2K hosts in that network
CIDR:Classless InterDomain Routingr network portion of address of arbitrary lengthr address format: a.b.c.d/x, where x is # bits in network
portion of address
11001000 00010111 00010000 00000000
networkpart
hostpart
200.23.16.0/23
8/14/2019 4 Network Layer
24/68
Network Layer 4-24
IP addresses: how to get one?
Q: How does hostget IP address?
hard-coded by system admin in a filer Wintel: control-panel->network->configuration-
>tcp/ip->propertiesr UNIX: /etc/rc.config
DHCP:Dynamic Host Configuration Protocol:dynamically get address from as serverr plug-and-play
(more shortly)
8/14/2019 4 Network Layer
25/68
Network Layer 4-25
IP addresses: how to get one?
Q: How does networkget network part of IPaddr?
A: gets allocated portion of its provider ISPsaddress space
ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20
Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23
Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23... .. . .
Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23
8/14/2019 4 Network Layer
26/68
Network Layer 4-26
IP addressing: the last word...
Q: How does an ISP get block of addresses?
A: ICANN: Internet Corporation for AssignedNames and Numbers
r allocates addressesr manages DNSr assigns domain names, resolves disputes
8/14/2019 4 Network Layer
27/68
Network Layer 4-27
Getting a datagram from source to dest.
IP datagram:
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.2223.1.3.1
223.1.3.27
A
B
E
miscfields
sourceIP addr
destIP addr data
datagram remainsunchanged, as it travelssource to destination
addr fields of interesthere
Dest. Net. next router Nhops
223.1.1 1223.1.2 223.1.1.4 2
223.1.3 223.1.1.4 2
forwarding table in A
8/14/2019 4 Network Layer
28/68
Network Layer 4-28
Getting a datagram from source to dest.
Starting at A, send IPdatagram addressed to B:
look up net. address of B inforwarding table
find B is on same net. as A link layer will send datagram
directly to B inside link-layerframer B and A are directly
connected
Dest. Net. next router Nhops
223.1.1 1223.1.2 223.1.1.4 2
223.1.3 223.1.1.4 2
miscfields 223.1.1.1 223.1.1.3 data
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.2223.1.3.1
223.1.3.27
A
B
E
forwarding table in A
8/14/2019 4 Network Layer
29/68
Network Layer 4-29
Getting a datagram from source to dest.
Dest. Net. next router Nhops
223.1.1 1223.1.2 223.1.1.4 2
223.1.3 223.1.1.4 2Starting at A, dest. E: look up network address of E
in forwarding table E on differentnetwork
r A, E not directly attached routing table: next hop
router to E is 223.1.1.4 link layer sends datagram to
router 223.1.1.4 inside link-layer frame
datagram arrives at 223.1.1.4
continued..
miscfields 223.1.1.1 223.1.2.3 data
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.2223.1.3.1
223.1.3.27
A
B
E
forwarding table in A
8/14/2019 4 Network Layer
30/68
Network Layer 4-30
Getting a datagram from source to dest.
Arriving at 223.1.4,destined for 223.1.2.2
look up network address of Ein routers forwarding table
E on samenetwork as routers
interface 223.1.2.9r
router, E directly attached link layer sends datagram to
223.1.2.2 inside link-layer
frame via interface 223.1.2.9 datagram arrives at
223.1.2.2!!! (hooray!)
miscfields 223.1.1.1 223.1.2.3 data
Dest. Net router Nhops interface
223.1.1 - 1 223.1.1.4223.1.2 - 1 223.1.2.9
223.1.3 - 1 223.1.3.27
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.2223.1.3.1
223.1.3.27
A
B
E
forwarding table in router
8/14/2019 4 Network Layer
31/68
Network Layer 4-31
ICMP: Internet Control Message Protocol
used by hosts, routers,gateways to communicationnetwork-level informationr error reporting:
unreachable host, network,
port, protocolr echo request/reply (used
by ping) network-layer above IP:
r ICMP msgs carried in IP
datagrams ICMP message: type, code plus
first 8 bytes of IP datagramcausing error
Type Code description
0 0 echo reply (ping)
3 0 dest. network unreachable
3 1 dest host unreachable
3 2 dest protocol unreachable
3 3 dest port unreachable3 6 dest network unknown
3 7 dest host unknown
4 0 source quench (congestion
control - not used)
8 0 echo request (ping)
9 0 route advertisement
10 0 router discovery
11 0 TTL expired
12 0 bad IP header
8/14/2019 4 Network Layer
32/68
Network Layer 4-32
DHCP: Dynamic Host Configuration Protocol
Goal: allow host to dynamicallyobtain its IP addressfrom network server when it joins networkCan renew its lease on address in use
Allows reuse of addresses (only hold address while connectedan on
Support for mobile users who want to join network (moreshortly)
DHCP overview:
r host broadcasts DHCP discover msgr DHCP server responds with DHCP offer msgr host requests IP address: DHCP request msgr DHCP server sends address: DHCP ack msg
8/14/2019 4 Network Layer
33/68
Network Layer 4-33
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.2223.1.3.1
223.1.3.27
A
B
E
DHCPserver
arriving DHCP
client needs
address in this
network
8/14/2019 4 Network Layer
34/68
Network Layer 4-34
DHCP client-server scenarioDHCP server: 223.1.2.5 arriving
client
time
DHCP discover
src : 0.0.0.0, 68dest.: 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
8/14/2019 4 Network Layer
35/68
Network Layer 4-35
NAT: Network Address Translation
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
138.76.29.7
local network(e.g., home network)
10.0.0/24
rest ofInternet
Datagrams with source or
destination in this networkhave 10.0.0/24 address forsource, destination (as usual)
Alldatagrams leavinglocal
network have same single sourceNAT IP address: 138.76.29.7,different source port numbers
8/14/2019 4 Network Layer
36/68
Network Layer 4-36
NAT: Network Address Translation
Motivation: local network uses just one IP address asfar as outside word is concerned:r no need to be allocated range of addresses from ISP:
- just one IP address is used for all devicesr can change addresses of devices in local network
without notifying outside worldr can change ISP without changing addresses of
devices in local networkr devices inside local net not explicitly addressable,
visible by outside world (a security plus).
8/14/2019 4 Network Layer
37/68
Network Layer 4-37
NAT: Network Address TranslationImplementation: NAT router must:
r outgoing datagrams:replace(source IP address, port#) of every outgoing datagram to (NAT IP address,new port #). . . remote clients/servers will respond using (NAT
IP address, new port #) as destination addr.
r remember (in NAT translation table)every (sourceIP address, port #) to (NAT IP address, new port #)translation pair
r incoming datagrams:replace(NAT IP address, newport #) in dest fields of every incoming datagramwith corresponding (source IP address, port #)stored in NAT table
8/14/2019 4 Network Layer
38/68
Network Layer 4-38
NAT: Network Address Translation
10.0.0.1
10.0.0.2
10.0.0.3
S: 10.0.0.1, 3345
D: 128.119.40.186, 80
1
10.0.0.4
138.76.29.7
1: host 10.0.0.1sends datagram to128.119.40, 80
NAT translation tableWAN side addr LAN side addr
138.76.29.7, 5001 10.0.0.1, 3345
S: 128.119.40.186, 80D: 10.0.0.1, 3345 4
S: 138.76.29.7, 5001D: 128.119.40.186, 802
2: NAT routerchanges datagramsource addr from10.0.0.1, 3345 to138.76.29.7, 5001,
updates table
S: 128.119.40.186, 80D: 138.76.29.7, 5001 3
3: Reply arrivesdest. address:138.76.29.7, 5001
4: NAT routerchanges datagramdest addr from138.76.29.7, 5001 to 10.0.0.1, 3345
8/14/2019 4 Network Layer
39/68
Network Layer 4-39
NAT: Network Address Translation
16-bit port-number field:r 60,000 simultaneous connections with a single
LAN-side address!
NAT is controversial:r routers should only process up to layer 3r violates end-to-end argument
NAT possibility must be taken into account by app
designers, eg, P2P applicationsr address shortage should instead be solved by
IPv6
8/14/2019 4 Network Layer
40/68
Network Layer 4-40
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles
4.3 Hierarchical Routing
4.4 The Internet (IP) Protocol4.5 Routing in the Internet
r4.5.1 Intra-AS routing: RIP and OSPFr
4.5.2 Inter-AS routing: BGP4.6 Whats Inside a Router?
8/14/2019 4 Network Layer
41/68
Network Layer 4-41
Routing in the Internet
The Global Internet consists of Autonomous Systems(AS) interconnected with each other:r Stub AS: small corporation: one connection to other ASsr Multihomed AS: large corporation (no transit): multiple
connections to other ASsr Transit AS: provider, hooking many ASs together
Two-level routing:r Intra-AS: administrator responsible for choice of routing
algorithm within networkr Inter-AS: unique standard for inter-AS routing: BGP
8/14/2019 4 Network Layer
42/68
Network Layer 4-42
Internet AS Hierarchy
Intra-AS border (exterior gateway) routers
Inter-ASinterior (gateway) routers
8/14/2019 4 Network Layer
43/68
Network Layer 4-43
Intra-AS Routing
Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols:
r RIP: Routing Information Protocol
r OSPF: Open Shortest Path First
r IGRP: Interior Gateway Routing Protocol (Ciscoproprietary)
8/14/2019 4 Network Layer
44/68
Network Layer 4-44
RIP ( Routing Information Protocol)
Distance vector algorithm Included in BSD-UNIX Distribution in 1982 Distance metric: # of hops (max = 15 hops)
Distance vectors: exchanged among neighbors every30 sec via Response Message (also calledadvertisement)
Each advertisement: list of up to 25 destination netswithin AS
8/14/2019 4 Network Layer
45/68
Network Layer 4-45
RIP: Example
Destination Network Next Router Num. of hops to dest.
w A 2y B 2
z B 7x -- 1. . ....
w x yz
A
C
D B
Routing table in D
8/14/2019 4 Network Layer
46/68
Network Layer 4-46
RIP: Example
Destination Network Next Router Num. of hops to dest.
w A 2y B 2
z B A 7 5x -- 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
8/14/2019 4 Network Layer
47/68
Network Layer 4-47
RIP: Link Failure and Recovery
If no advertisement heard after 180 sec -->neighbor/link declared deadr routes via neighbor invalidatedr new advertisements sent to neighbors
r neighbors in turn send out new advertisements (iftables changed)
r link failure info quickly propagates to entire net
8/14/2019 4 Network Layer
48/68
Network Layer 4-48
RIP Table processing
RIP routing tables managed by application-levelprocess called route-d (daemon)
advertisements sent in UDP packets, periodicallyrepeated
physical
link
network forwarding(IP) table
Transprt(UDP)
routed
physical
link
network(IP)
Transprt(UDP)
routed
forwardingtable
8/14/2019 4 Network Layer
49/68
Network Layer 4-49
OSPF (Open Shortest Path First)
open: publicly available Uses Link State algorithm
r LS packet disseminationr Topology map at each node
r Route computation using Dijkstras algorithm
OSPF advertisement carries one entry per neighborrouter
Advertisements disseminated to entire AS (viaflooding)r Carried in OSPF messages directly over IP (rather than TCP
or UDP
8/14/2019 4 Network Layer
50/68
Network Layer 4-50
OSPF advanced features (not in RIP)
Security: all OSPF messages authenticated (toprevent malicious intrusion)
Multiple same-cost paths allowed (only one path inRIP)
For each link, multiple cost metrics for differentTOS (e.g., satellite link cost set low for besteffort; high for real time)
Integrated uni- and multicast support:r Multicast OSPF (MOSPF) uses same topology data
base as OSPF Hierarchical OSPF in large domains.
8/14/2019 4 Network Layer
51/68
Network Layer 4-51
Hierarchical OSPF
8/14/2019 4 Network Layer
52/68
Network Layer 4-52
Hierarchical OSPF
Two-level hierarchy: local area, backbone.r Link-state advertisements only in arear each nodes has detailed area topology; only know
direction (shortest path) to nets in other areas.
Area border routers:summarize distances to netsin own area, advertise to other Area Border routers.
Backbone routers: run OSPF routing limited tobackbone.
Boundary routers: connect to other ASs.
8/14/2019 4 Network Layer
53/68
Network Layer 4-53
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
BGB : Border Gateway Protocol
8/14/2019 4 Network Layer
54/68
Network Layer 4-54
BGP: controlling who routes to you
Figure 4.5-BGPnew: a simple BGP scenario
A
B
C
WX
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 networksr X does not want to route from B via X to Cr .. so X will not advertise to B a route to C
8/14/2019 4 Network Layer
55/68
Network Layer 4-55
BGP: controlling who routes to you
Figure 4.5-BGPnew: a simple BGP scenario
A
B
C
WX
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?r No way! B gets no revenue for routing CBAW since neitherW nor C are Bs customers
r B wants to force C to route to w via Ar B wants to route onlyto/from its customers!
8/14/2019 4 Network Layer
56/68
Network Layer 4-56
BGP operation
Q: What does a BGP router do? Receiving and filtering route advertisements from
directly attached neighbor(s).
Route selection.r To route to destination X, which path (of
several advertised) will be taken? Sending route advertisements to neighbors.
8/14/2019 4 Network Layer
57/68
Network Layer 4-57
BGP messages
BGP messages exchanged using TCP. BGP messages:
r OPEN: opens TCP connection to peer andauthenticates sender
r UPDATE: advertises new path (or withdraws old)r KEEPALIVE keeps connection alive in absence of
UPDATES; also ACKs OPEN requestr NOTIFICATION: reports errors in previous msg;
also used to close connection
8/14/2019 4 Network Layer
58/68
Network Layer 4-58
Why different Intra- and 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
8/14/2019 4 Network Layer
59/68
Network Layer 4-59
Chapter 4 roadmap
4.1 Introduction and Network Service Models4.2 Routing Principles
4.3 Hierarchical Routing
4.4 The Internet (IP) Protocol4.5 Routing in the Internet
4.6 Whats Inside a Router?
R t A hit t O i
8/14/2019 4 Network Layer
60/68
Network Layer 4-60
Router Architecture Overview
Two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP) switchingdatagrams from incoming to outgoing link
8/14/2019 4 Network Layer
61/68
Network Layer 4-61
Input Port Functions
Decentralized switching: given datagram dest., lookup output port
using routing table in input port memory
goal: complete input port processing atline speed
queuing: if datagrams arrive faster thanforwarding rate into switch fabric
Physical layer:bit-level reception
Data link layer:e.g., Ethernetsee chapter 5
I t P t Q i
8/14/2019 4 Network Layer
62/68
Network Layer 4-62
Input Port Queuing
Fabric slower that input ports combined -> queueing
may occur at input queues Head-of-the-Line (HOL) blocking: queued datagram
at front of queue prevents others in queue frommoving forward
queueing delay and loss due to input buffer overflow!
Th t f it hi f b i
8/14/2019 4 Network Layer
63/68
Network Layer 4-63
Three types of switching fabrics
Switching Via Memory
8/14/2019 4 Network Layer
64/68
Network Layer 4-64
Switching Via Memory
First generation routers:
packet copied by systems (single) CPU speed limited by memory bandwidth (2 buscrossings per datagram)
Input
Port
Output
Port
Memory
System Bus
Modern routers: input port processor performs lookup, copy intomemory
Cisco Catalyst 8500
8/14/2019 4 Network Layer
65/68
Network Layer 4-65
Switching Via a Bus
datagram from input port memory
to output port memory via a sharedbus bus contention: switching speed
limited by bus bandwidth
1 Gbps bus, Cisco 1900: sufficientspeed for access and enterpriserouters (not regional or backbone)
8/14/2019 4 Network Layer
66/68
Network Layer 4-66
Switching Via An InterconnectionNetwork
overcome bus bandwidth limitations Banyan networks, other interconnection nets
initially developed to connect processors inmultiprocessor Advanced design: fragmenting datagram into fixed
length cells, switch cells through the fabric.
Cisco 12000: switches Gbps through theinterconnection network
8/14/2019 4 Network Layer
67/68
Network Layer 4-67
Output Ports
Bufferingrequired when datagrams arrive from
fabric faster than the transmission rate Scheduling disciplinechooses among queued
datagrams for transmission
8/14/2019 4 Network Layer
68/68
Output port queueing
buffering when arrival rate via switch exceedsoutput line speed queueing (delay) and loss due to output port
buffer overflow!
Recommended