TCP/IP Concepts

Download as pdf or txt
Download as pdf or txt
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

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

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, 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; explosive growth of Internet

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.rfc-editor.org

TCP/IP Layering

Applications such as NFS, NIS, 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, lease lines, ...)

LAN
(Ethernet, Token Ring, ...)

Network Architecture Support in Linux


Wide Area Networks Serial/modem/ISDN connections CCITT X.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.25 (sl or 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

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, IPX, DECnet, ...) authentication connection negotiation and configuration

IP Protocol
Packet delivery protocol: Best effort - 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

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

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 .

00100001 10010111 00000111 33 . 151 . 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

Subnet Mask
The subnetmask identifies which part of the IP address is the network address, and which part is the host address
10000001 129 . 00100001 10010111 00000111 33 . 151 . 7 00000000 . 0
last 8 bits identify the host

IP Address

Subnet Mask

11111111 11111111 11111111 255 . 255 . 255

Indicates: The first 24 bits identify the network

Notation: 129.33.151.7/255.255.255.0 New, alternative notation: 129.33.151.7/24

Special Internet Addresses


Several special addresses reserved by IANA: Loopback: 127.0.0.1 Local network: host part all zeros (129.33.151.0) Local broadcast: host part all ones (129.33.151.255) Reserved for intranets not directly connected to the internet: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 Multicast addresses: 224.0.0.1 and up

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.151.7/255.255.254.0 (= 129.33.151.7/23) 23 bits subnetmask Network identifier is 129.33.150.0 Valid IP addresses: 129.33.150.1 - 129.33.151.254 Broadcast address is 129.33.151.255 129.33.151.7/255.255.255.128 (= 129.33.151.7/25) 25 bits subnetmask Network identifier is 129.33.151.0 Valid IP addresses: 129.33.151.1 - 129.33.151.126 Broadcast address is 129.33.151.127

ICMP Protocol
Used to communicate error and control messages for IP, UDP and TCP Integral to IP operation, 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.0.2 PING 10.0.0.2 (10.0.0.2) from 10.0.0.1 : 56(84) bytes of data. 64 bytes from 10.0.0.2: icmp_seq=0 ttl=128 time=1.5 ms 64 bytes from 10.0.0.2: icmp_seq=1 ttl=128 time=0.9 ms 64 bytes from 10.0.0.2: icmp_seq=2 ttl=128 time=0.8 ms 64 bytes from 10.0.0.2: icmp_seq=3 ttl=128 time=0.8 ms --- 10.0.0.2 ping statistics --4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 0.8/1.0/1.5 ms

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. telnet is 23, http is 80 Client side ports are dynamic, > 1023 Every client connection uses a new port A socket is a combination of IP address, protocol and port and identifies an application uniquely on the network TCP and UDP both implement ports, independent of each other

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.g. DNS, NFS)

TCP Protocol
Connection-oriented application interface to IP Ensures reliable communications Duplication, 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, telnet, ftp, mail

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, e.g. nfsserver1 Mapping stored locally Domain network Hostname is a hierarchical name, e.g. www.ibm.com Mapping stored in global Domain Name System (DNS)

Checkpoint (1 of 2)
1. T/F. IP addresses must be unique for each interface on the network. 2. T/F. Protocols define rules for orderly communications. 3. A socket consists of:
a. A machine address and port number b. An IP address, port number and protocol family c. A machine address and IP address d. A host name and port number

4. How many bits make up the unique physical address of a Token Ring or Ethernet adapter?
a. 16 b. 32 c. 48 d. 64 a. 16 b. 32 c. 48 d. 64

5. How many bits make up the Internet address?

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

Unit Summary
TCP/IP is a protocol suite consisting of several protocols The main protocols used in the TCP/IP protocol suite are IP, ICMP, ARP, 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, unreliable data communications The TCP protocol provides connection oriented, reliable data communications

You might also like