IST 220 Lectures for Dec 8 2009 Dec

  • Slides: 25
Download presentation
IST 220 Lectures for: Dec. 8, 2009 Dec. 10, 2009 1

IST 220 Lectures for: Dec. 8, 2009 Dec. 10, 2009 1

Introduction • Each WAN or LAN belongs to a particular organization, an internetwork does

Introduction • Each WAN or LAN belongs to a particular organization, an internetwork does not belong to any particular org • An internetwork could actually be very small, though it is usually big • For big internetworks, the routing tables must be still small; otherwise, too slow • To make routing tables small, we would need to use hierarchical addresses – IP addresses are a hierarchical address scheme • Each IP address has 32 bits 2

Five Classes of IP addresses To make both big and small companies happy, one

Five Classes of IP addresses To make both big and small companies happy, one class of IP address is NOT enough. 3

How to identify the class of an IP address? The first 4 bits of

How to identify the class of an IP address? The first 4 bits of an IP address identifies its class. 0 * * * : class A IP address 1 0 * * : class B IP address 1 1 0 * : class C IP address “*” means either bit “ 1” or bit “ 0” 1 1 1 0 : class D IP address 1 1 : class E IP address 4

Dotted Decimal Notation of an IP Address Remembering 32 bits IP addresses is often

Dotted Decimal Notation of an IP Address Remembering 32 bits IP addresses is often too HARD for human being. To solve this problem, we translate the 32 bits to decimal. 10000001 00110100 00000110 0000 Binary Decimal: 129 . 52 . 6 . 0 5

How to know the Class of a decimal IP address? Example: 129. 52. 6.

How to know the Class of a decimal IP address? Example: 129. 52. 6. 0 Step 1: translate the first decimal number “ 129” to binary, we get: 10000001 Step 2: because the first 4 bits “ 1000” match the identifier of Class A, it is a Class A address. Idea: the first decimal number tells the Class info: Suffix: Class 1 st decimal number A 0 through 127 Last 3 decimal numbers B 128 -191 Last 2 decimal numbers C 192 -223 6 Last 1 decimal number

IP Packet Forwarding in a tiny Internetwork Question 1: how many physical networks are

IP Packet Forwarding in a tiny Internetwork Question 1: how many physical networks are there? Principle: each physical network belongs to a particular organization; physical networks are interconnected by routers, not bridges. 7

Answer to Question 1 Answer: the two routers R 1 and R 2 break

Answer to Question 1 Answer: the two routers R 1 and R 2 break the internetwork into 3 physical networks. Note that Physical Network 2 includes two LAN segments and the bridge. Note that half of R 1 belongs to Phy Network 1; the other half of R 1 belongs to Phy Network 3. 8

What is the Network Address of Phy Network 1? Each Phy Network has a

What is the Network Address of Phy Network 1? Each Phy Network has a unique network address which cannot be used by any computer in it. The “prefix” of the Network Address must be the same as the prefix of the IP addresses of all other IP addresses used in the network; but all the “suffix” bits must be “ 0” Because the first decimal number of A’s IP address is 166, it is a Class B IP address. The “prefix” of A’s IP address should be 166. 200 because the first 16 bits are the prefix of any Class B address. 9

What is the Network Address of Phy Network 1 (cont. )? Because all the

What is the Network Address of Phy Network 1 (cont. )? Because all the IP addresses used in a Phy Network must have the same prefix, the prefix of the IP addresses of all Other computers, though now shown, must be 166. 200 Hence, the “prefix” of the Network Address must be 166. 200. Hence, the network address is: 166. 200. 0. 0 10

What is the Broadcast Address of Phy Network 1 (cont. )? The “prefix” of

What is the Broadcast Address of Phy Network 1 (cont. )? The “prefix” of the Broadcast Address must be the same as the prefix of the IP addresses of all other IP addresses used in the network; but all the “suffix” bits must be “ 1” Hence, the “prefix” of the Broadcast Address must be 166. 200; and the suffix must be: 1111 -1111 When we translate the 16 bits suffix back to decimal, we will get: 255 Hence, the broadcast address is: 166. 200. 255 11

Maximally, Phy Network 1 can hold how many computers? Because it is a Class

Maximally, Phy Network 1 can hold how many computers? Because it is a Class B network, the suffix part of the IP addresses used in the Phy Network will have 16 bits. Because the total number of all possible combinations of the 16 bits is 216, the Phy Network can theoretically hold 216 computers. However, because neither the Network Address nor the Broadcast Address can be used by a computer, maximally the Phy Network can only hold 216 – 2 computers. 12

How many IP addresses should R 1 own? NIC 1, 1 belongs to Phy

How many IP addresses should R 1 own? NIC 1, 1 belongs to Phy Network 1; however, NIC 1, 2 belongs to Phy Network 3. Different Phy Networks must have diff. prefix. Hence, the IP addresses assigned to these two NIC cards must have different prefix. Therefore, R 1 owns two IP addresses. 13

Assume computer A sends message “Hello” to D: Step 1: P-A (processor of A)

Assume computer A sends message “Hello” to D: Step 1: P-A (processor of A) adds the “IP header” (also called the routing layer header): | 168. 16. 24. 115 | 166. 200. 122. 1 | “hello” | (The IP layer payload includes the message only. ) Step 2: P-1 adds the NIC Layer (also called “Network Interface Layer”) header: | NIC-11’s MAC | NIC-A’s MAC | 168. 16. 24. 115 | 166. 200. 122. 1 | “hello” | (The NIC Layer payload includes the message and the two IP addr. ) 14

Assume computer A sends message “Hello” to D (cont’d): Step 3: NIC-A adds preamble

Assume computer A sends message “Hello” to D (cont’d): Step 3: NIC-A adds preamble and CRC | Preamble | NIC-11’s MAC | NIC-A’s MAC | 168. 16. 24. 115 | 166. 200. 122. 1 | “hello” | CRC| Step 4: NIC-A uses CSMA-CD to send the packet out after modulation. 15

Assume computer A sends message “Hello” to D (cont’d): Step 5: NIC-11 senses the

Assume computer A sends message “Hello” to D (cont’d): Step 5: NIC-11 senses the signal, demodulates it, and puts it into cache Step 6: NIC-11 does address filtering Step 7: NIC-11 does length checking Step 8: NIC-11 does CRC checking Step 9: NIC-11 strips off preamble & CRC Step 10: NIC-11 puts the packet into incoming queue 16

Assume computer A sends message “Hello” to D (cont’d): Step 11: P-1 (processor of

Assume computer A sends message “Hello” to D (cont’d): Step 11: P-1 (processor of R 1) gets the packet from queue Step 12: P-1 strips off the NIC layer header Step 13: P-1 does routing based on the Routing Table. Destination 166. 200. 0. 0 167. 234. 0. 0 168. 16. 0. 0 Where to forward NIC 1, 1 NIC 1, 2 17

Assume computer A sends message “Hello” to D (cont’d): Notes on the Routing Table:

Assume computer A sends message “Hello” to D (cont’d): Notes on the Routing Table: -The Destination column should contain Network Addr. -The Dest field tells the receiver’s Phy Network -The Routing Table should forward the packet towards the shortest path, if there exists multiple paths from R 1 to the receiver. -When P-1 matches the packet’s Dest IP Address against the routing table, the last row will be matched because the Network Address in the last row and the packet’s dest IP address have the SAME prefix. 18

Assume computer A sends message “Hello” to D (cont’d): Step 14: P-1 adds a

Assume computer A sends message “Hello” to D (cont’d): Step 14: P-1 adds a new NIC Layer header: | NIC-21’s MAC | NIC-12’s MAC | 168. 16. 24. 115 | 166. 200. 122. 1 | “hello” | Step 15: NIC-12 adds the preamble and CRC; NIC-12 then uses CSMA-CD to send it out after modulation. Step 16: NIC-21 will do exactly the same things NIC-11 has done. 19

Assume computer A sends message “Hello” to D (cont’d): Step 17: P-2 will do

Assume computer A sends message “Hello” to D (cont’d): Step 17: P-2 will do exactly the same things P-1 has done except that it will use a different routing table. Destination 166. 200. 0. 0 167. 234. 0. 0 168. 16. 0. 0 Where to forward NIC 2, 1 NIC 2, 2 20

Assume computer A sends message “Hello” to D (cont’d): Step 18: P-2 adds a

Assume computer A sends message “Hello” to D (cont’d): Step 18: P-2 adds a new NIC layer header: | NIC-D’s MAC | NIC-22’s MAC | 168. 16. 24. 115 | 166. 200. 122. 1 | “hello” | Alert: Inside the NIC layer header, the dest address cannot be the MAC address of NIC-L of the Bridge, since no bridge does address filtering. 21

Assume computer A sends message “Hello” to D (cont’d): Step 19: NIC-22 adds the

Assume computer A sends message “Hello” to D (cont’d): Step 19: NIC-22 adds the preamble and CRC; it then uses CSMA-CD to send packet out after modulation. Step 20: NIC-L will sense the signal, demodulates it, and puts it into cache. Step 20: NIC-L will do length checking; Step 21: NIC-L will do CRC checking Step 22: NIC-L will strip off preamble & CRC Step 23: NIC-L will put the packet into queue. 22

Assume computer A sends message “Hello” to D (cont’d): Step 24: P-B (bridge) will

Assume computer A sends message “Hello” to D (cont’d): Step 24: P-B (bridge) will decide where to forward the packet based on its forwarding table: Destination Where is the packet from? Where to forward? D’s MAC Addr. Left segment NIC-R D’s MAC Addr. Right segment discard C’s MAC Addr. Left segment Discard C’s MAC Addr. Right segment NIC-L 23

Assume computer A sends message “Hello” to D (cont’d): Step 25: because the first

Assume computer A sends message “Hello” to D (cont’d): Step 25: because the first rule is matched, P-B will forwards the packet to NIC-R. Step 26: NIC-R adds preamble and CRC. Step 27: NIC-R uses CSMA-CD to sent the packet out after modulation. Step 28: NIC-D senses the signal, demodulates it, and puts it into cache. Step 29: NIC-D does address filtering. 24

Assume computer A sends message “Hello” to D (cont’d): Step 30: NIC-D does length

Assume computer A sends message “Hello” to D (cont’d): Step 30: NIC-D does length checking. Step 31: NIC-D does CRC checking. Step 32: NIC-D strips off preamble and CRC. Step 33: NIC-D forwards the packet to P-C. Step 34: P-D strips off the NIC layer header; Step 35: P-D strips off the IP header after knowing who the sender is. Step 36: P-D shows the message in Outlook. 25