1 OSI Reference Model Benefits Standardizes interfaces Facilitates modular engineering Ensures interoperable technology Accelerates evolution Simplifies teaching and learning Application Presentation Session Transport Network Data Link Physical
2 Why a Layered Network Model? Reduces complexity Standardizes interfaces Facilitates modular engineering Application Presentation Session Transport Network Data Link Physical
3 Peer-to-Peer Communications Application Presentation Session Transport Network Data Link Physical HOST AHOST B segments packets frames bits Application Presentation Session Transport Network Data Link Physical
4 MAC Address MAC address is burned into ROM on a network interface card 24 bits c Vendor Code Serial Number ROM RAM Vendor assigned IEEE assigned IEEE -- Institute of Electrical and Electronics Engineers
5 Ethernet/ IEEE (CSMA/CD) ABCD Collision ABCD JAMJAMJAMJAMJAMJAMJAMJAMJAMJAMJAMJAM Back-off
6 Ethernet 5-4 rule
7
8 TCP/IP Protocol Stack Map DOD model to the OSI Reference Model Application Presentation Session Transport Network Data Link Physical Application Transport Internet Network Interface OSI Reference Model Ethernet, 802.3, 802.5, FDDI, and so on. TCP/IP Conceptual Layers US Department Of Defence (DOD)
9 IP Datagram # Bits VERSHLEN Type of Service Total Length Identi- fication Flags Frag Offset TTL 3 # Bits8320~ Protocol Header Checksum Source IP Address Destination IP Address IP Options Data… Network Header Frame Trailer Frame Header Data
10 IP Address Bit Patterns 1724 Class A: # Bits 1416 Class B: # Bits 3218 Class C: # Bits 0network #host # 1network #host #0 1network #host #10 2
11 IP Address Bit Patterns Class D: # Bits Class E: # Bits Multicast For Research
12 Recognizing Classes in IP Addresses (First Octet Rule) High Order Bits (binary ) Octet in Decimal Address Class – – – – – 255 ABCDEABCDE Network Reserved for loopback. The address often is used to refer to the local host
13 Network And Host Number Address Class Network Number Host Number ABCABC ,384 2,097,152 16,777,214 65, Network 126= ( Reserved) = ,097,152 = 2 21 Host 16,777,214 = ,534 = =
14 Decimal Equivalents of Bit Patterns = = = = = = = =
15 Subnet Planning Other subnets 20 subnets 5 hosts per subnet Class C address: subnets 5 hosts per subnet Class C address: subnets 5 Bits of Subnet 2 5 =32 Subnets 5 hosts per subnet 3 Bits of Host = 6 Hosts 20 subnets 5 Bits of Subnet 2 5 =32 Subnets 5 hosts per subnet 3 Bits of Host = 6 Hosts
16 IP Host Address: Subnet Mask: NetworkSubnetHost : Subnet: : Class C Subnet Planning Example Subnet Address = Host Addresses = Rang = – Broadcast Address = Five Bits of Subnetting
/ / / /30 Subnet Planning /28 R1 R3 R2 R /26 ? An additional subnet required for a Ethernet link between R1 and R2 as shown in the diagram. Which subnet address can be configured in this network to provide a maximum of 14 useable addresses for this link while wasting the fewest addresses? / / / / / /28
/ / / /30 Subnet Planning /28 R1 R3 R2 R /26 ? / / / /28 96 -- -- -- --
19 Broadcast Addresses / / / / (Directed broadcast) (Local network broadcast) X
20 AddressClassSubnetBroadcast C Subnet Mask A B Exercise: Broadcast Addresses
21 All Subnets Broadcast / / / / (All Subnets Broadcast)
22 Address Resolution Protocol IP: = ??? I need the Ethernet address of
23 Address Resolution Protocol IP: Ethernet: I need the Ethernet address of I heard that broadcast. The message is for me. Here is my Ethernet address. IP: = ???
24 Address Resolution Protocol Map IP Ethernet Local ARP IP: Ethernet: I need the Ethernet address of I heard that broadcast. The message is for me. Here is my Ethernet address. Destination local IP: = ???
25 Finding the MAC Address Router A Destination not local Host Z Host Y Response Routing Table: Net for Host Z Routing Table: Net for Host Z Map IP Ethernet Not Local ARP Broadcast Host Y MAC Host Y MAC IP: MAC? Host Y MAC Host Y MAC Router A MAC Router A MAC IP: Ethernet: c I want access the Host Z Request Response
26 Proxy ARP Router A Host Z Host Y Request Routing Table: Net for Host Z Routing Table: Net for Host Z Broadcast Host Y MAC Host Y MAC IP: MAC? I want access the Host Z /24 The router response its own MAC Address Response Host Y MAC Host Y MAC Router A MAC Router A MAC IP: Ethernet: c Response
27 Transport Layer Overview Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Application Transport Internet Network Interface Hardware TCP : Connection-oriented services UDP : Connectionless services
28 Determines destination upper-layer protocol IP Datagram Protocol Field Transport Layer Internet Layer TCP UDP Protocol Numbers IP 176
29 TCP Segment Format # Bits Source Port Dest. Port Sequence Number Acknowledgement Number HLENReserved Code Bits 16 Window 16 Check- sum 16 Urgent 0 or 32 OptionData... Transport Header Network Header Data Frame Trailer Frame Header
30 Port Numbers TCP Port Numbers FTPFTP Transport Layer TELNETTELNET DNSDNS SNMPSNMP TFTPTFTP SMTPSMTP UDP Application Layer HTTPHTTP
31 Port Numbers assigned range Port numbers have the following assigned ranges: Port number are 16 bits long (0~65535) Numbers from 1 to 1023 are well-known port number (controlled by the IANA) Numbers above 1023 are dynamically assigned port numbers
32 TCP Sequence and Acknowledgment Numbers # Bits Source Port Dest. Port Sequence Number Acknowledgement Number HLENReserved Code Bits 16 Window 16 Check- sum 16 Urgent 0 or 32 OptionData...
33 TCP Window size # Bits Source Port Dest. Port Sequence Number Acknowledgement Number HLENReserved Code Bits 16 Window 16 Check- sum 16 Urgent 0 or 32 OptionData...
34 Window size = 3 Send 4 Window size = 3 Send 2 TCP Windowing Sender Receiver Window size = 3 Send 1 Window size = 3 Send 3 Window size = 3 Send 3 ACK 5 Window size = 2 ACK 3 Window size = 2 Packet 3 is Dropped
35 UDP no sequence or acknowledgment fields Application-layer protocols can provide for reliability UDP Segment Format 16 Source Port 16 Destination Port 16 Length 16 ChecksumData… # Bits
36 Application Layer Overview *Used by the router Application Transport Internet Network Interface Hardware File Transfer - TFTP * - FTP - NFS - SMTP Remote Login - Telnet * - rlogin Network Management - SNMP * Name Management - DNS* File Transfer - TFTP * - FTP - NFS - SMTP Remote Login - Telnet * - rlogin Network Management - SNMP * Name Management - DNS*
37 Classless Routing Protocols Classless Routing Protocols: RIPv2 EIGRP OSPF IS-IS BGPv4 Classful Routing Protocols: RIPv1 IGRP 注意 : 有类和无类路由协议在构建路由表时采用不同的方法;而有类和 无类的路由行为是关于如何查找路由表的方法 ( 这时路由表已经 建立 ) 。 有类和无类路由协议与有类和无类路由行为 ( 通过 ip classless 和 no ip classless 控制 ) 是相互独立的。
38 Use discontiguous major network number ABC /30 E0S0 S1S0E0 Routing Table S0 1 1 S1 1 1 S0 S1 Routing Table S E0 0 0 Routing Table E0 S0 0 0 Network Interface Hops / Same major network and separate by other major network RIP /8/ / /24
39 With no ip classless Drop R2(config)#no ip classless ip classless Command S0 Default Route /16 E To get to : R2 R3 R1 Network Protocol Destination Network Exit Interface E0 S0 C C R S*
40 With ip classless Default R2(config)#ip classless ip classless Command S0 Default Route E R2 R3 R1 Network Protocol Destination Network Exit Interface E0 S0 C C R S* To get to : /