1
CS 3640: Introduction to Networks and Their Applications
Fall 2018, Lecture 9: The Network Layer I: Addressing (Credit: Christo Wilson @ NEU) Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain
CS 3640: Introduction to Networks and Their Applications Fall 2018, - - PowerPoint PPT Presentation
CS 3640: Introduction to Networks and Their Applications Fall 2018, Lecture 9: The Network Layer I: Addressing (Credit: Christo Wilson @ NEU) Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain 1 You should Be
1
Fall 2018, Lecture 9: The Network Layer I: Addressing (Credit: Christo Wilson @ NEU) Instructor: Rishab Nithyanand Teaching Assistant: Md. Kowsar Hossain
2
You should…
CSMA/CD, CSMA/CA, RTS/CTS.
3
Today in class
Recap: Medium access control protocols
designing one?
the receiver.
RTS/CTS is too expensive!
Recap: Link layer addressing
which MAC addresses are accessible through which interfaces. These mappings are gathered by observing source MAC addresses of each arriving frame.
avoid this.
6
Today in class
What the network layer does
incompatible link layers (e.g., Wi-Fi and Ethernet networks).
“internetwork”. Example: The Internet.
Routers
The structure of the Internet
network vary significantly.
Network 2 Network 1 Network 3 Network 4
Forwarding vs. Routing
The network layer
Internet without the network layer.
provide if it has to serve every network on the Internet?
11
Today in class
Addressing options
Internet (~23 Billion).
Person (most specific).
at some specificity.
Iowa needs to get the parcel to UPS Iowa City.
Network layer addressing
1** 10* 11* 100 101 110 111 0** 00* 01* 000 001 010 011 Datagram, Destination = 101
In In rea eality, th this is is what rou
look li like
IP addressing
11000000 C0 192 10101000 A8 168 00010101 15 21 01001100 4C 76 Decimal Hex Binary 8 16 24 31
Requirements of routing tables
The hierarchy of IP addresses
Host Network Pfx 31
Known by all routers Known by edge (LAN) routers
Classes of IP addresses
Host Ntwk 31 1 8 Example: MIT 18.*.*.* 1-126
Class B
Host Network 10 31 2 16 Example: UIowa 172.16.*.* 128-191 8
Class C
Host Network 11 31 3 24 Example: 216.63.78.* 192-223 8 16 16 24 24
devices in your class.
The hierarchy of IP addresses
Host Networ k Pfx
Subtree size determined by network class
The hierarchy of IP addresses
Class Prefix Bits Network Bits Number of Classes Hosts per Class A 1 7 27 – 2 = 126 (0 and 127 are reserved) 224 – 2 = 16,777,214 (All 0 and all 1 are reserved) B 2 14 214 = 16,398 216 – 2 = 65,534 (All 0 and all 1 are reserved) C 3 21 221 = 2,097,512 28 – 2 = 254 (All 0 and all 1 are reserved) Total: 2,114,036
Too many network IDs Way too big
The problem with class-based hierarchies
Class Prefix Bits Network Bits Number of Classes Hosts per Class A 1 7 27 – 2 = 126 (0 and 127 are reserved) 224 – 2 = 16,777,214 (All 0 and all 1 are reserved) B 2 14 214 = 16,398 216 – 2 = 65,534 (All 0 and all 1 are reserved) C 3 21 221 = 2,097,512 28 – 2 = 254 (All 0 and all 1 are reserved) Total: 2,114,036
Way too big
Reducing router storage with “subnets”
because it is! The designers did not foresee needing to store 1000s of entries on routers.
Host Ntwk Pfx Subnet
Subnet masks and routing tables
used by routers to indicate which hosts are reachable by other routers.
subnet mask. It gets me closest to the destination.
Host Ntwk Pfx Subnet Address Prefix Subnet Mask Prefix After Masking (in Binary) Next Hop 0.0.0.0 0.0.0.0
******** ******** ******** ********
Port 4 18.0.0.0 255.0.0.0
00010010 ******** ******** ********
Port 2 128.42.0.0 255.255.0.0
10000000 00101010 ******** ********
Port 3 128.42.128.0 255.255.128.0
10000000 00101010 1******* ********
Port 5 128.42.222.0 255.255.255.0
10000000 00101010 11011110 ********
Port 1
Reducing router storage with “subnets”
Host Networ k Pfx
Subtree size determined by length
Subnet
The limitations of subnetting
(at least) every network that has a class (at least 2.1 M).
Class Prefix Bits Network Bits Number of Classes Hosts per Class A 1 7 27 – 2 = 126 (0 and 127 are reserved) 224 – 2 = 16,777,214 (All 0 and all 1 are reserved) B 2 14 214 = 16,398 216 – 2 = 65,534 (All 0 and all 1 are reserved) C 3 21 221 = 2,097,512 28 – 2 = 254 (All 0 and all 1 are reserved) Total: 2,114,036
Way too big
Reducing routing table sizes with CIDR (Classless Inter Domain Routing)
IPs which have a CIDR representation of 129.10.0.0/16
Reducing routing table sizes with CIDR (Classless Inter Domain Routing) Prefix Netmask Prefix After Masking (in Binary) IP Address Range 207.46.0.0 19
11001111 00101110 000***** ********
207.46.0 – 31.* 207.46.32.0 19
11001111 00101110 001***** ********
207.46.32 – 63.* 207.46.64.0 19
11001111 00101110 010***** ********
207.46.64 – 95.* 207.46.128.0 18
11001111 00101110 10****** ********
207.46.128 – 191.* 207.46.192.0 18
11001111 00101110 11****** ********
207.46.192 – 255.* Hole in the Routing Table: No coverage for 96 – 127 Missing entry: 207.46.96.0/19
Reducing routing table sizes with CIDR (Classless Inter Domain Routing) Prefix Netmask Prefix After Masking (in Binary) Next Hop 207.46.0.0 19
11001111 00101110 000***** ********
Port 1 207.46.32.0 19
11001111 00101110 001***** ********
Port 1 207.46.64.0 18
11001111 00101110 01****** ********
Port 1 207.46.128.0 18
11001111 00101110 10****** ********
Port 2 207.46.192.0 18
11001111 00101110 11****** ********
Port 3
207.46.0.0 18
11001111 00101110 00****** ********
Port 1 207.46.0.0 17
11001111 00101110 0******* ********
Port 1 Same length netmask All bits match except for the last one Same port
Size of CIDR routing tables: ~ 450K entries for the entire Internet!
What you should remember from this lecture
Assignment 2