49
CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Embed Size (px)

Citation preview

Page 1: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

CSC 336Data Communications

and Networking

Lecture 7d: Interconnecting LAN

Dr. Cheer-Sun Yang

Spring 2001

Page 2: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 3: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Interconnecting LANs

• Layer 1 connection – repeaters

• Layer 2 connection - bridges

Page 4: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 5: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Repeaters

• Layer 1 connections

• Used to expand physical length of a cable when it exceeds the distance limit and attenuation can occur.

Page 6: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 7: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridges

• Ability to expand beyond single LAN• Provide interconnection to other LANs/WANs• Use Bridge or router• Bridge is simpler

– Connects similar but different types of LANs– Identical protocols for physical and link layers– Minimal processing

• Router more general purpose– Interconnect various LANs and WANs– see later

Page 8: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 9: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Why Bridge?

• Eliminate unnecessary traffic

• Different department cannot access information in another LAN

• Security

Page 10: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Functions of a Bridge

• Read all frames transmitted on one LAN and accept those address to any station on the other LAN

• Using MAC protocol for second LAN, retransmit each frame

• Do the same the other way round

Page 11: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridging Similar Types of LANs

• Read all frames transmitted on one LAN and accept those address to any station on the other LAN

• Using MAC protocol for second LAN, retransmit each frame

• Do the same the other way round

Page 12: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridge Operation

Page 13: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridge Design Aspects• No modification to content or format of frame• No encapsulation• Exact bitwise copy of frame• Minimal buffering to meet peak demand• Contains routing and address intelligence

– Must be able to tell which frames to pass– May be more than one bridge to cross

• May connect more than two LANs• Bridging is transparent to stations

– Appears to all stations on multiple LANs as if they are on one single LAN

Page 14: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Connection of Two LANs

Page 15: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridge Different Types of LANs• If one LAN has higher bit rates, a bridge must buffer

data frames• If collision occurs when forwarding a data frame: a

bridge must handle binary exponential backoff, if it is Ethernet

• If it is Token Ring (a contension free protocol), a bridge must wait for a token to arrive

• If one LAN supports priority, the bridge must assign a default priority.

• If maximum frame size is different in two LANs, the bridge must fragment the data frame.

Page 16: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 17: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Types of Bridges

• Fixed Routing Bridge: using a fixed routing table to Transparent bridge: Spanning tree algoroithm

• Source routing bridges

Page 18: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridge Operations

• How does a bridge know when to forward and when to throw away data frames?

• How does a bridge know where to forward a data frame to? What if a host moves?

Page 19: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Bridge Types

• Fixed Routing Bridge: using a fixed routing table to determine “next hop” destination

• Transparent bridge: the routing decision is transparent to a host.– spanning tree algoroithm is used to find the

“next hop”

• Source routing bridges: the source decides the path to the destination

Page 20: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Fixed Route Bridges

• Fixed Routing Bridge: using a fixed routing table to determine “next hop” destination

• How does a routing table look like?

• Try “netstat -rn” on taz.cs.wcupa.edu

Page 21: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 22: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 23: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 24: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Transparent Bridges• Complex large LANs need alternative routes

– Load balancing– Fault tolerance

• Bridge(NOT the source) must decide whether to forward frame

• Bridge must decide which LAN to forward frame on• Routing selected for each source-destination pair of

LANs– Done in configuration– Usually least hop route– Only changed when topology changes

Page 25: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Route Learning

Page 26: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Flooding

Sends every frame to every LAN to which it is connected except the one on which the frame arrived.

WATER!!!

Page 27: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Frame Propagation Problem

Page 28: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Spanning Tree Algorithm

• Address learning works for tree layout– i.e. no closed loops

• For any connected graph there is a spanning tree that maintains connectivity but contains no closed loops

• Each bridge assigned unique identifier• Exchange between bridges to establish

spanning tree

Page 29: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Loop of Bridges

Page 30: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Spanning Tree

• Bridge automatically develops routing table

• Automatically update in response to changes

• Frame forwarding

• Address learning

• Loop resolution

Page 31: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Frame Forwarding

• Maintain forwarding database for each port– List station addresses reached through each port

• For a frame arriving on port X:– Search forwarding database to see if MAC address is

listed for any port except X– If address not found, forward to all ports except X– If address listed for port Y, check port Y for blocking

or forwarding state• Blocking prevents port from receiving or transmitting

– If not blocked, transmit frame through port Y

Page 32: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Address Learning

• Can preload forwarding database• Can be learned• When frame arrives at port X, it has come form

the LAN attached to port X• Use the source address to update forwarding

database for port X to include that address• Timer on each entry in database• Each time frame arrives, source address checked

against forwarding database

Page 33: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Spanning Tree Algorithm

• A cost is assigned to each bridge-to-LAN connection, or bridge-port.

• Derive a graph representation of the network (Figure 6.32).

• Find the spanning tree which covers every node without any loop.

• The last step determines a designated bridge for each LAN. This is the bridge that eventually forwards frames from that LAN.

Page 34: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

L3

Page 35: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Generate a Graph

• Associate a cost with each bridge-to-LAN connection, or bridge port.

• The cost of sending a frame from one LAN to another is the sum of costs of bridge ports. For example, the cost of sending a frame from L1 to L4 via bridges B1 and B2 is 6.

• Visualize the network as a graph.• Use Spanning Tree Algorithm to determine a set

of edges that connect all the LAN nodes of Figure 6.32.

Page 36: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 37: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Spanning Tree

• Use Spanning Tree Algorithm to determine a set of edges that connect all the LAN nodes of Figure 6.32.– Elect one of their own to be a root bridge. It is the one

with the lowest ID– Determine a root port– Determine a designated bridge for each LAN

Page 38: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 39: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Root Bridge Election• During the process, the cost to the root bridge is

also determined.• Every bridge records the cost to the root bridge

through each of its ports, and then selects the cheapest one. Figure 6.33 shows the root port (designated by an arrow) and paths to the root bridge.

Page 40: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

cost=6

cost=8

cost =3cost=6

cost=2

Page 41: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Designated Bridge Election• L1’s designated bridge is B1• L2’s designated bridge is B1• L3’s designated bridge is B3• L4 can use B2, B4, ir B6 as its designated bridge

Page 42: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

I gave up

I gave up!!

I am the designated

node for L4.

Page 43: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Final Results• L1’s designated bridge is B1• L2’s designated bridge is B1• L3’s designated bridge is B3• L4 ‘s designated bridge is B2.• Every LAN is connected to its designated bridge

and every bridge can communicate with the root bridge via its root port.

• (There is an error in Fig. 6.35: the cost from B1 to L2 is 2.)

Page 44: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Source Routing Bridges

• Although source routing bridges can be used with any type of LAN segment, they are used primarily for the interconnection of token ring LAN segments.

• The spanning tree bridges perform the routing in a way that is transparent to the end stations. Conversely, with source routing, the end stations perform the routing function.

• The necessary information must be included in a frame.

Page 45: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Source Route Bridges

Page 46: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001
Page 47: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

All-Routes Broadcast

Page 48: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Comparison of LAN Bridges

• See Table 6.8

Page 49: CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001

Reading

• Chapter 6: 6.5

• HW#4: Chapter 6 problem 18, problem 21