Tải bản đầy đủ (.pdf) (32 trang)

Advanced Computer Networks: Lecture 15 - Dr. Amir Qayyum

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (465.5 KB, 32 trang )

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

3


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

4




Data Transfer in Source Routing
• Analogous to 
following 
directions

2

0

Switch 1

2

3 0

1
0

1

3

data

3

Switch 2


data

1 3

0

data

1 0

data

2

3 0

Switch 3

Host A

3

3

1

2

data


0 1

Host B
1

1

3
0

data

3 0

1

5


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

6



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

7


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
8
Packet leaves via NIC 2


Implementation and Performance
I/O bus

CPU

Interface 1

Interface 2

Interface 3
Main memory

• Packet arriving at interface 1 has to go on interface 2
• Point of contention for packets: I/O and memory bus
9


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

10


Bridges and Extended LANs

11


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

12



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

B

C
Port 1
Bridge
Port 2
X

Y

Z

13


Bridges vs. Switches

• Switch


– 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

14


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

15


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)
16
– 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

B

C
Port 1
Bridge
Port 2
X

Y


Z

Host   Port
   A      1
   B      1
   C      1
   X      2
   Y      2
   Z      2
17


Learning Bridges
A
B
B3
C

B5
D

B2

B7

E

K
F


B1
G

H
B6

• Problem

B4

I
J

– Redundancy (desirable to handle failures, but …)
– Makes extended LAN structure cyclic
– Frames may cycle forever

• Solution: spanning tree

18


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

19


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

20


Spanning Tree Algorithm

• Each bridge has a unique, 
totally­ordered identifier
• Select bridge with lowest ID 
as root bridge
21



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

22


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

C


B5
D

B2
E

Designated bridge

K
F

Preferred port
B2

B7

B1
G

H
B6

B4

I
J

23



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

24


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

25


×