Title: Chapter 4: Network Layer
1Chapter 4 Network Layer
- 4. 1 Introduction
- 4.2 Virtual circuit and datagram networks
- 4.3 Whats inside a router
- 4.4 IP Internet Protocol
- Datagram format
- IPv4 addressing
- ICMP
- IPv6
- 4.5 Routing algorithms
- Link state
- Distance Vector
- Hierarchical routing
- 4.6 Routing in the Internet
- RIP
- OSPF
- BGP
- 4.7 Broadcast and multicast routing
2Hierarchical Routing
- Our routing study thus far - idealization
- all routers identical
- network flat
- not true in practice
- scale with 200 million destinations
- cant store all dests in routing tables!
- routing table exchange would swamp links!
- administrative autonomy
- internet network of networks
- each network admin may want to control routing in
its own network
3Hierarchical 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
4Intra-AS and Inter-AS routing
- Gateways
- perform inter-AS routing amongst themselves
- perform intra-AS routers with other routers in
their AS
b
a
a
C
B
d
A
network layer
inter-AS, intra-AS routing in gateway A.c
link layer
physical layer
5Intra-AS and Inter-AS routing
Host h2
Intra-AS routing within AS B
Intra-AS routing within AS A
- Well examine specific inter-AS and intra-AS
Internet routing protocols shortly
6Chapter 4 Network Layer
- 4. 1 Introduction
- 4.2 Virtual circuit and datagram networks
- 4.3 Whats inside a router
- 4.4 IP Internet Protocol
- Datagram format
- IPv4 addressing
- ICMP
- IPv6
- 4.5 Routing algorithms
- Link state
- Distance Vector
- Hierarchical routing
- 4.6 Routing in the Internet
- RIP
- OSPF
- BGP
- 4.7 Broadcast and multicast routing
7Routing in the Internet
- The Global Internet consists of Autonomous
Systems (AS) interconnected with each other - Stub AS small corporation one connection to
other ASs - Multihomed AS large corporation (no transit)
multiple connections to other ASs - Transit AS provider, hooking many ASs together
- AS Lookup
- https//www.ultratools.com/tools/asnInfo
- Two-level routing
- Intra-AS administrator responsible for choice of
routing algorithm within network - Inter-AS unique standard for inter-AS routing
BGP
8Intra-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)
9Chapter 4 Network Layer
- 4. 1 Introduction
- 4.2 Virtual circuit and datagram networks
- 4.3 Whats inside a router
- 4.4 IP Internet Protocol
- Datagram format
- IPv4 addressing
- ICMP
- IPv6
- 4.5 Routing algorithms
- Link state
- Distance Vector
- Hierarchical routing
- 4.6 Routing in the Internet
- RIP
- OSPF
- BGP
- 4.7 Broadcast and multicast routing
10RIP ( 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
11RIP 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
12RIP Example
Dest Next hops w - - x -
- z C 4 . ...
Advertisement from A to D
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
13RIP Link Failure and Recovery
- If no advertisement heard after 180 sec --gt
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) - RIP is based on UDP packets
14Chapter 4 Network Layer
- 4. 1 Introduction
- 4.2 Virtual circuit and datagram networks
- 4.3 Whats inside a router
- 4.4 IP Internet Protocol
- Datagram format
- IPv4 addressing
- ICMP
- IPv6
- 4.5 Routing algorithms
- Link state
- Distance Vector
- Hierarchical routing
- 4.6 Routing in the Internet
- RIP
- OSPF
- BGP
- 4.7 Broadcast and multicast routing
15OSPF (Open Shortest Path First)
- Successor to RIP
- Uses Link State algorithm
- LS packet dissemination
- Route computation using Dijkstras algorithm
- Advertisements disseminated to entire AS (via
flooding) - Carried in OSPF messages directly over IP (no TCP
or UDP) - ICMP is directly on IP, too
16OSPF advanced features (not in RIP)
- Security all OSPF messages authenticated (to
prevent malicious intrusion) - Multiple same-cost paths allowed (only one path
in RIP) - Hierarchical OSPF in large domains.
17Hierarchical OSPF
18Hierarchical 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 ASs.
19Chapter 4 Network Layer
- 4. 1 Introduction
- 4.2 Virtual circuit and datagram networks
- 4.3 Whats inside a router
- 4.4 IP Internet Protocol
- Datagram format
- IPv4 addressing
- ICMP
- IPv6
- 4.5 Routing algorithms
- Link state
- Distance Vector
- Hierarchical routing
- 4.6 Routing in the Internet
- RIP
- OSPF
- BGP
- 4.7 Broadcast and multicast routing
20Inter-AS routing in the Internet BGP
21Internet inter-AS routing BGP
- BGP (Border Gateway Protocol) the de facto
standard for inter-AS routing - BGP glues the whole Internet together
- Uses TCP (service port 179)
- Path Vector protocol
- similar to Distance Vector protocol
- each Border Gateway broadcast to neighbors
(peers) entire path (i.e., sequence of ASs) 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
22Internet 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 (dont 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 its route advertisements to peers - e.g., dont want to route traffic to Z -gt dont
advertise any routes to Z
23BGP controlling who routes to you
- 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
24BGP controlling who routes to you
- 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 Bs customers - B wants to force C to route to w via A
- B wants to route only to/from its customers!
Policy !!
25BGP 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
26Why different Intra- and Inter-AS routing ?
- Policy
- Inter-AS admin wants control over how its
traffic routed, who routes through its net
(policy). - 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
27Network Layer summary
- What weve covered
- network layer services
- routing principles link state and distance
vector - Hierarchical routing
- IP
- Internet routing protocols RIP, OSPF, BGP
- whats inside a router?
- IPv6
- Next stop
- the Data
- link layer!