chapter 4: network layer · 2018-02-16 · network layer 4-2 chapter 4: network layer 4. 1...
TRANSCRIPT
![Page 1: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/1.jpg)
Network Layer 4-1
Chapter 4: Network Layer
Chapter goals: understand principles behind network layer
services: network layer service models forwarding versus routing how a router works routing (path selection) dealing with scale advanced topics: IPv6
instantiation, implementation in the Internet
![Page 2: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/2.jpg)
Network Layer 4-2
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 3: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/3.jpg)
Network Layer 4-3
Network layer
transport segment from sending to receiving host
on sending side encapsulates segments into datagrams
on rcving side, delivers segments to transport layer
network layer protocols in every host, router
router examines header fields in all IP datagrams passing through it
application transport network data link physical
application transport network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
![Page 4: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/4.jpg)
Network Layer 4-4
Two Key Network-Layer Functions
forwarding: move packets from router’s input to appropriate router output
routing: determine route taken by packets from source to dest.
routing algorithms
analogy:
routing: process of planning trip from source to dest
forwarding: process of getting through single interchange
![Page 5: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/5.jpg)
Network Layer 4-5
1
2 3
0111
value in arriving
packet’s header
routing algorithm
local forwarding table
header value output link
0100
0101
0111
1001
3
2
2
1
Interplay between routing and forwarding
![Page 6: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/6.jpg)
Network Layer 4-6
Network service model
Q: What service model for “channel” transporting datagrams from sender to receiver?
Example services for individual datagrams:
guaranteed delivery
guaranteed delivery with less than 40 msec delay
Example services for a flow of datagrams:
in-order datagram delivery
guaranteed minimum bandwidth to flow
restrictions on changes in inter-packet spacing
![Page 7: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/7.jpg)
Network Layer 4-7
Network layer service models:
Network
Architecture
Internet
ATM
ATM
ATM
ATM
Service
Model
best effort
CBR
VBR
ABR
UBR
Bandwidth
none
constant
rate
guaranteed
rate
guaranteed
minimum
none
Loss
no
yes
yes
no
no
Order
no
yes
yes
yes
yes
Timing
no
yes
yes
no
no
Congestion
feedback
no (inferred
via loss)
no
congestion
no
congestion
yes
no
Guarantees ?
![Page 8: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/8.jpg)
Network Layer 4-8
Connection setup
3rd important function in some network architectures:
ATM, frame relay, X.25
before datagrams flow, two end hosts and intervening routers establish virtual connection
routers get involved
network vs transport layer connection service:
network: between two hosts (may also involve intervening routers in case of VCs)
transport: between two processes
![Page 9: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/9.jpg)
Network Layer 4-9
Datagram networks
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 transport network data link physical
application transport network data link physical
1. Send data 2. Receive data
![Page 10: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/10.jpg)
Network Layer 4-10
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 11: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/11.jpg)
Network Layer 4-11
Router Architecture Overview
Two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP)
forwarding datagrams from incoming to outgoing link
![Page 12: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/12.jpg)
Network Layer 4-12
Input Port Functions
Decentralized switching: given datagram dest., lookup output port
using forwarding table in input port memory
goal: complete input port processing at ‘line speed’
queuing: if datagrams arrive faster than forwarding rate into switch fabric
Physical layer: bit-level reception
Data link layer: e.g., Ethernet see chapter 5
![Page 13: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/13.jpg)
Network Layer 4-13
Three types of switching fabrics
![Page 14: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/14.jpg)
Network Layer 4-14
Output Ports
Buffering required when datagrams arrive from fabric faster than the transmission rate
Scheduling discipline chooses among queued datagrams for transmission
![Page 15: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/15.jpg)
Network Layer 4-15
Output port queueing
buffering when arrival rate via switch exceeds output line speed
queueing (delay) and loss due to output port buffer overflow!
![Page 16: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/16.jpg)
Network Layer 4-16
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 17: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/17.jpg)
Network Layer 4-17
The Internet Network layer
forwarding table
Host, router network layer functions:
Routing protocols •path selection •RIP, OSPF, BGP
IP protocol •addressing conventions •datagram format •packet handling conventions
ICMP protocol •error reporting •router “signaling”
Transport layer: TCP, UDP
Link layer
physical layer
Network layer
![Page 18: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/18.jpg)
Network Layer 4-18
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 19: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/19.jpg)
Network Layer 4-19
IP datagram format
ver length
32 bits
data (variable length, typically a TCP
or UDP segment)
16-bit identifier
header checksum
time to live
32 bit source IP address
IP protocol version number
header length (bytes)
max number remaining hops
(decremented at each router)
for fragmentation/ reassembly
total datagram length (bytes)
upper layer protocol to deliver payload to
head. len
type of service
“type” of data
flgs fragment offset
upper layer
32 bit destination IP address
Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.
how much overhead with TCP?
20 bytes of TCP
20 bytes of IP
= 40 bytes + app layer overhead
![Page 20: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/20.jpg)
Network Layer 4-20
IP Fragmentation & Reassembly network links have MTU
(max.transfer size) - largest possible link-level frame.
different link types, different MTUs
large IP datagram divided (“fragmented”) within net
one datagram becomes several datagrams
“reassembled” only at final destination
IP header bits used to identify, order related fragments
fragmentation: in: one large datagram out: 3 smaller datagrams
reassembly
![Page 21: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/21.jpg)
Network Layer 4-21
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 22: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/22.jpg)
Network Layer 4-22
IP Addressing: introduction
IP address: 32-bit identifier for host, router interface
interface: connection between host/router and physical link routers typically have
multiple interfaces
host typically has one interface
IP address is associated with each interface
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
223.1.1.1 = 11011111 00000001 00000001 00000001
223 1 1 1
![Page 23: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/23.jpg)
Network Layer 4-23
Subnets IP address:
subnet part (high order bits)
host part (low order bits)
What’s a subnet ? device interfaces with
same subnet part of IP address
can physically reach each other without intervening 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.2 223.1.3.1
223.1.3.27
network consisting of 3 subnets
subnet
![Page 24: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/24.jpg)
Network Layer 4-24
IP addressing: CIDR
CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length
address format: a.b.c.d/x, where x is # bits in subnet portion of address
11001000 00010111 00010000 00000000
subnet part
host part
200.23.16.0/23
![Page 25: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/25.jpg)
Network Layer 4-25
IP addresses: how to get one?
Q: How does a host get IP address?
hard-coded by system admin in a file
Windows: 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”
![Page 26: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/26.jpg)
Network Layer 4-26
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
![Page 27: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/27.jpg)
Network Layer 4-27
IP addresses: how to get one?
Q: How does network get subnet 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
![Page 28: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/28.jpg)
Network Layer 4-28
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
![Page 29: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/29.jpg)
Network Layer 4-29
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 of Internet
Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual)
All datagrams leaving local network have same single source
NAT IP address: 138.76.29.7, different source port numbers
![Page 30: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/30.jpg)
Network Layer 4-30
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 31: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/31.jpg)
Network Layer 4-31
IPv6
Initial motivation: 32-bit address space soon to be completely allocated.
Additional motivation: header format helps speed processing/forwarding
header changes to facilitate QoS
IPv6 datagram format:
fixed-length 40 byte header
no fragmentation allowed
![Page 32: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/32.jpg)
Network Layer 4-32
IPv6 Header (Cont)
Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: identify upper layer protocol for data
![Page 33: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/33.jpg)
Network Layer 4-33
Other Changes from IPv4
Checksum: removed entirely to reduce processing time at each hop
Options: allowed, but outside of header, indicated by “Next Header” field
ICMPv6: new version of ICMP additional message types, e.g. “Packet Too Big”
multicast group management functions
![Page 34: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/34.jpg)
Network Layer 4-34
Transition From IPv4 To IPv6
Not all routers can be upgraded simultaneous no “flag days”
How will the network operate with mixed IPv4 and IPv6 routers?
Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers
![Page 35: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/35.jpg)
Network Layer 4-35
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 36: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/36.jpg)
Network Layer 4-36
1
2 3
0111
value in arriving
packet’s header
routing algorithm
local forwarding table
header value output link
0100
0101
0111
1001
3
2
2
1
Interplay between routing, forwarding
![Page 37: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/37.jpg)
Network Layer 4-37
u
y x
w v
z 2
2 1
3
1
1
2
5 3
5
Graph: G = (N,E)
N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Graph abstraction
![Page 38: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/38.jpg)
Network Layer 4-38
Graph abstraction: costs
u
y x
w v
z 2
2 1
3
1
1
2
5 3
5 • c(x,x’) = cost of link (x,x’) - e.g., c(w,z) = 5 • cost could always be 1, or inversely related to bandwidth, or inversely related to congestion
Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
Question: What’s the least-cost path between u and z ?
Routing algorithm: algorithm that finds least-cost path
![Page 39: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/39.jpg)
Network Layer 4-39
Routing Algorithm classification
Global or decentralized information?
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 of info with neighbors
“distance vector” algorithms
Static or dynamic? Static:
routes change slowly over time
Dynamic:
routes change more quickly
periodic update
in response to link cost changes
![Page 40: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/40.jpg)
Network Layer 4-40
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 41: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/41.jpg)
Network Layer 4-41
Hierarchical Routing
scale: with 200 million destinations:
can’t store all dest’s 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
Our routing study thus far - idealization
all routers identical
network “flat”
… not true in practice
![Page 42: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/42.jpg)
Network Layer 4-42
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
Gateway router
Direct link to router in another AS
![Page 43: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/43.jpg)
Network Layer 4-43
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
IPv6
4.5 Routing algorithms Link state
Distance Vector
Hierarchical routing
4.6 Routing in the Internet RIP, OSPF, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 44: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/44.jpg)
Network Layer 4-44
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)
![Page 45: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/45.jpg)
Network Layer 4-45
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s 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, IGRP
BGP
4.7 Broadcast and multicast routing
![Page 46: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/46.jpg)
Network Layer 4-46
Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto standard
BGP provides each AS a means to: 1. Obtain subnet reachability information from
neighboring ASs. 2. Propagate reachability information to all AS-
internal routers. 3. Determine “good” routes to subnets based on
reachability information and policy.
allows subnet to advertise its existence to rest of Internet: “I am here”
![Page 47: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/47.jpg)
Network Layer 4-47
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
![Page 48: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/48.jpg)
Network Layer 4-48
Chapter 4: Network Layer
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s 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
![Page 49: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/49.jpg)
Network Layer 4-49
R1
R2
R3 R4
source
duplication
R1
R2
R3 R4
in-network
duplication
duplicate
creation/transmission duplicate
duplicate
Broadcast
deliver packets from source to all other nodes source duplication is inefficient:
source duplication: how does source determine recipient addresses?
![Page 50: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/50.jpg)
Network Layer 4-50
In-network duplication
flooding: when node receives brdcst pckt, sends copy to all neighbors Problems: cycles & broadcast storm
controlled flooding: node only brdcsts pkt if it hasn’t brdcst same packet before Node keeps track of pckt ids already brdcsted Or reverse path forwarding (RPF): only forward
pckt if it arrived on shortest path between node and source
spanning tree No redundant packets received by any node
![Page 51: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/51.jpg)
Network Layer 4-51
A
B
G
D
E
c
F
A
B
G
D
E
c
F
(a) Broadcast initiated at A (b) Broadcast initiated at D
Spanning Tree
First construct a spanning tree
Nodes forward copies only along spanning tree
![Page 52: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/52.jpg)
Multicast Routing: Problem Statement
Goal: find a tree (or trees) connecting routers having local mcast group members tree: not all paths between routers used
source-based: different tree from each sender to rcvrs
shared-tree: same tree used by all group members
Shared tree Source-based trees
![Page 53: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/53.jpg)
Tunneling
Q: How to connect “islands” of multicast routers in a “sea” of unicast routers?
mcast datagram encapsulated inside “normal” (non-multicast-addressed) datagram
normal IP datagram sent thru “tunnel” via regular IP unicast to receiving mcast router
receiving mcast router unencapsulates to get mcast datagram
physical topology logical topology
![Page 54: Chapter 4: Network Layer · 2018-02-16 · Network Layer 4-2 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4](https://reader033.vdocument.in/reader033/viewer/2022041922/5e6c70ed7d215e0025685e95/html5/thumbnails/54.jpg)
Network Layer 4-54
Chapter 4: summary
4. 1 Introduction
4.2 Virtual circuit and datagram networks
4.3 What’s inside a router
4.4 IP: Internet Protocol Datagram format
IPv4 addressing
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