Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Similar documents
TSIN02 - Internetworking

ECE4110 Internetwork Programming. Introduction and Overview

TSIN02 - Internetworking

Introduction to Open System Interconnection Reference Model

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

OSI Transport Layer. objectives

Chapter 7. Local Area Network Communications Protocols

TCPIP Protocol Suite & Utilities. Revision no.: PPT/2K403/02

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

TSIN02 - Internetworking

Need For Protocol Architecture

Need For Protocol Architecture

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Chapter 09 Network Protocols

TSIN02 - Internetworking

Defining Networks with the OSI Model. Module 2

Chapter 12 Network Protocols

Review of Important Networking Concepts

TCP/IP THE TCP/IP ARCHITECTURE

Introduction to Protocols

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

EE 610 Part 2: Encapsulation and network utilities

The Internet Protocol (IP)

Introduction to Internetworking

The Internet. The Internet is an interconnected collection of netw orks.

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

Introduction to TCP/IP networking

Interconnecting Networks with TCP/IP

TCP /IP Fundamentals Mr. Cantu

CCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers

Internet. Organization Addresses TCP/IP Protocol stack Forwarding. 1. Use of a globally unique address space based on Internet Addresses

Introduction to Networks and the Internet

Data and Computer Communications. Chapter 2 Protocol Architecture, TCP/IP, and Internet-Based Applications

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Fundamentals of Networking. OSI & TCP/IP Model. Kuldeep Sonar 1

IP Protocols. ALTTC/Oct

Computer Networks (Introduction to TCP/IP Protocols)

Transport Layer TCP & UDP Week 7. Module : Computer Networks Lecturers : Lucy White Office : 324

APPENDIX F THE TCP/IP PROTOCOL ARCHITECTURE

Connectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)

Goals and topics. Verkkomedian perusteet Fundamentals of Network Media T Circuit switching networks. Topics. Packet-switching networks

TCP/IP Networking. Training Details. About Training. About Training. What You'll Learn. Training Time : 9 Hours. Capacity : 12

Copyleft 2005, Binnur Kurt. Objectives

User Datagram Protocol

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

ET4254 Communications and Networking 1

Chapter 2 Network Models 2.1

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

Lecture (11) OSI layer 4 protocols TCP/UDP protocols

CPSC156a: The Internet Co-Evolution of Technology and Society. Lecture 4: September 16, 2003 Internet Layers and the Web

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space provided.

06/02/ Local & Metropolitan Area Networks 0. INTRODUCTION. 1. History and Future of TCP/IP ACOE322

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

CHAPTER-2 IP CONCEPTS

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

What is the difference between unicast and multicast? (P# 114)

Network and Security: Introduction

OSI Network Layer. Chapter 5

NT1210 Introduction to Networking. Unit 10

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

Lesson 5 TCP/IP suite, TCP and UDP Protocols. Chapter-4 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Internet Protocols (chapter 18)

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

CSC 634: Networks Programming

User Datagram Protocol (UDP):

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Part VI. Appendixes. Appendix A OSI Model and Internet Protocols Appendix B About the CD

CSCI-GA Operating Systems. Networking. Hubertus Franke

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

4.0.1 CHAPTER INTRODUCTION

Internetwork Protocols

Operating Systems. 16. Networking. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski

The Transmission Control Protocol (TCP)

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I

Computer Networks. Lecture 9 Network and transport layers, IP, TCP, UDP protocols

TCP/IP Protocol Suite and IP Addressing

Communicating over the Network

Internetworking Terms. Internet Structure. Internet Structure. Chapter 15&16 Internetworking. Internetwork Structure & Terms

IP Address Assignment

Layering in Networked computing. OSI Model TCP/IP Model Protocols at each layer

EEC-682/782 Computer Networks I

The Internet. 9.1 Introduction. The Internet is a global network that supports a variety of interpersonal and interactive multimedia applications.

Networking Fundamentals

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

QUIZ: Longest Matching Prefix

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

Internet and Intranet Protocols and Applications

Just enough TCP/IP. Protocol Overview. Connection Types in TCP/IP. Control Mechanisms. Borrowed from my ITS475/575 class the ITL

TCP/IP Networking Basics

Network Architecture Models

The OSI Model. Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO).

Networking Technologies and Applications

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

Chapter 5 OSI Network Layer

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

CS610 Computer Network Final Term Papers Solved MCQs with reference by Virtualians Social Network

Transcription:

Chapter 2 - Part 1 The TCP/IP Protocol: The Language of the Internet

Protocols A protocol is a language or set of rules that two or more computers use to communicate 2

Protocol Analogy: Phone Call Parties in phone call are located at physical addresses Phone numbers are like logical addresses Area code and prefix subdivide the network Physical addresses are fixed, logical addresses can be reassigned In computer networking Physical addresses are Media Access Control (MAC) addresses Logical addresses are Internet Protocol (IP) addresses 3

Protocol Analogy: Phone Call Conversation has its own protocols Listen while others are talking Repeat a sentence if other person does not hear it clearly 4

Protocol Analogy: Phone Call 5

Layered Network Protocols Communication between computers is a difficult problem Protocols provide the structure and rules for computers to communicate Specialized network communication software provides an interface between software applications and the network interface card (NIC) Communication software is divided into pieces in a layered fashion Creates modular structure 6

Layered Network Protocols Each piece implements a separate protocol that when combined with the other pieces, forms the complete protocol suite or stack Each layer depends only on the services provided by lower layers Each protocol layer can be developed and tested independently of the other layers It only has to interface properly with the layers above and below it 7

OSI Model Open-System Interconnection (OSI) model is a reference for designing protocol standards Developed by International Organization for Standardization (ISO) Has 7 layers 8

OSI Model Layers Layer 7: Application Programs with which users interact Often uses a graphical user interface (GUI) Example: WWW browser Layer 6: Presentation Presents information to the application layer in formatted structure Handles encryption and compression Layer 5: Session Manages sessions between hosts 9

OSI Model Layers Layer 4: Transport Provides reliable end-to-end communication between hosts Handles packet sequencing, flow control, error recovery Examples: Transmission Control Protocol (TCP) and Sequenced Packet Exchange (SPX) 10

OSI Model Layers Layer 3: Network Provides end-to-end delivery of information between networks Reliability not guaranteed Uses network addresses Permits creation of internetworks (internets) Examples: Internet Protocol (IP) and Internetwork Packet Exchange (IPX) Output of this layer is a packet 11

OSI Model Layers Layer 2: Data Link Produces encoding pattern for physical layer Handles some flow control, error control Addresses for this layer are known as MAC addresses Output of this layer is a frame Layer 1: Physical Electrical and mechanical interface to the network Transmits and receives a bit stream 12

Communication and the OSI Model System A System B 7 Application Application 6 Presentation Presentation 5 Session Session 4 3 2 1 Transport Network Data Link Physical Router H3 H4 H5 H6 H7 DATA Transport Network Data Link Physical H2A H3 H4 H5 H6 H7 DATA T2A H2B H3 H4 H5 H6 H7 DATA T2B 13

Protocol Data Units (PDU) The combination of data and header information from a layer in a protocol suite is a PDU 14

OSI Model PDUs W. Stallings, Data and Computer Communications, 6 ed., Upper Saddle River, NJ, Prentice Hall, 2000 15

Peer Layer Interaction Consider two entities communicating Layer 7 on Host A communicates, or interacts, only with Layer 7 on Host B Same with layers 4, 5, and 6 Layers 1, 2, and 3 interact only with the same layers on the Host B or the next-hop entity Result is Peer-to-Peer interaction between model layers 16

PDU Flow PDUs flow up and down the model depending on their direction Example Application on Host A requires information from application on Host B Host A application layer appends a header to its data and sends the application layer PDU to the presentation layer Presentation layer appends its header and sends presentation layer PDU to session layer Process continues until physical layer appends its header, creating physical layer PDU, and sends PDU out on network 17

PDU Flow Physical layer on Host B receives Host A s physical layer PDU Host B physical layer strips off the Host A physical layer header and passes the resulting data link PDU up to the Host B data link layer Process continues until Host B s application layer finally receives Host A s application layer PDU Process reverses when Host B replies 18

Layer Interaction - Services Protocol standards must define the services provided by each layer to the layers above and below 19

OSI Architecture and Services W. Stallings, Data and Computer Communications, 6 ed., Upper Saddle River, NJ, Prentice Hall, 2000 20

TCP/IP Internet Protocols TCP - Transmission Control Protocol. IP - Internet Protocol. Most popular protocol suite used for interconnecting networks. Others include IPX/SPX, VINES, AppleTalk. Was the internet protocol for ARPANET. 21

TCP/IP Protocol Stack vs. OSI Model OSI TCP/IP Application Presentation Session Transport Network Data Link Physical Process Host-to-Host Internet Network Access TELNET FTP SMTP SNMP HTTP TCP UDP IP, ICMP, ARP, etc 22

TCP/IP Protocol Stack vs. OSI Model Some authors do the following: Call the TCP/IP Process layer the Application layer Call the Host-to-Host layer the Transport layer Split Network Interface layer into the Network Access and Physical layers (creates a 5-layer model) 23

TCP/IP Layers 4. Process (Application) Provides communication between processes or applications on separate hosts Combines OSI presentation and application layers OSI session layer omitted 24

TCP/IP Layers 3. Host-to-Host (Transport) End-to-end data transfer Logical connection between source and destination Two main functions Flow control using sliding windows Communicating hosts negotiate how much data is to be transmitted each time Reliability using sequence numbers and acknowledgements Guarantees delivery of each packet 25

TCP/IP Layers 2. Internet Routing data through one or more networks using routers Provides logical (not physical) addressing and path selection 1. Network Access (Network Access + Physical) Organize packets into frames for transmitting Encodes bit stream Provides some error detection Similar to OSI Data Link and Physical layers 26

Some TCP/IP Protocols W. Stallings, Data and Computer Communications, 6 ed., Upper Saddle River, NJ, Prentice Hall, 2000 27

Some TCP/IP Process Layer Protocols Telnet Virtual terminal utility enabling access to remote hosts FTP - File Transfer Protocol File transfer utility SMTP - Simple Mail Transfer Protocol Main protocol responsible for transmission and distribution of e-mail SNMP - Simple Network Management Protocol Main protocol responsible for transmission of vital network and system statistics and commands 28

Some TCP/IP Process Layer Protocols HTTP - Hypertext Transfer Protocol Main protocol responsible for transmission of information throughout the World Wide Web 29

Some TCP/IP Host-to-Host Layer Protocols TCP Connection oriented Reliable Connection established between both ends before data transfer begins Creates a virtual circuit between end-user applications Responsible for Breaking messages into segments (segmentation) Reassembling messages at destination (reassembly) Handles retransmitting dropped packets 30

Some TCP/IP Host-to-Host Layer Protocols UDP - User Datagram Protocol Connectionless protocol No acknowledgements Unreliable No checking for segment delivery and sequencing Depends on higher layers for reliablility 31

Some TCP/IP Internet Layer Protocols IP - Internet Protocol Main protocol of the entire TCP/IP protocol suite responsible primarily for addressing and routing of packets Connectionsless, best-effort delivery Fragmentation and reassembly Routers will break up packets if necessary (Fragmentation) and reassemble and a downstream router (Reassembly) Some networks have maximum packet sizes Do not confuse with TCP s Segmentation and Reassembly 32

Some TCP/IP Internet Layer Protocols ICMP - Internet Control Message Protocol Provides network error and diagnostic feedback to networking nodes (hosts, routers) Note: error in text puts ICMP in Host-to-Host layer ARP - Address Resolution Protocol Broadcast protocol responsible for converting IP addresses to MAC addresses RARP - Reverse ARP Broadcast protocol responsible for converting a MAC address to an IP address 33

Some TCP/IP Internet Layer Protocols RIP - Routing Information Protocol Interior routing protocol used to disseminate routing information within an autonomous system Autonomous system Group of routers exchanging information via a common routing protocol Group of routers and networks managed by a single organization Always a connection between any two nodes (except during failure) Distance-vector protocol Hop count determines shortest path Often used in LANs 34

Some TCP/IP Internet Layer Protocols OSPF - Open Shortest Path First Interior routing protocol used to disseminate routing information within an autonomous system Link state protocol Algorithm finds shortest path including speed of link and number of hops Can perform load balancing BGP - Border Gateway Protocol Exterior routing protocol that exchanges information between border routersof different autonomous systems 35

Some TCP/IP Internet Layer Protocols EGP - Exterior Gateway Protocol Exterior routing protocol used to exchange information between autonomous systems BGP is an EGP 36

IP, TCP, and UDP Headers Protocol analyzers are used to analyze traffic on networks Interpret the protocol fields Workstation-based analyzers are software packages that use the workstation s NIC to capture frames on the network Ethernet card programmed to respond to all MAC addresses, not just its own (and broadcasts) Strips off MAC framing and passes IP information up to Internet (Network) layer Called promiscuous mode 37

IP Header Bit 0 Bit 31 Bit 0 Bit 31 4 5 00 00 28 Version Header Length Service Packet Length 0 1 0 E0 01 0000000 (2) Identification B D M Fragment Offset L 20 06 4F 2A TTL Transport Protocol Header Checksum C0 09 55 C8 Source IP Address C0 09 55 C9 Destination IP Address IP Options Padding IP Options Padding 38

IP Header Fields Version Version 4 is current Length Length of header in 32-bit words Priority and Service How the datagram should be handled, such as priority Packet length Length of packet in bytes 39

IP Header Fields Identification Relates a fragment to the IP packet from which it came Flags Specifies whether fragmenting should occur Fragment offset Fragment s position relative to original packet from which it came 40

IP Header Fields TTL (Time To Live) Time in seconds that a packet can remain valid Internet nodes must decrease by 1 second When TTL reaches zero, packet is discarded Device discarding sends packet back ICMP message saying packet was dropped Since internet nodes process packets in less than 1 second, TTL is essentially the maximum hop count Transport protocol Number identifying the TCP protocol in the payload 41

IP Header Fields Header checksum Integrity check for header only Source IP address 32-bit source IP address Destination IP address 32-bit destination address 42

IP Header Fields Options Source route Pre-determined route Security specifications Record route Padding Addresses of intermediate nodes are recorded and sent back to source Bits added to create a valid number of 16-bit entries in header 43

TCP Header 44

TCP Header Fields Minimum header size is 20 bytes More if options are used 45

TCP Header Fields Source port Number of calling port Initiator of request is client process Generally not significant Destination port Number of called port Grantor of request is the server process Identifies one of the destination processes such as HTTP 46

TCP Header Fields Sequence number Number of bytes transmitted to other end node of TCP connection Unique numbers selected at beginning of connection and incremented as total number of bytes transmitted increases Used to ensure correct sequencing of information at destination and for retransmitting from source Acknowledgement number Next expected TCP octet 47

TCP Header Fields Data offset / Header length Length of TCP header Flags Window Number of octets destination says it is willing to accept Source uses this to decide how many packets to send Window size negotiated at connection start up and adjusted depending on network conditions Checksum Checksum of header and data fields 48

TCP Header Fields Urgent pointer Indicates end of urgent data Options Only one defined is Maximum Segment Size Padding Used to fill out header Data Upper layer protocol data 49

TCP/UDP Ports Port numbers are used to pass information to upper layers They are also used to keep track of different connections running at the same time Internet Assigned Numbers Authority (IANA) assigns port numbers Numbers below 1024 are well-known ports Numbers above 1024 are dynamically assigned ports Some of these are registered for vendor-specific applications 50

Popular Port Numbers Service Port Transport Comment FTP 21 TCP File transfer Telnet 23 TCP Remote terminal SMTP 25 TCP e-mail HTTP 80 TCP Hypertext transport protocol TFTP 69 UDP Trivial file transfer SNMP 161 UDP Simple network management RIP 520 UDP Routing information protocol DNS 53 TCP/UDP Domain name system 51

TCP Services Connection-oriented Application must establish session with destination Point-to-point communication Only 2 endpoints Complete reliability Guarantees error-free delivery Full duplex communication 52

TCP Services Has a stream interface mode Application sends continuous sequence of octets No guarantee that data at receiver is partitioned same as at sender Reliable connection startup Graceful connection shutdown Data will be delivered before closing connection 53

End-to-End Delivery TCP is an end-to-end protocol Provides connection between applications on two computers Virtual connections - connections created by software IP carries messages for TCP TCP message is the IP payload At destination, IP passes data to TCP 54

End-to-End Delivery Host 1 Host 2 Application TCP IP Network Interface Network Interface Router IP Network Interface Application TCP IP Network Interface 55

TCP Connection Establishment Source and destination exchange SYN (synchronize) and ACK (acknowledgement) packets Packets contain initial sequence numbers Uses 3-Way Handshake technique Source sends SYN packet, destination sends back ACK Happens 3 times Avoids problems that can occur with late delivery of an old SYN from a previous session 2-way handshake is susceptible to this 56

Three-Way Handshake 57

Flow Control Data overrun can occur when sender transmits data faster than receiver can process it Protocols use flow control mechanisms so receiver can control rate of transmission Two key types: Sliding window Stop-and-go Same as sliding window with window size = 1 58

Stop and Go Flow Control Receiver sends small ACK packet when it is ready for next Sender waits for ACK before sending next packet Inefficient if network transit time is large 59

Example - Stop and Go Flow Control Given Packet length = 1000 octets One-way travel time = 50 ms Network capacity = 2 Mbps Transmission takes 50 ms + 0.5 ms (packet length in seconds) Receiver sends acknowledgement, which arrives at sender 50 ms later 60

Example - Stop and Go Flow Control Sender can only send packets every 100.5 ms Effective data rate is bits 1 8 1000 octets octet 100.5ms This is 4% of capacity 79.6 kbps 61

TCP Flow Control - Sliding Window TCP uses a sliding window method of flow control Allows sender to transmit several packets before receiving an acknowledgment TCP defines window size as the number of packets that can be sent before an acknowledgement is returned Window size of 1 means each segment must be acknowledged before next one is sent Very inefficient As ACKs arrive at the sender, the window is moved along the buffer of data packets to be sent This is the sliding window 62

Sliding Window Flow Control D. Comer, Computer Networks and Internets, 2ed, Upper Saddle River, NJ, Prentice Hall, 1999 63

TCP Flow Control - Sliding Window Sliding window protocol is about W times faster than stop-and-go protocol T w T g W T w is the throughput of sliding window protocol, T g is the throughput of stop and go protocol, and W is the window size Max speed is the network capacity 64

Stop-and-Go vs. Sliding Window D. Comer, Computer Networks and Internets, 2ed, Upper Saddle River, NJ, Prentice Hall, 1999 65

TCP Flow Control - Sliding Window TCP window sizes are variable during a connection Each acknowledgement from destination contains a window size saying how many bytes destination can accept Sender adjusts its window size to match the size the destination wants Exception is during network congestion 66

TCP Flow Control - Sliding Window Sender also has a congestion control window that is normally the size of the receiver s window However, can be reduced if segments are dropped or lost When this happens, sender uses a much smaller congestion control window size If segments are not lost this time, congestion window is increased Process repeats until the sender s congestion window reaches the size of the receiver s buffer 67

Window Size Adjustment D. Comer, Computer Networks and Internets, 2ed, Upper Saddle River, NJ, Prentice Hall, 1999 68

Reliability and Retransmission Retransmission is one of the most important ways TCP achieves reliability When TCP sends data, it starts the Retransmission Timer If timer expires before an acknowledgement is received from destination, TCP retransmits the segment TCP adjusts the timer to account for network conditions Short timer for LANs Longer timer for long distances Longer timer for congested networks This technique reduces retransmissions and congestion 69

Retransmission D. Comer, Computer Networks and Internets, 2ed, Upper Saddle River, NJ, Prentice Hall, 1999 70

UDP Lower overhead than TCP No provisions for retransmission No windows 71

UDP Header 0 3 7 11 15 19 23 27 31 02 08 02 08 00 20 F9 5F 0 3 7 11 15 19 23 27 31 Source Port Destination Port Packet Length Checksum 72

UDP Header Source and destination port Similar to TCP Packet length Length of UDP header and all higher-layer information Checksum Similar to TCP 73

IP Addresses They are the key to communicating on the Internet They are logical addresses Can t use hardware addresses 32-bits (4 octets) long Unique across the Internet IP addresses of the source and destination (not the next hop) are included in an IP packet 74

IP Address Hierarchy Each address has a prefix and a suffix Prefix Also called Network Number Identifies the network Suffix Also called Host Number Identifies host on that prefix s network Uniqueness No two networks can have the same network number No two hosts on a given network can have the same host number 75

IP Address Classes Five address classes: A, B, C, D, E First four bits determine the class A, B, and C are primary classes A has an 8-bit network number First bit = 0 B has a 16-bit network number First 2 bits = 10 C has a 32-bit network number First 3 bits = 110 Class D is for IP multicasting Class E is for research 76

IP Address Classes Class A addresses are for networks with many hosts Not many of these networks Class C addresses are for networks with a few hosts Many of these networks 77

IP Address Classes 78

IP Address Classes 79

IP Address Classes 80

IP Address Classes D and E Class D: Multicast Range: 224.0.0.0-239.255.255.255 First 4 bits are 1110 Class E: Research 240.0.0.0-247.255.255.255 First 5 bits are 11110 81

Dotted Decimal Notation Divide up 32-bit address into 8-bit segments Convert each segment to decimal Separate decimal numbers by dots 82

Dotted Decimal Notation 83