730 likes | 740 Views
This chapter covers identification of IP protocol stack, addressing classes, subnetting, VLAN interconnections, TCP/IP basics, and protocol numbers. Learn configuration, segments, ARP, addressing, and interconnections of TCP/IP networks.
E N D
Chapter 8 Interconnecting Networks with TCP/IP
Objectives • Upon completion of this chapter you will be able to perform the following tasks: • Identify the IP protocol stack, its protocol layer functions, and commonly used IP protocols • Identify IP address classes, IP addresses, IP subnet masks, IP network numbers, subnet numbers, and possible host numbers. • Configure IP addresses and subnet masks on a router interface and optionally configure a host table. • Interconnect the VLANs with a layer three device such as a router on a stick.
Introduction to TCP/IP Host Host Internet TCP/IP • Early protocol suite • Universal
TCP/IP Protocol Stack 7 5 6 Application 5 Presentation 4 Application 4 Session 3 3 Transport Transport 2 2 Internet Network 1 1 Data Link Data Link Physical Physical
Application Layer Overview File Transfer - TFTP * - FTP * - NFS E-Mail - SMTP Remote Login - Telnet * - rlogin * Network Management - SNMP * Name Management - DNS* Application Transport Internet Data Link *Used by the router Physical
Transport Layer Overview Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Connection-OrientedConnectionless Application Transport Internet Data Link Physical
TCP Segment Format Bit 0 Bit 15 Bit 16 Bit 31 Destination port (16) Source port (16) Sequence number (32) Acknowledgement number (32) 20Bytes Headerlength (4) Reserved (6) Code bits (6) Window (16) Checksum (16) Urgent (16) Options (0 or 32 if any) Data (varies)
Port Numbers RIP FTP TELNET SMTP DNS TFTP SNMP ApplicationLayer 520 21 23 25 53 69 161 Port Numbers TransportLayer TCP UDP
TCP Port Numbers Source Port Dest. Port … Telnet Z Host Z Host A Dest. port = 23.Send packet to my Telnet application. SP DP 1028 23 …
UDP Segment Format Bit 0 1 Bit 15 Bit 16 Bit 31 Destination port (16) Source port (16) 8Bytes Length (16) Checksum (16) Data (if any) • No sequence or acknowledgment fields
Internet Layer Overview Internet Protocol (IP) Internet Control Message Protocol (ICMP) Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP) Application Transport • OSI network layer corresponds to the TCP/IP internet layer Internet Data Link Physical
IP Datagram Bit 0 1 Bit 15 Bit 16 Bit 31 Version(4) HeaderLength (4) Priority & Type of Service (8) Total Length (16) Flags(3) Identification (16) Fragment offset (13) 20Bytes Time to live (8) Protocol (8) Header checksum (16) Source IP Address (32) Destination IP Address (32) Options (0 or 32 if any) Data (varies if any)
Protocol Field TransportLayer UDP TCP ProtocolNumbers 6 17 • Determines destination upper-layer protocol InternetLayer IP
Internet Control Message Protocol Application Destination Unreachable Echo (Ping) Other Transport 1 ICMP Internet Data Link Physical
Address Resolution Protocol I need the Ethernet address of 176.16.3.2. 172.16.3.1 172.16.3.2 IP: 172.16.3.2 = ???
I need the Ethernet address of 176.16.3.2. I heard that broadcast. The message is for me. Here is my Ethernet address. Address Resolution Protocol 172.16.3.1 172.16.3.2 IP: 172.16.3.2 = ???
I need the Ethernet address of 176.16.3.2. I heard that broadcast. The message is for me. Here is my Ethernet address. Address Resolution Protocol 172.16.3.1 172.16.3.2 IP: 172.16.3.2 = ??? IP: 172.16.3.2 Ethernet: 0800.0020.1111
I need the Ethernet address of 176.16.3.2. I heard that broadcast. The message is for me. Here is my Ethernet address. Address Resolution Protocol 172.16.3.1 172.16.3.2 • Map IP MAC • Local ARP IP: 172.16.3.2 = ??? IP: 172.16.3.2 Ethernet: 0800.0020.1111
Reverse ARP What is my IP address? Ethernet: 0800.0020.1111 IP = ???
Reverse ARP I heard that broadcast. Your IP address is 172.16.3.25. What is my IP address? Ethernet: 0800.0020.1111 IP = ???
Reverse ARP I heard that broadcast. Your IP address is 172.16.3.25. What is my IP address? Ethernet: 0800.0020.1111 IP = ??? Ethernet: 0800.0020.1111 IP: 172.16.3.25
Reverse ARP I heard that broadcast. Your IP address is 172.16.3.25. What is my IP address? • Map MAC IP Ethernet: 0800.0020.1111 IP = ??? Ethernet: 0800.0020.1111 IP: 172.16.3.25
Introduction to TCP/IP Addresses 172.16.0.1 172.18.0.1 172.18.0.2 172.16.0.2 HDR SA DA DATA 10.13.0.0 192.168.1.0 192.168.1.1 10.13.0.1 172.17.0.1 172.17.0.2 • Unique addressing allows communication between end stations • Path choice is based on destination address • Location is represented by an address
IP Addressing 32 bits DottedDecimal Network Host 255 255 255 255 Maximum
IP Addressing 32 bits DottedDecimal Network Host 255 255 255 255 Maximum 17 1 8 9 16 24 25 32 11111111 11111111 11111111 11111111 Binary 1286432168421 1286432168421 1286432168421 1286432168421
IP Addressing 32 bits DottedDecimal Network Host 255 255 255 255 Maximum 17 1 8 9 16 24 25 32 11111111 11111111 11111111 11111111 Binary 1286432168421 1286432168421 1286432168421 1286432168421 172 16 122 204 ExampleDecimal 10101100 00010000 01111010 11001100 ExampleBinary
Network Host Host Host Network Network Host Host Network Network Network Host IP Address Classes 8 bits 8 bits 8 bits 8 bits • Class A: • Class B: • Class C: • Class D: Multicast • Class E: Research
IP Address Classes 1 8 9 16 17 24 25 32 Bits: 0NNNNNNN Host Host Host Class A: Range (1-126) 1 8 9 16 17 24 25 32 Bits: 10NNNNNN Network Host Host Class B: Range (128-191) 1 8 9 16 17 24 25 32 Bits: 110NNNNN Network Network Host Class C: Range (192-223) 1 8 9 16 17 24 25 32 Bits: 1110MMMM Multicast Group Multicast Group Multicast Group Class D: Range (224-239)
Host Addresses 172.16.2.2 10.1.1.1 10.6.24.2 E1 E0 172.16.3.10 10.250.8.11 172.16.2.1 172.16.12.12 10.180.30.118 Routing Table Network Interface 172.16 . 12 . 12 172.16.0.0 10.0.0.0 E0 E1 Network Host
Determining Available Host Addresses Network Host 172 16 0 0 N 10101100 00010000 00000000 00000000 1 16151413121110 9 87654321 00000000 00000001 2 00000000 00000011 3 ... ... ... 11111111 11111101 65534 11111111 11111110 65535 11111111 11111111 65536 - 2 2N-2 = 216-2 = 65534 65534
IP Address Classes Exercise Address Class Network Host 10.2.1.1 128.63.2.100 201.222.5.64 192.6.141.2 130.113.64.16 256.241.201.10
IP Address Classes Exercise Answers Address Class Network Host 10.2.1.1 A 10.0.0.0 0.2.1.1 128.63.2.100 B 128.63.0.0 0.0.2.100 201.222.5.64 C 201.222.5.0 0.0.0.64 192.6.141.2 C 192.6.141.0 0.0.0.2 130.113.64.16 B 130.113.0.0 0.0.64.16 256.241.201.10 Nonexistent
Addressing without Subnets 172.16.0.1 172.16.0.2 172.16.255.253 172.16.255.254 172.16.0.3 • Network 172.16.0.0 …... 172.16.0.0
Addressing with Subnets 172.16.3.0 172.16.4.0 • Network 172.16.0.0 172.16.1.0 172.16.2.0
Subnet Addressing 172.16.2.200 172.16.3.5 172.16.3.1 E1 E0 172.16.2.2 172.16.3.100 172.16.2.1 172.16.2.160 172.16.3.150 New Routing Table Network Interface 172.16 . 2 . 160 172.16.0.0 172.16.0.0 E0 E1 Network Host
Subnet Addressing 172.16.2.200 172.16.3.5 172.16.3.1 E1 E0 172.16.2.2 172.16.3.100 172.16.2.1 172.16.2.160 172.16.3.150 New Routing Table Network Interface 172.16 . 2 . 160 172.16.2.0 172.16.3.0 E0 E1 Network Subnet Host
172 16 0 0 255 255 255 0 Subnet Mask Network Host IPAddress Network Host DefaultSubnetMask 255 255 0 0 11111111 11111111 00000000 00000000 Also written as “/16” where 16 represents the number of 1s in the mask. Network Subnet Host 8-bitSubnetMask Also written as “/24” where 24 represents the number of 1s in the mask.
Decimal Equivalents of Bit Patterns 128 64 32 16 8 4 2 1 0 0 0 0 0 0 0 0 = 0 1 0 0 0 0 0 0 0 = 128 1 1 0 0 0 0 0 0 = 192 1 1 1 0 0 0 0 0 = 224 1 1 1 1 0 0 0 0 = 240 1 1 1 1 1 0 0 0 = 248 1 1 1 1 1 1 0 0 = 252 1 1 1 1 1 1 1 0 = 254 1 1 1 1 1 1 1 1 = 255
Subnet Mask without Subnets Network Host 172.16.2.160 10101100 00010000 00000010 10100000 11111111 11111111 00000000 00000000 255.255.0.0 00000000 00000000 10101100 00010000 • Subnets not in use—the default NetworkNumber 172 16 0 0
Subnet Mask with Subnets Subnet Network Host 172.16.2.160 10101100 00010000 00000010 10100000 11111111 11111111 00000000 11111111 255.255.255.0 10101100 00010000 00000010 00000000 • Network number extended by eight bits 128 192 224 240 248 252 254 255 NetworkNumber 172 16 2 0
Subnet Mask with Subnets (cont.) Subnet Network Host 172.16.2.160 10100000 10101100 00010000 00000010 11111111 11111111 11000000 11111111 255.255.255.192 10101100 00010000 00000010 10000000 • Network number extended by ten bits 128 192 224 240 248 252 254 255 128 192 224 240 248 252 254 255 NetworkNumber 172 16 2 128
Subnet Mask Exercise Address Subnet Mask Class Subnet 172.16.2.10 255.255.255.0 10.6.24.20 255.255.240.0 10.30.36.12 255.255.255.0
Subnet Mask Exercise Answers Address Subnet Mask Class Subnet 172.16.2.10 255.255.255.0 B 172.16.2.0 10.6.24.20 255.255.240.0 A 10.6.16.0 10.30.36.12 255.255.255.0 A 10.30.36.0
Broadcast Addresses 172.16.3.0 172.16.4.0 172.16.1.0 172.16.2.0 172.16.3.255 (Directed broadcast) X 255.255.255.255 (Local network broadcast) 172.16.255.255 (All subnets broadcast)
Addressing Summary Example 172 16 2 160 Host 10101100 00010000 00000010 10100000 172.16.2.160 1 Mask 255.255.255.192 Subnet 4 Broadcast First Last
Addressing Summary Example 172 16 2 160 Host 10101100 00010000 00000010 10100000 172.16.2.160 1 Mask 255.255.255.192 2 11111111 11111111 11000000 11111111 Subnet Broadcast First Last
Addressing Summary Example 172 16 2 160 3 Host 10101100 00010000 00000010 10100000 172.16.2.160 1 Mask 255.255.255.192 2 11111111 11111111 11000000 11111111 Subnet Broadcast First Last 7
Addressing Summary Example 172 16 2 160 3 Host 10101100 00010000 00000010 10100000 172.16.2.160 1 Mask 255.255.255.192 2 11111111 11111111 11000000 11111111 Subnet 4 10000000 Broadcast First Last
Addressing Summary Example 172 16 2 160 3 Host 10101100 00010000 00000010 10100000 172.16.2.160 1 Mask 255.255.255.192 2 11111111 11111111 11000000 11111111 Subnet 4 10000000 Broadcast 10111111 5 First 6 Last
Addressing Summary Example 172 16 2 160 3 Host 10101100 00010000 00000010 10100000 172.16.2.160 1 Mask 255.255.255.192 2 11111111 11111111 11000000 11111111 Subnet 4 10000000 Broadcast 10111111 5 First 10000001 6 Last