1.02k likes | 1.12k Views
Network+ Guide to Networks 5 th Edition. Chapter 4 Introduction to TCP/IP Protocols. Objectives. Identify and explain the functions of the core TCP/IP protocols Explain how the TCP/IP protocols correlate to layers of the OSI model
E N D
Network+ Guide to Networks5th Edition Chapter 4 Introduction to TCP/IP Protocols
Objectives • Identify and explain the functions of the core TCP/IP protocols • Explain how the TCP/IP protocols correlate to layers of the OSI model • Discuss addressing schemes for TCP/IP in IPv4 and IPv6 protocols Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Objectives (cont’d.) • Describe the purpose and implementation of DNS (Domain Name System) and DHCP (Dynamic Host Configuration Protocol) • Identify the well-known ports for key TCP/IP services • Describe common Application layer TCP/IP protocols Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Characteristics of TCP/IP (Transmission Control Protocol/ Internet Protocol) • Protocols : set of instructions designed and coded by programmers--defines network communication standards • TCP/IP • Network layer • Protocol Suite • Subprotocols • TCP, IP, UDP, ARP • Developed by Department of Defense • ARPANET (1960s) (Internet precursor) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Characteristics of TCP/IP (cont’d.) • Popularity • Low cost • Communicates between dissimilar platforms • Open nature (free use and modification by developers) • Routable • Spans more than one LAN (LAN segment) • NetBEUI is not routable • Flexible • Runs on combinations of network operating systems or network media • Disadvantage • requires more configuration Network+ Guide to Networks, 5th Edition modified by Dr. Feda AlShahwan
The TCP/IP Core Protocols • It is a certain subprotocols of the TCP/IP suite • Operates in Transport or Network layers of OSI model • Provide basic services to protocols in other layers • Most significant core protocols in TCP/IP • TCP • IP Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
TCP (Transmission Control Protocol) • Transport layer protocol • Provides reliable data delivery services • Connection-oriented subprotocol • Establish connection before transmitting, with the TCP Handshake • Sequencing and checksums • Flow control • Transmitter waits for ACK before sending more • TCP segment format • Encapsulated by IP datagram in Network layer • Becomes IP datagram’s “data” Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-1 A TCP segment TCP Segment Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
TCP Segment • Source port: Port number at the source node • Destination port: Port number at the destination node • Port number : 16 bits • Address on the host where the application makes itself available to incoming or outgoing data. • 80 is the port number for Web requests via HTTP protocol • Sequence number: 32 bits • Identifies the data segment’s position in the stream of data segment already sent. • Acknowledgement number: 32 bits • Confirms receipt of the data Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
TCP Segment • TCP header length: 4 bits • Indicates the length of the TCP header • Reserved: 6 bits • Future use • Flags : 6 bits • Collection of six 1-bit fields that signal special conditions. • URG • ACK • PSH • RST • SYN • FIN Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
TCP Segment • Sliding-window size: 16 bits • Performs flow control • Maximum number of bytes the sender can issue to a receiver while acknowlegment is outstanding • Ex: 4000 bytes and 1000bytes issues, 250 ack, buffering 750, remaining:? • Checksum: 16 bits • Allows receiving node to determine if the TCP segment is corrupted • Urgent pointer: 16 bits • Indicates a location in the data field whether urgent data resides • Options: 0-32 bits • maximum segment size a network can handle. Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
TCP Segment • Padding: variable • Contains filler information to ensure that size of TCP segment is multiple of 32 bits • Often 0 • Sequence number: 32 bits • Identifies the data segment’s position in the stream of data segment already sent. • Data: variable • Contains original sent data • Size depends on • Size of data sent • Constrains on TCP segment size network type • Segment limitation IP datagram Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Important TCP Header Fields • Flags, especially SYN and ACK • Indicates purpose of segment • Source Port and Destination Port • Guides data to the correct process on the destination computer • SEQ number and ACK number • Used to arrange segments in the correct order • Data Analyzer : is a program that translates the unlabeled hexadecimal TCP packet into user friendly form • Example : text book p140 Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
TCP Handshake • Computer A sends SYN to Computer B • SYN flag set • SEQ field: Random initial sequence number (ISN) • ACK field: Empty (zeroes) • Computer B replies with SYN/ACK • SYN and ACK flags set • SEQ field: Computer B's random initial sequence number (ISN) • ACK field: Computer A's ISN plus 1 • Computer A responds with ACK • ACK flag set • SEQ field: Computer A's ISN plus 1 (Computer B ACK) • ACK field: Computer B's ISN plus 1 • FIN flag indicates transmission end Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-3 Establishing a TCP connection SYN with SEQ=937013558 Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Wireshark Demonstration • Relative SEQ and ACK numbers at top • Absolute SEQ and ACK values at bottom, in hexadecimal Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
UDP (User Datagram Protocol) • Transport layer protocol • Provides unreliable data delivery services • Connectionless transport service • No assurance packets received in correct sequence • No guarantee packets received at all • No error checking, sequencing • Lacks sophistication • More efficient than TCP • Useful situations • Great volume of data transferred quickly(live audio/video over Internet) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-4 A UDP segment UDP (cont’d.) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
IP (Internet Protocol) • Network layer protocol • Routes packets using IP addresses • Provides information on how and where data should be delivered (source and destination addresses) • Enables TCP/IP to internetwork • Traverses more than one LAN segment and more than one type of network through a router • Unreliable, connectionless protocol • No guaranteed data delivery, no handshake • Some higher level protocols provide reliability, like TCP/IP suite • use IP to ensure that data packets are delivered to the right address • Checksum: integrity of the routing information in the IP header Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-5 An IP datagram IP (cont’d.) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Important IP Header Fields • Version • Version number of the protocol (IPv4 or IPv6) • Most networks support IPv4 thus it is 4 bits long • IHL (Internet Header Length) • Identifies the IP header length • Indicates to the receiver where data will begin • Minimum 5 blocks • DiffServ (Differentiated Services) Informs the router what level of precedence they should apply when processing the incoming packet Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Important IP Header Fields • Total Length • The total IP datagram (header + data) length • Maximum 65535 bytes • Identification • Identifies the message to which a datagrams belongs and enables reassembly of fragmented packets • Flags • Indicates whether a message is fragmented and whether it is the last in the fragment • Fragment offset • Indicates where the datagram belongs in the incoming set of fragments Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Important IP Header Fields • TTL (Time to Live) • Indicates the maximum time the datagram remains in the network before it is discarded • Measured in number of times a datagram has been forwarded by a router or the number of router hops • Decreases by one for each router the packet passes through (a "hop") • When TTL reaches zero, the packet is discarded • Protocol • Identifies the type of Transport layer protocol that will receive the datagram (TCP or UDP) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Important IP Header Fields • Header Checksum • Allows the receiver to calculate whether the IP header has been corrupted during transmission • Source Destination IP Addresses • Used to deliver packet and response • Options • Used to specify special options • Padding • Contains filler information to ensure that the size of the TCP header is a multiple of 32 bits • Data • Contains data originally sent by the source , in addition to the information added in the transport layer. Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
ICMP (Internet Control Message Protocol) • Network layer protocol • Reports on data delivery success/failure • Announces transmission failures to sender • Network congestion • Data fails to reach destination • Data discarded: TTL expired • ICMP cannot correct errors • Provides critical network problem troubleshooting information (TCP corrects) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
IGMP (Internet Group Management Protocol) • Network layer protocol • Manages multicasting • Multicasting: is a transmission method that allows one node to send data to defined group of nodes not like broadcast • Uses • Internet teleconferencing or videoconferencing • Routers sending traffic reports to each other Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
ARP (Address Resolution Protocol) • Network layer protocol • Obtains a MAC address from an IP address and then creates a database that maps the MAC address to the host’s IP(logical) address • Broadcast is used to know addresses • ARP table (ARP cache) • Computers store recently-used MAC-to-IP address mappings on their storage devices • Increases efficiency • Two entry types: dynamic and static Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
ARP Demonstration • Dynamic ARP table entries: entries that are created when a client makes an ARP request that can not be satisfied by data already in the ARP table • Static ARP table entries: entries that are created manually using ARP utility • ARP utility is controlled by ARP command :used for troubleshooting • ARP -D * • Clears the ARP cache • ARP -A • Shows the ARP cache Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
ARP Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
RARP (Reverse Address Resolution Protocol) • Converts MAC address to IP Address • Obsolete—replaced by DHCP • Used if a node does not know its IP address • Broadcast message with its MAC address Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
IPv4 Addressing • Networks recognize two addresses • Logical (Network layer)automatically or manually set using protocol standard rules • Physical (MAC, hardware) addresses ->by NIC’s manufacturer at factory • IP protocol responsible to handle logical addressing address on TCP/IP networks called IP addresses • IP addresses are assigned and used according to very specific parameters • Unique 32-bit number • Divided into four octets/bytes (sets of eight bits) • Separated by periods • Example: 144.92.43.178 Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Table 4-1 Commonly used TCP/IP classes IPv4 Addressing (cont’d.) • IP address information • An IP Address contains two types of information network (network to which computer is attached) and host (a computer within that network) • Network Class determined by first octet (seeTable4-1) • Class A, Class B, Class C Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
IPv4 Addressing (cont’d.) • Class D, Class E rarely used (never assigned to devices on our network) • Class D: value between 224 and 239 • Multicasting • Class E: value between 240 and 254 • Experimental use by IETF (Internet Engineering Task Force) • Each of the other three octets consists of eight bits -256 combinations • Networks use 1 through 254 • 0: reserved as placeholder when referring to an entire group of computers on a network • 10.0.0.0 all devices whose first octet is 10 • 255: reserved for broadcast transmission • 255.255.255.255 all devices on the network segment Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
IPv4 Addressing (cont’d.) • Class A devices • Net work ID share same first octet (bits 0-7) • Host: second through fourth octets (bits 8-31) • Large companies and government organizations early Internet users such as IBM • Class B devices • Share same first two octet (bits 0-15) • Host: second through fourth octets (bits 16-31) • Midsized organizations • Class C devices • Share same first three octet (bits 0-23) • Host: second through fourth octets (bits 24-31) • Smaller organizations colleges Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-8 IP addresses and their classes • Running out of addresses • IPv6 (next generation IP) incorporates new addressing scheme Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
IPv4 Addressing (cont’d.) • Loopback address • First octet equals 127 (127.0.0.1) • Loopback test • Attempting to connect to own machine (device communicating with itself) • Powerful troubleshooting tool • A positive response from a loopback test means the TCP/IP core protocols are installed and in use on the workstation. • Windows XP, Vista/ ipconfig command /IP/ /all • Unix, Linux/ ifconfig command / innet /-s Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-9 Results of the ipconfig /all command on a Windows XP or Windows Vista workstation IPv4 Addressing (cont’d.) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Figure 4-10 Results of the ifconfig -a command on a UNIX workstation IPv4 Addressing (cont’d.) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Binary and Dotted Decimal Notation • Decimal number between 0 and 255 represents each binary octet • Period (dot) separates each decimal • Dotted decimal address has binary equivalent • Converting each octet • Remove decimal points • Example : • 131.65.10.36 • 100000011 01000001 00001010 00100100 Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Subnet Mask • A special 32-bit number (net mask) that identifies device’s subnet through combining it with device IP address. • Informs network about segment, network where device attached • Distinguishes Network ID from the Host ID • Four octets (32 bits) • Expressed in binary or dotted decimal notation • Assigned same way as IP addresses • Manually, or automatically (via DHCP) Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Table 4-2 Default subnet masks • Subnetting • The process of subdividing network single class into multiple, smaller logical networks (segments) • Control network traffic • Make best use of limited number of IP addresses • Subnet mask varies depending on subnetting method • Nonsubnetted networks use defaults Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Assigning IP Addresses • Government-sponsored organizations • Dole out IP address blocks to ISPs and other network providers • IANA, ICANN, RIRs • Companies, individuals • Obtain IP addresses from ISPs • Every network node must have unique IP address • Otherwise it cannot send or receive Internet packets • Error message generated on the new client and its TCP/IP services are disabled • Existing host may receive an error message but can continue to function Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Static and Automatic IP Address Assignment • Static IP address • Manually typed into each device • Modify client workstation TCP/IP properties • Only way to change • Human error cause duplicates • Automatic IP addressing • BOOTP and DHCP • Reduce duplication error Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
BOOTP (Bootstrap Protocol) • To facilitate IP address management Administrating each configuration file (manual static addresses) that is stored on the hard disk of each networked computer • Developed in Mid-1980s • Application layer protocol • Central list of IP addresses, associated devices’ MAC addresses • Assign client IP addresses dynamically • Dynamic IP address • Assigned to device upon request • Changeable Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
BOOTP (cont’d.) • BOOTP process • Client connects to network • Sends broadcast message asking for IP address • Includes client’s NIC MAC address • BOOTP server looks up client’s MAC address in BOOTP table • Responds to client • Client’s IP address • Server IP address • Server host name • Default router IP address Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
BOOTP (cont’d.) • Process resembles RARP • Difference • RARP requests, responses not routable (RARP server for every LAN) • RARP only capable of issuing IP address to client but BOOTP may issue additional information (client’s subnet mask) • BOOTP surpassed by DHCP (Dynamic Host Configuration Protocol) • More sophisticated IP addressing utility • DHCP requires little intervention • BOOTP difficult to maintain on large networks but useful for networked diskless workstations. Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
DHCP (Dynamic Host Configuration Protocol) • Assigns network device unique IP address • Automatically • Application layer protocol • Developed by IETF (BOOTP replacement) • Operation • Similar to BOOTP • Lower administrative burden • Administrator does not maintain table but only requires DHCP service on DHCP server Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan
Reasons to Use DHCP • Saves time spent assigning IP addresses • Prevents accidental duplicate IP addresses • Allows users to move devices (like laptops) without having to change their TCP/IP configuration as long as a workstation is configured to obtain its IP address from a central server. • Makes IP addressing transparent for mobile users Network+ Guide to Networks, 5th Edition modified by Dr. Feda ALShahwan