280 likes | 430 Views
CMPE 150 Fall 2005 Lecture 20. Introduction to Computer Networks. Announcements. Homework 4 up by the end of the week. Lab this week: Layer 2. Ethernet. Holiday this Friday (11.11). Monday, 11.14 class meets in E2 room 506. Today. Finish DLL!. Last Class…. DLL Switching.
E N D
CMPE 150Fall 2005Lecture 20 Introduction to Computer Networks
Announcements • Homework 4 up by the end of the week. • Lab this week: • Layer 2. • Ethernet. • Holiday this Friday (11.11). • Monday, 11.14 class meets in E2 room 506.
Today • Finish DLL!
Last Class… • DLL Switching. • Interconnecting multiple LANs. • Bridges. • Transparent Bridges. • Backward Learning. • Spanning Tree.
Spanning Tree Algorithm (1) 1. Determine root bridge. 2. Determine root port on all bridges. 3. Determine designated bridges.
Spanning Tree Algorithm (2) • Initially all bridges assume they are the root and broadcast message with its ID, root path cost. • Eventually, lowest-ID bridge will be known to everyone and will become root. • Root bridge periodically broadcasts it’s the root.
Spanning Tree Algorithm (3) • Directly connected bridges update their cost to root and broadcast message on other LANs they are attached. • This is propagated throughout network. • On any (non-directly connected) LAN, bridge closest to root becomes designated bridge.
Spanning Tree: Example LAN 2 LAN 2 10 5 10 5 10 10 B3 B4 B3 B4 B1 B1 10 5 10 5 10 10 LAN 5 LAN 5 5 5 B5 B5 5 5 LAN 1 LAN 1 10 10 5 5 5 5 B2 B2 LAN 3 LAN 4 LAN 3 LAN 4
Spanning Tree: Example B1 . Only designated bridges on each LAN allowed to forward frames. . Bridges continue exchanging info to react to topology changes. LAN 2 LAN 1 B4 B3 B5 LAN 5 B2 LAN 3 LAN 4
Remote Bridges • Remote bridges can be used to interconnect distant LANs.
Repeaters, Hubs, Bridges, Switches, Routers, Gateways • How do they differ? • Operate in different layers. • I.e., they look at different information to perform switching/routing/forwarding.
Repeaters • Operate at the PHY. • Connect 2 cable segments. • Amplify signal in order to extend LAN’s range.
Hubs, Bridges, Switches . Also operates at the PHY. . Joins several lines. . Similar to repeater? . Bridges operate at the DLL. . Connects 2+ LANs. . Route on DLL addresses. . Also operate at the DLL. . Typically connect computers.
Cut-Through Switching • Instead of store-and-forward. • Start frame forwarding as soon as destination header field has arrived. • Before whole frame has arrived. • Assumes outgoing interface available. • Typically handled in hardware.
Routers and Gateways • Routers operate at the network layer. • They look at network-layer addresses (e.g., IP addresses) to route packets. • Gateways typically operate at higher layers, i.e., transport and above.
Main Functions • Routing. • Forwarding.
Design Issues • Services provided to transport layer. • How to design network-layer protocols.
Store-and-Forward Packet Switching Subnet fig 5-1 . Host sends packet to nearest router. . Packet forwarded to next router. . Until packet reaches destination.
Services • What kind of services provided to transport layer? • Connection-oriented versus connectionless service?
Connectionless Service • Datagram network. • “Move all intelligence to the edges”. • Routers just route. • Everything else should be done end-to-end. • No ordering, no flow/congestion control, no reliable delivery. • Best-effort service model. • Packets are routed independently… • E.g., Internet.
Connection-Oriented Service • Virtual circuit networks. • `A la telephone network. • Reliable, ordered service. • Virtual connection established from source to destination. • E.g., X-25, ATM.
Datagram Network Operation • How does it work? • Data from transport layer is broken into packets, or datagrams. • Network layer at host adds network-layer header and forwards packets to directly-connected router.
Datagram Network: Example • Routing within a diagram subnet.
Virtual Circuit Network Operation • Connection-establishment before sending data. • All traffic for that connection follows same route.
Virtual Circuit Network: Example • Routing within a virtual-circuit subnet.