Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapters 4 & 5 Addressing Will go over Exam 1

Similar presentations


Presentation on theme: "Chapters 4 & 5 Addressing Will go over Exam 1"— Presentation transcript:

1 Chapters 4 & 5 Addressing Will go over Exam 1
Dr. Clincy Lecture

2 Recall, what info is used by router to make next hop decision ?
What ACTUAL info does the router use to make a next hop decision ? Dr. Clincy Lecture

3 Mask Given the network address, we can easily determine the block and range of addresses Suppose given the IP address, can we determine the network address (beginning of the block) ? To route packets to the correct network, a router must extract the network address from the destination IP address For example, given , we know this is a class B, therefore is the netid and is the network address (starting address of the block) How would we EXTRACT the network address from the IP address? We would use a MASK. A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block. Dr. Clincy Lecture

4 AND operation If bit is ANDed with 1, it’s preserved If bit is ANDed with 0, it’s changed to a 0. There are 3 default masks: one for each class. The default masks preserve the netid when ANDed with the addresses Class A Default Mask: Class B Default Mask: Class C Default Mask: A simple way to determine the netid for un-subnetted cases: (1) if mask byte is 255, retain corresponding byte of the address, (2) if mask byte is 0, set corresponding address byte to 0. Dr. Clincy Lecture

5 Examples Given the address and the default class A mask, find the beginning address (network address). The default mask is , which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is Solution Given the address and the default class B mask, find the beginning address (network address). The default mask is , which means that the first 2 bytes are preserved and the other 2 bytes are set to 0s. The network address is Solution Given the address and the class C default mask, find the beginning address (network address). The default mask is , which means that the first 3 bytes are preserved and the last byte is set to 0. The network address is Solution Dr. Clincy Lecture

6 5-bit Address Space Illustration
No Netid case 32 addresses/block Number of blocks: 1 Address range per block: 0 to 31 Netids: N/A Network Addresses : 00000 Broadcast Addresses: 11111 Dr. Clincy Lecture

7 5-bit Address Space Illustration
1-bit Netid case 16 addresses/block Number of blocks: 2 Address range per block: 0 to 15 Netids: 0, 1 Network Addresses : 00000, 10000 Broadcast Addresses: 01111, 11111 What is the mask ? Dr. Clincy Lecture

8 5-bit Address Space Illustration
2-bit Netid Case 8 addresses/block Number of blocks: 4 Address range per block: 0 to 7 Netids: 00, 01, 10, 11 Network Addresses : 00000, 01000, 10000, 11000 Broadcast Addresses: 00111, 01111, 10111, 11111 What is the mask ? Dr. Clincy Lecture

9 5-bit Address Space Illustration
3-bit Netid Case 4 addresses/block Number of blocks: 8 Address range per block: 0 to 3 Netids: 000, 001, 010, 011, 100, 101, 110, 111 Network Addresses : 00000, 00100, 01000, 01100 10000, 10100, 11000, 11100 Broadcast Addresses: 00011, 00111, 01011, 01111 10011, 10111, 11011, 11111 What is the mask ? Dr. Clincy Lecture

10 Mixing 3-bit & 2-bit Cases (think of the 32-bit case)
4 addresses/block and 8 addresses/block Number of blocks: 6 Address range per block: 0 to 3 and 0 to 7 Netids: 000, 001, 010, 011, 10, 11 Network Addresses : 00000, 00100, 01000, 01100 10000, 11000 Broadcast Addresses: 00011, 00111, 01011, 01111 10111, 11111 Dr. Clincy Lecture

11 Multihomed devices As we mentioned that, any device with one or more connections to the Internet will need an IP address for EACH connection – such devices are called “multihomed” devices. A Router could be a multihomed device Dr. Clincy Lecture

12 Example of direct broadcast address
Router sending to all hosts on a network If the hostid is all 1’s, it’s called a “broadcast address” and the router use it to send a packet to all host in a specific network. In this case, hosts 20, 64, 126 and etc. will receive the packet from the router Example of limited broadcast address Host sending to all other hosts on a network If the hostid and netid are all 1’s, it’s called a “limited broadcast address”. If the host wants to send a packet to all host in a specific network, it would use this address. The router would block this address so that data stays contained within a specific network. Dr. Clincy Lecture

13 Example of this host on this address
IPless Host sending message to bootstrap server An address of all 0’s is used during bootstrap time if the host doesn’t know it’s IP address. The un-named host sends an all 0 source address and limited broadcast (all 1’s) destination address to the bootstrap server. Example of specific host on this network Host sending to some other specific host on a network An address with a netid of all 0’s is used by a host or router to send another host with in the same network a message. Dr. Clincy Lecture

14 Example of loopback address
The IP address with the 1st byte equal to 127 is used for the loop back address. Loopback address is used to test software on a machine – the packet never leaves the machine – it returns to the protocol software Example: a “ping” command can send a packet with a loopback address as the destination address to see if the IP software is capable of receiving and processing a packet. Dr. Clincy Lecture

15 Sample internet With your new found knowledge, think about Project 2
Ethernet ATM Token Ring Ethernet With your new found knowledge, think about Project 2 Dr. Clincy Lecture

16 Exam 2 Results & Grading Scale
Average Score = 48 Standard Deviation= 15 (large) A-grade (0 students) B-grade (7 students) C-grade (4 students) D-grade (5 students) F-grade (1 student) Dr. Clincy Lecture


Download ppt "Chapters 4 & 5 Addressing Will go over Exam 1"

Similar presentations


Ads by Google