LAN Interconnection 2

Repeaters, Bridges, Routers and Gateways

g LAN interconnection refers to the ability to inter- network LANs, MANs, and WANs, through relays.

b A layer n relay is a device that interconnects two systems not directly connected to each other (OSI Ref. Model) ` Layer n relay shares a common layer n with other systems, but does not participate in layer n+1 protocol g Terminology is non uniformly used in the litera- ture

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 3

Interconnecting LANs

g There are four generic devices for LAN intercon- nection

b Repeater : relay

b Bridge : Data relay

b : relay

b Gateway : Any relay at higher layer than net- work layer g One final category combines bridges and routers functionalities

b Brouters

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 4

Relays, Bridges, Routers and Gateways

End System End System

Relays

Network Relays

Bridge Repeater

Physical Media

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 5

Shared-Bandwidth LANs

Thick Trunk Cable Maximum Trunk Link, 500 Meters Transceiver

Terminating Resistor at each end Transceiver Cable

Bridge

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 6

Dedicated-Bandwidth LANs Structured Wiring

Work Location Wall Plate Wiring Closest LAN Hub

Patch Panel Horizental Distribution V (UTP Cat 5) e r t i c B a u l i l d i n g

UTP B a 100 m distance D c i k VD s b µ t o Fiber (62.5/125 m) r n 2 Km distance i e b u t i o n

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 7

Repeaters

g Repeaters are used to interconnect homogene- ous networks, and to extend their range of opera- tions g Repeaters pass signals in both directions g Their main functions include

b Amplifying signals

b Regenerating signal

b Signals are not changed except for ‘‘cleaning’’ g Repeaters have no effect on protocols

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 8

Standalone Repeaters

g Repeaters forward packets to all ports

b Shared Network g All segments interconnected by means of repeaters are in one Electrical

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 9

Electrical Collision Domain

g All collisions occurring in a single collision domain must be detected by the nodes causing the collisions before they terminate their transmissions

b This has to hold for all network nodes, includ- ing the ones at the farthest ends of the net- work g As a result, the network diameter is directly related to the minimum packet size, which is 512 bits

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 10

Electrical Collision Domain

DTE Delay Cable Delay Repeater Delay Cable Delay DTE Delay

g To handle collision appropriately, the following rule must hold true 2 × ( Total repeater delays ) + 2 × ( Total cable delays ) + 2 × ( Total DTE delays ) < 512 bit times

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 11

Bridges For Shared LANs

g Bridges allow for the simplest and most common form of internetworking, interconnection of homogeneous networks g IEEE 802 committees developed standards for bridges to interconnect different types of LANs b Rather a complex task

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 12

Typical Bridge Configuration

Host Host

LAN Bridge Bridge LAN

Host Host

Bridge-to-Bridge MAC Protocol Protocol

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 13

Why Bridges?

g Several reasons for the use of bridges to connect LANs

b Performance, by building ‘‘firewalls’’,

b Reliability, network can be partitioned into self contained units

b Security, control and monitor traffic

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 14

Bridges Characteristics

g Bridges operate at the

b Usually the MAC layer of LANs ` The basic bridge, with no special features, does not look any further than the address fields

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 15

Bridges

g Bridges do not interfere with higher level proto- cols

b Transparently pass traffic between upper- layer running different protocols (XNS, TCP/IP, and OSI)

b Only devices running the same protocol can communicate with one another

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 16

Bridges Main Advantages

g Bridges can connect LANs that use different phy- sical media such as coax cable, fiber optics, or twisted pairs. g Bridges can connect LANs that use different media access control protocols media such as CSMA/CD and Token Ring.

b The possible difference in maximum frame size must be handled by upper layers protocol ` Passing through the bridge, the packet does not violate the maximum length on any network segment

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 17

Bridges Basic Functionalities

g A Bridge, between network 1 and 2, performs the following functions

b Reads all frames on network 1, and accepts those addressed to network 2

b Retransmits accepted frames onto network 2, using the MAC protocol for network 2

b Performs equivalent functions on network 2 to network 1 traffic

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 18

Bridges Basic Operations

Host A Host B Layers 4-7

Network Layer PKT PKT Bridge

LLC PKT PKT PKT

MAC 802.3PKT 802.3PKT 802.4PKT 802.4PKT

Physical 802.3PKT 802.3PKT 802.4PKT 802.4PKT

802.3PKT 802.4PKT

CSMA/CD LAN Token Bus LAN

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 19

Bridges Over Point-To-Point Links

Station Station User User ( 1 ) ( 1 ) LLC LLC ( 2) ( 2) Bridge Bridge MAC MAC ( 3) MAC Link Link MAC ( 3) PHY ()3 ()4 (4) ( 3 ) PHY PHY PHY PHY PHY LAN LAN

Packet Data Unit 1 : User Data

Packet Data Unit 2 : LLC-H User Data

Packet Data Unit 3: MAC-H LLC-H User Data MAC-T

Packet Data Unit 4 : Link-HMAC-H LLC-H User Data MAC-T Link-T

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 21

Routing with Bridges

g Most basic form of bridges, ‘‘No Frills’’ bridges perform the following operations :

b Promiscuously, listen to every packet transmitted

b Store each packet until it can be transmitted

b When ready transmit the packet on all adja- cent LANs, except the one on which it was received

b Preferably, operates transparently not to cause protocols on stations to fail

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 22

Basic Bridges

g ‘‘No Frills’’ bridges extend the capabilities of the LANs

b Limits collisions in CSMA/CD

b Extend the maximum number of stations in 802.5

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 23

Basic Bridges

g ‘‘No Frills’’ may waste total LAN bandwidth

b Manual insertion of addresses in the database ` May involve difficult management g If it were for them to know which stations were on which LANs, bridges may become more efficient

b Bridges must be equipped with greater rout- ing capabilities

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 24

Routing with Bridges

g Three basic routing strategies :

b Fixed routing ` Only suitable for small LANs ` Mostly proprietary protocols

b Spanning tree, developed by IEEE 802.1 ` Intended for use in interconnecting LANs with similar and dissimilar MAC Standards, (802.3, 802.4, 802.5, FDDI) ` Routing technique is used is referred to as Spanning Tree

b Source Routing, developed by IEEE 802.5 ` Intended for use in interconnecting Token Rings

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 25

Interconnection of Different Types of LANs

To CSMA/CD Token Bus Token Ring From 802.3 802.4 802.5

802.3 1,4 1,2,4,8

802.4 1,5,8,9,10 9 1,2,3,8,9,10

802.5 1,2,5,6,7,10 1,2,3,6,7 6,7

1 Reformat the frame, compute new checksum

2 Reverse the bit order

3 Copy priority, even if not meaningful

4 Generate fictitious priority

5 Discard priority

6 Drain the ring

7 Fake A and C bits

8 Deal with congestion

9 Deal with temporary token handoff

10 Deal with long frames for receiving LAN

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 26

Bridging with Different LANs

g Two techniques are widely used :

b Encapsulation,

b Translation (Mapping)

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 27

Encapsulation

g The frame of the in-bound LAN is included in the information field of the frame of the out-bound LAN g The receiving bridge performs de-encapsulation

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 28

Encapsulation

g Major limitations :

b No standards for encapsulation are defined

b Requires that both bridges subscribe to the same encapsulation proprietary scheme ` Limits interoperability ` Limits transparency

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 29

Translation Concept

g Bridges map the content of incoming incoming frame into the outbound frame that conforms to the outbound LAN g Translation may require higher processing rate than encapsulation

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 30

Translation

g To achieve translation, bridge internal sublayer performs :

b Frame disassembly at the in-bound LAN

b Altering of certain field of the in-bound LAN frame

b Reconstruction of the out-bound LAN frame g These services are defined within the bridge by a set of primitives and parameters

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 31

Bridge Architecture Service Relationship

Higher Layer Entities (Bridge Protocol Entity, Bridge Management,...)

LLC LLC

MAC Relay Entity Media Access Method Independent MAC Services MAC Services ISS ISS

MAC Entity MAC Entity Media Access Media Access Method Dependent Method Dependent

ISS : Internal Sublayer Service

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 32

MAC Dependent Bridge Action

Destination LAN

Source LAN IEEE 802.3 IEEE 802.4 IEEE 802.5

IEEE 802.3 Calculate CRC Calculate CRC Set default user Set Default user priority priority Use default access Use default access priority priority

IEEE 802.4 Discard frame if Use user priority Discard if long frame too long of inbound frame Calculate CRC Calculate CRC Use user priority Use user priority Discard User Priority or default access of inbound frame priority for access Use user priority or default access priority for access

IEEE 802.5 Discard frame if Discard frame if Use user priority too long too long of inbound frame Calculate CRC Calculate CRC Use user priority Discard User Priority Use user priority or default access of inbound frame priority for access Use user priority or default access priority for access

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 33

IEEE 802 Bridges Spanning Tree Bridges

g Spanning Tree Bridges perform three basic func- tions

b Frame forwarding

b Learning station addresses

b Resolving possible loops in the topology by participating in a spanning tree generation algorithm

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 34

Frame Forwarding

PSI PSI FF

FDB FR FT

PSI : Port State Information FF : Frame Forwarding FR : Frame Reception FT : Frame Transmission FDB : Filtering Data Base

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 35

Frame Forwarding

g Each bridge receives frames from incoming LAN ports and transmits frames to outgoing LAN ports g A forwarding database containing entries for all destinations currently known is maintained

b Database entry = (station address, forward port #)

b Database is originally empty, and initialized by flooding g Bridges perform algorithm, g Bridges perform database maintenance through a learning algorithm

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 36

Forwarding and Learning

Bridge Frame received Forwarding on port X

DA found in No Database?

Yes Forward on ports except X

Yes Outband port = X

No

Forward on outband port

Bridge SA found in No Database? Learning Yes

Update entry Add SA to DB and Timer Add new timer

End

Recommended Timer : 300 seconds

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 37

Learning Bridges

Port 1 Port 2 Port 1 Port 2 B1 B2 Port 3

LAN 1 LAN 2 LAN 3

12 34 56

LAN 4

7 8

Event B1 Actions B1 Database

Station 1 sends a message B1 transmits the message [ 1, Port 1 ] to Station 6 on LAN 3 on Port 2 and Port 3 Station 6 sends a message B1 receives the message [ 1, Port 1 ] to Station 1 on LAN 1 on Port 2 and transmits it on [ 6, Port 2 ] Port 1 Station 1 sends a message B1 transmits the message [ 1, Port 1 ] to Station 6 on LAN 3 on Port 2 [ 6, Port 2 ]

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 38

Looping

g Infinite loops may happen

45 LAN 1

B1 B2 B3

LAN 2

12 3

1- Station 4 transmits to Station 3 3- B1 transmits packet on LAN 2 2- All bridges receive the packet, 4- B2 and B3 receive packet on LAN 2, update their databases and queue note that 4 resides now on LAN 2, packet to be transmitted on LAN 2 update their databases and queue packet to be transmitted on LAN 1

.... This may continue for ever ....

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 39

Loop Elimination

g Design a loop free network

b Loops are not bad since they allow a degree of redundancy g Design an algorithm that prunes the topology into a loop-free subset

b Spanning Tree Algorithm

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 40

Spanning Tree

g The spanning tree is developed automatically by an algorithm resident in each bridge

b No network management is required to configure the network g The tree guarantees only one route between two stations in the LAN

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 41

Spanning Tree Basic Steps

g (a) Bridges elect a single bridge, among all the bridges on all the LANs, to be the ‘‘Root Bridge’’ g (b) Bridges calculate the distance of the shortest path from themselves to the root bridge g (c) For each LAN, briges elect a ‘‘Designated Bridge’’ from among all the bridges residing on that LAN

b Elected bridge is the one closest to the ‘‘Root Bridge’’ g (d) Brigdes select the ‘‘Root Port’’ that gives the best path from themselves to the ‘‘Root Bridge’’ g (e) Briges select ports to be included in the span- ning tree

b Selected ports include ‘‘Root Port’’ and any port on which the bridge has been selected ‘‘Designated Bridge’’

b Data traffic is forwarded only to and from ports selected in the spanning tree

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 42

Spanning Tree Bridge Algorithm

g Each port of a bridge is uniquely identified within the bridge

b A separate unique LAN address (48-bit) g Each bridge is assigned a unique identifier,

b In essence, the MAC address of one of its ports and a priority level g A special group MAC address,

b All bridges on this LAN

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 43

Spanning Tree

g Root Bridge

b Bridge with lowest value of bridge identifier

g Path Cost

b Associated with each port on each bridge is a path cost ` Cost of transmitting a frame onto a LAN through that port

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 44

Spanning Tree

g Root port

b The port used toward the first hop on the minimum cost path to the root bridge g Root path cost

b A root path is the path from a bridge to the route bridge with minimum cost

b The root path cost is the cost of the root path

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 45

Spanning Tree

g Designated bridge

b Bridge that logically connects the LAN to the next LAN closer to the root g Designated port

b Port of the designated bridge that attachs the bridge to the LAN

b All traffic, to and from the LAN, passes through the designated port

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 46

Spanning Tree Algorithm

g Determine the root bridge

b Initially, each bridge assumes it is the root bridge

g Determine the root port on all other bridges

g Determine the designated port on each LAN

b This port will be the port with the minimum root path cost

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 47

General Topology Physical

LAN 2

B3 B4

C=10 C=5 Id:45 Id:57

C=10 C=5 B1

C=10 Id:42 LAN 5

C=10 B5

C=5 Id:83

C=5

LAN 1 B2

C=10

C=5 C=5 Id:97

LAN 3

LAN 4

Prof. A. Bruce McDonald Spring’01 LAN Interconnection 48

Spanning Tree Topology Logical

B1

Id 42 Route Path Cost 0

Port Id : 1 Port Id : 2 Path Cost 10 Path Cost 10 D D

LAN 1 LAN 2

B5 R B4 R Port Id : 1 Port Id : 1 Path Cost 5 Path Cost 5 Id 83 Id 57 Route Path Cost 05 Route Path Cost 05

Port Id : 2 Port Id : 2 Path Cost 5 Path Cost 5 D B2 R B3 R

Id 97 Port Id : 1 LAN 5 Route Path Cost 10 Path Cost 5 Id 45 Route Path Cost 10 Port Id : 1 Port Id : 2 Path Cost 5 Path Cost 5 Port Id : 2 D D Path Cost 10

LAN 3 LAN 4

Prof. A. Bruce McDonald Spring’01