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 Application Presentation Session Transport Network Data Link Physical
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
The TCP/IP Model Application Transport Internet Network Interface
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
TCP/IP Layers Application Layer Transport Layer Internet Layer Network Interface Layer Internet Layer IP ICMP IGMP ARP Network Interface Layer Ethernet ATM Transport Layer UDP TCP Application Layer FTP HTTP
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
Cat 5 UTP
Cable Connections Pin#ColorNICHub or Switch 1Striped OrangeTxRx 2Solid OrangeTx ReturnRx Return 3Striped GreenRxTx 4Solid BlueNot Used 5Striped BlueNot Used 6Solid GreenRx ReturnTx Return 7Striped BrownNot Used 8Solid BrownNot Used
The 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 Internet layer dataEthernet headerEthernet footer frame Transport layer dataIP header datagram Application layer dataTCP header message Application layer data segment
Ethernet Frame Preamble Start of Frame Delimiter Destination Address Source Address Ethertype/Length Data and Pad Frame Check Sequence
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:
Example A (hex) 3COM CORPORATION 00105A (base 16) 3COM CORPORATION 5400 BAYFRONT PLAZA MAILSTOP: 4220 SANTA CLARA CA UNITED STATES
Ethertype/Length Contains the protocol type and length of the data field excluding any pad
Common Ethertype Values 0800Internet Protocol 0805X ARP 8035RARP 809BAppleTalk on Ethernet 8137Netware 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
Internet Protocol (IP)Router UDPTCP IP ICMPIGMPARP
Datagram (IP) Source IP Address Destination IP Address Time To Live VersionIHLTotal Length IdentificationFlags ProtocolHeader Checksum Data Options IP Header Type of Service Fragment Offset
Some Common Protocol Numbers (RFC 791) 1ICMP 2IGMP 6TCP 17UDP
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
wxyz Class A Network ID Host ID Class B Network ID Host ID Class C Network ID Host ID
Limitations of the Original IP Addressing Scheme Wastes IP Addresses Network of 2000 Computers Assigned 65,534 IP Addresses 63,534 Wasted 2000 Allocated Class B wxyz Network ID Host ID Adds Multiple Entries to Routing Tables Class C wxyz Network ID Host ID Portion of Internet Routing Tables Company Network IDs Internet
Solution: Classless Inter-Domain Routing (CIDR)wxyz IP Address in Dotted Decimal Notation Network ID Host ID 32 Values 4 Values IP Address in Binary Notation
The Key to CIDR is the Subnet Mask Subnet Mask Bits CIDR Notation Calculating the Network 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: NetworkHost
Subnet Mask Bits Network ID Host ID wxyz Binary Representation Decimal Representation
Using CIDR Notation to indicate the configuration of the subnet mask IP Address Subnet Mask Number of Subnet Mask Bits (ones) IP Address in CIDR Notation = / /20
Calculating the Network ID IP Address Subnet Mask Network ID Network ID in CIDR Notation / / IP Address in CIDR Notation: /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.xClass B private IPs – x.xClass C private IPs – x.xAutomatic Private IP (Microsoft)
Internet Control Message Protocol (ICMP) UDPTCP IP ICMP IGMPARP Router
ICMP Network layer TCP/IP Protocol Described in RFC 792 Carries informational queries and error messages Used by the ping command
Internet Group Management Protocol (IGMP) UDPTCP IPICMP IGMP ARP
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
Address Resolution Protocol (ARP) UDPTCP IPICMPIGMP ARP B B C C A A Cache 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 ARP Cache 3
Transmission Control Protocol (TCP) IPICMPIGMPARP UDP TCP
Connection oriented Transport layer protocol Uses port numbers Handles segments
Message (TCP) Source IP Address Sequence Number Acknowledgement Number Data OffsetReserved Destination IP Address UnusedProtocolLength Source PortDestination Port Control BitsWindow ChecksumUrgent Pointer Data Options Pseudo- Header TCP Header
Port numbers A unique number that relates to a service or protocol Assigned by the Internet Assigned Numbers Authority (IANA) and published in RFC 1700 Contained in a file called SERVICES
Source Port 2 Bytes in length Identifies the process on the transmitting system that generated the information in the Data field
Destination Port 2 Bytes in length Identifies the process on the receiving system for which the information in the Data field is intended
Sequence Number 4 bytes Unique number that identifies the location of the data in this segment in relation to the entire sequence.
Acknowledgment Used for acknowledgment messages Specifies the sequence number of the next segment expected by the receiving system
Data Offset 4 Bits in length Specifies the number of 4 byte words in the TCO header
Reserved 6 Bits in length This field is not used
Control Bits 6 bits in length –URG set if segment contains urgent data –ACK set if acknowledgment message –PSH set to forward immediately –RST set to reset TCP configuration and discard all segments –SYN set to synchronize sequence numbers –FIN set to terminate a TCP connection
Window 2 Bytes in length. Specifies how many bytes the computer is capable of accepting from the connected system.
Checksum 2 Bytes in length Contains the result of a cyclical redundancy check (CRC) performed by the transmitting system The CRC is recalculated at the receiving end and compared with the number in the checksum field
Urgent Pointer 2 Bytes in length When the urgent (URG) control bit is present, this field indicates which part of the data in the segment is urgent
Options Variable length field Contains information related to optional TCP connection configuration features.
Socket Composed of an IP address and TCP port number Example: :80
User Datagram Protocol (UDP) UDP TCP IPICMPIGMPARP
Identifying Applications UDP TCP FTP HTTP FTP Server HTTP Server TCP Port 20, 21 TCP Port 80 IP Address + TCP Port or UDP Port = Socket
TCP/IP Utilities Server-based Software Diagnostic Utilities Connectivity Utilities Ftp Telnet Tftp Arp Hostname Ipconfig Nbstat Netstat Ping Tracert TCP/IP Printing Service TCP/IP Printing Service Internet Information Services Internet Information Services
Data Flow UDP TCP FTP HTTP IP ICMP IGMP ARP Ethernet ATM UDP TCP FTP HTTP IP ICMP IGMP ARP Ethernet ATM Data Application FTP HTTP Transport Data UDP TCP FTP HTTP Internet Data UDP TCP IP ICMP IGMP ARP Preamble Data CRC IP ICMP IGMP ARP Ethernet ATM Data Ethernet ATM Data Ethernet ATM Data IP ICMP IGMP ARP Ethernet ATM Data UDP TCP IP ICMP IGMP ARP Data UDP TCP FTP HTTP Preamble Internet Transport Application Data CRC FTP HTTP
The TCP/IP Model Network Access Internet Application Transport Internet Network Access Application Transport Internet Network Access SenderReceiver Router Data link TCP IP MAC IP MAC Data link