690 likes | 792 Views
Bellevue University. CIS 351 OSI and TCP/IP. Topics. Comparison of OSI and TCP/IP Models Local Area Networking using Ethernet and TCP/IP Ethernet The TCP/IP Protocol Stack. The OSI Reference Model. TCP/IP.
E N D
Bellevue University CIS 351 OSI and TCP/IP
Topics • Comparison of OSI and TCP/IP Models • Local Area Networking using Ethernet and TCP/IP • Ethernet • The TCP/IP Protocol Stack
TCP/IP • Development was funded by US Government’s Advanced Research Projects Agency (ARPA) in 1960s and 1970s. • Widely used protocol suite – Protocol of choice for the Internet and most operating systems • Implementation parallels the OSI Model
TCP/IP Protocol Suite • Transmission Control Protocol (TCP) • User Datagram Protocol (UDP) • Internet Protocol (IP) • Internet Control Message Protocol (ICMP) • Internet Group Management Protocol (IGMP) • Address Resolution Protocol (ARP) • TCP/IP Utilities
Application Layer Application Layer HTTP FTP Transport Layer Transport Layer TCP UDP Internet Layer Internet Layer IP ICMP IGMP ARP Network Interface Layer Network Interface Layer ATM Ethernet TCP/IP Layers
Ethernet • Covers both Physical and Data link standards in ISO model • Covers • Uses CSMA/CD • Handles communication at the link level • Sends and receives frames
Ethernet (cont) IEEE 802.3: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Access Method and Physical Layer Specifications • Physical layer specification • Frame Format • CSMA/CD Media Access Control (MAC) mechanism
Physical Layer • Star or bus topology • RG8 or RG58 Coax, UTP, STP, or fiber optic cable • Coax limited to 10 MBps • UTP, STP, and fiber optic limited to 1GBps (currently)
100BaseT • Most popular physical layer for Ethernet LANs • Category 5 Unshielded Twisted Pair cable • RJ-45 Connectors • Star Topology - requires a hub or switch
The 5-4-3 Rule • You may have five cable segments • Connected by four repeaters • No more than three segments can be of mixed types
Packet Terminology • Segment • Message • Datagram • Frame
TCP/IP Traffic From top to bottom segment Application layer data message TCP header Application layer data datagram IP header Transport layer data frame Ethernet header Internet layer data Ethernet footer
Preamble 7 bytes of alternating ones and zeros used to synchronize clock signals with the incoming frame
Start of Frame Delimiter A one byte field consisting of 6 ones and zeros followed by two consecutive ones. The ones signal that the bits to follow contain the start of the actual frame
Destination Address A six byte field containing the hardware address of the destination end of the link
Source Address A six byte field containing the address of the network interface adapter that generated the packet.
Addressing • Six byte hardware address • Unique to each Network Interface Card • Consists of a three byte Organizationally Unique Identifier and three byte serial number
Organizationally Unique Identifier (OUI) • First three bytes of the hardware address • Identifies the company that manufactured the Network Interface • Complete list can be found at: http://standards.ieee.org/regauth/oui/oui.txt
Example 00-10-5A (hex) 3COM CORPORATION 00105A (base 16) 3COM CORPORATION 5400 BAYFRONT PLAZA MAILSTOP: 4220 SANTA CLARA CA 95052 UNITED STATES
Ethertype/Length Contains the protocol type and length of the data field excluding any pad
Common Ethertype Values 0800 Internet Protocol 0805 X.25 0806 ARP 8035 RARP 809B AppleTalk on Ethernet 8137 Netware IPX
Data and Pad • Contains the data passed down from the network layer protocol on the transmitting system • Padding is used if the length of the data sent from the network layer is less than 46 bytes. • The maximum length for the data field is 1500 bytes
Frame Check Sequence • Four bytes of footer that contain a checksum of the entire packet. • The transmitting computer calculates the checksum and stores it in the footer. • The receiving computer recalculates the checksum and compares it to the stored checksum. • Transmission is successful if both checksum values match
Router TCP UDP IP ICMP IGMP ARP Internet Protocol (IP)
Datagram (IP) Version IHL Type of Service Total Length Identification Flags Fragment Offset Time To Live Protocol Header Checksum Source IP Address IP Header Destination IP Address Options Data
Some Common Protocol Numbers (RFC 791) 1 ICMP 2 IGMP 6 TCP 17 UDP
IP Addressing • Uses a 32 bit binary address • Address is expressed as group of four decimal numbers in the range of 0-255, separated by periods (also known as dots)
Classful IP Addressing • IP Addresses • IP Address Classes
IP Address Classes Class A Network ID Host ID Class B Network ID Host ID Class C Network ID Host ID w x y z
Adds Multiple Entries to Routing Tables Wastes IP Addresses 2000 Allocated 63,534 Wasted Class B Class C Network ID Network ID Host ID Host ID 255 255 255 255 255 0 0 0 w w x x y y z z Company Network IDs Internet 192.168.1.0 192.168.2.0 Network of 2000 Computers Assigned 65,534 IP Addresses 192.168.3.0 Portion of Internet Routing Tables 192.168.1.0 255.255.255.0 192.168.1.1 192.168.2.0 255.255.255.0 192.168.2.1 192.168.3.0 255.255.255.0 192.168.3.1 192.168.4.0 255.255.255.0 192.168.4.1 192.168.5.0 255.255.255.0 192.168.5.1 192.168.6.0 255.255.255.0 192.168.6.1 192.168.7.0 255.255.255.0 192.168.7.1 192.168.8.0 255.255.255.0 192.168.8.1 192.168.4.0 192.168.5.0 192.168.6.0 192.168.7.0 192.168.8.0 Limitations of the Original IP Addressing Scheme
IP Address in Dotted Decimal Notation w x y z 10.217.123.7 4 Values Network ID Host ID 32 Values IP Address in Binary Notation 00001010 11011001 0111101100000111 Solution: Classless Inter-Domain Routing (CIDR)
The Key to CIDR is the Subnet Mask • Subnet Mask Bits • CIDR Notation • Calculating theNetwork ID • Determining Local and Remote Hosts
Subnet Masks • Determine which part of the IP address is the Network part and which is the host part Example: 255.0.0.0 Network Host
Binary Representation Decimal Representation 11111111 255 w x y z 11111110 254 10 . 217 . 123 . 7 11111100 252 Network ID Host ID 11111000 248 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 1 0 0 1 11110000 240 11100000 224 11000000 192 255 . 255 . 255 . 0 10000000 128 00000000 0 Subnet Mask Bits
IP Address 10 . 217 . 123 . 7 00001010 11011001 01111011 00000111 Subnet Mask 255 . 255 . 240 . 0 11111111 11111111 11110000 00000000 Number of Subnet Mask Bits (ones) 8 + 8 + 4 + 0 = 20 IP Address in CIDR Notation 10.217.123.7/20 Using CIDR Notation to indicate the configuration of the subnet mask
Calculating the Network ID IP Address in CIDR Notation: 10.217.123.7/20 IP Address 10 . 217 . 123 . 7 00001010 11011001 01111011 00000111 Subnet Mask 255 . 255 . 240 . 0 11111111 11111111 11110000 00000000 Network ID 00001010 11011001 01110000 00000000 Network ID in CIDR Notation 10.217.112.0/20
IP Address Classes • Class A 0x.x.x.x • Class B 10x.x.x.x • Class C 110x.x.x.x • Class D 1110x.x.x.x
Private Addresses(Non-routable over the Internet) • 10.x.x.x Class A private IPs • 172.(16-31).x.x Class B private IPs • 192.168.x.x Class C private IPs • 169.254.x.x Automatic Private IP (Microsoft)
Router TCP UDP IP ICMP IGMP ARP Internet Control Message Protocol (ICMP)
ICMP • Network layer TCP/IP Protocol • Described in RFC 792 • Carries informational queries and error messages • Used by the ping command
TCP UDP IP ICMP IGMP ARP Internet Group Management Protocol (IGMP)
IGMP • Network layer TCP/IP Protocol • Described in RFC 2236 • Provides a way for an Internet computer to report its multicast group membership to adjacent routers
1 5 ARP Cache ARP Cache 2 B 3 6 A TCP UDP 4 C 1. ARP cache is checked 2. ARP request is sent 3. ARP entry is added 4. ARP reply is sent 5. ARP entry is added 6. IP packet is sent IP ICMP IGMP ARP Address Resolution Protocol (ARP)
TCP UDP IP ICMP IGMP ARP Transmission Control Protocol (TCP)
TCP • Connection oriented • Transport layer protocol • Uses port numbers • Handles segments