* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Lesson 07 Bridges, Hub, Switches and Routers
Survey
Document related concepts
Internet protocol suite wikipedia , lookup
Distributed firewall wikipedia , lookup
Airborne Networking wikipedia , lookup
Computer network wikipedia , lookup
Deep packet inspection wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Parallel port wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Network tap wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Nonblocking minimal spanning switch wikipedia , lookup
Virtual LAN wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Transcript
Lesson 07 Bridges, Hub, Switches and Routers [email protected] Until now The Internet is a graph ‒ Leaves are hosts (laptops, servers, fridges…) ↪ terminate traffic on the Internet ‒ Nodes are routers ↪ get traffic across the Internet ‒ Edges are … but what are edges? Edges ‒ ‒ ‒ ‒ ‒ Element in graph Local connectivity Ethernet A “layer 2” thingie Abstraction of a cable Functional definition ‒ No IP forwarding required in order for any station to reach any other station on same link ‒ A station can, in a single transmission, reach all other stations on the same link ‒ All broadcasts on the same link will reach the same set of stations Application Transport Network Link Stuff, more or less faking the assumptions and expectations of the IP layer… Network segment Starting point… or line… ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ Physical Entity Commonly assumed: a cable Constrained by physic Signal attenuation: maximum length 10base5 = 500 m 10base2 = 185 m (200 yd) 1000baseT = 100 m Propagation delay Beyond the limits: Repeaters Two cables can be joined by a repeater ‒ Connect (in general) 2 “cables” ‒ Each up-to max length ‒ Regenerate physical signal This allows to extend the network segment… beyond any limit? Multiple Access Edges are not edges… What is required from a network segment: ‒ Communication medium shared between all stations “on the segment” ‒ “Collision domain” ‒ Contention for exclusive access ‒ Medium access control (…MAC) ‒ Mutual exclusion with no “external support” ‒ More stations, more contentions, less throughput and longer delays Medium sharing using the medium ‒ “Listen while transmit” ‒ If transmission, other than own, received: ↪ COLLISION, back off, retry later ‒ Otherwise, transmission succeeded Yet… Is it true? Transmission delay Otherwise… When is the transmission considered successful? ‒ ‒ ‒ ‒ One want a way to be sure no collision occurred Add a limit to the longest possible path between two hosts (232 bits) Compute the maximum round-time trip (464 bits) Ensure a minimum packet length so that a packet is longer than the round-time trip plus some margin to have a noticeable collision (512 bits = 64 bytes) ‒ Under these assumptions, collision only occur while transmitting Time Collision Space a b c Ethernet Going wireless Wireless networks adds a new challenge ↪ Host c may not hear host a In managed mode, the access point acts as a mediator since it hears every-one ‒ Hosts request medium access with a RTS (request to send) ‒ Access point answers CTS (clear to send) is the medium is free ‒ If the medium is busy, back-off and retry Physical layer Cables and repeaters… Link ‒ Can transmit bits from hosts to others ‒ May detect collisions ‒ Has physical contraints Application Transport Network ? Physical Can we do better? Bridges And bridges were invented… Link ‒ Bridges can separate collision domains ↪ join two network segments ‒ Forward traffic between segments ‒ Smarter than repeater ‒ Filter on traffic destination ‒ Messages are: ‒ Read for information ‒ Stored in a queue (of bounded size) Application Transport Network MAC Physical Bridge filtering A bridge connects some network segments ‒ Forwards a message only to the segment the target host belongs to ‒ Learns where hosts are from the messages they send ‒ Records hosts location in the bridging table ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ Algorithm: When the bridge receives: a message m for host t received on port p ↪ physical port (contrary to TCP/UDP port) originated from host s If the bridge does not know about t: forward record (s,p) in the bridging table Else if (t,p’) is in the bridging table If p=p’, do nothing Else forward to port p’ record (s,p) in the bridging table Do not record broadcast addresses Link One segment or some collision domains joined by bridges make a link: “A set of network interfaces which can communicate directly with each other, without relaying by an intermediate router” Quote from previous lesson Beyond the limits Cables can be limitedly connected into some collision domain Collision domains can be connected into some link But what is the limit? Why not make the whole Internet of segments? ‒ Each bridge records, explicitly, all destinations on the link ‒ Limit is, therefore, memory in the “smallest bridge” bridges and Logical and physical addresses Hosts on the Internet are identified by their IP addresses Hosts on a link are identified by their MAC addresses ‒ MAC address factory set in network adapter and bridges ↪ (at least for Ethernet) 48 bits ‒ first 24 make the vendor ID ‒ next 24 are uniquely assigned by the vendor ‒ Common prefix not geographically aggregated ↪ not suitable for routing ‒ Way to get MAC address from IP address required ARP What happens when a host want to send or forward an IP packet: ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ ‒ Routing table tells What is the IP address a of next target for the packet (next-hop or addressee) On which link this host is located (and directly reachable) Broadcast “who-as a” on the link The host whose IP is a replies: “a is-at m” Encapsulated the IP packet in a Ethernet frame: Source MAC address: of the sending network interface Destination MAC address: m IP header: Source IP: unchanged, creator of the IP packet Destination IP: unchanged, addressee of the IP packet Transmit MAC addresses are stored on the host in the ARP table Often, the target of an ARP request checks the MAC address of the requester by another ARP request Let us get real What… This was not real? ‒ A repeater is implemented in an Ethernet hub ↪ but who uses that anymore? ‒ A bridge is implemented in a switch ‒ Yet a bridge do not know anything about IP and do not care about IP headers ‒ Often switches are dealing with IP ‒ IP address for configuration (argh… so confusing) ‒ Some switches are IP aware (e.g. limit a port to a given IP address… reminds you something?) ‒ Some Cisco switches are routers is disguise (see the switches they lent to BR) Nowadays Today’s networks only has switches and no more hubs ‒ Equipment is connected full-duplex one-another ↪ one twisted pair for each direction ‒ No more collision… in wired connections ‒ CSMA/CD still used but only CSMA/CA does some work Wired packets can still be lost in hosts’ and switches’ queues Switches and loops Suppose 1 sends a packet to 2 ‒ ‒ ‒ ‒ B forward to A and C A and C learns 1 is behind port “to B” A and C forward to A and C … Worse if 1 broadcasts… STP STP = Spanning Tree Protocol ↪ obsoleted by RSTP = Rapid STP Distributed algorithm to compute a spanning tree of the “graph” made by switches (nodes) and collision domains (edges) Each switch sends BPDU on all their ports: ‒ ‒ ‒ ‒ Switch ID = smallest MAC address of their ports Port ID = MAC address of the port Root ID = lowest known switch ID Cost = distance to the Root For the BPDU received from a port: ‒ You are the best if you are the Root or the shortest path to the Root (tie broken by Switch ID then by Port ID) ‒ As the Root is the smallest known switch, those with wrong Root are disqualified As all members of a segment receive the same BPDU, all compute the same winner: ‒ It becomes the designated port for this segment (we could say designated switch… unless there are two ports on the same switch on the same segment) Each switch updates their status depending of the previous computation done for each of their ports: ‒ Root updated (the smallest Root among those of the designated port of each segment) ‒ Cost updated (one plus the cost of the designated port corresponding to the Root or 0 for the Root itself) ‒ Smallest port connected to this segment becomes the root port After some time of stability, any port which is neither root nor designated is blocked (not forwarding yet listening for incoming BPDU) Never say that a switch routes An analogous role but different protocols and schemes: ‒ Routing table vs. bridging table ‒ ‒ ‒ ‒ ‒ IP address vs. MAC address Routing protocol vs. STP and learning algorithm Scalable vs. not so scalable link can indeed be very large (geographically) but only contains a small number of hosts Switch does not manipulate frames while routers changes the TTL and a few other minor things