cs 356 computer network architectures lecture 14
play

CS 356: Computer Network Architectures Lecture 14: Switching - PowerPoint PPT Presentation

CS 356: Computer Network Architectures Lecture 14: Switching hardware, IP auxiliary functions, and midterm review [PD] chapter 3.4.1, 3.2.7 Xiaowei Yang xwy@cs.duke.edu Switching hardware Software switch Packets cross the bus twice


  1. CS 356: Computer Network Architectures Lecture 14: Switching hardware, IP auxiliary functions, and midterm review [PD] chapter 3.4.1, 3.2.7 Xiaowei Yang xwy@cs.duke.edu

  2. Switching hardware

  3. Software switch • Packets cross the bus twice – Half of the memory bus speed • 133Mhz, 64-bit wide I/O bus à 4Gpbs • Short packets reduce throughput – 1Mpps, 64 bytes packet – Throughput = 512 Mbps – Shared by 10 ports: 51.2Mbps

  4. Hardware switches • Ports communicate with the outside world – Eg, maintains VC tables • Switching fabric is simple and fast

  5. Performance bottlenecks • Input port – Line speed: 2.48 Gbps • 2.48x10 9 /(64x8) = 4.83 Mpps • Buffering – Head of line blocking – May limit throughput to only 59% – Use output buffers or sophisticated buffer management algorithms to improve performance

  6. Fabrics • Shared bus – The workstation switch • Shared memory – Input ports read packets to shared memory – Output ports read them out to links

  7. Fabrics • Cross bar – Each output ports need to accept from all input ports

  8. Fabrics • Self routing – a self-routing header added by the input port – Most scalable – Often built from 2x2 switching units

  9. An example of self-routing • 3-bit numbers are self-routing headers • Multiple 2x2 switching elements – 0: upper output; 1: lower output

  10. Midterm Policy • Up to March 1’s lecture • Closed book/notes • One page of your own note (letter-size) • No Internet • Calculator is allowed • 75 mins

  11. What’s in the test • Mastery of networking knowledge • Application of networking knowledge

  12. Network architectures • Layering • Encapsulation / decapsulation • Multiplexing vs demultiplexing • Connectionless vs connection oriented • Internet architecture – Statistical multiplexing – Protocols – Link, network, transport, and application layers – Functions of layers – Best effort service

  13. Physical Layer • Transmission delay • Propagation delay • Bandwidth • Delay / bandwidth product • Throughput • How to keep a “pipe” full?

  14. Link layer • Coding/encoding – NRZ, NRZI, Manchester, 4B/5B • Framing – Byte-oriented: sentinel, byte-counting – Bit-oriented: bit-stuffing – Clock-based framing • Error detection – Parity, checksum, CRC • Reliable transmission – Forward Error Correcion – Stop and wait – Sliding window • Sequence number space vs window size – Concurrent logical channels

  15. Link layer (cont.) • Multi-access links – Ethernet • Multi-access carrier sense with collision detection • How to detect collision • How to avoid collision • Maximum segment length • Minimum packet size – WIFI • How to avoid collision (MACA) – Bluetooth – Cellular • Switching, bridges, ATM

  16. Link layer (cont.) • Switching technologies – Datagram – Virtual circuits • How to set up • Virtual circuit identifier • Switching table • ATM switches – Source routing • Learning bridges – Address learning – Spanning tree algorithm

  17. Internet Protocol • Classful vs classless IP addressing – CIDR • IP forwarding – How to determine a host is on the same subnet – Longest prefix lookup – Fragmentation and assembly – Path MTU discovery • ARP – What’s used for? • ICMP – What’s used for?

  18. Dynamic routing protocols • Routing information protocol (RIP) – Distance vector algorithm – Count to infinity – How to alleviate to count to infinity • Split horizon • Reverse poisoning • Path vector • Open shortest path first – Dijkstra – Reliable flooding – Forward search algorithm for efficiency

  19. Dynamic Host Configuration Protocol (DHCP)

  20. Dynamic Assignment of IP addresses • Dynamic assignment of IP addresses is desirable – IP addresses are assigned on-demand – Avoid manual IP configuration • Inconvenient, error prone • ifconfig – Support mobile devices

  21. DHCP • Dynamic Host Configuration Protocol (DHCP) – Designed in 1993 – Supports temporary allocation (“leases”) of IP addresses – DHCP client can acquire all IP configuration parameters • Default router, network mask, DNS resolver • Sent as UDP packets • A client-server protocol – Server port: 67 – Client port: 68 • Most client-server protocols do not have unique client ports

  22. DHCP Message Format Hardware Address OpCode Hardware Type Hop Count Length Unused (in BOOTP) Number of Seconds Flags (in DHCP) Transaction ID Client IP address Your IP address Server IP address Gateway IP address Client hardware address (16 bytes) Server host name (64 bytes) Boot file name (128 bytes) Options (There are >100 different options)

  23. DHCP • OpCode : 1 (Request), 2(Reply) Note: DHCP message type is sent in an option • Hardware Type : 1 (for Ethernet) • Hardware address length : 6 (for Ethernet) • Hop count : set to 0 by client • Transaction ID : Integer (used to match reply to response) • Seconds: number of seconds since the client started to boot • Client IP address, Your IP address, server IP address, Gateway IP address, client hardware address, server host name, boot file name: client fills in the information that it has, leaves rest blank

  24. DHCP Message Type • Message type is Value Message Type sent as an 1 DHCPDISCOVER option. 2 DHCPOFFER 3 DHCPREQUEST 4 DHCPDECLINE 5 DHCPACK 6 DHCPNAK 7 DHCPRELEASE 8 DHCPINFORM

  25. DHCP operations Src: 0.0.0.0, 68 Dest: 255.255.255.255, 67 DHCPDISCOVERY Yiaddr: 0.0.0.0 Transaction ID: 654 Src:128.195.31.1, 67 Dest: 255.255.255.255, 68 DHCPOFFER Yiaddr: 128.195.31.147 Transaction ID: 654 Server ID: 128.195.31.1 Lifetime: 3600 secs

  26. DHCP operations Src: 0.0.0.0, 68 Dest: 255.255.255.255, 67 DHCPREQUEST Yiaddr: 128.195.31.147 Transaction ID: 655 server ID: 128.195.31.1 Lifetime: 3600 secs Src:128.195.31.1, 67 Dest: 255.255.255.255, 68 DHCPACK Yiaddr: 128.195.31.147 Transaction ID: 655 Server ID: 128.195.31.1 Lifetime: 3600 secs

  27. More on DHCP operations • A client may receive DCHP offers from multiple servers • The DHCPREQUEST message accepts offers from one server • Other servers who receive this message considers it as a decline • A client can use its address after receiving DHCPACK • DHCP replies can be unicast, depending on implementation – Client hardware address as MAC destination – Yiaddr as IP destination

  28. Scalability • How many DHCP servers do we need? – Routers do not forward broadcast IP addresses – One per subnetwork! Too many • Solution: relay agent – Configured with the DHCP server’s IP address – One relay agent per subnetwork – Unicast to the DHCP server

  29. DHCP relay agent Src: 0.0.0.0., 68 Src: 0.0.0.0., 68 Dest: 128.195.31.10, 67 Dest: 255.255.255.255, 67 Giaddr: 128.195.41.1 Giaddr: 0 DHCPDISCOVER DHCPDISCOVER 128.195.31.10 128.195.41.1 128.195.31.1 Src: 128.195.41.1, 67 Src: 128.195.31.10, 67 Dest: 255.255.255.255, 68 Dest: 128.195.41.1, 67 Giaddr: 128.195.41.1 Giaddr: 128.195.41.1 DHCPOFFER DHCPOFFER …… ……

  30. Well-known client port • Why does DHCP choose well-known client port? • A: For relay purpose. Otherwise, the relay agent has to remember the port of the original DHCP discovery message.

  31. History of DHCP • Three Protocols: – RARP (until 1985, no longer used) – BOOTP (1985-1993) – DHCP (since 1993) • Only DHCP is widely used today

  32. Network Address Translation

  33. Network address translation • A fix to the IP address depletion problem. – NAT is a router function where IP addresses (and possibly port numbers) of IP datagrams are replaced at the boundary of a private network • We’ll discuss another solution: IPv6 http://www.potaroo.net/tools/ipv4/index.html

  34. Basic operation of NAT • Private • Internet • network •Source •= 10.0.1.2 •Source •= 128.143.71.21 •Destination •= 213.168.112.3 •Destination •= 213.168.112.3 • NAT •private address: 10.0.1.2 •public address: • 213.168.112.3 • device •public address: 128.143.71.21 •H1 •H5 •Source •= 213.168.112.3 •Source •= 213.168.112.3 •Destination •= 10.0.1.2 •Destination •= 128.143.71.21 •Private •Public •Address •Address •10.0.1.2 •128.143.71.21 • NAT device has address translation table

  35. Private Network • Private IP network is an IP network that is not directly connected to the Internet • IP addresses in a private network can be assigned arbitrarily. – Not registered and not guaranteed to be globally unique – Public IP address are assigned via Internet registries • Generally, private networks use addresses from the following experimental address ranges ( non-routable addresses ): – 10.0.0.0 – 10.255.255.255 – 172.16.0.0 – 172.31.255.255 – 192.168.0.0 – 192.168.255.255

  36. Main uses of NAT • Pooling of IP addresses • Supporting migration between network service providers • IP masquerading • Load balancing of servers

  37. Pooling of IP addresses • Scenario: Corporate network has many hosts but only a small number of public IP addresses • NAT solution: – Corporate network is managed with a private address space – NAT device manages a pool of public IP addresses

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend