Chapter One - Introduction to Computer Networks And Data Communications Network Architectures • A reference model that describes the layers of hardware and software necessary to transmit data between two points or for multiple devices / applications to interoperate • Reference models are necessary to increase likelihood that different components from different manufacturers will converse • Two models to learn: OSI model and TCP/IP protocol 1 suite Chapter One - Introduction to Computer Networks And Data Communications Network Architectures • The OSI model’s seven layers: 2 Chapter One - Introduction to Computer Networks And Data Communications Network Architectures - OSI • Application layer – where the application using the network resides. Common network applications include web browsing, e-mail, file transfers, and remote logins • Presentation layer – performs a series of miscellaneous functions necessary for presenting the data package properly to the sender or receiver 3 Chapter One - Introduction to Computer Networks And Data Communications Network Architectures - OSI • Session layer – responsible for establishing sessions between users • Transport layer – provides an end-to-end error-free network connection. Makes sure the data arrives at the destination exactly as it left the source. • Network layer – responsible for creating, maintaining and ending network connections. Transfers a data packet from node to node within the network. 4 Chapter One - Introduction to Computer Networks And Data Communications Network Architectures - OSI • Data link layer – responsible for taking the data and transforming it into a frame with header, control and address information, and error detection code • Physical layer – handles the transmission of bits over a communications channel. Includes voltage levels, connectors, media choice, modulation techniques 5 THE SEVEN OSI REFERENCE MODEL LAYERS Each layer defines a family of function distinct from those of the other layers. An Exchange Using the OSI Model Physical Layer • Coordinates the function required to transmit a bit stream over a physical medium. • Defines the procedures and function that physical devices and interfaces have to perform for transmission to occur. Physical Layer Physical layer concerns • Physical characteristics of interface and media. The physical layer defines the characteristics of the interface between devices and the transmission medium. • Representation of bit. The physical layer defines the type of encoding (how 0s and 1s are changed to signals) • Data rate: The number of bits send per second. • Synchronization of bits: The sender and the receiver clocks must be synchronized. Physical layer concerns • Line configuration. The physical layer is concerned with the connection of devices to the medium. • Physical topology. The physical topology defines how devices are connected to make a network. • Transmission mode. The physical layer also defines the direction of transmission between two devices. Data Link Layer Transforms the physical layer, a raw transmission facility, to a reliable link and it responsible for node-to-node delivery. Data Link Layer Data Link layer responsibilities • Framing: The data link layer divides the stream of bits received from the network layer into manageable data units called frames. • Physical addressing: The data link layer adds a header to the frame to define the physical address of the sender (source address) and/or receiver (destination address) of the frame. • Flow control: If the rate at which the data are absorbed by the receiver is less than the rate produced in the sender, the data link layer impose a flow control mechanism to prevent overwhelming the receiver. Data Link layer responsibilities • Error control: The data link layer adds reliability to the physical layer by adding mechanism to detect and retransmit damage or lost frames and prevent duplication of frames. • Access control: When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time. Data Link layer Network layer • Responsible for the source-to-destination delivery of a packet possibly across multiple networks (links). • The network layer ensures that each packet gets from its point of origin to its final destination. Network Layer Network layer responsibilities • Logical addressing: – The network layer adds a header to the packet coming from the upper layer, includes the logical addresses of the sender and receiver. • Routing: – When independent networks or link are connected together to create an internetwork ( a network of networks) the connecting devices (router or gateways) route the packet to their final destination. Network Layer Example Network Layer Example Transport layer • Responsible for source-to-destination (end-to-end) delivery of the entire message. • Ensure that the whole message arrives intact and in order. • Transport layer, may create a connection between the two end port. Transport layer responsibilities • Service-point addressing: gets the entire message to the correct process on that computer, not only from one computer to the next but also from specific process on the other. • Segmentation and reassembly: divides the message into segments, each segment containing a sequence number, these numbers enable the T.L to reassemble the message when it arrived correctly. • Connection control: – Connectionless : each segment is an independent packet – Connection-oriented: make a connection with the transport layer on the receiving machine before delivering the packets Transport layer responsibilities • Flow control: end-to-end flow control • Error control: the sending transport layer makes sure that the entire message arrives at the receiving transport layer without error (damage, loss,…) Transport Layer Transport Layer Example Session layer Is the next dialog controller, it establishes, maintain, and synchronizes the interaction between communicating systems. Session layer responsibilities • Dialog control: The Session layer allows two systems to enter into dialog. Allows the communication between two processes to take place either in half-duplex (one way at a time) or full-duplex ( two ways at a time) • Synchronization: Session layer allows a process to add checkpoints (synchronization points) into a stream of data. Session Layer Presentation layer Is concerned with the syntax and semantics of the information exchanged between two systems. Presentation layer responsibilities • Translation: Presentation layer is responsible for interoperability between these different encoding methods. • Encryption: – A system must be able to assure privacy. – Encryption means, that the sender transforms the original information to another form and sends the resulting message out over the network. • Compression: Data compression reduce the number of bits to be transmitted. Presentation Layer Application layer The application layer enables the user, wither human or software, to access the network. It provides user interfaces and support for services, such as electronic mail, remote file access and transfer…. Application layer services • Network Virtual Terminal. – Network virtual terminal is a software version of a physical terminal and allows a user to log on a remote host. • File transfer, Access, and management (FTAM) – This application allows a user to access files in a remote computer, to retrieve file files from a remote computers. • Mail Services. – This application provides the basis for e-mail forwarding and storage. • Directory services – This application provides distributed database sources and access for global information about various objects and services. Application Layer Summary of Layer Functions Chapter One - Introduction to Computer Networks And Data Communications 38 Chapter One - Introduction to Computer Networks And Data Communications Network Architectures • The TCP/IP protocol suite (DoD protocol suite, Internet model): 39 Chapter One - Introduction to Computer Networks And Data Communications Network Architectures – TCP/IP • Application layer – equivalent to OSI’s application and presentation layers • Transport layer – equivalent to OSI’s transport layer • Network (Internet or internetwork) layer – equivalent to OSI’s network layer • Network access (data link/physical) layer – equivalent to OSI’s data link and physical layers 40 Chapter One - Introduction to Computer Networks And Data Communications Network Architectures • Logical and physical connections – A logical connection is one that exists only in the software, while a physical connection is one that exists in the hardware • Note that in a network architecture, only the lowest layer contains the physical connection, while are higher layers contain logical connections 41 Chapter One - Introduction to Computer Networks And Data Communications The TCP/IP protocol suite in action • Note the flow of data from user to web browser and back • At each layer, information is either added or removed, depending on whether the data is leaving or arriving at a workstation • The adding of information over pre-existing information is termed encapsulation 42 TCP/IP model in summary Protocol Layering: The Internet is build this way • Internet Protocol (IP) provides a way to deliver packets to a destination SSH, FTP, HTTP, SMTP DNS, VoIP TCP UDP Internet Protocol Internet (IP) addresses mmhh@dmu.ac.uk (email) http://www.apoptygma.eu.org (www) ftp://ftp.uk.debian.org (file transfer) telnet://towel.blinkenlights.nl (telnet) 144.32.100.24 These are the IP addresses 148.122.211.110 of the above sites. IP addresses 195.224.53.39 are 32 bits grouped into 4 octets. (Octet = 8 bits – a number from 62.250.7.101 0-255) Three different kinds of addresses – Host names (e.g., www.cnn.com) – IP addresses (e.g., 64.236.16.20) – MAC addresses (e.g., 00-15-C5-49-04-A9) MAC Address vs. IP Address • MAC addresses – Hard-coded in read-only memory when adaptor is built – Like a social security number – Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76) – Portable, and can stay the same as the host moves – Used to get packet between interfaces on same network • IP addresses 47 – – – – Configured, or learned dynamically Like a postal mailing address Hierarchical name space of 32 bits (e.g., 12.178.66.9) Not portable, and depends on where the host is attached Protocol Layering: The Internet is build this way • TCP—Transmission Control Protocol, reliable connect-oriented transfer of a byte stream. • TCP uses packets to maintain connections” across a network, and thus is layered above IP. SSH, FTP, HTTP, SMTP DNS, VoIP TCP UDP Internet Protocol Transmission Control Protocol • TCP is connection-oriented. • HTTP is an application layer protocol which uses TCP as its transport. • Each host has a very formal way of ensuring the accuracy of the message it receives in a connection-oriented transport. • Being connection-oriented introduces a guarantee of reliability in the connection. • Reliability – every byte of data is guaranteed to be received at the other end. Protocol Layering: The Internet is build this way • UDP—User Datagram Protocol, best-effort connectionless transfer of individual messages. • UDP just sends or receives raw packets with a best-effort approach, also layered above IP SSH, FTP, HTTP, SMTP DNS, VoIP TCP UDP Internet Protocol Connection-Oriented and Connectionless Services • Six different types of service. Protocol Layering: The Internet is build this way • SSH, FTP, HTTP, SMTP and many more applications use TCP connections to communicate data back and forth SSH, FTP, HTTP, SMTP DNS, VoIP TCP UDP Internet Protocol Protocol Layering: The Internet is build this way • DNS, VoIP, and many more applications use UDP packets to communicate data SSH, FTP, HTTP, SMTP DNS, VoIP TCP UDP Internet Protocol Layers in the Example HTTP HTTP protocol HTTP TCP TCP protocol TCP IP Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 54 IP IP protocol Ethernet IP protocol Ethernet Ethernet router71.tcpip- router137.tcpiplab.edu lab.edu 128.143.137.1 128.143.71.1 00:e0:f9:23:a8:20 IP Ethernet neon.tcpip-lab.edu 128.143.71.21 Layers in the Example HTTP TCP IP Frame is an IP datagram Ethernet Send HTTP Request to neon Establish a connection to 128.143.71.21 at port 80Open TCP connection to 128.143.71.21 port 80 IP datagram is a TCP segment for port 80 Send IP data-gram to Send a datagram (which contains a connection Send IP datagram to IP 128.143.71.21 request) to 128.143.71.21 128.143.71.21 Frame is an IP datagram Send the datagram to 128.143.137.1 Ethernet Ethernet HTTP TCP IP Send the datagram Ethernet to 128.143.7.21 argon.tcpipneon.tcpip-lab.edu router71.tcpip- router137.tcpipSend Ethernet frame Send Ethernet frame lab.edu 128.143.71.21 lab.edu to 00:20:af:03:98:28 to 00:e0:f9:23:a8:20 lab.edu 128.143.137.144 128.143.137.1 128.143.71.1 00:e0:f9:23:a8:20 55 Layers and Services • Service provided by TCP to HTTP: – reliable transmission of data over a logical connection • Service provided by IP to TCP: – unreliable transmission of IP datagrams across an IP network • Service provided by Ethernet to IP: – transmission of a frame across an Ethernet segment • Other services: 56 – DNS: translation between domain names and IP addresses – ARP: Translation between IP addresses and MAC addresses Sending a packet from Argon to Neon argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network 57 Ethernet Network is notArgon on my local Sending128.143.71.21 a packet from to network. Neon Therefore, I need to send the packet to my 128.143.71.21 on my local network. default gateway withisaddress 128.143.137.1 DNS: DNS: The is IPisthe address address of Therefore, I can send the packet directly. ARP:What What theIPMAC of“neon.tcpip-lab.edu” “neon.tcpip-lab.edu”? is of address 128.143.137.1? ARP: TheofMAC address 128.143.71.21 128.143.137.1 is 00:e0:f9:23:a8:20 argon.tcpip-lab.edu "Argon" 128.143.137.144 ARP: What is the MAC ARP: TheofMAC address of address 128.143.71.21? 128.143.137.1 is neon.tcpip-lab.edu 00:20:af:03:98:28 "Neon" 128.143.71.21 router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router frame Ethernet Network 58 frame Ethernet Network • DNS – Domain Name System • DNS is the application that turns our web site addresses into Internet Protocol addresses. • Like an operator, given a name it will return a phone number. Chapter One - Introduction to Computer Networks And Data Communications 60