You are on page 1of 23

TCP/IP Concepts

Objectives
After completing this unit, students should be able to: List and describe the main protocols included in the TCP/IP protocol suite Describe the TCP/IP layering model Discuss the main features of the main TCP/IP protocols Describe IP addressing

Open standards Allows communication between heterogeneous systems Supports different physical network types Protocol of the Internet . ICMP.. UDP.What is TCP/IP Transmission Control Protocol/Internet Protocol Suite of protocols that work together TCP. . PPP.. ARP. IP.

History Late 1960s Mid 1970s 1980 1983 Mid 1980s Late 1980s 1990s DARPA primary funding agency ARPANET point-to-point leased line interconnection Internet established. explosive growth of Internet . ARPANET as backbone TCP/IP mandatory use in ARPANET BSD UNIX incorporates TCP/IP TCP/IP available on almost all computer systems TCP/IP becomes protocol of choice for most organizations.

Requests for Comment (RFC) RFC 791 Internet Protocol Issued by Internet Architecture Board (IAB) TCP/IP standards Information on managing TCP/IP networks Identified by number with larger numbers indicating newer RFCs http://www.org .rfc-editor.

Token Ring. NIS.) .) LAN (Ethernet.. lease lines. .. mail. DNS UDP Unreliable delivery to correct program TCP Reliable delivery to correct program IP Unreliable delivery of packets to correct system WAN (Modem connections..TCP/IP Layering Applications such as NFS.. .

Network Architecture Support in Linux Wide Area Networks Serial/modem/ISDN connections CCITT X.25 (sl or ax) .25 Protocol (under development) ATM (under development) Frame Relay (dlci or sdla) Local Area Networks Ethernet (eth) Token Ring (tr) FDDI (fddi) ARCnet (arc) WiFi (???) Miscellaneous Loopback (lo) AX.

LANs and the ARP Protocol Most LANs are broadcast networks at the lowest level Everybody receives what you are sending To identify the recipient. a MAC address is used 48 bits. unique for the network adapter Notation: 02:60:8C:2E:9B:CA Special MAC address FF:FF:FF:FF:FF:FF is used for broadcasts The ARP protocol is used to determine the MAC address of your party Broadcast destination IP address to anyone Only the destination replies with its MAC address ARP is invoked automatically by IP if the destination MAC address is not known Cached in ARP table View table with arp -a .

) authentication connection negotiation and configuration . IPX. ... DECnet.WANs and the SLIP and PPP Protocols Some WANs do not transmit packets but streams of bytes To transmit IP packets. an encapsulation technique is needed SLIP: encapsulation technique for IP only PPP: encapsulation technique for multiple protocols (IP.

no guarantees Next-hop routing to destination host based on IP address Additional features Packet fragmentation and reassembly if packet too large for infrastructure Priority indication Broadcast capability .IP Protocol Packet delivery protocol: Best effort .

Internet Address Each host on an IP network needs an IP address 32 bits should be unique IP addresses are usually written in decimal-dot notation: Binary 10000001 Decimal-Dot 129 . 00100001 10010111 00000111 33 . 151 . 7 .

00100001 10010111 00000111 33 . 7 Assigned by the Assigned by this organization to this network administrator to this host network Identifies the host Assigned by IANA to this organization Identifies the network .IP Address Assignment IP Addresses assigned in groups ("classes") by the IANA (Internet Assigned Numbers Authority) through ISPs All addresses in a class have the first n bits in common A class can be broken up to assign to networks All hosts in a network have the first n+m in common Thus. the first n+m bits identify the network The last 32-n-m bits identify the host on the network Example: n=16 m=8 10000001 129 . 151 .

7 00000000 .151. alternative notation: 129.Subnet Mask The subnetmask identifies which part of the IP address is the network address. 255 Indicates: The first 24 bits identify the network Notation: 129.0 New. 255 . 151 . 0 last 8 bits identify the host IP Address Subnet Mask 11111111 11111111 11111111 255 .7/24 . 00100001 10010111 00000111 33 .151.33.255.7/255. and which part is the host address 10000001 129 .33.255.

0/12 192.0.1 Local network: host part all zeros (129.Special Internet Addresses Several special addresses reserved by IANA: Loopback: 127.0) Local broadcast: host part all ones (129.16.1 and up .0/8 172.33.0.151.0.151.0.0.168.0/16 Multicast addresses: 224.255) Reserved for intranets not directly connected to the internet: 10.0.33.0.0.

33.126 Broadcast address is 129.Off-the-byte Subnet Masks Subnet Masks do not have to end at an 8-bit boundary Gives more control on number of IP addresses assigned to a network Makes calculations much harder Examples: 129.33.150.7/255.151.33.7/255.151.33.151.1 .151.33.151.7/23) 23 bits subnetmask Network identifier is 129.255.151.254 Broadcast address is 129.150.151.33.255.33.255.128 (= 129.254.129.33.33.129.151.33.7/25) 25 bits subnetmask Network identifier is 129.1 .127 .0 (= 129.255 129.0 Valid IP addresses: 129.33.0 Valid IP addresses: 129.151.33.151.

0.0.8 ms 64 bytes from 10.0. 0% packet loss round-trip min/avg/max = 0.8 ms --. UDP and TCP Integral to IP operation.ICMP Protocol Used to communicate error and control messages for IP.1 : 56(84) bytes of data.0.0/1. 4 packets received. 64 bytes from 10.10.0.0.2 (10.2) from 10.5 ms 64 bytes from 10.0.0.0. but functionally separate ICMP messages are sent using IP datagrams Reports back on any IP error with the exception of: Errors with IP packets containing ICMP messages Packets discarded because the source or destination address is an address reserved for intranets Used in ping to verify if a host is alive $ ping 10.0.5 ms .9 ms 64 bytes from 10.2: icmp_seq=1 ttl=128 time=0.0.0.2: icmp_seq=3 ttl=128 time=0.0.0.2: icmp_seq=0 ttl=128 time=1.2 ping statistics --4 packets transmitted.2: icmp_seq=2 ttl=128 time=0.2 PING 10.0.0.0.0.8/1.

telnet is 23. protocol and port and identifies an application uniquely on the network TCP and UDP both implement ports.Ports and Sockets A port identifies the application on the host Server side ports are well-known and fixed Stored in /etc/services e.g. http is 80 Client side ports are dynamic. independent of each other . > 1023 Every client connection uses a new port A socket is a combination of IP address.

DNS.g.UDP Protocol Connectionless application interface to IP Does not guarantee packet delivery or duplication protection Main usage: Broadcast/multicast traffic Real-time communications (streaming audio/video) Traffic with low overhead requirements (e. NFS) .

telnet.TCP Protocol Connection-oriented application interface to IP Ensures reliable communications Duplication. ftp. mail . out-of-order protection Retransmission of missing packets Pacing (adapt number of packets sent to available bandwidth) Main usage: Unicast. reliable connections such as http.

Name Resolution A symbolic hostname exists for (almost) every IP address Easier to remember More flexible: hostname is not linked to the physical network a server is on All hosts need a way to resolve the hostname to an IP address and vice versa Flat network Hostname is a single word.ibm. www.g. e.com Mapping stored in global Domain Name System (DNS) . e.g. nfsserver1 Mapping stored locally Domain network Hostname is a hierarchical name.

A host name and port number 4. A machine address and IP address d. How many bits make up the Internet address? . 16 b. T/F. IP addresses must be unique for each interface on the network. A socket consists of: a. How many bits make up the unique physical address of a Token Ring or Ethernet adapter? a. 48 d. 2. T/F. 48 d. 3. 32 c. Protocols define rules for orderly communications. A machine address and port number b. 16 b. port number and protocol family c. 32 c. An IP address. 64 a. 64 5.Checkpoint (1 of 2) 1.

ARP is used on networks which do broadcasts at the lowest level and thus need MAC addresses to identify the recipient. The common form of an Internet address is four octets in decimal form known as decimal dot notation. .0.1? 9. IP guarantees delivery of datagrams in the same sequence as they are sent. What are the two pieces of an Internet address? 7.Checkpoint (2 of 2) 6. What is the reason for a port number in the UDP and TCP headers? 11. T/F. T/F.0. 10. What is the special address 127. 8. T/F.

ICMP. unreliable data communications The TCP protocol provides connection oriented. reliable data communications . ARP.Unit Summary TCP/IP is a protocol suite consisting of several protocols The main protocols used in the TCP/IP protocol suite are IP. TCP and UDP along with many network interface and application protocols The Internet Protocol has a 32-bit. two-part logical address which represents a network and a host address When provided an IP address and a mask the network and host addresses can be determined The UDP protocol provides connectionless.