4Network Protocols Pre-determined rules that govern communications A group of inter-related protocols that are necessary to perform a communication function is called a protocol suite
5Role of ProtocolsThe format or structure of the message, such as how much data to put into each segmentThe process by which intermediary devices share information about the path to the destinationThe method to handle error and system messages between intermediary devicesThe process to setup and terminate communications or data transfers between hosts
6Layered Task Networks are complex! We use the concept of layers in our daily life.Networks are complex!Many “pieces/ devices/ parts”:hostsrouterslinks of various mediaapplicationsprotocolshardware, software
7Organization of air travel ticket (purchase)baggage (check)gates (load)runway takeoffairplane routingticket (complain)baggage (claim)gates (unload)runway landinga series of steps
8Layering of airline functionality ticket (purchase)baggage (check)gates (load)runway (takeoff)airplane routingdepartureairportarrivalintermediate air-trafficcontrol centersticket (complain)baggage (claimgates (unload)runway (land)ticketbaggagegatetakeoff/landingLayers: each layer implements a servicevia its own internal-layer actionsrelying on services provided by layer below
9Why a layered model? Easier to teach communication process. Speeds development, changes in one layer does not affect how the other levels works.Standardization across manufactures.Allows different hardware and software to work together.Reduces complexity
10Internet protocol stack (TCP/IP model) application: supporting network applicationsFTP, SMTP, HTTPtransport: host-host data transferTCP, UDPnetwork: routing of datagrams from source to destinationIP, routing protocolslink: data transfer between neighboring network elementsPPP, Ethernetphysical: bits “on the wire”applicationtransportnetworklinkphysical
11TCP/IP Reference Model LayerProtocolsApplicationHTTPTELNETFTPSMTPSNMPTransportTCPUDPInternetIPICMPNetwork Access (Host-to-network)ETHERNETPACKET RADIO
12Encapsulation destination source application transport network link messageMapplicationtransportnetworklinkphysicalsegmentHtMdatagramHtHnMframeHtHnHlMlinkphysicalHtHnHlMHtHnHlMswitchdestinationnetworklinkphysicalHtHnMHtHnMMapplicationtransportnetworklinkphysicalHtHnHlMHtHnHlMHtMHtHnMrouterHtHnHlM
13Protocols at the application layer HTTP:browser and web server communicationFTP :file transfer protocolTELNET:remote login protocolPOP3: RetrievePOP3 is designed to delete mail on the server as soon as the user has downloaded itIMAP (Internet Message Access Protocol )Retrieve s,retaining on the server and for organizing it in folders on the serve
14Protocols at the transport layer Transmission control protocol (TCP),Connection orientedConnection established before sending dataReliableuser datagram protocol (UDP)ConnectionlessSending data without establishing connectionFast but unreliable
15Protocol at the network layer IPPath selection ,routing and addressingICMP (Internet Control Message Protocol )sends error messages relying on IPa requested service is not availablea host or router could not be reachedProtocols at the link layerEthernetUses CSMA/CDToken Ring
16Data Formats Application data data data data data data message layertransportlayerTCPheaderdataTCPheaderdataTCPheaderdatasegmentnetworklayerIPheaderTCPheaderdatapacketdata linklayerEthernetheaderIPheaderTCPheaderdataEthernettrailerframe
17Packet Encapsulation (TCP/IP) The data is sent down the protocol stackEach layer adds to the data by pretending headers22Bytes20Bytes20Bytes4Bytes64 to 1500 Bytes
18Encapsulation Data usually transferred in blocks Protocol data units (PDUs)Each PDU contains data and control informationSome PDUs only controlThree categories of controlAddressOf sender and/or receiverError-detecting codee.g. frame check sequenceProtocol controlAdditional information to implement protocol functionsAddition of control information to data is encapsulationData accepted or generated by entity and encapsulated into PDUContaining data plus control informatione.g. TFTP, HDLC, frame relay, ATM, AAL5, LLC, IEEE 802.3, IEEE[Advance]
19Benefits of a Layered Model Assists in protocol designprotocols that operate at a specific layer have defined information that they act upon and a defined interface to the layers above and belowFosters competitionproducts from different vendors can work togetherPrevents technology or capabilities changes in one layer from affecting other layer above and belowProvides a common language to describe networking functions and capabilitiesThere are benefits to using a layered model to describe network protocols and operations.[Advance]
21Protocol and Reference Models 2 types of networking modelsA protocol model provides a model that closely matches the structure of a particular protocol suiteTransmission Control Protocol/Internet Protocol (TCP/IP)A reference model provides a common reference for maintaining consistency within all types of network protocols and servicesit is not intended to be an implementation specification or to provide a sufficient level of detail to define precisely the services of the network architecturethe primary purpose is to aid in clearer understanding of the functions and processes involvedOpen Systems Interconnection (OSI) model
22The OSI Reference Model The OSI reference model is the primary model for network communications.Allows you to view the network functions that occur at each layer.It is a framework that you can use to understand how information travels throughout a network7 layers -- each of which illustrates a particular network function.APS TN DP
24TCP/IP and OSI ModelsThe TCP/IP model describes the functions that occur at layer of protocols within the TCP/IP suite (Protocol Model)The OSI model is used for network design, operation specifications and troubleshooting (Reference Model)
25Comparing the OSI and TCP/IP Models The functions of the Application, Presentation and Session layers of the OSI model are combined into one Application layer in the TCP/IP modelThe Data Link and Physical layers of the OSI model combine to make the Network Access layer of the TCP/IP modelThe key parallel between the two models occur at layers 3 and 4 of the OSI modelTCP operates at the transport layerIP operates at the Internet layer
27Communication Process Creation of data at the application layer of the originating source end deviceSegmentation and encapsulation of data as it passes down the protocol stack in the source end deviceGeneration of the data onto the media at the network access layer of the stackTransportation of the data through the internetwork, which consists of media and any intermediary devicesReception of the data at the network access layer of the destination end deviceDecapsulation and reassembly of the data as it passes up the stack in the destination devicePassing this data to the destination application at the application layer of the destination end deviceThe above seven steps in the communication process are indicated in the next slide.
28Communication Process cont… 1234567SourceDestinationThis slide shows the seven steps in the communication process.
29Communication with OSI Model Data(Port) Segment(IP) Packet(MAC) Frame
30Device Operation Layer DevicesOperate at LayerComputerLayer-7 (6,5,4)RouterLayer-3SwitchLayer-2HubLayer-1
31The virtual interaction between layers [Advance]
32Protocol Data Unit and Encapsulation Protocol data unit (PDU) is the generic term for “data” at each levelEncapsulation is the process of adding control information as it passes through the layered model
33Sending ProcessThe Application layer begins the process by delivering the data to the Transport layerThe Application data is broken into TCP segments and each segment is given a label, called a headerthe header contains information about which process running on the destination computer should receive the messageit also contains the information to enable the destination process to reassemble the segmentsThe TCP segment is sent to the Internet layer and encapsulated within an IP packet, which adds an IP headerthe IP header contains the source and destination IP addressesIn the web server example, the TCP/IP model is used to illustrate the process of sending an HTML web page to a client.
34Sending Process cont…The IP packet is sent to the Network Access layer where it is encapsulated with a frame header and trailereach frame header contains the source and destination physical addressesthe trailer contains error checking informationFinally the bits are encoded onto the Ethernet media by the end- device network interface card (NIC)
41AddressingVarious types of addresses are needed to successfully deliver the data from a source application running on one host to the correct destination application running on anotherData Link physical addresses (MAC)Network logical addresses (IP)Transport service port numbers (Port)MAC AddressIP AddressPort Number
42MAC Addresses (6 Byte unique) A MAC address is a unique 6-byte address that is burned into each network interface or more specifically, directly into the PROM chip on the NIC.
43IPv4 Address Each device on a network must be uniquely defined. The packets of the communication need to be identified with the source and destination addresses of the two end systemsIPv4 is 32 bits in length and difficult for human to remember. Therefore, represent IPv4 addresses using dotted decimal format.( )IP has two portion: network and hostnetworkhost
44Layer 2 Address (MAC address) This is the physical address of the host (or end device)in a LAN using Ethernet, this address is called the Media Access Control (MAC) addressLayer 2 addresses are used to communicate between devices on a single local network(packet)
45Layer 3 Address (IP address) This is the logical addressLayer 3 addresses are primarily used to move data from one local network to another local networkenable intermediary network devices to locate hosts on different networks(segment)NetworkDevice230
46Why MAC and IP both Address? Source and destination MAC change each time to transport packet from one device to another device.Source and destination IP address is fixed.[Advance]
47Layer 4 Service Port Number At layer 4, the information contained in the PDU header identifies the specific process or service running on the destination host devicethe separately running programs are examples of individual processes
48Service Port Example Bank Different Service, different Counter Remittance Service CounterCash Pay CounterCash Receive CounterElectric Bill CounterInformation Desk………Different Service, different CounterNetworking (PC)File Transfer/ FTP/ SMTPWeb/ HTTPTelnet……….Different Service, different Port
49Service Port List Service Protocol Port Mail SMTP 25 POP3 POP, POP3 110WebHTTP80File TransferFTP20, 21Telnet23Domain Name ResolutionDNS53Dynamic Host ConfigurationDHCP67, 68
50Port numbers Well known ports (Numbers 0 to 1023) Registered Ports (Numbers 1024 to 49151)Dynamic or Private Ports (Numbers to 65535)The Internet Assigned Numbers Authority (IANA) assigns port numbers.netstat
51Relationship of layers and addresses in TCP/IP [Advance]
52Getting Data to the End Device The host physical address, is contained in the header of the Layer 2 PDU, called a frame.Layer 2 is concerned with the delivery of messages on a single local network.The Layer 2 address is unique on the local network and represents the address of the end device on the physical media.In a LAN using Ethernet, this address is called the Media Access Control (MAC) address.When two end devices communicate on the local Ethernet network, the frames that are exchanged between them contain the destination and source MAC addresses.Once a frame is successfully received by the destination host, the Layer 2 address information is removed as the data is decapsulated and moved up the protocol stack to Layer 3.[Advance]
53Getting the Data Through the Internetwork Layer 3 protocols are primarily designed to move data from one local network to another local network within an internetwork.Layer 3 addresses must include identifiers that enable intermediary network devices to locate hosts on different networksAt the boundary of each local network, an intermediary network device, usually a router, decapsulates the frame to read the destination host address contained in the header of the packet, the Layer 3 PDURouters use the network identifier portion of this address to determine which path to use to reach the destination host.[Advance]
54Getting Data to the Right Application Think about a computer that has only one network interface on it. How to differentiate various type of data?Each application or service is represented at Layer 4 by a port numberWhen the data is received at the host, the port number is examined to determine which application or process is the correct destination for the dataExample of popular port numbers?[Advance]
56Division of Layers 7. Application 6. Presentation Upper Layers 5. Session4. TransportMiddle Layer3. Network2. Data LinkLower Layers1. Physical
57OSI – The Application Layer Provides network services to the user's applications.It does not provide services to any other OSI layer***Think of any network application you use daily
58OSI – The Presentation Layer It ensures that the information that the application layer of one system sends out is readable by the application layer of another system.*** Think of any common file formats (JPEG, txt etc)
59OSI – The Session Layer*** After you prepare your data, you need to establish the communication channels to send dataThis layer establishes, manages, and terminates sessions between two communicating hosts.It also synchronizes dialogue between the two hosts' presentation layers and manages their data exchange.
60Application Layer Protocols Domain Name Service (DNS)used to resolve Internet names to IP addressesHypertext Transfer Protocol (HTTP)used to transfer files that make up the web pages of the world wide webSimple Mail Transfer Protocol (SMTP)used for the transfer of mail messages and attachmentsTelnet (terminal emulation protocol)used to provide remote access to servers and networking devicesFile Transfer Protocol (FTP)used for interactive file transfers between systemsThese protocols specify the format and control information necessary for many of the common Internet communication functions.
61Application Layer Software Network-aware applicationsimplement the application layer protocols and are able to communicate directly with the lower layers of the protocol stackclients and web browsersApplication layer servicesare programs that interface with the network and prepare the data for transferdifferent types of data (text, graphics or video) require different network services to ensure that it is properly prepared for processing by the functions occurring at the lower layers of the OSI modelWithin the Application layer, there are two forms of software programs or processes that provide access to the network: applications and services.
62DNS Service and Protocol DNS uses TCP/UDP port 53Domain names were created to convert the numeric IP address into a simple, recognizable namedomain names are easier to remember than actual numeric addressesany change to the address is transparent to the user since the domain name is the same
63DNS Directory Structure Uses a hierarchical structure to create a name databasehierarchy is an inverted tree with the root at the top and branches belowThe different top-level domains (TLD) represent either the country origin or the type of organizationAfter TLD are second-level domain names, and below them are other lower level domains[Advance]
64WWW Service and Protocol The web browser establishes a connection to the web service running on the server using the Hypertext Transfer Protocol (HTTP)request a page using an URL (uniform resource locator) or web addressa web browser is a client application running on a client deviceHTTP uses TCP port 80An URL consists of three partsthe protocol – hypertext transfer protocol (http)the server namethe specific file name requestedBrowsers can interpret and present many data typesplain text and Hypertext Markup Language (HTML)other data types require another service or program such as plug-ins or add-ons
65WWW Service and HTTP cont… The web client makes a connection to the HTTP server and requests a pageIn response to the request, the HTTP server returns the code for a web pageThe browser interprets the HTML code and displays a web page
66HTTP Protocol HTTP specifies a request/response protocol HTTP protocol uses three common messages – GET, POST and PUTHTTP is not a secure protocolPOST messages in plain text can be intercepted and readHTML pages are not encryptedHTTP Secure (HTTPS) protocol can use authentication and encryption to secure the dataThe Hypertext Transfer Protocol (HTTP), one of the protocols in the TCP/IP suite, was originally developed to publish and retrieve HTML pages and is now used for distributed, collaborative information systems.
67E-mail Services and SMTP/POP3 User composes an using an application called a mail user agent (MUA) or clientClient sends s to a server using Simple Mail Transfer Protocol (SMTP) and receives s using Post Office Protocol version 3 (POP3)SMTP uses TCP port 25POP uses UDP port 110
68Mail Transfer Agent The MTA process is used to forward e-mail the MTA receives messages from a MUA or another MTAbased on the message header, it determines how a message has to be forwarded to reach its destinationif the recipient resides on the local server, the mail is passed to the mail delivery agent (MDA)if the recipient is not on the local server, the MTA routes the to the MTA on the appropriate serverThe server operates two separate processes:Mail Transfer Agent (MTA)Mail Delivery Agent (MDA)
69Mail Delivery AgentThe MDA receives the inbound mail from the MTA and delivers the mail to the appropriate users’ mailboxesIt can also resolve final delivery issues, such as virus scanning, spam filtering and return-receipt handlingThe server operates two separate processes:Mail Transfer Agent (MTA)Mail Delivery Agent (MDA)
70SMTP and POP POP and POP3 are inbound mail delivery protocols MDA listens for a client connection to the serverSMTP governs the transfer of outbound from the sending client to the MDA, as well as the transport of between MTAenables to be transported across data networks between different types of server and client software[Advance]
71File Transfer Protocol FTP uses TCP ports 20 (data) and 21 (commands and replies)An FTP client is used to push and pull files from a server running the FTP daemon (FTPd)Client establishes the first connection to the server on TCP port 21for control traffic such as client commands and server repliesClient establishes the second connection to the server over TCP port 20for file transfer in both directionTCP port 21TCP port 20
72Telnet Telnet uses TCP port 23 Provides a method of emulating text-based terminals over the networkallows a local device to access a remote device as if the keyboard and monitor are connected to the remote device directlyA connection using Telnet is called a virtual terminal (VTY) sessionThe Telnet server runs a service called the Telnet daemon
73OSI – The Transport Layer Data will be segmented and send to destination device. Transport layer of destination device will reassemble them.This layer handles details of reliable transfer. (ensures that the data arrive completely )
74Basic functions of the Transport layer Segmentation and ReassemblyConversation MultiplexingPlus :Connection-oriented conversationsReliable deliveryOrdered data reconstructionFlow controlProtocolsThe two most common Transport layer protocols of TCP/IP protocol suite are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
75User Datagram Protocol (UDP) UDP is a simple, connectionless protocol, described in RFC 768.It has the advantage of providing for low overhead data delivery.The pieces of communication in UDP are called datagrams.These datagrams are sent as "best effort" by this Transport layer protocol.8 bytes overhead
76User Datagram Protocol Applications that use UDP include:Domain Name System (DNS)Video StreamingVoice over IP (VoIP)
77Transmission Control Protocol (TCP) TCP is a connection-oriented protocol, described in RFC 793.Each TCP segment has 20 bytes of overhead in the header encapsulating the Application layer data.Same order deliveryReliable deliveryFlow control.
78Transmission Control Protocol Applications that use TCP are:Web BrowsersFile Transfers
79OSI – The Network LayerMany paths to the same destination. So, which path to follow?Segmented data needs address to reach the destination (network address)This layer handle 2 above stated issues.
80Network Layer Processes AddressingNetwork layer must provide a method for addressing the end deviceseach device must have a unique addressEncapsulationNetwork layer receives the Layer 4 PDU and adds a Layer 3 headerthe Layer 3 header contains a source address, destination address and other control informationthis Layer 3 PDU is known as a packetthe packet is sent down to the Data LinklayerRoutingthe Network layer must provide services to direct these packets to the destination hostintermediary devices, called routers, are used to direct packets toward the destination[Advance]
81Network Layer Processes cont… Decapsulationthe destination host examines the destination address to verify that the packet was addressed to this devicethe packet is decapsulated by the Network layer and the Layer 4 PDU contained in the packet is passed up to the appropriate service at the Transport layerencapsulationdecapsulation[Advance]
82OSI – The Data Link Layer It provides means for exchanging data frames over a common mediaTo detect and possibly correct errors that may occur in the Physical layerPhysical Addressing, topologies and flow control
83OSI – The Physical Layer It defines the electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating the physical link between end systems.Voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, physical connectors, and other, similar, attributes defined by physical layer specifications.