1 CMPT 471 Networking II Some important Internetworking concepts © Janice Regan, 2013.

Slides:



Advertisements
Similar presentations
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CCNA – Network Fundamentals
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Networks I Transmission Control Protocol Instituto Tecnológico y de Estudios Superiores de Monterrey Campus Estado de México Prof. MSc. Ivan A. Escobar.
Transmission Control Protocol (TCP) Basics
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Semester Copyright USM EEE442 Computer Networks Introduction: Protocols En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK)
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
Data Communications Architecture Models. What is a Protocol? For two entities to communicate successfully, they must “speak the same language”. What is.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer Internet Protocol (IP) layer Introduction.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
10/13/20151 TCP/IP Transmission Control Protocol Internet Protocol.
William Stallings Data and Computer Communications 7 th Edition Chapter 18 Internet Protocols.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
University of the Western Cape Chapter 12: The Transport Layer.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Routers and Routing Basics CCNA 2 Chapter 10.
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Protocols and Architecture Slide 1 Use of Standard Protocols.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
IP Protocol CSE TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol.
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Process-to-Process Delivery:
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
The Transport Layer Implementation Services Functions Protocols
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Lecture (2).
Instructor Materials Chapter 9: Transport Layer
Process-to-Process Delivery, TCP and UDP protocols
TCP/IP Transmission Control Protocol / Internet Protocol
Net 431: ADVANCED COMPUTER NETWORKS
Transport Layer Unit 5.
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
Net 323 D: Networks Protocols
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

1 CMPT 471 Networking II Some important Internetworking concepts © Janice Regan, 2013

2

3 Internetworking Requirements  Provides linkage between networks  Minimum physical and link layer  Provides routing and delivery of data between processes on different networks  Provides accounting services and maintains status information  Supports services for users and the network  Provides these services independent of individual network architectures, and must accommodate differences between networks

© Janice Regan, Architectural Approaches: 1  Connection oriented (reliable) delivery service  Delivered using a sustained connection across the network between two machines  The connection is initiated or built before it can be used  The connection, once established delivers data streams between the endpoints of the connection (a full duplex connection will have 1 data stream in each direction)  The connection is terminated when the application is finished using it  Resources for the circuit are allocated to connection. If circuit is idle then resources are unused and unavailable to other circuits

© Janice Regan, Architectural Approaches: 2  Connectionless  Stream of data is divided into pieces  Each piece is encapsulated in a packet by adding a header containing all information needed to get the packet to its destination  Each packet is sent independently and is individually routed through the network  Different packets from the same data stream may take different paths through the internet  Packets may arrive in an order different from the order in which they were sent (different paths = different travel times)

© Janice Regan, Architectural Approaches: 1  Connection oriented (reliable) delivery services  Support for quality of service simple  Failure of any router in the circuit will cause failure of the connection  Path setup overhead but reduced routing overhead (routing done once not for each packet)  Router table space needed for every connection passing through the router (may need less table space for address for a connection, but will need an entry for each connection not each network)  All networks involved must be circuit switched networks (pass through switching)

© Janice Regan, Architectural Approaches: 2  Connectionless  Support for quality of service is difficult  Delivery will not fail if a single intermediate router fails  Extra overhead in routing, must separately route each packet  No congestion control available  Best effort (not reliable) transmission of packets

© Janice Regan, Connectionless Internetworking  Advantages  Flexible and Robust  Minimal overhead (no connection overhead)  Disadvantages  Delivery not guaranteed  Order of delivery not guaranteed  Reliability is responsibility of next layer up (e.g. TCP, transport layer builds a virtual circuit)

© Janice Regan, Internetworking Protocols

© Janice Regan,

© Janice Regan, Encapsulation  Data is transferred in blocks called Protocol Data Units (PDU)  Each PDU contains control information and sometimes data  Control Information includes  Address  Error Detection code  Protocol Control  The addition of control information to data is referred to as Encapsulation

© Janice Regan, Figure 2.14 Stallings (2003) Transport layer Network layer Data link layer (e.g. ethernet) port ip address MAC address Encapsulation: Protocol Data Units in the TCP/IP Architecture

© Janice Regan, Protocol functions: IP (network) layer  Routing  Determining a path through the Internet through a series of hosts/routers to the destination  Addressing/ Forwarding  Sending packets along the determined path  Datagram lifetime  Removing packets that are ‘lost’ or ‘damaged’  Fragmentation and re-assembly  Dealing with networks having different maximum datagram sizes  Error control, Flow control  Connection management (if needed)  Transmission services

© Janice Regan, Addressing:  Each Internet Protocol address (IP address) must be globally applicable and globally unique  Must have global nonambiguity, must uniquely identify the host and interface globally  Must have global applicablity, must be accessible via address from any other node on the Internet  IP addresses are used to route PDU from the destination through ISs to the destination. Routes the PDU through the internet or Internet.

© Janice Regan, Internet addresses IPv4  32 bit global internet (IPv4) address is used to uniquely identify a particular network interface connected to a particular host as a destination for communication  Each IPv4 address is split into two parts (netid, hostid) to identify the host and the network to which the host is connected  The netid (network address or prefix) identifies the network to which the host belongs.  The hostid identifies the particular host (network interface for a multi homed host)

© Janice Regan, Internet addresses IPv6  128 bit global (IPv6) address is used to uniquely identify a particular network interface connected to a particular host as a destination for communication  Each IPv6 address is split into three parts (global routing prefix, subnet ID, interface identifier)  The global routing prefix (48 bits) identifies the network to which the host belongs (like an IPv4 netid).  The subnet ID (16 bits) is used to create a subnet structure within the network  The interface identifier (64 bits) indicates the particular host (like IPv4 host ID)

© Janice Regan, Addressing: connection identifiers  For a connection oriented network, a connection identifier may be used rather than a global address  The connection identifier is smaller (fewer bits) and creates less overhead  Connection identifier indicates route to Intermediate stations  End systems maintain flow and state information for the connection identified

© Janice Regan, Deciding where to go  Need to determine a path for a packet (or message) to take through a network  Two major components are required to determine such a path  Routing Building a routing table for each host and router.  Forwarding: Using the routing tables at each IS to determine the most efficient path to the destination.

© Janice Regan, Where to go? Routing  Routing: Building a routing table for each host and router.  A routing table indicates which of the router’s ( host’s) network interfaces provides the most direct path to each possible IP destination address  The entries in a routing table are determined statically (input by administrator) or dynamically using time varying routing data sent between routers and a routing algorithm

© Janice Regan, Where to go? Forwarding  Forwarding:  Using the routing tables at each intermediate router to determine the most efficient path to the destination.  At each intermediate router find the ‘best’ interface to send the packet through.  Simple algorithm for forwarding Each row of routing table represents one network (or host). For each row determine if the destination address is part of the network If it is add that row to the list of possible candidates for forwarding Choose the ‘best’ (longest match) of the candidates for forwarding Use the information in the row for the ‘best’ network to forward the packet

© Janice Regan, A sample routing table IPv4 DestinationGatewayGenmaskMetricIface * Eth * Eth * Eth * Eth Eth Eth * Lo * Eth Eth0

A sample routing table IPv6 © Janice Regan, Destination Next Hop Flag Met Ref Use If ::1/128 :: Un lo fdd0:8184:d967:25::a19:106/128 fdd0:8184:d967:29::a1d:109 UG eth1 fdd0:8184:d967:26::/64 fdd0:8184:d967:30::a1e:108 UG eth2 fdd0:8184:d967:29::/128 :: Un lo fdd0:8184:d967:29::a1d:10a/128 :: Un lo fdd0:8184:d967:29::/64 :: U eth1 fdd0:8184:d967:30::/128 :: Un lo fdd0:8184:d967:30::a1e:10a/128 :: Un lo fdd0:8184:d967:30::/64 :: U eth2 fe80::250:56ff:fea4:1795/128 :: Un lo fe80::250:56ff:fea4:59c9/128 :: Un lo fe80::250:56ff:fea4:764f/128 :: Un lo fe80::/64 :: U eth1 fe80::/64 :: U eth2 fe80::/64 :: U eth0 ::/0

© Janice Regan, Datagram Lifetime  Datagrams could loop indefinitely  Problems with routing or addressing can cause datagrams to travel in circles or on circuitous paths rather than reach their destination promptly  Consumes resources  Internet protocol may need upper bound on datagram life  Datagram marked with lifetime  Time To Live field in IP  Once lifetime expires, datagram discarded (not forwarded)  Hop count: Decrement time to live on passing through a each router  Time count: Need to know how long since last router

© Janice Regan, Fragmentation / Reassembly  Each protocol has a maximum size for it’s own PDUs. This maximum is different for different protocols  The data in the PDU must be broken into smaller pieces or fragmented if the PDU is too large for a network it passes through  The data in the fragmented PDU is reassembled, usually at the receiver

© Janice Regan, Why fragment?  A PDU from another network exceeds the maximum allowed size for the next network through which it will travel  To improve efficiency or error control. Fewer bits need to be retransmitted (reduce PDU size)  More equitable sharing of facilities  Reduced buffers needed at stations  But remember the costs  Increased overhead of control information  More interrupts, may increase processing time

26 CMPT 471 Networking II Review of TCP/UDP The transport layer © Janice Regan, 2013

27 The transport layer  Processes use a transport protocol communicate end to end. (reliably using TCP or best effort using UDP)  Data-link and network layer protocols communicate hop by hop, forming a communications channel for the transport layer  The transport layer shields the application processes from the details of the underlying communications channel  The transport layer specifies a particular application process as the source or destination. Lower layers specify at most the protocol in the next layer up

© Janice Regan,

© Janice Regan, Transport protocols  May provide best effort delivery of packets (UDP)  Application accepts responsibility for reliability  May provide a connection oriented reliable communication channel (TCP) either  On top of a best effort packet switched network (IP with unacknowledged connectionless LLC layer)  On top of a reliable network service (IP with acknowledged connectionless services)  May support multiplexing (particularly useful for circuit switch or virtual circuit networks using flows)  Combine multiple low rate flows through 1 port  Spread high rate flow between multiple ports

UDP: best effort transmission  Addressing  Multiplexing  Using one UDP port for all UDP traffic  Error control  What happens when an error occurs  Usually the packet is lost  Ordering  Reordering received packets to be in same order they were sent © Janice Regan,

© Janice Regan, Multiplexing of flows

© Janice Regan, TCP: reliable transmission  Addressing  Multiplexing  Flow control  Logical connection establishment  Logical connection maintenance  Logical connection termination  error control  reorder packets received the application

© Janice Regan, Addressing  User specified by:  User identification Specify Host and Port (may be socket in TCP or UDP) Port represents particular process or protocol Host is specified by an IP address Several processes on a given machine may be multiplexed together and use a single protocol port  Protocol port identification specified by an integer usually one protocol port for of each protocol type (TCP, UDP)  General port identification specified by an integer

© Janice Regan, Finding Port Addresses: 1  Static configuration:  Know address ahead of time  Universal assignment:  Central authority (IANA) assigns port numbers to common protocols. The list is published  All software uses this list of protocols/ports  Any host receiving a particular protocol will have a server process for that protocol which can be accessed through the assigned protocol port number  Ports are reserved for this IANA list  Ports are registered (use list exists) not reserved

© Janice Regan, Finding Port Addresses: 2  Name server: Server on a well known port can be queried to determine the port for the particular application  Instance server: server on a well know port will create an instance of the application and return the appropriate port to attach to that instance

© Janice Regan, Well Know port numbers

© Janice Regan, Structure of a TCP segment Comer 2000: fig 13.7 SOURCE PORT DESTINATION PORT CHECKSUM

© Janice Regan, Code Bits (1)  The code bits field contains a set of 6 flags  The ACK SYN and FIN flags produce packets used in the three way handshake to establish a TCP connection.

© Janice Regan, Code Bits (2)  ACK must be set if the frame contains a valid acknowledgement  PSH requests that data be sent immediately rather than waiting for enough data to fill a packet  When the urgent flag is set the value of the urgent pointer field added to the sequence number indicates the end (last octet) of a block of data that needs immediate delivery. Flag stays set until urgent data is delivered. The start of the urgent data is not marked.

© Janice Regan, Structure of a TCP segment Comer 2000: fig 13.7 SEQUENCE NUMBER ACKNOWLEDGEMENT NUMBER WINDOW

© Janice Regan, Sequence number (1)  A TCP connection is a full duplex (capable of sending data in both direction simultaneously) connection with data flowing in both directions  A TCP segment contains both a TCP header and a variable number of data octets  Consider two data streams, the data going from host1 to host2 and the data going from host2 to host1  Separately consider each of these data streams. In each data stream each octet of data has an octet number. The octet number of the next octet in the stream is one larger than the octet number of the present octet

© Janice Regan, Sequence number (2) Stream of octets of data from host 1 to host 2 Stream divided to show which data octets are placed in each successive segment First data octet number to be placed in segment Stream of octets of data from host 2 to host 1 Stream divided to show which data octets are placed in each successive segment First data octet number to be placed in segment Two Different Streams of DATA

© Janice Regan, Sequence number (3)  The octet count in each stream is independent. Separate counters!  TCP sequence numbers do not count packets they count octets of data. This is because TCP segments can contain variable numbers of octets of data.  A TCP segment whose first data octet is octet m, has a sequence number m when it is sent

© Janice Regan, Acknowledgement numbers  Consider the data stream from host1 to host2  When host1 sends a segment the sequence number of that segment refers to octet number of the first octet in that segment. This octet is part of the stream of data from host1 to host2 and the sequence number refers to that stream.  When host1 receives a segment with the ACK flag set the segment carries a valid acknowledgement  The acknowledgement number of a valid acknowledgement being received by host1 indicates the octet number, m, of the next data octet that host2 expects to receive from host1 (ACKs receipt of all data octets up to octet m-1)

© Janice Regan, Piggybacking  A valid acknowledgment can be sent in its own packet (no data being sent from host2 to host1 in the segment)  A valid acknowledgement can be piggybacked.  the acknowledgement is added to a segment carrying data from host2 to host 1  The acknowledgement is added by setting the ACK flag of that segment placing the correct value in the acknowledgement number field. The correct value is the octet number of the next octet of data expected. If the last octet received in the packet being acknowledged is M the correct value is M+1

© Janice Regan, Flow control + Error control  Flow Control  Control flow of data from source to receiver  Source sends at a particular rate (frames/sec)  Receiver must be able to receive and process data at that rate (rate must be controlled)  Error control  How to recover when a frame is damaged or lost in transmission

© Janice Regan, Stop and Wait: Error free  Packets arrive at destination in the same order they are sent Error free transmission Send F2 Send F3 Send F1 Send F0 Send ACK1 Send ACK2 Send ACK3 RTT TIMETIME

© Janice Regan, Stop and Wait Flow Control  Source entity (sender) transmits frame and starts a timer  Destination entity (receiver) receives frame  Destination entity sends ACK  Source entity receives ACK and stops timer  Source entity is now ready to start the cycle again for a new frame  If timer expires first four steps above are repeated for the same frame

Error control  How does the protocol recover when a packet or an ACK is lost or damaged?  How can a packet or ACK be lost or damaged?  Will discuss specific cases later © Janice Regan,