![Page 2: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/2.jpg)
2
– Datagram– Routers do not run application- and transport- layer protocols– Forwarding vs routing– Forwarding: router-local action of transfering a packet from an in
put link to the appropriate out link– Routing: network-wide process determining the end-to-end paths
that packets take from source to destination– Thr routing algorithm determines the values that are inserted into
the routers’ forwarding table.– Packet switch
Link-layer switch Router
![Page 3: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/3.jpg)
3
![Page 4: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/4.jpg)
4
![Page 5: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/5.jpg)
5
Network service model
– Defines the characteristics of end-to-end transport of packets between sending and receiving end systems.
Guaranteed delivery Guaranteed delivery with bounded delay In-order packet delivery Guranteed minimal bandwidth Guaranteed maximum jitter Security service
– Best-effort service: no service at all– ATM service model
Constant bit rate (CBR): as if a dedicated fixed-bandwidth transmission link
Available bit rate (ABR): cells cannot be reordered and a min cell transmission rate is guaranteed
![Page 6: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/6.jpg)
6
![Page 7: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/7.jpg)
7
Virtual circuit and datagram networks
Network layer vs transport layer– Host-to-host services, process-to-process services– Network layer: host-to-host connectionless service (datagram ne
tworks), host-to-host connection service (virtual-circuit networks)– End systems for transport layer vs routers and end systems for n
etwork layers
![Page 8: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/8.jpg)
8
Virtual circuit networks– ATM and frame relay– Virtual circuit
A path VC numbers Entries in the forwarding table Page 345
![Page 9: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/9.jpg)
9
Forwarding table
12 22 32
1 23
VC number
interfacenumber
Incoming interface Incoming VC # Outgoing interface Outgoing VC #
1 12 3 222 63 1 18 3 7 2 171 97 3 87… … … …
Forwarding table innorthwest router:
Routers maintain connection state information!
![Page 10: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/10.jpg)
10
– VC setup -> Data transfer -> VC tear down by ATM’s Q.2931 signaling protocol
– Connection set up at the transport layer?
![Page 11: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/11.jpg)
11
Datagram networks– Prefix match at the page 348– Longest prefix matching rule– Forwarding tables can be modifed at any time -> packets go diffe
rent paths and arrive out of order
![Page 12: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/12.jpg)
12
Forwarding table
Destination Address Range Link Interface
11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111
11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111
11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111
otherwise 3
4 billion possible entries
![Page 13: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/13.jpg)
13
What’s inside a router
![Page 14: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/14.jpg)
14
Input ports– A shadow copy of the forwarding table is typically stored at ech i
nput port and updated by the routing processor– Increase lookup speeds: content addressable memories (CAM)
allows a 32-bit IP address to be presented to the CAM, which returns the content of the forwarding table entry for that address in essentially constant time.
![Page 15: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/15.jpg)
15
Switching fabric
![Page 16: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/16.jpg)
16
Output ports
![Page 17: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/17.jpg)
17
Where does queueing occur– Packet queue can form at both the input ports and the output por
ts– Packet loss – Packet scheduler at the output port must choose one packet am
ong those queued for transmission First-come-first-served Weighted fair queueing For quality-of-service guarantees
![Page 18: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/18.jpg)
18
![Page 19: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/19.jpg)
19
![Page 20: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/20.jpg)
20
IP: forwarding and addressing in the Internet
![Page 21: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/21.jpg)
21
![Page 22: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/22.jpg)
22
IP datagram fragmentation– Maximum transmission unit: a hard limit on the length of an IP da
tagram– Jolt2 attack: none of fragments has an offset of zero or overlappi
ng IP fragments
![Page 23: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/23.jpg)
23
![Page 24: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/24.jpg)
24
IPv4 addressing– 32 bits long (4 bytes)– Dotted-decimal notation– Globally unique– subnet
![Page 25: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/25.jpg)
25
– Classless interdomain routing (CIDR)– a.b.c.d/x network portion of th IP address = prefix– Classfule addressing: C(/24) = 254 hosts, B(/16) = 65,634 hosts,
broadcast = 255.255.255.255
![Page 26: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/26.jpg)
26
Obtaining a block of addresses– Internet Corporation for Assigned Name and Numbers (ICANN)
Allocate IP addresses to regional Internet registries Manage the DNS root servers
Obtaining a host address: the Dynamic Host Configuration Protocol (DHCP)
– DHCP server discovery– DHCP server offer(s)– DHCP request– DHCP ACK– A TCP connection maintanence problem for a mobile node
![Page 27: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/27.jpg)
27
![Page 28: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/28.jpg)
28
![Page 29: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/29.jpg)
29
Network address translation (NAT)– Private addresses have meaning within that network– The NAT router behaves to the outside world as a single device
with a single IP address.
![Page 30: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/30.jpg)
30
– Arguments on Network address translation (NAT) Prot numbers for addressing processes not for addressing ho
sts Routers are supposed to process packets only up to layer 3 Violates the end-to-end arguments IPv6
![Page 31: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/31.jpg)
31
Internet Control Message Protocol (ICMP)– Error reporting– Ping program– Source quench message– Tracerout
![Page 32: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/32.jpg)
32
![Page 33: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/33.jpg)
33
IPv6– IPv5 (ST-2 similar to RSVP)– Datagram format
Expanded addressing capabilities: unicast, multicast, anycast address
A streamlined 40-byte header Flow labeling and priority
– IPv4 vs IPv6 Fragmentation/reassembly Header checksum Options
![Page 34: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/34.jpg)
34
![Page 35: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/35.jpg)
35
– Transition from IPv4 to IPv6 A flag day Dual-stack approach Tunneling
– The US Office of Management and Budget (OMB): to IPv6 by June 2008
– Europe’s Third Generation Partnership Program (3GPP) 2007.
– Difficult to change network-layer protocols
![Page 36: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/36.jpg)
36
![Page 37: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/37.jpg)
37
![Page 38: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/38.jpg)
38
IP security– IPsec– Virtual Private Networks (VPN)
Cryptographic agreement on algorithms and keys Encryption of IP datagram payload Data integrity Origin authentication
![Page 39: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/39.jpg)
39
Routing algoritms
– Default router: the first-hop router– The least cost path
– Global routing algorithm: link-state (LS) algorithms– Decentralized routing algorithm: distance-vector (DV) algorithms
– Static routing algorithms vs dynamic routing
– Load-sensitive algorithms vs load-insensitive
![Page 40: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/40.jpg)
40
Hierarchical routing– Autonomous systems (ASs)– Gateway routers– Within an AS, all routers run the same intra-AS routing protocol.– The ASs run the same inter-AS routing protocol.
![Page 41: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/41.jpg)
41
Routing in the Internet
RIP (routing information protocol)– DV protocol– Hop count as a cost metric (max 15)– Routing updates every 30 seconds
![Page 42: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/42.jpg)
42
OSPF(open shortest path first)– LS protocol– Link’s state updates every 30 minutes– Advantages:
Security: MD5 Multiple same-cost paths Integrated support for unicast and multicast routing Support for hierarchy within a single routing domain
![Page 43: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/43.jpg)
43
![Page 44: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/44.jpg)
44
BGP (Border Gateway Protocol)– Obtain subnet reachablility information from neighboring ASs– Propagate the reachablility information to all routers interanl to th
e AS– Determine “good” routes to subnets based on the reachability inf
ormation on AS policy.
![Page 45: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/45.jpg)
45
BGP routing policy
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
A
B
C
W X
Y
legend:
customer network:
provider network
![Page 46: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/46.jpg)
46
BGP routing policy (2)
A advertises path AW to B B advertises path BAW to X Should B advertise path BAW to C?
– 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!
A
B
C
W X
Y
legend:
customer network:
provider network
![Page 47: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/47.jpg)
47
Broadcast and Multicast Routing
Broadcast routing algorithms– N-way unicast– Uncontrolled flooding -> broadcast storm
![Page 48: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/48.jpg)
48
– Controlled flooding Sequence-number-controlled flooding Reverse path forwarding (RPF)
![Page 49: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/49.jpg)
49
– Spanning-tree broadcast
![Page 50: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/50.jpg)
50
![Page 51: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/51.jpg)
51
Multicast– To a subset of network nodes– Class D multicast IP address for multicast group– Internet Group Management Protocol and mulcast routing protoc
ols
![Page 52: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/52.jpg)
52
– Multicast routing algorithms Multicast routing using a group-shared tree Multicast routing using a source-based tree with pruning
![Page 53: Ch 4. The Network Layer Myungchul Kim mckim@icu.ac.kr](https://reader031.vdocuments.us/reader031/viewer/2022032804/56649e555503460f94b4d138/html5/thumbnails/53.jpg)
53
– Multicast routing in the Internet Distance Vector Multicast Routing Protocol (DVMRP) Protocol-Independent Multicast (PIM) routing protocol