University of Delaware CPEG 4191 Plan for next month or so Networking z Networking at the link layer (LAN networking) z Tanenbaum p z Networking at the Network layer z Intro Stallings pp z Routing Tanenbaum pp z Global Internet Tanenbaum pp z QoS Tanenbaum pp 397 – 418
University of Delaware CPEG 4192 Today zNetworking at the link layer
University of Delaware CPEG 4193 Building Bigger LANs from Smaller LANs LANs are interconnected with Repeaters Hubs Switches Bridges LANs connect to much larger networks through routers. LANs are subdivided using VLAN increasing intelligence These should all be transparent.
University of Delaware CPEG 4194 Interconnection Schemes zHubs or repeaters: physical-level interconnection. yDevices repeat/amplify signal. yNo buffering/routing capability. zBridges: link-layer interconnection. yStore-and-forward frames to destination LAN. yNeed to speak protocols of LANs it interconnect. zRouters : network-layer interconnection. yInterconnect different types of networks.
University of Delaware CPEG 4195 Repeater These connect two wires and make them seems like a longer wire. They capture the signal on the input, amplify and transmit on the output. They perform no local functions. With repeaters, 10Mbps Ethernet can cover 2500m.
University of Delaware CPEG 4196 Hub Hubs are like multi-port repeaters. Frames that simultaneously arrive at a hub collide even through they don’t arrive on the same wire. Hubs do not amplify. Hubs perform no logical function.
University of Delaware CPEG 4197 Switch If there are many hosts on a single LAN, the network might saturate. A switch can alleviate this problem. When a frame arrives at the switch, it is placed in a buffer. The frame destination address of the frame is analyzed and the frame is placed on the port that leads to the correct destination. (Store and forward). Typically, only one host is attached to one switch port. So collisions never occur. However, the switch has an internal LAN that must support collision avoidance. Very good for security!
University of Delaware CPEG 4198 Bridges Bridges connect different LANS at the link layer (routers do a similar thing at the network layer). Bridges are like switches, but with a bit more intelligence. Interconnect LANs of the same type, or LANs that speak different MAC protocols. So they may have to convert header. But this is limited. Bridge LAN A LAN B Extended LAN
University of Delaware CPEG 4199 Bridges Why bridges: A bridge breaks a large LAN into smaller, more manageable ones. Extend the size (e.g., a 10Mbps Ethernet can’t go more than 2500m.) Connect LANS of different types. If one breaks, the others still function. If one is hacked into, the damage is limited. Traffic load can be managed with hierarchical networks. High speed LAN (between buildings) lower speed LAN (in a building) bridges lower speed LAN (in a building) lower speed LAN (in a building)
University of Delaware CPEG Bridge Protocol Architecture zIEEE 802.1D specification for MAC bridges. PHY MAC LLC Station LAN Bridge Station MAC PHY MAC LLC PHY
University of Delaware CPEG Bridges 4 zNo additional encapsulation. zOperate at the data link layer. yOnly examine DLL header information. yDo not look at the network layer header. zBut they may have to do header conversion if interconnecting different LANs (e.g., to frame). zMay interconnect more than 2 LANs. zLANs may be interconnected by more than 1 bridge.
University of Delaware CPEG How bridges work Bridges accept every frame on the LAN to which it is attached. It stores the frame, decides where it should go, and then forwards it. This is called store and forward (compare to a hub or repeaters). The difficult task is to decide if and where the frame be forwarded.
University of Delaware CPEG Flooding Flooding: The bridge transmits every frame it sees onto every link, but the one it came in on. Mostly always works. Does not need any user intervention and simple to program. Not efficient, we lose the capacity increase associated with hierarchical networks. All broadcast frame must be flooded.
University of Delaware CPEG Routing with Bridges zBridge decides to relay frame based on destination MAC address. zIf only 2 LANs, decision is simple. zIf more complex topologies, routing is needed, i.e., frame may traverse more than 1 bridge.
University of Delaware CPEG Forwarding Tables The bridge has a table that maps destinations to out-going links. Bridge LAN A LAN B Extended LAN The bridge accepts all packets from LAN A. The bridge checks if the destination of the frame is on LAN A or B. If it is on LAN B, the frame is transmitted onto LAN B. Otherwise, it drops the frame. Traffic from B to A is handled similarly.
University of Delaware CPEG Routing zDetermining where to send frame so that it reaches the destination. zRouting by learning: adaptive or backward learning.
University of Delaware CPEG Routing with Bridges z3 algorithms: yFixed routing. ySpanning tree. ySource routing.
University of Delaware CPEG Fixed Routing zFixed route for every source-destination pair of LANs. zDoes not automatically respond to changes in load/topology. zStatically configured routing matrix (pre- loaded into bridge). zIf alternate routes, pick “shortest” one. zR ij : first bridge on the route from i to j.
University of Delaware CPEG Fixed Routing: Example LAN A LAN BLAN C LAN D EF G Source LAN A B C D E F G A B Ex: E-> F: 107; 102; 105. C D E F G
University of Delaware CPEG Fixed Routing zEach bridge keeps column for each LAN it attaches. zTable “From X” derived from column “x”. zEvery entry that has the number of the bridge results in entry. 101 From A From B DestNext hop BB C E F G A C A D - E - F A G A D B DestNext hop
University of Delaware CPEG Fixed Routing zSimple and minimal processing. zToo limited for internets with dynamically changing topology.
University of Delaware CPEG Dynamic Routing Determine routing tables without any user intervention. Must learn the network (backward learning). Must adapt to changes in the network (tables expire and are relearned).
University of Delaware CPEG Address Learning 1 zProblem: determine where destinations are. zBridges operate in promiscuous mode, i.e., accept all frames. zBasic idea: look at source address of received frame to learn where that station is (which direction frame came from). zBuild routing table so that if frame comes from A on interface N, save [A, N].
University of Delaware CPEG Address Learning 2 zWhen bridges first start, all tables are empty. zSo they flood: every frame for unknown destination, is forwarded on all interfaces except the one it came from. zWith time, bridges learn where destinations are, and no longer need to flood for known destinations.
University of Delaware CPEG Backward Learning zBridges look at frame’s (MAC) source address to find which machine is accessible on which LAN. LAN 1 LAN 2 LAN 3 LAN 4 B1 B2 If B1 sees frame from C on LAN 2, RT entry (C, LAN2). Any frame to C on LAN1 will be forwarded. But, frame to C on LAN2 will not be forwarded. C A B
University of Delaware CPEG Address Learning 3 zRT entries have a time-to-live (TTL). zRT entries refreshed when frames from source already in the table arrive. zPeriodically, process running on bridge scans RT and purges stale entries, i.e., entries older than TTL. zForwarding to unknown destinations reverts to flooding.
University of Delaware CPEG Frame Forwarding zDepends on source and destination LANs. yIf destination LAN (where frame is going to) = source LAN (where frame is coming from), discard frame. yIf destination LAN != source LAN, forward frame. yIf destination LAN unknown, flood frame. zSpecial purpose hardware used to perform RT lookup and update in few microseconds.
University of Delaware CPEG Loops zAlternate routes: loops. zExample: yLAN A, bridge 101, yLAN B, bridge 104, yLAN E, bridge 107, yLAN A. LAN A LAN B E
University of Delaware CPEG Loop: Problems A B LAN 1 LAN 2 B1 B2 1. Station A sends frame to B; bridges B1 and B2 don’t know B. 2. B1 copies frame onto LAN1; B2 does the same. 3. B2 sees B1’s frame to unknown destination and copies it onto LAN B1 sees B2’s frame and does the same. 5. This can go on forever.
University of Delaware CPEG Loop Resolution zGoal: remove “extra” paths by removing “extra” bridges. zSpanning tree: yGiven graph G(V,E), there exists a tree that spans all nodes where there is only one path between any pair of nodes, i.e., NO loops. yLANs are represented by nodes and bridges by edges.
University of Delaware CPEG Spanning Tree Routing zAka transparent bridges. zBridge routing table is automatically maintained (set up and updated as topology changes). z3 mechanisms: yAddress learning. yFrame forwarding. yLoop resolution.
University of Delaware CPEG Definitions 1 zBridge ID: unique number (e.g., MAC address + integer) assigned to each bridge. zRoot: bridge with smallest ID. zCost: associated with each interface; specifies cost of transmitting frame through that interface. zRoot port: interface to minimum-cost path to root.
University of Delaware CPEG Definitions 2 zRoot path cost: cost of path to root bridge. zDesignated bridge: on any LAN, bridge closest to root, i.e., the one with minimum root path cost.
University of Delaware CPEG Spanning Tree Algorithm 1 z1. Determine root bridge. z2. Determine root port on all bridges. z3. Determine designated bridges.
University of Delaware CPEG Spanning Tree Algorithm 2 zInitially all bridges assume they are the root and broadcast message with its ID, root path cost. zEventually, lowest-ID bridge will be known to everyone and will become root. zRoot bridge periodically broadcasts it’s the root.
University of Delaware CPEG Spanning Tree Algorithm 3 zDirectly connected bridges update their cost to root and broadcast message on other LANs they are attached. zThis is propagated throughout network. zOn any (non-directly connected) LAN, bridge closest to root becomes designated bridge.
University of Delaware CPEG Spanning Tree: Example B3 LAN 2 LAN 1 LAN 3LAN 4 LAN 5 B5 B4 B1 B B3 LAN 2 LAN 1 LAN 3LAN 4 LAN 5 B5 B4 B1 B
University of Delaware CPEG Spanning Tree: Example B1 LAN 1 LAN 2 B2 LAN 3LAN 4 LAN 5 B4 B5 B3. Only designated bridges on each LAN allowed to forward frames.. Bridges continue exchanging info to react to topology changes.
University of Delaware CPEG Source Routing 1 zRoute determined a priori by sender. zRoute included in the frame header as sequence of LAN and bridge identifiers. zWhen bridge receives frame: yForward frame if bridge is on the route. yDiscard frame otherwise.
University of Delaware CPEG Source Routing 2 zRoute: sequence of bridges and LANs. LAN 3 B1 LAN 1 B3 B2 B4 LAN 2 LAN 4 X Z X->Z: L1,B1,L3,B3,L2. X->Z: L1,B2,L4,B4,L2
University of Delaware CPEG Source Routing 4 zNo need to maintain routing table. yFrame has all needed routing information. zHowever, stations need to find route to destination.
University of Delaware CPEG Route Discovery 1 zFinding all routes. yIf destination is unknown, source sends broadcast route discovery frame. yFrame reaches every LAN. yWhen reply comes back, intermediate bridges record their id. ySource gets complete route information. zProblem: frame explosion.
University of Delaware CPEG Route Discovery 2 zAlternative: single route request frame forwarded according to spanning tree. B3 X Z B1 B4 LAN 1 LAN 3 LAN 2 LAN 4 Z X Single-route broadcast
University of Delaware CPEG Route Discovery 3 B3 X Z B1 B4 LAN 1 LAN 3 LAN 2 LAN 4 B2 L2, B3, L3, B1, L1 L2, B4, L4, B2, L1
University of Delaware CPEG Route Selection zSelect minimum-cost route, e.g., minimum-hop route. zIf tie, choose the one that arrived first. zRoutes are cached with a TTL; when TTL expires, re-discover route.
University of Delaware CPEG Routers zOperate at the network layer, i.e., inspect the network-layer header. zUsually main router functionality implemented in software. zStore-and-forward. zAbility to interconnect heterogeneous networks: address translation, link speed and packet size mismatch.