1 / 159

CS/ECE 438: Communication Networks Fall 2019

CS/ECE 438: Communication Networks Fall 2019. 4. Network Layer. Chapter 4: Network Layer. application transport network link physical. Chapter 4: Network Layer. Kurose & Ross 6 th Edition: Chapter 4: Network Layer Kurose & Ross 7 th Edition: Chapter 4: Network Data Plane

shelly
Télécharger la présentation

CS/ECE 438: Communication Networks Fall 2019

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS/ECE 438: Communication Networks Fall 2019 4. Network Layer

  2. Chapter 4: Network Layer application transport network link physical

  3. Chapter 4: Network Layer Kurose & Ross 6th Edition: Chapter 4: Network Layer Kurose & Ross 7th Edition: Chapter 4: Network Data Plane Chapter 5: Network Control Plane This Course: Hybrid -Combine in one chapter -But follow 7th Ed. (Mostly!) application transport network link physical

  4. our goals: understand principles behind network layer services: Network layer service models Forwarding versus routing How a router works Routing (Path Selection) Broadcast, Multicast Dealing with Scale Advanced Topics: IPv6, Mobility, SDN Controllers Instantiation, Implementation in the Internet Network Management Chapter 4: Network Layer

  5. Chapter 4: Outline Overview of Network Layer What’s Inside a Router? IP: Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP SDN: Software Defined Networks ICMP: The Internet Control Message Protocol Network Management and SNMP • Data Plane • Control Plane

  6. Transport segment from sending to receiving host On sending side encapsulates segments into datagrams On receiving side, delivers segments to transport layer Network layer protocols in everyhost, router Router examines header fields in all IP datagrams passing through it network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical Network layer

  7. Two key network-layer functions network-layer functions: • forwarding: move packets from router’s input to appropriate router output • routing: determine route taken by packets from source to destination • routing algorithms analogy: taking a trip • forwarding: process of getting through single interchange • routing: process of planning trip from source to destination

  8. Network layer: data plane, control plane Control plane • network-wide logic • determines how datagram is routed among routers along end-end path from source host to destination host • two control-plane approaches: • traditional routing algorithms: implemented in routers • software-defined networking (SDN): implemented in (remote) servers Data plane • local, per-router function • determines how datagram arriving on router input port is forwarded to router output port • forwarding function 0111 values in arriving packet header 1 2 3

  9. Per-router control plane Routing Algorithm Individual routing algorithm components in each and every router interact in the control plane 0111 control plane data plane values in arriving packet header 1 2 3

  10. Logically centralized control plane A distinct (typically remote) controller interacts with local control agents (CAs) Remote Controller CA 0111 control plane data plane CA CA CA CA values in arriving packet header 1 2 3

  11. example services for individual datagrams: guaranteed delivery guaranteed delivery with less than 40 msec delay example services for a flow of datagrams: in-order datagram delivery guaranteed minimum bandwidth to flow restrictions on changes in inter-packet spacing Network service model Q: What service model for “channel” transporting datagrams from sender to receiver?

  12. Network layer service models: Guarantees ? Network Architecture Internet Service Model best effort Congestion feedback no (inferred Via loss Bandwidth none Loss no Order no Timing no

  13. Chapter 4: Outline Overview of Network Layer What’s Inside a Router? IP: Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP SDN: Software Defined Networks ICMP: The Internet Control Message Protocol Network Management and SNMP

  14. Router architecture overview • high-level view of generic router architecture: routing, management control plane (software) operates in millisecond time frame routing processor forwarding data plane (hardware) operttes in nanosecond timeframe high-seed switching fabric router input ports router output ports

  15. Input port functions lookup, forwarding queueing link layer protocol (receive) switch fabric line termination decentralized switching: • using header field values, lookup output port using forwarding table in input port memory (“match plus action”) • goal: complete input port processing at ‘line speed’ • queuing: if datagrams arrive faster than forwarding rate into switch fabric physical layer: bit-level reception data link layer: e.g., Ethernet see chapter 5

  16. Input port functions lookup, forwarding queueing link layer protocol (receive) switch fabric line termination physical layer: bit-level reception decentralized switching: • using header field values, lookup output port using forwarding table in input port memory (“match plus action”) • Destination-based forwarding: forward based only on destination IP address (traditional) • Generalized Forwarding: forward based on any set of header field values data link layer: e.g., Ethernet see chapter 5

  17. Destination-based forwarding forwarding table Destination Address Range 11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 11001000 00010111 00011111 11111111 otherwise Link Interface 0 1 2 3 Q: but what happens if ranges don’t divide up so nicely?

  18. Longest prefix matching longest prefix matching when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Link interface 0 1 2 3 Destination Address Range 11001000 00010111 00010*** ********* 11001000 00010111 00011000 ********* 11001000 00010111 00011*** ********* otherwise examples: which interface? DA: 11001000 00010111 00010110 10100001 which interface? DA: 11001000 00010111 00011000 10101010

  19. Longest prefix matching • we’ll see why longest prefix matching is used shortly, when we study addressing • longest prefix matching: often performed using ternary content addressable memories (TCAMs) • content addressable: present address to TCAM: retrieve address in one clock cycle, regardless of table size • Cisco Catalyst: can up ~1M routing table entries in TCAM

  20. Switching fabrics • transfer packet from input buffer to appropriate output buffer • switching rate: rate at which packets can be transferred from inputs to outputs • often measured as multiple of input/output line rate • N inputs: switching rate N times line rate desirable • three types of switching fabrics memory bus memory crossbar

  21. output port (e.g., Ethernet) input port (e.g., Ethernet) memory system bus Switching via memory first generation routers: • traditional computers with switching under direct control of CPU • packet copied to system’s memory • speed limited by memory bandwidth (2 bus crossings per datagram)

  22. Switching via a bus • datagram from input port memory to output port memory via a shared bus • bus contention: switching speed limited by bus bandwidth • 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers bus

  23. crossbar Switching via interconnection network • overcome bus bandwidth limitations • banyan networks, crossbar, other interconnection nets initially developed to connect processors in multiprocessor • advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric. • Cisco 12000: switches 60 Gbps through the interconnection network

  24. Input Port Queueing • Packets may queue at input ports. Why? • Answer 1: Slow switching fabric switch fabric

  25. switch fabric one packet time later: green packet experiences HOL blocking Input port queuing • Answer 2: Output port contention • Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward X switch fabric output port contention: only one red datagram can be transferred.lower red packet is blocked

  26. Reducing Input Queueing • Why? • Reduce HOL blocking • Avoid packet drops at input queues • Save on queue memory • How? • Increase switch fabric speed • Increase inbound capacity of output ports

  27. datagram buffer queueing Output ports switch fabric • buffering required when datagrams arrive from fabric faster than the transmission rate • scheduling discipline chooses among queued datagrams for transmission line termination link layer protocol (send) Datagram (packets) can be lost due to congestion, lack of buffers Priority scheduling – who gets best performance, network neutrality

  28. switch fabric switch fabric one packet time later at t, packets move from input to output Output port queueing • buffering when arrival rate via switch exceeds output line speed • queueing (delay) and loss due to output port buffer overflow!

  29. How much buffering? • RFC 3439 rule of thumb: average buffering equal to “typical” RTT (say 250 msec) times link capacity C • e.g., C = 10 Gpbs link: 2.5 Gbit buffer • recent recommendation [Appenzellet’04]: with N flows, buffering equal to:

  30. Scheduling mechanisms • scheduling: choose next packet to send on link • 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 packet arrivals packet departures queue (waiting area) link (server)

  31. Scheduling policies: priority high priority queue (waiting area) priority scheduling: send highest priority queued packet • multiple classes, with different priorities • class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc. arrivals departures classify link (server) low priority queue (waiting area) 1 5 3 4 2 5 5 2 2 arrivals 1 1 3 3 4 4 packet in service departures

  32. Scheduling policies: still more Round Robin (RR) scheduling: • multiple classes • cyclically scan class queues, sending one complete packet from each class (if available) • real world example? 1 2 3 4 5 2 5 5 3 arrivals 1 1 2 4 4 packet in service departures 3

  33. Scheduling policies: still more Weighted Fair Queuing (WFQ): • generalized Round Robin • each class gets weighted amount of service in each cycle

  34. Chapter 4: Outline Overview of Network Layer What’s Inside a Router? IP : Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP SDN: Software Defined Networks ICMP: The Internet Control Message Protocol Network Management and SNMP • Data Format and Fragmentation • IPv4 Addressing • Network Address Translation • IPv6

  35. host, router network layer functions: • IP protocol • addressing conventions • datagram format • packet handling conventions forwarding table The Internet network layer transport layer: TCP, UDP • routing protocols • path selection • RIP, OSPF, BGP network layer • ICMP protocol • error reporting • router “signaling” link layer physical layer

  36. IP protocol version number 32 bits total datagram length (bytes) header length (bytes) type of service head. len ver length for fragmentation/ reassembly fragment offset “type” of data flgs 16-bit identifier max number remaining hops (decremented at each router) upper layer time to live header checksum 32 bit source IP address 32 bit destination IP address upper layer protocol to deliver payload to e.g. timestamp, record route taken, specify list of routers to visit. options (if any) data (variable length, typically a TCP or UDP segment) IP datagram format how much overhead? • 20 bytes of IP • 20 bytes of TCP • = 40 bytes + app layer overhead

  37. network links have MTU (max.transfer size) - largest possible link-level frame different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments … … reassembly IP fragmentation, reassembly fragmentation: in: one large datagram out: 3 smaller datagrams

  38. length =1040 length =4000 length =1500 length =1500 ID =x ID =x ID =x ID =x fragflag =0 fragflag =1 fragflag =0 fragflag =1 offset =0 offset =370 offset =0 offset =185 one large datagram becomes several smaller datagrams IP fragmentation, reassembly example: • 4000 byte datagram • MTU = 1500 bytes 1480 bytes in data field offset = 1480/8

  39. IP fragmentation, reassembly Path MTU discovery MSS clamping Router adds/alters TCP maximum segment size (MSS) option to all flows Breaks layering guarantees • Send large packet with Don’t Fragment (DF) flag set • If arrives at router with smaller MTU, packet dropped • ICMP “packet too big” sent back, with MTU • Fails if ICMP packets are blocked

  40. Chapter 4: Outline Overview of Network Layer What’s Inside a Router? IP : Internet Protocol Routing Protocols Intra-AS Routing in the internet: OSPF Routing among ISPs: BGP SDN: Software Defined Networks ICMP: The Internet Control Message Protocol Network Management and SNMP • Data Format and Fragmentation • IPv4 Addressing • Network Address Translation • IPv6

  41. IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link Router’s typically have multiple interfaces host typically has one or two interfaces (e.g., wired Ethernet, wireless 802.11) IP addresses associated with each interface 223.1.1.2 223.1.3.27 IP addressing: introduction 223.1.1.1 223.1.2.1 223.1.1.4 223.1.2.9 223.1.1.3 223.1.2.2 223.1.3.2 223.1.3.1 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

  42. Q: how are interfaces actually connected? A: we’ll learn about that in next chapters. 223.1.1.2 223.1.3.27 IP addressing: introduction 223.1.1.1 223.1.2.1 223.1.1.4 223.1.2.9 223.1.1.3 223.1.2.2 A: wired Ethernet interfaces connected by Ethernet switches 223.1.3.2 223.1.3.1 For now: don’t need to worry about how one interface is connected to another (with no intervening router) A: wireless WiFi interfaces connected by WiFi base station

  43. IP address: subnet part - high order bits host part - low order bits What’s a subnet ? device interfaces with same subnet part of IP address can physically reach each other without intervening router subnet Subnets 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 network consisting of 3 subnets

  44. recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet 223.1.1.0/24 223.1.2.0/24 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 223.1.3.0/24 subnet Subnets subnet mask: /24

  45. how many? Subnets 223.1.1.2 223.1.1.1 223.1.1.4 223.1.1.3 223.1.7.0 223.1.9.2 223.1.9.1 223.1.7.1 223.1.8.1 223.1.8.0 223.1.2.6 223.1.3.27 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2

  46. IP addressing: CIDR CIDR:Classless InterDomainRouting • subnet portion of address of arbitrary length • address format: a.b.c.d/x, where x is # bits in subnet portion of address host part subnet part 11001000 00010111 00010000 00000000 200.23.16.0/23 200.23.16.0–200.23.17.255

  47. IP addresses: how to get one? Q: How does a host get IP address? • hard-coded by system admin in a file • Windows: control-panel->network->configuration->tcp/ip->properties • UNIX: /etc/… • DHCP:Dynamic Host Configuration Protocol: dynamically get address from a server • “plug-and-play”

  48. DHCP: Dynamic Host Configuration Protocol goal: allow host to dynamically obtain its IP address from network server when it joins network • can renew its lease on address in use • allows reuse of addresses (only hold address while connected/“on”) • support for mobile users who want to join network (more shortly) DHCP overview: • host broadcasts “DHCP discover”msg [optional] • DHCP server responds with “DHCP offer”msg [optional] • host requests IP address: “DHCP request”msg • DHCP server sends address: “DHCP ack”msg

  49. DHCP client-server scenario DHCP server 223.1.1.0/24 223.1.2.1 223.1.1.1 223.1.1.2 arriving DHCP client needs address in this network 223.1.1.4 223.1.2.9 223.1.2.2 223.1.3.27 223.1.1.3 223.1.2.0/24 223.1.3.2 223.1.3.1 223.1.3.0/24

  50. DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP client-server scenario DHCP server: 223.1.2.5 arriving client DHCP offer Broadcast: is there a DHCP server out there? src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 lifetime: 3600 secs Broadcast: I’m a DHCP server! Here’s an IP address you can use DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs Broadcast: OK. I’ll take that IP address! DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs Broadcast: OK. You’ve got that IP address!

More Related