Advanced Computer Networks CS716 Advanced Computer Networks By Dr. Amir Qayyum 1
Lecture No. 15
Source Routing Packet header contains sequence of address/ports on path from source to destination One direction per switch: port, next switch; (absolute) Switches read, use, and then discard directions
Source Routing All forwarding/topology information required to switch a packet is provided by source host Used in some system area networks (SANs) Directions may be rotated instead of discarding
Data Transfer in Source Routing Analogous to following directions 2 Switch 2 Switch 1 3 1 3 1 data 1 3 2 data 1 3 data 3 1 Switch 3 2 data 1 3 Host A Host B 1 3 data 2 3 1 data 3 1
Source Routing Model Source host needs to know the correct and complete topology of the network Changes must propagate to all hosts Packet headers may be large and variable in size: the length is unpredictable
Can be used in datagram or virtual circuit networks Source Routing Model Each switch needs to correctly and efficiently manipulate the header information Rotation or stripping of address Pointer to current address Can be used in datagram or virtual circuit networks
Forwarding Performance Assume switch is General-purpose workstation With DMA support Multiple network adapters (NIC’s) Switching process Packet arrives on NIC 1 NIC 1 DMA’s packet into memory CPU looks at header, decides to send on NIC 2 NIC 2 DMA’s packet into NIC 2 memory Packet leaves via NIC 2
Implementation and Performance Packet arriving at interface 1 has to go on interface 2 Point of contention for packets: I/O and memory bus
Implementation and Performance The cost of processing small packets (parsing headers, deciding output port) dominates other restrictions Throughput = packets/sec x bits/packet Moving data from inputs to outputs in parallel may increase the aggregate throughput Potential bottlenecks I/O bus bandwidth Memory bus bandwidth Processor computing power
Bridges and Extended LANs
Building Extended LANs Traditional LAN Shared medium (e.g., Ethernet) Cheap, easy to administer Supports broadcast traffic Problem Want to scale LAN concept Larger geographic area (> O(1 km)) More hosts (> O(100)) But retain LAN-like functionality Solution: bridges
Bridges Connect two or more LANs with a bridge Transparently extends a LAN over multiple networks Accept & forward strategy (in promiscuous mode) Level 2 connection (does not add packet header) A Bridge B C X Y Z Port 1 Port 2
Bridges vs. Switches Switch Bridge Receive frame on input port Translate address to output port Forward frame Bridge Connect shared media All ports bidirectional Repeat subset of traffic Receive frame on one port Send on all other ports
Uses and Limitations of Bridges Extend LAN concept Limited scalability To O(1,000) hosts Not to global networks Not heterogeneous Some use of address, but No translation between frame formats
Learning Bridges Trivial algorithm Forward all frames on all (other) LAN’s Potentially heavy traffic & processing overhead Optimize by using address information “Learn” which hosts live on which LAN Maintain forwarding table Only forward when necessary (dest. not on same LAN) Reduces bridge workload
Learning Bridges Learn table entries based on source address Timeout entries to allow movement of hosts Table is an optimization; need not be complete Always forward broadcast frames Uses datagram or connectionless forwarding A Bridge B C X Y Z Port 1 Port 2 Host Port A 1 B 1 C 1 X 2 Y 2 Z 2
Learning Bridges Problem Solution: spanning tree C E D B2 B5 B B7 K F H B4 J B1 B6 G I Problem Redundancy (desirable to handle failures, but …) Makes extended LAN structure cyclic Frames may cycle forever Solution: spanning tree
Spanning Tree Subset of forwarding possibilities All LAN’s reachable, but Acyclic Bridges run a distributed algorithm to calculate the spanning tree Select which bridge actively forward Developed by Radia Perlman of DEC Now IEEE 802.1 specification Reconfigurable algorithm
Spanning Tree Concept LAN’s and bridges make a bipartite graph Ports are edges connecting LAN’s to bridges Spanning tree required Connect all LAN’s: all vertices of graph are covered Can leave out bridges: all edges may not be covered
Spanning Tree Algorithm Each bridge has a unique, totally-ordered identifier Select bridge with lowest ID as root bridge
Spanning Tree Algorithm Each bridge determines Direction of shortest path to root (preferred port) For each connected LAN, is it the designated bridge? Select bridge on each LAN closest to root as designated bridge Use ID (lowest) to break ties) Ports connecting LAN’s to designated bridges called designated ports
Spanning Tree Algorithm All designated bridges forward frames On all designated ports On preferred port (path leading to root) A B B3 LAN Designated port Preferred port Designated bridge C B5 D B7 B2 K E F B1 B2 G H B6 B4 I J
Distributed Spanning Tree Algorithm Bridges exchange configuration messages ID for bridge sending the message ID for what the sending bridge believes to be root bridge Distance (hops) from sending bridge to root bridge
Distributed Spanning Tree Algorithm Initially, each bridge believes it is the root Sends a configuration message, and checks if any received message is better than the current best message Each bridge records current best configuration message for each port
Distributed Spanning Tree Algorithm Bridges forward configuration messages outward from root bridge i.e., on all designated ports Bridge assumes it is designated bridge for a LAN until it learns otherwise A B B3 C B5 D B7 B2 K E F B1 G H B6 B4 I J
Algorithm Details In steady state, only designated bridges forward configuration messages Outward from root bridge, to all designated ports Until they learn they are not designated bridge
Algorithm Details In steady state, only root generates configuration messages periodically Timeout restarts algorithm (claiming “I am root …”) Although algorithm is reconfigureable, it is not possible to forward frames over alternative paths
Broadcast and Multicast Forward all broadcast/multicast frames to all preferred and designated ports Current practice Lets hosts decide whether or not to accept frame
Broadcast and Multicast Alternative: extend learning to handle groups Learn when no group members downstream Group members periodically identify themselves Accomplished by having each group member sending a frame to the bridge with group address in source field
Limitations of Bridges Do not scale Broadcast does not scale Spanning tree algorithm does not scale Do not accommodate heterogeneity Only supports networks with same address formats
Limitations of Bridges Caution: beware of transparency Frame drop because of bridge congestion Large and variable latency between two hosts Frames may reorder in extended LANs