1 / 215

Reviewing the Course

Reviewing the Course. Overview, TCP/IP Stack, ARP, LAN Switching, IP, Subnetting, UDP, TCP, NAT. Networking Concepts . Protocol Architecture (Stack or Suite) Protocol Layers Encapsulation Network Abstractions. TCP/IP Stack and OSI Reference Model.

bchen
Télécharger la présentation

Reviewing the Course

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. Reviewing the Course Overview, TCP/IP Stack, ARP, LAN Switching, IP, Subnetting, UDP, TCP, NAT

  2. Networking Concepts • Protocol Architecture (Stack or Suite) • Protocol Layers • Encapsulation • Network Abstractions

  3. TCP/IP Stack and OSI Reference Model The TCP/IP protocol stack does not define the lower layers of a complete protocol stack

  4. TCP/IP Protocol Stack • IP is the waist of the hourglass of the Internet protocol architecture • Multiple higher-layer protocols • Multiple lower-layer protocols • Only one protocol at the network layer.

  5. Assignment of Protocols to Layers

  6. Sending a packet from Argon to Neon

  7. DNS: What is the IP address of “neon.tcpip-lab.edu”? DNS: The IP address of “neon.tcpip-lab.edu” is 128.143.71.21 ARP: What is the MAC address of 128.143.137.1? ARP: What is the MAC address of 128.143.71.21? ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28 ARP: The MAC address of 128.143.137.1 is 00:e0:f9:23:a8:20 Sending a packet from Argon to Neon 128.143.71.21 is not on my local network. Therefore, I need to send the packet to my default gateway with address 128.143.137.1 128.143.71.21 is on my local network. Therefore, I can send the packet directly. frame frame

  8. Communications Architecture • The complexity of the communication task is reduced by using multiple protocol layers: • Each protocol is implemented independently • Each protocol is responsible for a specific subtask • Protocols are grouped in a hierarchy • A structured set of protocols is called a communicationsarchitectureorprotocol suite or stack

  9. The TCP/IP protocol suite is the protocol architecture of the Internet The TCP/IP suite has four layers: Application, Transport, Network, and Data Link Layer End systems (hosts) implement all four layers. Gateways (Routers) only have the bottom two layers. TCP/IP Protocol Suite

  10. Functions of the Layers • Data Link Layer: • Service: Reliable transfer of frames over a link Media Access Control on a LAN • Functions: Framing, media access control, error checking • Network Layer: • Service: Move packets from source host to destination host • Functions: Routing, addressing • Transport Layer: • Service: Delivery of data between hosts • Functions: Connection establishment/termination, error control, flow control • Application Layer: • Service: Application specific (delivery of email, retrieval of HTML documents, reliable transfer of file) • Functions: Application specific

  11. Layered Communications • An entity of a particular layer can only communicate with: 1. a peer layer entityusing a common protocol (Peer Protocol) 2. adjacent layersto provide services and to receive services

  12. Layers in the Example

  13. Send IP data-gram to 128.143.71.21 Frame is an IP datagram Frame is an IP datagram IP datagram is a TCP segment for port 80 Send HTTP Request to neon Establish a connection to 128.143.71.21 at port 80 Open TCP connection to 128.143.71.21 port 80 Send IP datagram to 128.143.71.21 Send a datagram (which contains a connection request) to 128.143.71.21 Send the datagram to 128.143.137.1 Send the datagram to 128.143.7.21 Send Ethernet frame to 00:e0:f9:23:a8:20 Send Ethernet frame to 00:20:af:03:98:28 Layers in the Example

  14. Layers and Services • Service provided by TCP to HTTP: • reliable transmission of data over a logical connection • Service provided by IP to TCP: • unreliable transmission of IP datagrams across an IP network • Service provided by Ethernet to IP: • transmission of a frame across an Ethernet segment • Other services: • DNS: translation between domain names and IP addresses • ARP: Translation between IP addresses and MAC addresses

  15. Encapsulation and Demultiplexing • As data is moving down the protocol stack, each protocol is adding layer-specific control information

  16. Different Views of Networking • Different Layers of the protocol stack have a different view of the network. This is HTTP’s and TCP’s view of the network.

  17. Network View of IP Protocol

  18. Network View of Ethernet • Ethernet’s view of the network

  19. Address Resolution Protocol(ARP)

  20. Overview

  21. ARP and RARP • Note: • The Internet is based on IP addresses • Data link protocols (Ethernet, FDDI, ATM) may have different (MAC) addresses • The ARP and RARP protocols perform the translation between IP addresses and MAC layer addresses • We will discuss ARP for broadcast LANs, particularly Ethernet LANs

  22. Processing of IP packets by network drivers

  23. Sending a packet from Argon to Neon

  24. Address Translation with ARP ARP Request: Argon broadcasts an ARP request to all stations on the network: “What is the hardware address of Router137?”

  25. Address Translation with ARP ARP Reply: Router 137 responds with an ARP Reply which contains the hardware address

  26. ARP Cache • Since sending an ARP request/reply for each IP datagram is inefficient, hosts maintain a cache (ARP Cache) of current entries. The entries expire after 20 minutes. • Contents of the ARP Cache: (128.143.71.37) at 00:10:4B:C5:D1:15 [ether] on eth0 (128.143.71.36) at 00:B0:D0:E1:17:D5 [ether] on eth0 (128.143.71.35) at 00:B0:D0:DE:70:E6 [ether] on eth0 (128.143.136.90) at 00:05:3C:06:27:35 [ether] on eth1 (128.143.71.34) at 00:B0:D0:E1:17:DB [ether] on eth0 (128.143.71.33) at 00:B0:D0:E1:17:DF [ether] on eth0

  27. Things to know about ARP • What happens if an ARP Request is made for a non-existing host? Several ARP requests are made with increasing time intervals between requests. Eventually, ARP gives up. • What if a host sends an ARP request for its own IP address? The other machines respond (gratuitous ARP) as if it was a normal ARP request. This is useful for detecting if an IP address has already been assigned.

  28. Proxy ARP • Proxy ARP: Host or router responds to ARP Request that arrives from one of its connected networks for a host that is on another of its connected networks.

  29. LAN Switching and Bridges

  30. Outline • Interconnection Devices • Bridges/LAN Switches vs. Routers • Bridges • Learning Bridges • Transparent bridges

  31. Introduction • There are many different devices for interconnecting networks

  32. Ethernet Hub • Used to connect hosts to Ethernet LAN and to connect multiple Ethernet LANs • Collisions are propagated

  33. Bridges/LAN switches • A bridgeor LAN switch is a device that interconnects two or more Local Area Networks (LANs) and forwards packets between these networks. • Bridges/LAN switches operate at the Data Link Layer (Layer 2)

  34. Terminology: Bridge, LAN switch, Ethernet switch There are different terms to refer to a data-link layer interconnection device: • The term bridge was coined in the early 1980s. • Today, the terms LAN switch or (in the context of Ethernet) Ethernet switch are used. Convention: • Since many of the concepts, configuration commands, and protocols for LAN switches were developed in the 1980s, and commonly use the old term `bridge’, we will, with few exceptions, refer to LAN switches as bridges.

  35. Ethernet Hubs vs. Ethernet Switches • An Ethernet switch is a packet switch for Ethernet frames • Buffering of frames prevents collisions. • Each port is isolated and builds its own collision domain • An Ethernet Hub does not perform buffering: • Collisions occur if two frames arrive at the same time. Hub Switch

  36. Routers • Routers operate at the Network Layer (Layer 3) • Interconnect IP networks

  37. Gateways • The term “Gateway” is used with different meanings in different contexts • “Gateway” is a generic term for routers (Level 3) • “Gateway” is also used for a device that interconnects different Layer 3 networks and which performs translation of protocols (“Multi-protocol router”)

  38. Routers Each host’s IP address must be configured If network is reconfigured, IP addresses may need to be reassigned Routing done via RIP or OSPF Each router manipulates packet header (e.g., reduces TTL field) Bridges/LAN switches MAC addresses of hosts are hardwired No network configuration needed Routing done by learning bridge algorithm spanning tree algorithm Bridges do not manipulate frames Interconnecting networks: Bridges versus Routers

  39. Bridges • Overall design goal: Complete transparency • “Plug-and-play” • Self-configuring without hardware or software changes • Bridges should not impact operation of existing LANs • Three parts to understanding bridges: • (1) Forwarding of Frames • (2) Learning of Addresses • (3) Spanning Tree Algorithm

  40. What do bridges do if some LANs are reachable only in multiple hops ? What do bridges do if the path between two LANs is not unique ? Need for a forwarding between networks

  41. Transparent Bridges • Three principal approaches can be found: • Fixed Routing • Source Routing • Spanning Tree Routing (IEEE 802.1d) • We only discuss the last one in detail. • Bridges that execute the spanning tree algorithm are called transparent bridges

  42. (1) Frame Forwarding • Each bridge maintains a MAC forwarding table • Forwarding table plays the same role as the routing table of an IP router • Entries have the form ( MAC address, port, age), where MAC address:host name or group address port:port number of bridge age:aging time of entry (in seconds) with interpretation: a machine with MAC address lies in direction of the port number from the bridge. The entry is age time units old. MAC forwarding table

  43. (1) Frame Forwarding • Assume a MAC frame arrives on port x. Is MAC address of destination in forwardingtable for ports A, B, or C ? Notfound ? Found? Forward the frame on theappropriate port Flood the frame, i.e., send the frame on all ports except port x.

  44. Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=y, Dest=x Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=x, Dest=y Src=y, Dest=x (2) Address Learning (Learning Bridges) • Routing tables entries are set automatically with a simple heuristic: The source field of a frame that arrives on a port tells which hosts are reachable from this port. Port 1 Port 4 x is at Port 3 y is at Port 4 Port 2 Port 5 Port 3 Port 6

  45. Src=y, Dest=x Src=y, Dest=x (2) Address Learning (Learning Bridges) Learning Algorithm: • For each frame received, the source stores the source field in the forwarding database together with the port where the frame was received. • All entries are deleted after some time (default is 15 seconds). Port 1 Port 4 x is at Port 3 y is at Port 4 Port 2 Port 5 Port 3 Port 6

  46. Flooding Can Lead to Loops • Switches sometimes need to broadcast frames • Upon receiving a frame with an unfamiliar destination • Upon receiving a frame sent to the broadcast address • Broadcasting is implemented by flooding • Transmitting frame out every interface • … except the one where the frame arrived • Flooding can lead to forwarding loops • E.g., if the network contains a cycle of switches • Either accidentally, or by design for higher reliability

  47. Solution: Spanning Trees • Ensure the topology has no loops • Avoid using some of the links when flooding • … to avoid forming a loop • Spanning tree • Sub-graph that covers all vertices but contains no cycles

  48. Solution: Spanning Trees • Ensure the topology has no loops • Avoid using some of the links when flooding • … to avoid forming a loop • Spanning tree • Sub-graph that covers all vertices but contains no cycles • Links not in the spanning tree do not forward frames

  49. Constructing a Spanning Tree • Need a distributed algorithm • Switches cooperate to build the spanning tree • … and adapt automatically when failures occur • Key ingredients of the algorithm • Switches need to elect a “root” • The switch with the smallest identifier • For each of its interfaces, a switch identifies if the interface is on the shortest path from the root • And it excludes an interface from the tree if not

  50. root One hop Three hops Constructing a Spanning Tree (cont. I)

More Related