II. Principles of Computer Communications Network and Transport Layer

Similar documents
EEC-484/584 Computer Networks

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

Vorlesung Kommunikationsnetze

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

Chapter 22 Network Layer: Delivery, Forwarding, and Routing 22.1

Chapter 5 (Week 9) The Network Layer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP BLM431 Computer Networks Dr.

User Datagram Protocol

EEC-684/584 Computer Networks

CHAPTER 9: PACKET SWITCHING N/W & CONGESTION CONTROL

Telecommunication Protocols Laboratory Course. Lecture 3

UNIT IV -- TRANSPORT LAYER

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Quality of Service in the Internet

Introduction to Networks and the Internet

Information Network Systems The network layer. Stephan Sigg

Chapter 24 Congestion Control and Quality of Service 24.1

Chapter 5 OSI Network Layer

ECE 435 Network Engineering Lecture 11

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Quality of Service in the Internet

TCP /IP Fundamentals Mr. Cantu

Your Name: Your student ID number:

ECE 435 Network Engineering Lecture 11

Dongsoo S. Kim Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Jaringan Komputer. Network Layer. Network Layer. Network Layer. Network Layer Design Issues. Store-and-Forward Packet Switching

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

CS164 Final Exam Winter 2013

Networking: Network layer

Computer Networks. Routing

9th Slide Set Computer Networks

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

Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk SOLUTIONS

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Chapter 19 Network Layer: Logical Addressing

OSI Network Layer. Chapter 5

Chapter 5 (Week 10) The Network Layer (CONTINUATION) ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP

ECE697AA Lecture 3. Today s lecture

Chapter 24. Transport-Layer Protocols

Chapter 6. The Network Layer

Paper solution Subject: Computer Networks (TE Computer pattern) Marks : 30 Date: 5/2/2015

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

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

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Leaky Bucket Algorithm

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Introduction Layer 3. IP-Header: and RFC-760 Addressing schemes Subnetting Routing. Layer 3 Solution in Trains

CHAPTER 18 INTERNET PROTOCOLS ANSWERS TO QUESTIONS

Transport Protocols and TCP

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

User Datagram Protocol (UDP):

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

IP - The Internet Protocol

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Internetwork Protocols

Networking Technologies and Applications

Configuring IP Services

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

Introduction to Internetworking

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

UNIT 2 TRANSPORT LAYER

Module 7 Internet And Internet Protocol Suite

Lecture 3: The Transport Layer: UDP and TCP

Chapter 6. The Network Layer

Transport Protocols and TCP: Review

ICMP (Internet Control Message Protocol)

IP Address Assignment

5.2 Routing Algorithms

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Internet Protocols (chapter 18)

Department of Computer Science and Engineering. Final Examination. Instructor: N. Vlajic Date: April 15, 2011

ET4254 Communications and Networking 1

ICMP, ARP, RARP, IGMP

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Answer to the written exam given on TDTS06 Computer networks, October 23,

Chapter 09 Network Protocols

Lab 4: Routing using OSPF

Congestion control in TCP

Lecture 8. Network Layer (cont d) Network Layer 1-1

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

Fall 2012: FCM 708 Bridge Foundation I

Transport Protocols & TCP TCP

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

EE 610 Part 2: Encapsulation and network utilities

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

ECE 428 Internet Protocols (Network Layer: Layer 3)

Problems of IP. Unreliable connectionless service. Cannot acquire status information from routers and other hosts

Network Layer/IP Protocols

Chapter 6. (Week 12) The Transport Layer (CONTINUATION) ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP

ICMP (Internet Control Message Protocol)

ECE 650 Systems Programming & Engineering. Spring 2018

Each ICMP message contains three fields that define its purpose and provide a checksum. They are TYPE, CODE, and CHECKSUM fields.

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

CHAPTER-2 IP CONCEPTS

c) With the selective repeat protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.

Intro to LAN/WAN. Transport Layer

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

Transcription:

II. Principles of Computer Communications Network and Transport Layer A. Internet Protocol (IP) IPv4 Header An IP datagram consists of a header part and a text part. The header has a 20-byte fixed part and a variable length optional part. 1

(1) Version: to keep track of which version of the protocol the datagram belongs to. (2) IHL: to provide the length of the header, in 32-bit words. When the value is 5, which applies no options are present. (3) Type of service: to distinguish between different classes of services. (4) Three-bit precedence field and three flags, D, T, and R {Delay, Throughput and Reliability}. (5) Total Length: to provide the length of the datagram (including header and data). (6) Identification: to identify each datagram. (7) DF and MF: don t fragment, and more fragments. (8) Fragment offset: To tell where in the current datagram this fragment belongs. (9) Time to live: a counter used to limit packet lifetimes. (10) Protocol: to tell which protocol process to give it to (e.g., TCP or UDP). (11) Header checksum: to detect errors in the datagram. (12) Source address and destination address 2

IP Address An IP address consists of two parts: network number and host number. (Why?) Unique: no two machines on the Internet have the same IP address. 32-bit long. Classful addressing: IP addresses are divided into five categories. 3

(How to manage IP address to avoid conflicts?) Usually a 32-bit IP address is written in dotted decimal notation. Each of 4 bytes is written in decimal (e.g., 158.182.7.1). Special IP addresses 4

Subnet (1) It is possible to split a large network into subnets. (2) A subnet mask is used to indicate the split of network. IPv6: Packet Format, Transitioning from IPv4 to IPv6 The new IP version is to Support more hosts on the Internet; Provide better quality of service. 5

IPv6 Header 40-byte header 16-byte address Address are written as eight groups of four hexadecimal digits with colons between groups: e.g., 8000:0000:89AB:CDEF 6

B. Routing Algorithms Shortest Path Routing To study the routing algorithms, a graph is commonly used to represent a subnet. Each node of the graph represents a router and each arc of the graph represents a communication line. The path length can be measured in terms of the number of hops, the geographic distance, etc. Dijkstra Algorithm (1) Set the value of the initial node to zero and set all other nodes to infinity. (2) Mark all nodes unvisited. Set the initial node as starting point. (3) For the current node, consider all of its unvisited neighbors and calculate their tentative distances. (4) Mark the current node as visited and remove it from the unvisited set. A visited node will never be checked again. (5) If the destination node has been marked visited or if the smallest tentative distance among the nodes in the unvisited set is infinity, then stop. The algorithm has finished. (6) Set the unvisited node marked with the smallest tentative distance as the next current node and go back to step (3). 7

Illustrated by example 8

Flooding Every incoming packet is sent out on every outgoing line except the one it arrived on. To solve the vast numbers of duplicate packets, a hop counter is introduced. The hop counter is contained in the header of each packet. It decremented at each hop. The packet will be discarded when the counter reached zero. Distance Vector Routing It is a dynamic routing algorithm. Each router maintains a table giving the best known distance to each destination and which line to use to get there. These tables are updated by exchanging information with their neighbors. An entry of routing tables contains two parts: the preferred outgoing line to be used for the destination, and an estimate of the distance to that destination. Example: 9

10

Count-to-Infinity Problem: this algorithm reacts rapidly to good news, but leisurely to bad news. Link State Routing Learning about the neighbors: When a router is booted, it sends a HELLO packet on each point-to-point line. The neighbors reply with their IDs. 11

Measuring Line Cost: the router sends an ECHO packet to each neighbor to measure the round-trip time, and then to estimate the delay. Building Link State Packets: each router build a packet containing the sender ID, a sequence number, age (expire time), and a list of neighbors. Distributing the Link State Packets: each router flood the packet to its neighbors. Computing the new routes: each router uses the set of link state packets to construct the subnet graph. 12

Broadcast and Multicast Routing Broadcast: sending a packet to all destinations simultaneously. (1) Flooding: Each router sends the packet to all the out-going line except the one the packet arrives. Multicast: sending a packet to a group of nodes. Two approaches are used: (1) Multicast is emulated using multiple point-to-point unicast connections. (2) Each router contains either a list of destinations or a bit map indicating the desired destinations. When a packet arrives at a router, the router checks all the destinations to determine the set of route lines that will be needed. 13

Hierarchical Routing Routers are divided into regions. Each router knows the internal structure within its own region, but only knows the inter-connection points of other regions. 14

C. Congestion Control Algorithms Introduction Congestion: When traffic increases too far due to many reasons, the routers are not longer able to cope and they begin losing packets. So that the performance degrades. 15

Metrics used to monitor a subnet for congestion: (1) Percentage of all packets discarded for lack of buffer space; (2) Average of queue lengths; (3) Number of packets that time out and are retransmitted; (4) Average packet delay; (5) Standard deviation of packet delay, etc. Open-loop and Closed-loop Open-loop: Once the system is up and running, midcourse corrections are not made. No feedback is needed. Closed-loop: It based on feedbacks to adjust system operation to correct the problem. 16

Load Shedding When routers are being overloaded by packets, they just throw the packets away. Many approaches can be used to discard packets: (1) Random manner; (2) Application-based or algorithm-based; Random Early Detection (RED) Algorithm (1) To drop packets before the congestion situation has become worse. (2) For a particular line, when the average queue length exceeds a threshold, the line is said to be congested and action is taken. 17

Jitter Control The variation in the packets arrival times is called jitter. A small jitter is desirable for some multimedia applications such as video, audio, etc. Jitter can be eliminated by buffering. But it only applicable for the non real-time applications such as video-on-demand. 18

Quality of Service Different applications have different requirements on quality of service Application Reliability Delay Jitter Bandwidth E-mail High Low Low Low File Transfer High Low Low Medium Web access High Medium Low Medium Audio on demand Low Low High Medium Video on demand Low Low High High Telephony Low High High Low Videoconferencing Low High High High Techniques for achieving good quality of service (1) Buffering; (2) Traffic shaping; (3) Resource reservation; (4) Admission control. 19

D. Transport Control Protocol (TCP) Operation of TCP When a sender transmits a segment, it also starts a timer. When the segment arrives at the destination, the receiving TCP entity sends back a segment (with data if any) bearing an acknowledgement number equal to the next sequence number it expects to receive. If the sender s timer goes off before the acknowledgement is received, the sender transmits the segment again. 20

TCP Segment Header 21

(1) Source port and destination port: to identify the local end points of the connections. (2) Sequence number and acknowledgement number (3) TCP header length: to tell how many 32-bit words are contained in the header (4) Six 1-bit flags (5) Window size: to tell how many bytes may be sent starting at the byte acknowledged. (6) Checksum (7) Options: to provide a way to extend the header 22

Connection Establishment Three-way handshaking Connection Release To release a connection, either party can send a TCP segment with the FIN bit set. 23

Congestion Control: Exponential and then Linear A threshold is used in the congestion control algorithm, initially 64 KB. At the beginning, the window size grows exponentially until the threshold is hit. Then successful transmissions grow the window linearly. If a timeout occurs, the threshold is set half of the current window, and the starting window is reset to one. 24

Timer Management For each connection, TCP maintains the timeout interval as Timeout = RTT + 4 D Where RTT is the round-trip time, D is the standard deviation. TCP constantly adjusts the timeout interval based on continuous measurements of network performance. E. User Datagram Protocol (UDP) Connectionless protocol: it provides a way for applications to send encapsulated IP datagrams and send them without having to establish a connection. 8-byte header UDP Datagram Header 25

Packet encapsulation 26