Topics: 1. HTTP, DNS, and SMTP Examples 2. Layered Architectures 3. OSI Reference Model 4. TCP/IP Reference Model. Garcia: Sections 2.1 2.



Similar documents
Objectives of Lecture. Network Architecture. Protocols. Contents

The OSI and TCP/IP Models. Lesson 2

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

How To Understand The Layered Architecture Of A Network

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Networking Test 4 Study Guide

Understanding TCP/IP. Introduction. What is an Architectural Model? APPENDIX

Layered Architectures and Applications

Transport and Network Layer

Protocol Architecture

Chapter 1: Introduction

Technical Support Information Belkin internal use only

Troubleshooting Tools

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Overview of TCP/IP. TCP/IP and Internet

Overview of Computer Networks

Protocols and Architecture. Protocol Architecture.

How To Design A Layered Network In A Computer Network

RARP: Reverse Address Resolution Protocol

IP - The Internet Protocol

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Protocols. Packets. What's in an IP packet

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Introduction To Computer Networking

Topics. Computer Networks. Let s Get Started! Computer Networks: Our Definition. How are Networks Used by Computers? Computer Network Components

Computer Networks CS321

Module 1. Introduction. Version 2 CSE IIT, Kharagpur

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Computer Networks/DV2 Lab

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Module 1: Reviewing the Suite of TCP/IP Protocols

Internet Protocol: IP packet headers. vendredi 18 octobre 13

CPS221 Lecture: Layered Network Architecture

The TCP/IP Reference Model

Internet Control Protocols Reading: Chapter 3

Ethernet. Ethernet. Network Devices

IP addressing and forwarding Network layer

Protocol Data Units and Encapsulation

Guideline for setting up a functional VPN

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

Subnetting,Supernetting, VLSM & CIDR

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Communication Networks. MAP-TELE 2011/12 José Ruela

TCP/IP Protocol Suite. Marshal Miller Chris Chase

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

Communications and Computer Networks

Lecture Computer Networks

LESSON Networking Fundamentals. Understand TCP/IP

Network layer: Overview. Network layer functions IP Routing and forwarding

BASIC ANALYSIS OF TCP/IP NETWORKS

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

PART OF THE PICTURE: The TCP/IP Communications Architecture

Introduction to Computer Networks

How do I get to

CSE 3461 / 5461: Computer Networking & Internet Technologies

Computer Networks Vs. Distributed Systems

TCP/IP Network Essentials. Linux System Administration and IP Services

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, Lecturer: Kartik Krishnan Lecture 1-3

Ethernet and IP A slightly less introductory networking class. Drew Saunders Networking Systems Stanford University

Network: several computers who can communicate. bus. Main example: Ethernet (1980 today: coaxial cable, twisted pair, 10Mb 1000Gb).

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Network Models and Protocols

ICS 153 Introduction to Computer Networks. Inst: Chris Davison

Lecture (02) Networking Model (TCP/IP) Networking Standard (OSI) (I)

8.2 The Internet Protocol

NETWORK LAYER/INTERNET PROTOCOLS

1 Introduction to mobile telecommunications

Transport Layer Protocols

THE TCP/IP PROTOCOL SUITE

Unix System Administration

Zarządzanie sieciami telekomunikacyjnymi

Data Communications and Networking Overview

Network Programming TDC 561

Lecture 28: Internet Protocols

Chapter 5. Data Communication And Internet Technology

Homework 3 TCP/IP Network Monitoring and Management

Network Security TCP/IP Refresher

Unit 4. Introduction to TCP/IP. Overview. Description. Unit Table of Contents

The OSI Model: Understanding the Seven Layers of Computer Networks

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

CSCI 362 Computer and Network Security

ELEC3030 Computer Networks

The OSI Model and the TCP/IP Protocol Suite

Instructor Notes for Lab 3

DO NOT REPLICATE. Analyze IP. Given a Windows Server 2003 computer, you will use Network Monitor to view and analyze all the fields of IP.

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Introduction to Analyzer and the ARP protocol

Basic Network Configuration

Mobile IP Network Layer Lesson 01 OSI (open systems interconnection) Seven Layer Model and Internet Protocol Layers

How To Use A Network Over The Internet (Networking) With A Network (Netware) And A Network On A Computer (Network)

524 Computer Networks

2. IP Networks, IP Hosts and IP Ports

Basic Operation & Management of TCP/IP Networks

CCNA Discovery Networking for Homes and Small Businesses Student Packet Tracer Lab Manual

Transcription:

COSC 3213: Computer Networks I Module 2 Instructor: Dr. Marvin Mandelbaum Department of Computer Science York University Section A Handout # 2 Topics: 1. HTTP, DNS, and SMTP Examples 2. Layered Architectures 3. OSI Reference Model 4. TCP/IP Reference Model Garcia: Sections 2.1 2.4

Protocol Set of rules and conventions used by two communicating parties. How a communication will be initiated and terminated, How data and control information are arranged in a datagram, What control information is included, etc. Examples Hypertext transfer protocol (HTTP), File transfer protocol (FTP), Simple mail transfer protocol (SMTP), and Transmission control protocol (TCP). * HTTP, FTP, and SMTP are application layer protocols while TCP is the transport layer protocol. Basic Definitions 2

Client/Server configuration A server is a powerful machine that houses data and other shared resources. Clients are smaller machines that connect to the server to retrieve shared information. The two communicate based on the following protocol: Client makes a request over the network to the server Client waits When server gets the request, it performs the requested job and returns a reply Basic Definitions 3

Some Other Basic Definitions 3. Port: A server process waits for incoming requests by listening to a port. Analogous to a wall socket in a telephone network. Widely used ports are well known. 3. Daemon: Process that runs in the background and listens for a request. 3. Networks consist of two components: Hardware that forms the infrastructure connecting the computers, e.g., twisted pair wire / optical fibre / cable, routers, switches, servers, etc. Software that forms a cohesive connection such that the user sees the entire network as a single coherent system. The design of software is highly structured and is the focus of our discussion in this presentation. Basic Definitions 4

EG1: Browsing a Homepage (1): http://www. comm.utoronto.ca/comm.html Event. User clicks URL http://www. comm.utoronto.ca/comm.html a. Client process determines the IP address corresponding to the host name www.comm.utoronto.com using the Domain Name Server (DNS) query. 2b. Using the IP address, client process sets up a 2- way TCP connection with port 80 (the well known port number for http protocol) with the WWW server. 2c. TCP connection is reliable and connection-oriented.. Client HTTP daemon sends a request (GET) for the document (comm.html) specified in the URL. HTTP version used by the browser is HTTP/1.1. Server HTTP daemon receives the GET command by listening at TCP port 80 and interprets the message. Server HTTP daemon sends result code with a description of the document. HTTP/1.1 specifies the protocol version used by the server. Result code 200 indicates that the client request was successful. Apache/1.3.23 specifies the server including its operating system (Unix) 8218 specifies the length of the document in bytes text/html specifies the type (text using HyperText Markup language) of file. Server HTTP daemon sends <comm.html> through the TCP port.. HTML text is interpreted by Client browser and displayed. Server HTTP daemon disconnects after completing the transmission Message Content IP address: 128.100.11.60 GET /comm.html HTTP/1.1 HTTP/1.1 200 OK Date: Mon, 06 Jan 2003... Server: Apache/1.3.23 (Unix) Last modified: 03 Sep 2002... Content Length: 8218 Content Type: text/html <html> <head><title></title> <font face= Arial > What is communications <\font>... 5

Browsing a Homepage (2): http://www. comm.utoronto.ca/comm.html 1. HTTP protocol requires a two-way, reliable (without errors), connection-oriented connection (in correct sequential order) to be set up. 2. Establishment of connection is outside the scope of HTTP. 3. HTTP uses the services of TCP to transfer the file reliably (without errors) and in a correct sequence order (connection-oriented). 4. Similarly, TCP builds on other layers to provide the requested service to HTTP. 5. Communication between HTTP peers (and TCP peers) is virtual. HTTP client Virtual Communication HTTP server Application Layer GET Response Port 1127 GETCP80, 1127 Port 80 TCP 1127, 80 Response bytes TCP Transport Layer Lower Layers 6

EG2: Address Resolution (1) The HTTP example requires a DNS query to resolve the address of server. In other words, an IP address is to be retrieved from the domain name www.comm.utoronto.ca. The address resolution is performed by a domain name system (DNS), which is a distributed database (consisting of several servers) used to convert names into addresses. A process in the host called resolver composes the question for the DNS. The resolver contacts the local DNS server first. Only if it fails to resolve an address, a higher level DNS server is accessed. The communication between resolver and the DNS server is carried out using the UDP protocol of the transport layer. UDP protocol is unreliable and provides connectionless service. Resolver (client) Virtual Communication Resolver HTTP (DNS) server Application Layer QUERY Response Port 1120 QUERY GETCP80, TCP53, 1127 1120 Port 53 UDP TCP 1120, 53 Response bytes TCP UDP Transport Layer Lower Layers 7

Address Resolution (2) Event. Client application requests its resolver for translation of the name www.comm.utoronto.ca to an IP address.. Client resolver composes query message. The OPCODE value indicates that is a Standard QUERY (SQUERY) The QNAME value specifies the address to be resolved. The QTYPE and QCLASS values ask for translation to an IP address. Resolver sends a UDP datagram with query message (step 2) including information of its port (53 for DNS).. DNS server looks up address and prepares response. Note that the question asked by the Client resolver is repeated followed by the answer (IP address). DNS server sends UDP datagram encapsulating the response message Message Content Header: OPCODE=SQUERY Question: QNAME=comm.utoronto.ca, QCLASS=IN, QTYPE=A Header: OPCODE=SQUERY,RESPONSE, AA Question: QNAME=comm.utoronto.com, QCLASS=IN, QTYPE=A Answer: tesla.comm.utoronto.ca. 86400 IN A 128.100.11.56 8

EG3: Electronic Email (1) The mail client (Outlook) contacts a local SMTP (simple mail transfer protocol) server for delivery of an Email. The user prepares an Email message with Recipient s email address, subject, and body. The mail client prepares a binary file encoding the above information. The mail client contacts the local SMTP server (may require DNS resolution if IP address is not known) using the TCP protocol of the transport layer and transmits the file to the local SMTP server. The local SMTP server repeats the above process with the destination SMTP server, which in turn repeats the process with the destination SMTP. Four machines involved; only the first two are shown. Port 1125 SMTP (Sender) client TCP Email Virtual Communication GETCP 80, 1127 EMailTCP25, 1125 1125, 25 Response bytes SMTP HTTP (Receiver) server TCP UDP Response Port 25 Application Layer Transport Layer Lower Layers 9

Email (2) Event. Mail application establishes a TCP connection with its local SMTP server.. Local SMTP server issues an available message to the mail application.. The mail application identifies itself by sending a HELO message.. SMTP server issues a 250 message indicating the mail application to proceed.. The mail application sends the sender s address.. SMTP server replies with a 250 message to proceed.. The mail application sends the destination s address.. SMTP server replies with a 250 message to proceed.. The mail application sends a DATA message requesting permission to send the mail. 0. SMTP server gives permission to client by sending a 354 message. 1. The mail application sends the mail file containing the message. 2. SMTP server indicates mail file is received. A message ID is returned. 3. The mail application indicates that the mail session is over. 4. SMTP server sends a 221 message confirming the end of the session. HELO bhaskara.comm.utoronto.ca 250 bhaskara.comm.utoronto.ca HELO bhaskara.comm.utoronto.ca pleased to meet you MAIL FROM: <asif@comm.utoronto.ca> 250 <asif@comm.utoronto.ca> Sender ok RCPT TO: <registrar@ece.cmu.edu> 250 <registrar@ece.cmu.edu> Recipient ok DATA Message Content Port number for SMTP is 25. 220 tesla.comm.toronto.edu ESMTP Sendmail 8.9.0/8.9.0; Thu, 25 Dec 2004 354 Enter mai, end with. on a line by itself. Hi Registrar, I am interested in CS program 250 FFF717 Message accepted for delivery QUIT 10 221 tesla.comm.toronto.edu closing connection

OSI Reference Model (1) OSI (Open Systems Interconnection) reference model was the first attempt made by ISO (International Organization of Standardization) towards a networking standard. OSI reference model partitions the overall communication process in seven layers. Why layers? Reduces the complexity of design Analogous to the concept of functions: Layer (n 1) provides a service to layer n keeping its internal details hidden from layer n. Applications can be developed at the top most layer without worrying about the intrinsic details in the lower layer. Example: a company president in Germany wishes to send a thank-you note to his counterpart in Vancouver, Canada. Both presidents only know their home language. 11

A Network Analogy A company president in Germany, who speaks and writes only German, wishes to send a thank-you note and small gift to the marketing manager of a company in Vancouver at the completion of a successful deal. (Application). The letter and gift are sent by mail or courier. (Communication system). The communications system must be able to guarantee to the company in Germany that the letter and gift have arrived safely at the company in Vancouver. (Reliability). An electronic communications system or computer network must be able to provide the same kinds of facilities and guarantee. Layered Process: 1. German company president tells PR director to send a thank-you letter and gift. 2. PR director, who doesn t speak English either, dictates the letter in German and gives the recording and gift to a secretary. 3. Secretary, who speaks German and English, translates letter to English, types letter in Canadian format and gives letter and gift to an administrative assistant. 4. The administrative assistant makes a file copy of the letter and makes note of the gift, ensuring that addressee s name and title are exactly correct, and notes other details. The letter and gift are passed on to the manager, shipping and receiving. 12

Analogy in Detail (Transmitter) 5. The manager of shipping and receiving is responsible for guaranteeing that the shipment arrives safely at the final destination: 5.1 The manager makes a copy of the letter and notes details of the gift so that duplicates can be send if necessary. 5.2 The manager assigns a shipment number (e.g. 12345) and sequential parcel number to each parcel, so they become 12345:1 and 12345:2. Parcel 12345:2 is marked so that it is known that there are only 2 parcels in this shipment. 5.3 The parcels, tagged with both numbers and postal addresses, are given to a shipping clerk. 6. The shipping clerk calls the German company s Toronto office and learns that the shipment should be sent to Toronto by mail and then by courier to Vancouver. A routing slip is attached to each parcel independently. The parcels are then put into the mail cart labeled Toronto, and the mail cart is sent to the mail room. The shipping clerk advises the manager of shipping and receiving of the routing through Toronto. 7. The mailroom staff make copies of everything, put the mail in bags and weigh the bags on very accurate scales. The destination and weight of each bag is recorded on an attached tag. The bags are then sent to the loading dock. 13

Analogy in Detail (Transmitter) German Prez Instructions PR Director Dictation Secretary Translation, Gift Admin Assistant Address, Reliability Manager S&H Packetization Shipping Clerk Routing Bagging, Reliability Mailroom Staff To Loading Dock 14

Analogy in Detail (Router) The loading dock staff put the mail bags on the transportation medium required to send the bags to their destination 1. When the mail bag arrives in the loading dock in Toronto, it is sent to the mailroom where it is weighed. If there is a discrepancy from what is recorded on the tag, the whole shipment is rejected and the mailroom in Germany is notified to send a replacement. Assuming the weights match, the mailroom in Germany is told that the shipment is OK. At this point the mailroom in Germany destroys its copies. 2. The mailbag is sent to the shipping clerk in Toronto, who unpacks it and routes the mail. Some mail gets sent to the shipping and receiving manager in Toronto, while other mail is put in a courier bag for Vancouver with other documents. 3. The shipping and receiving manager in Toronto looks at the content of the letter and checks for any wear and tear. Also, the gift is checked for damage. If none found, the two packages are returned to the shipping clerk to continue processing the shipment. If there is some indiscrepancy, the shipping and receiving manager in Germany is asked to send new letter or gift with the damaged destroyed. 15

Analogy in Detail (Transmitter) Instructions German Prez PR Director Dictation Secretary Translation, Gift Admin Assistant Address, Reliability Manager S&H Packetization Shipping Clerk Routing Mailroom Staff Bagging, Reliability Toronto Manager S&H Shipping Clerk Mailroom Staff Medium of Transmission (Mail / Courier) 16

Analogy in Detail (Receiver) The courier bag for Vancouver is sent to the mailroom and eventually finds it way to Vancouver, where the same process takes place in reverse order as happened in Toronto. (7 5) The two parcels arrive at the shipping and receiving manager in Vancouver via the mailroom staff and shipping clerk. The shipping and receiving manager in Vancouver notes that the parcels have arrived and telephones the shipping and receiving manager in Germany to confirm arrival, The shipping and receiving manager in Germany can now destroy the copies (4 2) The shipping and receiving manager passed the mail to as administrative assistant who logs the letter as received and passes the letter to a secretary who passes the letter to the VP of PR. In this case the secretary has no specific function to perform. (2 1) The VP of PR reads the letter and tells the marketing manager that the president of the German company says Thank you and has sent a small gift. 17

Analogy German Prez Instructions PR Director Dictation Secretary Translation, Gift Admin Assistant Address, Reliability Manager S&H Packetization Shipping Clerk Routing Mailroom Staff Bagging, Reliability Toronto Manager S&H Shipping Clerk Mailroom Staff Vancouver Prez PR Director Secretary Admin Assistant Manager S&H Shipping Clerk Mailroom Staff Medium of Transmission (Mail / Courier) 18

Lesson Learned (1) 1. A process at layer n are referred to as a layer n entity. In our earlier example, dictation of letter in German by the PR director to its secretary is layer-6 entity. 2. Layer n communicates virtually with the corresponding layer on the other machine using a protocol data unit (PDU) comprising of service data unit (SDU) and a header. n entity H SDU n entity PDU In our analog example, German president communicated with the Vancouver president virtually by instructing his employee to send a letter and a gift. The SDU are the instructions while the header contains the destination address and port number. 3. The combination of layer n entities are referred to as peer processes. 4. Layer n entity communicates only virtually with its peer on the other machine. The actual transmission takes place via the lower layers. 19

Lesson Learned (2) n PDU n-sap n entity n entity n PDU n-sap (n - 1) entity (n - 1) entity (n 1) PDU 5. Layer n will pass a n-layer PDU to layer (n - 1) through a software port referred to as service access point (SAP). In our example, the president s office is a SAP. 6. Layer (n - 1) will create its (n - 1)-layer PDU by using the n-layer PDU as its SDU and adding some header information. This process is called encapsulation. H n-pdu (n - 1)PDU 20

Lesson Learned (3) 7. On receiving (n -1)layer PDU, the(n - 1) entity will remove the header information and use it to perform its own controls. If the controls are correct, the (n - 1) SDU, which is n- layer PDU, will be passed on to the higher layer. 8. The header typically contains source address, destination address, checksum for error detection / correction, size of data to follow in SDU, and sequencing information. 9. If the layer n PDU is too large to be handed as a (n 1)-layer SDU, it is broken into smaller segments and several (n 1)-layer PDUs are generated. This process is called segmentation. 10. It is also possible to combine several layer n PDUs and place them as one SDU in (n 1) PDU. 21

OSI Reference Model (1) APDU Application Presentation Session Application Layer: 1. Provides frequently requested services. 2. Request for a service is made by following a protocol. 3. Uses the service offered by the presentation layer by passing an application protocol data unit (APDU) to the presentation layer. Transport Data AH Network Data Link Physical 4. Example: To access a WWW document, HTTP protocol is used by the web browser (Internet Explorer or Netscape). 5. Other application layer protocols include FTP for file transfer, SMTP for Email, and TELNET for remote login. 22

OSI Reference Model (2) APDU PPDU Application Presentation Session Transport Network Data Link Physical Presentation Layer: 1. Concerned with the syntax and semantics of the information transmitted. 2. Makes common data structures compatible on different machines. 3. Example: T in ASCII representation is 1010010 T in EBCDIC representation is 11001110 It is the function of the presentation layer to ensure that the transmitted bits are properly mapped to the correct alphabet. 4. Allows higher level data structures to be defined. 5. Communicates with the session layer using a presentation protocol data unit (PPDU) composed of APDU PH 6. Especially useful for banks and hospitals. 23

OSI Reference Model (3) APDU PPDU SPDU Application Presentation Session Transport Network Data Link Session Layer: 1. Allows users to establish sessions between them. 2. Sessions are defined based on the requirements for users and may vary from half duplex to full duplex and inclusion or omission of synchronization point 3. Services include: Dialog control: tracking whose turn is to transmit Token management: preventing parties from attempting the same operation at the same time. Synchronization: Check pointing long transmission by including synchronization points. 4. Communicates with the transport layer with a session protocol data unit (SPDU) composed of Physical PPDU SH 24

OSI Reference Model (4) APDU PPDU SPDU TPDU Application Presentation Session Transport Network Data Link Transport Layer: 1. Responsible for end-to-end transfer of data from a session entity in source to its peer session entity at destination. 2. Accepts SPDU from session layer, labels source and destination addresses, segments the data if needed, and passes segments to the network layer. 3. Kinds of Services include: Reliable Connection-oriented: Error-free transmission of data in sequence to its destination Unreliable Connectionless: No guarantee of being error-free or as a matter of fact, even of delivering. 4. Communicates with the network layer using a TPDU Physical SPDU2 TH2 SPDU1 TH1 25

OSI Reference Model (5) APDU PPDU SPDU TPDU Packet Application Presentation Session Transport Network Data Link Network Layer: 1. Provides for transfer of data in packets. 2. Deals with routing and congestion Routing implies not the actual route but the procedure used for selecting the route, i.e., in terns of distance or traffic condition or other criterion. Checks for congestion. If it exists, try congestion control mechanism like slowing down the rate of transmission of packets. 3. Provides compatibility between hosts connected to different networks using a procedure called internetworking. 4. Packet is composed of frame with Network header Physical TPDU NH 26

OSI Reference Model (6) APDU PPDU SPDU TPDU Packet Frame Application Presentation Session Transport Network Data Link Physical Data Link Layer: 1. Provides for transfer of frames across a transmission line. 2. Packets are further composed as frames with framing information on the boundaries. DT Packet DH 3. Does checksum on each frame allowing error detection. 4. Also includes a medium access control (MAC) sublayer that allows for LAN connectivity. 27

OSI Reference Model (7) APDU PPDU SPDU TPDU Packet Frame Bits Application Presentation Session Transport Network Data Link Physical Physical: 1. Performs actual transmission of bits (0 or 1) over a communication medium such as twisted pair wire, cable, or optical fibre. 2. Design issues are largely electrical, mechanical, timing interfaces, and physical medium. Electrical: Deals with different bit representation such as what voltage is used to represent a 0 or a 1, what is the duration of the pulse, how the initial connection is established, how the connection is terminated, and so on. Mechanical: Socket type and number of pins in each socket. Medium: Compatibility issues between different mediums say a cable with optical fibre. To Transmission Medium 28

Critique of OSI 1. Bad Timing: Came too late. The competing TCP/IP was already widely in use (especially in research institutions) by the time OSI was standardized. 2. Bad Technology: Choice of seven layers was more political than technical. Two layers (session and presentation) are nearly empty while two layers (data link and network) are overfull and complex. 3. Bad Implementations: Initial implementations were huge and slow. Though the products improved later but the initial impression lingered on. 4. Bad Politics: OSI was widely perceived as an European product while many people thought of TCP/IP as an extension of Unix. 5. Bad Government Policy: Government support of OSI was thought of as an attempt to shove a technically inferior product down the throat of poor researchers (A. S. Tanenbaum). 29

TCP/IP Reference Model (1) Application Transport Internet Network Interface Application Layer: is similar to its counterpart in OSI except that it can bypass the layers and communicate directly with any layer. Transport Layer: 1. Similar in many respects to transport layer in OSI; Provides for communication between the peer entries at the source and destination. 2. Provides two end-to-end transport protocols: Transmission Control Protocol (TCP): Reliable connection oriented service. Source: segments the input stream, passes each one to the internet layer. Receiver: reassembles the received message,placing the segments in sequence and checking for an error. It is duty of TCP to ensure error-free transmission. User Datagram Protocol (UDP): Unreliable connectionless service. No sequencing or error control is done. 30

TCP/IP Reference Model (2) Application Transport Internet Network Interface Internet Layer: 1. is the linchpin holding TCP/IP together. 2. Allows hosts to injects packets (or datagrams) into the network and allow them to travel independently to the destination. 3. Packets may arrive out of order or in error. It is the job of the transport layer to correct for such problems. 4. Main job of the internet layer is to deliver IP packets and avoid congestion. 5. Uses the Internet Protocol (IP). Network Interface: 1. Is derived mainly from the network that TCP/IP connects. 2. In other words, TCP/IP allows networks to use their technology at the lowest level. TCP/IP provides a means of connecting them 31

TCP/IP Protocols: A list of protocols used in TCP/IP: Application DNS FTP SMTP HTTP Transport TCP UDP Internet IP Interface ARPANET SATNET Packet Radio LAN 32

Example: (1,1), s Server LAN (1,2), w Workstation (1,3), r Router (2,1) PPP (2,2) PC Infrastructure: 1. A LAN comprising of a server and a workstation is connected via a router to a PC. The connection between the router and PC is a point-to-point (PPP) connection. 2. Each machine on the LAN typically have two addresses: An IP address known globally An Ethernet address determined by its network interface card (NIC) 3. The router has as many addresses as the number of networks connected to it. IP Ether net Serve r (1,1) s Wstat ion (1,2) w Route r (1,3) r PC (2,2) Route r (2,1) 33

Example: Protocols: used for an HTTP request made by PC to server (1,1), s Server LAN Server / workstation HTTP PC HTTP TCP Router TCP IP IP IP (1,2), w Workstation Interface Interface Interface (1,3), r Router (2,1) Ethernet PPP PPP (2,2) PC 34

Example 1: Interaction on LAN Task: Transfer of an IP datagram from workstation to server 1. IP datagram contains source & destination addresses in header (1,1), s Server. (1,1) (1,2) Data LAN Header (1,2), w Workstation (1,3), r Router (2,1) 2. IP entity in the workstation looks at its routing table to see if an entry exits for the server IP address, (1,1). 3. Indeed it does, mapping IP address (1,1) to Ethernet address s. 4. IP datagram is passed to the Ethernet interface layer that prepares an Ethernet frame as follows. s w IP datagram C (2,2) PC PPP Header Checksum 5. Ethernet frame is broadcasted across the LAN 6. All on LAN except server rejects datagram. Server retrieves IP datagram by following (1-5) in reverse order. 35

Example 2: Interaction btw different networks (1) Task: Transfer of an IP datagram from server to PC 1. IP datagram contains source & destination addresses in header (1,1), s Server. (2,2) (1,1) Data LAN (1,2), w Workstation (1,3), r Router (2,1) Header 2. IP entity in the source looks at its routing table to see if an entry exits for the PC IP address, (2,2). 3. Answer to (2) is no. Server looks for the default entry which is that of the router with Ethernet address r. 4. IP datagram is passed to the Ethernet interface layer that prepares an Ethernet frame as follows. r s IP datagram C PPP Header Checksum 5. Ethernet frame is broadcasted across the LAN (2,2) PC 6. All on LAN except router rejects datagram. 36

Example 2: Interaction btw different networks (2) 7. The IP datagram is extracted by the Ethernet interface layer in the router and passed on the Internet layer. (1,1), s Server LAN (1,2), w Workstation (1,3), r Router (2,1). (2,2) (1,1) Data Header 8. The Internet layer extracts the destination IP address (2,2) and consults the routing table for a match. 9. The routing table shows that a PC with PPP protocol is connected directly to the router. 10. The IP datagram is encapsulated in a PPP frame and passed on to the PC. PPP header IP datagram C (2,2) PC PPP Checksum 11. The interface layer in the PC accepts the frame, extracts the IP datagram and passes it on to the Internet layer. 37

Example 3: HTTP application (1) (1,1), s Server LAN Task: Transfer of a request for a HTML document from PC to Server 1. For simplicity, assume a TCP connection is established between the server and PC (more on connections later). 2. HTTP request GET/infocom/index.html HTTP/1.0 is passed on to the TCP layer of PC that creates a TCP segment containing source port number (SP#) & client port number (CP#) (1,2), w Workstation. SP# CP# HTTP request (1,3), r Router (2,1) Header 3. TCP segment is passed to IP layer that creates an IP datagram. (1,1) (2,2) PF TCP segment PPP Header (2,2) PC where protocol field (PF) shows that upper layer has asked for the information. IP datagram passed on to interface layer. 38

Example 3: HTTP application (2) 4. Interface layer encapsulates the IP datagram into a PPP frame (1,1), s Server PPP header IP datagram C LAN (1,2), w Workstation (1,3), r Router (2,1) Checksum and sends the PPP frame to the router. 5. The IP datagram is extracted by the interface layer of the router and passed on to the Internet layer. The Internet layer extracts the destination address (1,1) and checks the routing table for a match. 6. Since a match exists, the Interface layer prepares an Ethernet frame encapsulating the IP datagram plus the Ethernet addresses in the header and broadcasts the Ethernet frame on the LAN. s r IP datagram C PPP Header Checksum (2,2) PC 39

Example 3: HTTP application (3) (1,1), s Server LAN 4. Interface layer of the Server compares the Ethernet address with the address on its network interface card (NIC). The address matches so the Ethernet frame is accepted. 5. A Checksum is performed to check for errors. In case of no errors, the IP datagram is extracted. (1,1) (2,2) PF TCP segment (1,2), w Workstation (1,3), r Router (2,1) Header and passed on to the Internet layer. 6. The Internet layer maps the IP address and sees that the IP datagram is meant for it. It extracts the TCP segment. SP# CP# HTTP request (2,2) PC PPP Header and passes it on to the TCP layer. 7. HTTP request GET/infocom/index.html HTTP/1.0 is extracted by TCP layer and passed on to specified port number. 40

Example 3: HTTP application (4) (1,1), s Server LAN 8. Recall that the protocol used by the Transport layer is TCP, which is a reliable connection-oriented protocol. An acknowledgment is therefore sent to the PC in exactly the same manner as the request was received. 9. The Application layer retrieves the HTML document and transmits it to the PC following steps (1-8) in reverse order. (1,2), w Workstation (1,3), r Router (2,1) PPP (2,2) PC 41

Common IP Utilities (1) PING: used to determine whether a host is online. >> ping www.ece.cmu.edu Pinging ece.cmu.edu [128.2.136.200] with 32 bytes of data: Reply from 128.2.136.200: bytes=32 time=42ms TTL=241 Reply from 128.2.136.200: bytes=32 time=41ms TTL=241 Reply from 128.2.136.200: bytes=32 time=41ms TTL=241 Reply from 128.2.136.200: bytes=32 time=41ms TTL=241 Ping statistics for 128.2.136.200: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 41ms, Maximum = 42ms, Average = 41ms IPCONFIG (only on Windows): used to display the TCP/IP information about the local host. >> ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix. : cs.yorku.ca IP Address............ : 130.63.90.77 Subnet Mask........... : 255.255.255.0 Default Gateway......... : 130.63.90.1 42

Common IP Utilities (2) TRACEROUTE (TRACERT on Windows): used to trace the route between the source and the destination. >> tracert www.ece.cmu.edu Tracing route to WEB3.ANDREW.cmu.edu [128.2.11.43] over a maximum of 30 hops: 1 <1 ms <1 ms <1 ms gateway-90.cs.yorku.ca [130.63.90.1] 2 <1 ms <1 ms <1 ms mosquito.gw.yorku.ca [130.63.31.12] 3 <1 ms <1 ms <1 ms gladiator.gw.yorku.ca [130.63.27.18] 4 <1 ms <1 ms <1 ms ORION-YORK-RNE.DIST1-TORO.IP.orion.on.ca [66.97.23.49] 5 1 ms <1 ms <1 ms BRDR2-TORO-GE2-2.IP.orion.on.ca [66.97.16.125] 6 25 ms 1 ms 1 ms c4-tor01.canet4.net [205.189.32.214] 7 11 ms 11 ms 13 ms abilene-chinng.canet4.net [205.189.32.97] 8 27 ms 27 ms 27 ms nycmng-chinng.abilene.ucaid.edu [198.32.8.83] 9 32 ms 32 ms 32 ms washng-nycmng.abilene.ucaid.edu [198.32.8.85] 10 41 ms 41 ms 41 ms beast-abilene-p3-0.3rox.net [192.88.115.125] 11 41 ms 41 ms 41 ms bar-beast-ae1-0.3rox.net [192.88.115.76] 12 42 ms 42 ms 42 ms cmu-i2.3rox.net [192.88.115.186] 13 41 ms 42 ms 41 ms CORE0-VL501.GW.CMU.NET [128.2.33.226] 14 42 ms 41 ms 42 ms CYH-A100-VL1000.GW.CMU.NET [128.2.0.35] 43

Common IP Utilities (3) NETSTAT: provides the TCP/IP network status of the local machine. >> netstat s (s stands for protocol statistics option. With s option IP, ICMP, UDP, and TCP statistics are provided. Only IP and ICMP statistics below. ) IPv4 Statistics Packets Received = 21746248 Received Header Errors = 0 Received Address Errors = 524 Datagrams Forwarded = 0 Unknown Protocols Received = 0 Received Packets Discarded = 301215 Received Packets Delivered = 21444509 Output Requests = 21572914 Routing Discards = 0 Discarded Output Packets = 0 Output Packet No Route = 0 Reassembly Required = 0 Reassembly Successful = 0 Reassembly Failures = 0 Datagrams Successfully Fragmented = 0 Datagrams Failing Fragmentation = 0 Fragments Created = 0 ICMPv4 Statistics Received Send Messages 4767 949 Errors 0 0 Destination Unreachable 3850 0 Time Exceeded 108 0 Parameter Problems 0 0 Source Quenches 0 0 Redirects 0 0 Echos 0 949 Echo Replies 809 0 Timestamps 0 0 Timestamp Replies 0 0 Address Masks 0 0 Address Mask Replies 0 44 0