You are on page 1of 68

Chapter 4

Network Layer

Network Layer 4-1


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

Network Layer 4-2


Network layer functions

❒ transport packet from application

sending to receiving hosts transport


network
data link
❒ network layer protocols in
network
physical data link
network network
every host, router data link physical data link
physical physical
network
three important functions: data link
physical network

❒ path determination: route


data link
physical

taken by packets from source network


network

to dest. Routing algorithms


data link
data link physical
physical
❒ forwarding: move packets network
data link application
from router’s input to physical transport
network
appropriate router output data link
physical
❒ call setup: some network
architectures require router
call setup along path before
data flows
Network Layer 4-3
Network service model

Q: What service
model for “channel” The most important
transporting abstraction provided
by network layer:
packets from sender
to receiver?
? ?
virtual circuit
service abstraction

❒ guaranteed bandwidth? or
❒ loss-free delivery?
❒ in-order delivery?
❒ congestion feedback to
?datagram?

sender?

Network Layer 4-4


Virtual circuits
“source-to-dest path behaves much like telephone
circuit”
❍ performance-wise
❍ network actions along source-to-dest path

❒ call setup, teardown for each callbefore data can flow


❒ each packet carries VC identifier (not destination host ID)
❒ every router on source-dest path maintains “state” for
each passing connection
❍ transport-layer connection only involved two end systems
❒ link, router resources (bandwidth, buffers) may be
allocated to VC
❍ to get circuit-like perf.
Network Layer 4-5
Virtual circuits: signaling protocols

❒ used to setup, maintain teardown VC


❒ not used in today’s Internet

application
6. Receive data application
transport 5. Data flow begins
network 4. Call connected 3. Accept call transport
data link 1. Initiate call 2. incoming call network
data link
physical
physical

Network Layer 4-6


Datagram networks: the Internet model

❒ no call setup at network layer


❒ routers: no state about end-to-end connections
❍ no network-level concept of “connection”

❒ packets forwarded using destination host address


❍ packets between same source-dest pair may take
different paths

application
application
transport
transport
network
data link 1. Send data 2. Receive data network
data link
physical
physical

Network Layer 4-7


Chapter 4 roadmap
4.1 Introduction and Network Service Models
4.2 Routing Principles
❍ Link state routing
❍ Distance vector routing

4.3 Hierarchical Routing


4.4 The Internet (IP) Protocol
4.5 Routing in the Internet
4.6 What’s Inside a Router

Network Layer 4-8


Routing
Routing protocol
Goal: determine “good” path 5
(sequence of routers) thru 3
network from source to dest. B C 5
2
A 2 1 F
3
Graph abstraction for 1 2
routing algorithms: D E
1
❒ graph nodes are
routers ❒ “good” path:
❒ graph edges are ❍ typically means minimum

physical links cost path


❍ other def’s possible
❍ link cost: delay, or
congestion level

Network Layer 4-9


Routing Algorithm classification
Global or decentralized Static or dynamic?
information? Static:
Global:
❒ routes change slowly
❒ all routers have complete
topology, link cost info over time
❒ “link state” algorithms Dynamic:
Decentralized: ❒ routes change more
❒ router knows physically- quickly
connected neighbors, link
❍ periodic update
costs to neighbors
❒ iterative process of ❍ in response to link
computation, exchange of cost changes
info with neighbors
❒ “distance vector” algorithms

Network Layer 4-10


Distance Vector Routing: overview
Iterative, asynchronous: Each node:
each local iteration caused
by:
❒ local link cost change wait for (change in local link
❒ message from neighbor: its cost of msg from neighbor)
least cost path change
from neighbor
Distributed: recompute distance table
❒ each node notifies
neighbors only when its
if least cost path to any dest
least cost path to any
destination changes has changed, notify
neighbors
❍ neighbors then notify
their neighbors if
necessary
Network Layer 4-11
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

Network Layer 4-12


Hierarchical Routing
Our routing study thus far - idealization
❒ all routers identical
❒ network “flat”
… not true in practice

scale: with 200 million administrative autonomy


destinations: ❒ internet = network of
❒ can’t store all dest’s in networks
routing tables! ❒ each network admin may
❒ routing table exchange want to control routing in its
would swamp links! own network

Network Layer 4-13


Hierarchical Routing
❒ aggregate routers into gateway routers
regions, “autonomous ❒ special routers in AS
systems” (AS) ❒ run intra-AS routing
❒ routers in same AS run protocol with all other
routers in AS
same routing protocol
❒ also responsible for
❍ “intra-AS” routing
routing to destinations
protocol
outside AS
❍ routers in different AS ❍ run inter-AS routing
can run different intra-
protocol with other
AS routing protocol
gateway routers

Network Layer 4-14


Intra-AS and Inter-AS routing
C.b Gateways:
B.a
•perform inter-AS
A.a routing amongst
b A.c c themselves
a C a
b •perform intra-AS
a B
routers with other
d c routers in their
A b
AS

network layer
inter-AS, intra-AS link layer
routing in
gateway A.c physical layer

Network Layer 4-15


Intra-AS and Inter-AS routing
Inter-AS
C.b routing
between B.a
A.a A and B Host
b A.c c h2
a C a
b
a B
Host d c Intra-AS routing
h1 b
A within AS B
Intra-AS routing
within AS A

❒ We’ll examine specific inter-AS and intra-AS


Internet routing protocols shortly

Network Layer 4-16


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

Network Layer 4-17


The Internet Network layer
Host, router network layer functions:

Transport layer: TCP, UDP

Routing protocols IP protocol


•path selection •addressing conventions
•RIP, OSPF, BGP •datagram format
Network •packet handling conventions
layer forwarding
ICMP protocol
table
•error reporting
•router “signaling”

Link layer

physical layer

ICMP : Internet Control Message Protocol


Network Layer 4-18
IP Addressing: introduction
❒ IP address: 32-bit 223.1.1.1

identifier for host, 223.1.2.1


223.1.1.2
router interface 223.1.1.4 223.1.2.9
❒ interface: connection
223.1.2.2
between host/router 223.1.1.3 223.1.3.27

and physical link


❍ router’s typically have
multiple interfaces 223.1.3.1 223.1.3.2
❍ host may have multiple
interfaces
❍ IP addresses
associated with each 223.1.1.1 = 11011111 00000001 00000001 00000001
interface
223 1 1 1

Network Layer 4-19


IP Addressing
❒ IP address: 223.1.1.1

❍ network part (high 223.1.2.1


223.1.1.2
order bits) 223.1.1.4 223.1.2.9
❍ host part (low order
bits) 223.1.1.3
223.1.2.2
223.1.3.27
❒ What’s a network ?
LAN
(from IP address
perspective) 223.1.3.1 223.1.3.2
❍ device interfaces with
same network part of
IP address
network consisting of 3 IP networks
❍ can physically reach
(for IP addresses starting with 223,
each other without first 24 bits are network address)
intervening router

Network Layer 4-20


IP Addressing 223.1.1.2

How to find the 223.1.1.1 223.1.1.4

networks?
223.1.1.3
❒ Detach each
interface from 223.1.9.2 223.1.7.0
router, host
❒ create “islands of
isolated networks 223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0

223.1.2.6 223.1.3.27

Interconnected 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2


system consisting
of six networks

Network Layer 4-21


IP Addresses
given notion of “network”, let’s re-examine IP addresses:
“class-full” addressing:

class
1.0.0.0 to
A 0 network host 127.255.255.255

B network 128.0.0.0 to
10 host
191.255.255.255
192.0.0.0 to
C 110 network host
223.255.255.255
224.0.0.0 to
D 1110 multicast address
239.255.255.255

32 bits

Network Layer 4-22


IP addressing: CIDR
❒ Classful addressing:
❍ inefficient use of address space, address space exhaustion
❍ e.g., class B net allocated enough addresses for 65K hosts,
even if only 2K hosts in that network
❒ CIDR: Classless InterDomain Routing
❍ network portion of address of arbitrary length
❍ address format: a.b.c.d/x, where x is # bits in network
portion of address

network host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
Network Layer 4-23
IP addresses: how to get one?

Q: How does host get IP address?

❒ hard-coded by system admin in a file


❍ Wintel: control-panel->network->configuration-
>tcp/ip->properties
❍ UNIX: /etc/rc.config
❒ DHCP: Dynamic Host Configuration Protocol:
dynamically get address from as server
❍ “plug-and-play”

(more shortly)

Network Layer 4-24


IP addresses: how to get one?
Q: How does network get network part of IP
addr?
A: gets allocated portion of its provider ISP’s
address 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

Network Layer 4-25


IP addressing: the last word...

Q: How does an ISP get block of addresses?


A: ICANN: Internet Corporation for Assigned
Names and Numbers
❍ allocates addresses
❍ manages DNS
❍ assigns domain names, resolves disputes

Network Layer 4-26


Getting a datagram from source to dest.
forwarding table in A
Dest. Net. next router Nhops
223.1.1 1
223.1.2 223.1.1.4 2
IP datagram: 223.1.3 223.1.1.4 2
misc source dest
data
fields IP addr IP addr A 223.1.1.1
❒ datagram remains 223.1.2.1
unchanged, as it travels 223.1.1.2
223.1.1.4 223.1.2.9
source to destination
B
❒ addr fields of interest 223.1.2.2
223.1.1.3 223.1.3.27 E
here
223.1.3.1 223.1.3.2

Network Layer 4-27


Getting a datagram from source to dest.
forwarding table in A
misc Dest. Net. next router Nhops
data
fields 223.1.1.1 223.1.1.3
223.1.1 1
223.1.2 223.1.1.4 2
Starting at A, send IP 223.1.3 223.1.1.4 2
datagram addressed to B:
❒ look up net. address of B in A 223.1.1.1
forwarding table
223.1.2.1
❒ find B is on same net. as A 223.1.1.2
❒ link layer will send datagram 223.1.1.4 223.1.2.9
directly to B inside link-layer B
223.1.2.2
frame 223.1.1.3 223.1.3.27 E
❍ B and A are directly
223.1.3.1 223.1.3.2
connected

Network Layer 4-28


Getting a datagram from source to dest.
forwarding table in A
misc Dest. Net. next router Nhops
data
fields 223.1.1.1 223.1.2.3
223.1.1 1
223.1.2 223.1.1.4 2
Starting at A, dest. E:
223.1.3 223.1.1.4 2
❒ look up network address of E
in forwarding table
A 223.1.1.1
❒ E on different network
❍ A, E not directly attached 223.1.2.1
223.1.1.2
❒ routing table: next hop 223.1.1.4 223.1.2.9
router to E is 223.1.1.4 B
223.1.2.2
❒ link layer sends datagram to 223.1.1.3 223.1.3.27 E
router 223.1.1.4 inside link-
223.1.3.2
layer frame 223.1.3.1

❒ datagram arrives at 223.1.1.4


❒ continued…..
Network Layer 4-29
Getting a datagram from source to dest.
forwarding table in router
misc Dest. Net router Nhops interface
data
fields 223.1.1.1 223.1.2.3
223.1.1 - 1 223.1.1.4
Arriving at 223.1.4, 223.1.2 - 1 223.1.2.9
223.1.3 - 1
destined for 223.1.2.2 223.1.3.27

❒ look up network address of E A 223.1.1.1


in router’s forwarding table
223.1.2.1
❒ E on same network as router’s 223.1.1.2
interface 223.1.2.9 223.1.1.4 223.1.2.9
❍ router, E directly attached B
223.1.2.2
❒ link layer sends datagram to 223.1.1.3 223.1.3.27 E
223.1.2.2 inside link-layer 223.1.3.2
223.1.3.1
frame via interface 223.1.2.9
❒ datagram arrives at
223.1.2.2!!! (hooray!) Network Layer 4-30
ICMP: Internet Control Message Protocol

❒ used by hosts, routers,


Type Code description
gateways to communication
0 0 echo reply (ping)
network-level information
3 0 dest. network unreachable
❍ error reporting:
3 1 dest host unreachable
unreachable host, network, 3 2 dest protocol unreachable
port, protocol 3 3 dest port unreachable
❍ echo request/reply (used 3 6 dest network unknown
by ping) 3 7 dest host unknown
❒ network-layer “above” IP: 4 0 source quench (congestion
❍ ICMP msgs carried in IP control - not used)
datagrams 8 0 echo request (ping)
❒ ICMP message: type, code plus
9 0 route advertisement
10 0 router discovery
first 8 bytes of IP datagram
11 0 TTL expired
causing error
12 0 bad IP header

Network Layer 4-31


DHCP: Dynamic Host Configuration Protocol

Goal: allow host to dynamically obtain its IP address


from network server when it joins network
Can renew its lease on address in use
Allows reuse of addresses (only hold address while connected
an “on”
Support for mobile users who want to join network (more
shortly)
DHCP overview:
❍ 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

A 223.1.1.1 DHCP 223.1.2.1


server
223.1.1.2
223.1.1.4 223.1.2.9
B
223.1.2.2 arriving DHCP
223.1.1.3 223.1.3.27 E client needs
address in this
223.1.3.1 223.1.3.2
network

Network Layer 4-33


DHCP client-server scenario
DHCP server: 223.1.2.5 arriving
DHCP discover
client
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
time 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-34


NAT: Network Address Translation

rest of local network


Internet (e.g., home network)
10.0.0/24 10.0.0.1

10.0.0.4
10.0.0.2
138.76.29.7

10.0.0.3

All datagrams leaving local Datagrams with source or


network have same single source destination in this network
NAT IP address: 138.76.29.7, have 10.0.0/24 address for
different source port numbers source, destination (as usual)

Network Layer 4-35


NAT: Network Address Translation

❒ Motivation: local network uses just one IP address as


far as outside word is concerned:
❍ no need to be allocated range of addresses from ISP:
- just one IP address is used for all devices
❍ can change addresses of devices in local network
without notifying outside world
❍ can change ISP without changing addresses of
devices in local network
❍ devices inside local net not explicitly addressable,
visible by outside world (a security plus).

Network Layer 4-36


NAT: Network Address Translation
Implementation: NAT router must:

❍ 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.

❍ remember (in NAT translation table) every (source


IP address, port #) to (NAT IP address, new port #)
translation pair

❍ incoming datagrams: replace (NAT IP address, new


port #) in dest fields of every incoming datagram
with corresponding (source IP address, port #)
stored in NAT table
Network Layer 4-37
NAT: Network Address Translation
NAT translation table
2: NAT router 1: host 10.0.0.1
WAN side addr LAN side addr
changes datagram sends datagram to
138.76.29.7, 5001 10.0.0.1, 3345 128.119.40, 80
source addr from
…… ……
10.0.0.1, 3345 to
138.76.29.7, 5001, S: 10.0.0.1, 3345
updates table D: 128.119.40.186, 80
10.0.0.1
1
S: 138.76.29.7, 5001
2 D: 128.119.40.186, 80 10.0.0.4
10.0.0.2
138.76.29.7 S: 128.119.40.186, 80
D: 10.0.0.1, 3345 4
S: 128.119.40.186, 80
D: 138.76.29.7, 5001 3 10.0.0.3
4: NAT router
3: Reply arrives changes datagram
dest. address: dest addr from
138.76.29.7, 5001 138.76.29.7, 5001 to 10.0.0.1, 3345

Network Layer 4-38


NAT: Network Address Translation

❒ 16-bit port-number field:


❍ 60,000 simultaneous connections with a single
LAN-side address!
❒ NAT is controversial:
❍ routers should only process up to layer 3
❍ violates end-to-end argument
• NAT possibility must be taken into account by app
designers, eg, P2P applications
❍ address shortage should instead be solved by
IPv6

Network Layer 4-39


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.5.1 Intra-AS routing: RIP and OSPF
❍ 4.5.2 Inter-AS routing: BGP

4.6 What’s Inside a Router?

Network Layer 4-40


Routing in the Internet
❒ The Global Internet consists of Autonomous Systems
(AS) interconnected with each other:
❍ Stub AS: small corporation: one connection to other AS’s
❍ Multihomed AS: large corporation (no transit): multiple
connections to other AS’s
❍ Transit AS: provider, hooking many AS’s together

❒ Two-level routing:
❍ Intra-AS: administrator responsible for choice of routing
algorithm within network
❍ Inter-AS: unique standard for inter-AS routing: BGP

Network Layer 4-41


Internet AS Hierarchy
Intra-AS border (exterior gateway) routers

Inter-AS interior (gateway) routers

Network Layer 4-42


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
❍ IGRP: Interior Gateway Routing Protocol (Cisco
proprietary)

Network Layer 4-43


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 every


30 sec via Response Message (also called
advertisement)
❒ Each advertisement: list of up to 25 destination nets
within AS

Network Layer 4-44


RIP: Example
z
w x y
A D B

C
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B 7
x -- 1
…. …. ....
Routing table in D

Network Layer 4-45


RIP: Example
Dest Next hops
w - - Advertisement
x - - from A to D
z C 4
…. … ...
z
w x y
A D B

C
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 Network Layer 4-46
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

Network Layer 4-47


RIP Table processing

❒ RIP routing tables managed by application-level


process called route-d (daemon)
❒ advertisements sent in UDP packets, periodically
repeated
routed routed

Transprt Transprt
(UDP) (UDP)
network forwarding forwarding network
(IP) table table (IP)
link link
physical physical

Network Layer 4-48


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-49


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-50
Hierarchical OSPF

Network Layer 4-51


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-52


Inter-AS routing in the Internet: BGP
R4
R5 BGP
R3 AS3
(OSPF intra-AS
AS1 AS2 routing)
(RIP intra-AS (OSPF
routing) BGP intra-AS
routing)
R1 R2

Figure 4.5.2-new2: BGP use for inter-domain routing

BGB : Border Gateway Protocol

Network Layer 4-53


BGP: controlling who routes to you
legend: provider
B network
X
W A
customer
C network:

Figure 4.5-BGPnew: a simple BGP scenario


❒ 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-54


BGP: controlling who routes to you
legend: provider
B network
X
W A
customer
C network:

Figure 4.5-BGPnew: a simple BGP scenario


❒ 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-55
BGP operation
Q: What does a BGP router 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-56


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

Network Layer 4-57


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

Network Layer 4-58


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?

Network Layer 4-59


Router Architecture Overview
Two key router functions:
❒ run routing algorithms/protocol (RIP, OSPF, BGP)
❒ switching datagrams from incoming to outgoing link

Network Layer 4-60


Input Port Functions

Physical layer:
bit-level reception
Data link layer: Decentralized switching:
e.g., Ethernet ❒ given datagram dest., lookup output port
see chapter 5 using routing table in input port memory
❒ goal: complete input port processing at
‘line speed’
❒ queuing: if datagrams arrive faster than
forwarding rate into switch fabric

Network Layer 4-61


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 from
moving forward
❒ queueing delay and loss due to input buffer overflow!

Network Layer 4-62


Three types of switching fabrics

Network Layer 4-63


Switching Via Memory
First generation routers:
❒ packet copied by system’s (single) CPU
❒ speed limited by memory bandwidth (2 bus
crossings per datagram)
Input Memory Output
Port Port

System Bus

Modern routers:
❒ input port processor performs lookup, copy into
memory
❒ Cisco Catalyst 8500
Network Layer 4-64
Switching Via a Bus

❒ datagram from input port memory


to output port memory via a shared
bus
❒ bus contention: switching speed
limited by bus bandwidth
❒ 1 Gbps bus, Cisco 1900: sufficient
speed for access and enterprise
routers (not regional or backbone)

Network Layer 4-65


Switching Via An Interconnection
Network

❒ overcome bus bandwidth limitations


❒ Banyan networks, other interconnection nets
initially developed to connect processors in
multiprocessor
❒ Advanced design: fragmenting datagram into fixed
length cells, switch cells through the fabric.
❒ Cisco 12000: switches Gbps through the
interconnection network

Network Layer 4-66


Output Ports

❒ Buffering required when datagrams arrive from


fabric faster than the transmission rate
❒ Scheduling discipline chooses among queued
datagrams for transmission

Network Layer 4-67


Output port queueing

❒ buffering when arrival rate via switch exceeds


output line speed
❒ queueing (delay) and loss due to output port
buffer overflow!
Network Layer 4-68

You might also like