290 likes | 411 Views
CENG415 – Communication Networks. Lectures 17 Network layer – ICMP – Queuing system. ICMP: Internet control Message protocol. used by hosts & routers to communicate network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping)
E N D
CENG415 – Communication Networks Lectures 17 Network layer – ICMP – Queuing system
ICMP: Internet control Message protocol • used by hosts & routers to communicate network-level information • error reporting: unreachable host, network, port, protocol • echo request/reply (used by ping) • network-layer “above” IP: • ICMP messages carried in IP datagrams • ICMP message: type=3, 4, 11, or 12: code plus IP header and following 8 bytes of IP datagram causing error (would include UDP or TCP port numbers)
Trace Route – ICMP • Source sends series of UDP segments to destination host • First has TTL =1 • Second has TTL=2, etc. • Unlikely port number • When nth datagram arrives to nth router: • Router discards datagram • Sends to source an ICMP message (type 11, code 0) • Datagram includes router IP address. Traceroute does DNS lookup to find name of router (if any) • When ICMP message arrives, source calculates RTT • Traceroute repeat the process 3 times (To get average RTT) Stopping criterion • UDP segment eventually arrives at destination host • Destination returns ICMP “port unreachable” packet (type 3, code 3)
IPv6 – Few word IPv6 was first proposed in 1998 with RFC 2460 Initial motivation:32-bit address space soon to be completely allocated (however, NAT and CIDR have fixed the problem for now) A general list of improvements that IPv6 proposes is: • More address space (128 bit) • Better address space management • Easier TCP/IP administration • Modernized routing capabilities • Improved support for multicasting, security and mobility • Improve QoS (quality of service) IPv6 datagram format: • fixed-length 40 byte header • no fragmentation allowed
IPv6 - Header • Priority: identify priority among datagrams in flow • Flow Label: identify datagrams in same “flow.” • (concept of“flow” not well defined). • Next header: identify upper layer protocol for data
Other changes from IPv4 • Checksum:removed entirely to reduce processing time at each hop • Options: allowed, but outside of header, indicated by “Next Header” field • (segmentation is done in Options Header) • ICMPv6: new version of ICMP • additional message types, e.g. “Packet Too Big” • multicast group management functions
Transition from IPv4 to IPv6 • Not all routers can be upgraded simultaneous • no “flag days” • How will the network operate with mixed IPv4 and IPv6 routers? • Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers
IPv6-addresses • IPv6 Works with 128-bit numbers • IPv6 address notation represents the 128 bits as 32 hexadecimal digits • Subdivided into eight groups of four hexadecimal digits, using colons as delimiters. • An example would be: 3ffe:1900:4545:3:200:f8ff:fe21:67cf fe80::200:f8ff:fe21:67cf (:0: ::)
IPv6-IPv4 tunneling • To convert an IPv4 to an IPv6, we add 96 leading 0’s to the 32 bit IP address Example: 192.168.1.2 :0:0:0:0:0:0:c0a8:0102 72.212.2.1 :::::::48d4:0201
IPv6-IPv4 Tunneling A E F B tunnel Logical view: IPv6 IPv6 IPv6 IPv6 A B E F Physical view: IPv6 IPv6 IPv6 IPv6 IPv4 IPv4
Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Src:B Dest: E IPv6-IPv4 Tunneling A E F B tunnel Logical view: IPv6 IPv6 IPv6 IPv6 A B E F Physical view: IPv6 IPv6 IPv6 IPv6 IPv4 IPv4 Key point: Encapsulation of IPv6 Datagram inIPv4 Datagram A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4
Lab: Packet tracer - ICMP We will use the network built in Lecture 16 Test1: ping (echo request / reply) At PC0, open a CommandPrompt window andping 72.9.9.2 (PC4) Switch to simulation mode and redo the ping Check the Message at PC0 Check the Message received back
Lab: Packet tracer - ICMP We will use the network built in Lecture 16 Test2: destination host unreachable At PC0, open a CommandPrompt window andping 22.22.22.22 (non-existing) Switch to simulation mode and redo the ping Check the Message at PC0 Check the Message received back
Lab: Packet tracer - ICMP We will use the network built in Lecture 16 Test3: TTL Expired • Go to simulation mode • Click on the add complex PDU icon (mouse converted to envelop) • Click once on PC0 and once on PC4 • In the create Complex PDU set the following: • Click on Create PDU The created message is a ping (ICMP) with TTL=1 When the message reaches the router, TTL = 0 An ICMP is sent back from the router to PC0
Queuing system FIFO (first in first out) scheduling: send in order of arrival to queue • discard policy: if packet arrives to full queue: who to discard? • Tail drop: drop arriving packet • priority: drop/remove on priority basis • random: drop/remove randomly
Queuing system Priority scheduling: transmit highest priority queued packet • multiple classes, with different priorities • class may depend on marking or other header info, e.g. Type of service, IP source/destination, port numbers, etc..
Queuing system round robin scheduling: • multiple classes • cyclically scan class queues, serving one from each class (if available)
Queuing system Weighted Fair Queuing: • generalized Round Robin • each class gets weighted amount of service in each cycle
Queuing theory We will study the queuing system in the routers. We will use some assumptions to simplify the problem. The queuing system can be seen as follow: • Queuing theory can apply on any queuing system • What we mean by theory is: • An estimation and formulation of the arrival process • An estimation and formulation of the servicing process • The objective of the queuing theory is the study and estimate the average amount of waiting that will occur, under a variety of circumstances
Queuing theory Queuing system The basic queuing system that we will study • (Assumption 1) The size of the input source is assumed to be infinite. • The time between consecutive arrivals is referred to as the inter arrival time. • (Assumption 2) We suppose that the arrivals follow the Poisson distribution (Exponential distribution). Service mechanism Queue Input source Served packets
Queuing theory • We denote by λn the mean arrival rate (expected number of arrivals per unit time) of new packets when n packets are in the system. (Assumption 3)In our case we suppose λ constant for all n. • Note that 1/λ is the mean arrival time of packets. • The Queue : Where packets wait before being served. • Characterized by the maximum permissible number of packets it can contain. (Assumption 4) In our case, we consider the queue with unlimited capacity.
Queuing theory • Service Mechanism: One or more service facilities, (Assumption 5) in our case we consider one service facility. • Service time is the time elapsed from the commencement of service to its completion. • (Assumption 6) We say that the service follow the Poisson distribution (Exponential distribution).
Queuing theory • We denote by µn the mean service rate for overall system (expected number of packets completing service per unit of time) when n customers are in the system. • (Assumption 6) In our case we suppose µ constant for all n. • Note that 1/µ = mean service time. Such a model is called M/M/1 • First M is the distribution of the inter arrival time • Second M is the distribution of service time • 1 is for the number of service facilities
Queuing theory - Terminologies Pn = probability of exactly n customers in the queuing system L = Expected (average) number of customers in queuing system Lq = Expected queue length (excludes customers being served) W = waiting time in the system (including service) for each individual customer. Wq = Waiting time in queue Relation between L, W, Lq and WqLittle’s formula (John D.C. Little) • L=λW • Lq = λWq • W=Wq+1/µ (1/µ = mean service time)
λ λ λ λ λ λ µ µ µ µ µ µ Queuing theory – State process Each state represents the number of packets in the queuing system: Principle: Rate in = Rate out For state 0: µP1 = λP0 P1 = (λ/µ)P0 For state 1: λP0+ µP2 = µP1 + λP1 µP2 = λP1 P2 = (λ/µ)2P0 .... We conclude that Pn = (λ/µ)nP0 • Under the assumption that λ < µ (otherwise the queue will increase indefinitely) • P0=1- λ/µ L = λ/(µ-λ) W = 1/(µ- λ) = Wq+1/µ Wq=λ/µ(µ-λ) 0 1 2 3 4 5 …
Queuing theory – Example In a router, packets arrive at a mean rate of 5 packets per seconds. The mean time of routing a packet has an exponential distribution and is equal to 0.1 second. Packets arrive according to the Poisson distribution. • What is the average waiting time in the router? • What is the probability that the queue exceeds 5 packets? • Determine the proportion of time that the server is busy?
Solution • W = 1/(µ-λ) = 1/5=0.2s • P (the queue exceeds 5) = 1 - (P0+P1+P2+P3+P4+P5+P6)