TCP/IP-Overview

Total Page:16

File Type:pdf, Size:1020Kb

TCP/IP-Overview

Lecture-4

TCP/IP-Overview:

The history goes back to ARPANET – a research network sponsored by DoD US Govt. It eventually connected hundreds of universities and govt installations, using leased telephone lines. When satellite and radio networks were later added, the existing protocol had a trouble interworking with them, so a new reference architecture was needed, thus the ability to connect multiple networks in a seamless way was one of the major design goals. The architecture became known as TCP/IP Reference Model. It was first described by Cerf and Kahn in 1974 Design Goal: The network should survive loss of subnet hardware, without existing conversation being broken, as a result of attack from Soviet Union. Since the applications with divergent requirements were envisioned, ranging from transmitting files to real time speech transmission, a flexible architecture was needed.

i Link Layer: The physical layer and data link layer of OSI reference model is combined together to form a link layer. Purpose: It describes what links such as serial lines and classical Ethernet must do to meet the needs of the connectionless internet layer and describes how data should be physically generated and transmitted over the physical medium by the network devices. Following are the functions and responsibilities of link layer : At physical level  At physical level data consist of a stream of bits (sequence of 0's and 1's).  Defines how the bits are encoded into electrical signals by the network devices.  Synchronizing the sender and receiver at the bit level.  Line configuration - point-to-point or point-to-multipoint  Transmission mode - simplex, half duplex or full duplex  Topology - star, ring, tree, bus etc.  Mechanical specification of cables and connectors.  Specification of electronic factors like voltage, frequency, impedance etc. At logical level  At logical level data consists of frames.  Encapsulates IP packets or message received from the higher layer into frames.  Synchronization of frames.  Flow control, error detection and correction of frames at LLC sub-layer.  Physical addressing, access control at MAC sub layer. Protocols used: Ethernet, Token ring, X.25, Frame relay, FDDI, GPRS. Network Devices : Network adaptor, Modem, Hub, Switch.

ii The internet layer Purpose  Permit host to inject packets into any network and have them travel independently to destination (on different network).  Packets may arrive out of order, in which case it is the duty of higher layers to arrange them.  Internet layer defines an official packet format and protocol called IP(internet protocol), plus a companion protocol called ICMP(Internet control Message Protocol) that help it function  Routing packet to correct address  Unicast and multicast routing – the routing protocol do not take part in routing, but they creates forwarding tables for routers to help them in the routing process IP is a connectionless protocol that provides no flow control, no error control, and no congestion control services. If any of these services is required by any application, the application should rely only on the Transport layer protocol. Routing layers has auxiliary protocols that help IP in its delivery and routing task. These are: IP (IPv4,IPv6) ICMP: internet control message protocol—helps IP to report some problems when routing IGMP: Internet Group Management protocol – helps IP in multitasking DHCP: Dynamic host Configuration protocol – help IP to get network layer address for hosts ARP: Address resolution protocol—help IP to find link-layer address for hosts or router given the network address RARP DHCP Network devices: Router, Gateway.

Transport Layer: It provides service to application layer, get a message from application program running on source host and delivers it to corresponding program on the application layer of destination host.

It is logical end-to-end connection between two hosts at the transport layer. It gets the message from the application layer, encapsulates it in transport layer packet(called a segment or user datagram in different protocols) and sends it, through logical connection, to transport layer on destination.  Core Protocols used by transport layer - TCP and UDP; In TCP packets are called as segments, while in UDP it is called as datagrams. TCP- It is connection oriented protocol, that first establishes a logical connection between transport layer at two hosts before transferring data. It creates a logical pipe between two TCPs for transferring a stream of bytes. TCP is:  Connection-oriented - Establishes a logical connection between sender and receiver before sending any data packets.  Reliable - Receiver sends acknowledgement of received packet to the sender.  Stateful - Both sender and receiver keeps track of the state of communication session. It provides: i. Flow control - Matching data rate of two hosts ii. Error control – To ensure segment arrive without error, resending the corrupt one iii. Congestion control to reduce loss of segments due to congestion UDP(User datagram protocol) – is connection-less protocol that transmits user datagram without first creating the logical connection. In UDP each datagram is an independent entity without being related to previous or next one. UDP does not provide flow, error, congestion control, Its simplicity is small overhead, used for sending short messages cannot afford retransmission of packet involved in TCP when message is corrupt or lost. New protocol.  Unreliable - No acknowledgement of received packet.  Stateless - Doesn't keep track of the state, works on timeout criteria.  Used in application like streaming media (video, audio), where reliability, error recovery and flow control is not important.  Has less overhead. New protocols Datagram Congestion Control Protocol (DCCP), Stream Control Transmission Protocol (SCTP) etc are used. It is the new emerging protocol used for multimedia JPEG, MIDI- Musical Instrument Digital Interface, MPEG- Moving Picture Experts Group, PICT, TIFF- Tagged Image File Format  Network devices used : Router, Gateway. Application Layer: Communication at application layer is between two processes(two programs running at this layers)To communicate, a process send a request to other processes and receive a response. Process-to-Process communication is the duty of application layer. Protocols at this layers are: HTTP – is vehicle for accepting www SMTP- for email service SNMP- Simple Network Management Protocol FTP- for transferring file TFTP- Trivial File Transfer Protocol – simple than FTP TELNET – terminal Network PING SSH – Secure Shell- used for accessing sites remotely DNS IMAP - Internet Message Access Protocol LDAP - Lightweight Directory Access Protocol NTP - Network Time Protocol POP3 RTP - Real-time Transport Protocol RTSP SIP  Some common application layer functions are :  User interacts directly with the application software, where application process creates user data and transmits this data to other application process on same or another host via one of the transport layer protocol (TCP or UDP).  Network application software's uses specific protocol and socket or port number for communication like web browser - http protocol - 80 port, file transfer - ftp protocol - 21 port, Logging on remote computer - telnet protocol - 23 port etc Following are the functions of application layer :  Formatting data - Text format may be in American Standard Code for Information Interchange (ASCII) or Extended Binary Coded Decimal Interchange Code (EBCDIC).  Representing data - Defines how data is to be represented to the end user.  Process-to-process communication - E.g. client and server application software.  Creating sessions - E.g. a web browser with one or more tabs, then its application layer responsibility to create and manage separate sessions for each tab.  Provides services like browsing, e-mail, file transfer, chatting, directory etc.

Working of the different Layers – A real Example Without going into a great deal of technical detail, I will describe a general example of how these layers work in real life. Assuming that the protocol stack being used is TCP/IP and the user is going to use an FTP client program to get or send files from/to a FTP server the following will essentially happen: 1. The user will start the FTP client program on the sending computer. 2. The user will select the address (If the user selected a name, a description of DNS would need to be described complicating this scenario) and port of the server. 3. The user will indicate to the FTP client program that they want to connect to the server. 4. The application layer will send information through the presentation layer to the session layer telling it to open a connection to the other computer at a specific address and port. The presentation layer will not do much at this time, and the presentation layer is actually handled by the FTP program. 5. The session layer will negociate through to the FTP server for a connection. There are several synchronization signals sent between the client and server computers just to establish the connection. This is a description of the sending of a signal from the client to the server: a) The session layer of the client will send a data packet (SYN) signal to the transport layer. b) The transport layer will add a header (TCP header) to the packet indicating what the source port is and what the destination port is. There are also some other flags and information that will not be discussed here to minimize complexity of this explanation. c) The network layer will add source IP address and destination IP address along with other information in a IP header. d) The datalink layer will determine (using ARP and routing information which is not discussed here for brevity) the hardware address of the computer the data is being sent to. An additional header (ethernet) will be added at this layer which indicates the hardware address to receive the message along with other information. e) The information will be transmitted across the physical wire (hardware layer) until the signal reaches the network card of the server computer. The signal may go through several hubs or repeaters. f) The FTP server will normally only look for ethernet frames that are matching its own hardware address. g) The FTP server will see the ethernet frame matching its address and strip the ethernet header information and send it to the network layer. h) The network layer will examine the IP address information, strip the IP header, and if the IP address matches its own, will send the information to the transport layer. i) The transport layer will look at the TCP port number and based on the port number and services being run, will strip the TCP header and send the information to the appropriate program which is servicing the requested port. j) At this point, the session layer in the FTP program will conduct a series of data exchanges between itself through all the lower layers to the client computer until a session is established. 6. At this point information may be sent through several FTP commands between the client and the server. Every transmission passes through the network layers from the application layer down to the hardware layer and back up the layers on the receiving computer. 7. When the client decides to terminate the session layer will be informed by the higher layers and will negotiates for the closing of the connection.

Recommended publications