TCP/IP Bridging, Switching and Routing in LANs Alvin Kwan.

43
TCP/IP Bridging, Switching and Routing in LANs Alvin Kwan Alvin Kwan
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    225
  • download

    0

Transcript of TCP/IP Bridging, Switching and Routing in LANs Alvin Kwan.

TCP/IP

Bridging, Switching and Routing in LANs

Bridging, Switching and Routing in LANs

Alvin KwanAlvin Kwan

TCP/IP

BridgeBridge

TCP/IP

Segmenting with BridgesSegmenting with Bridges

A bridge is the middle device between network A bridge is the middle device between network segments within a LANsegments within a LAN• It aims to reduce data collisions by separating It aims to reduce data collisions by separating

collision domains between segmentscollision domains between segments

• It works on the data link layer with the use of the It works on the data link layer with the use of the MAC addressMAC address

• It has a buffer (memory) to keep MAC It has a buffer (memory) to keep MAC addresses of the network devices in each addresses of the network devices in each network segments through a self-configuring network segments through a self-configuring processprocess

TCP/IP

How does Bridging work?How does Bridging work?

A bridge builds an address table that consists of A bridge builds an address table that consists of an up-to-date listing of every MAC address on an up-to-date listing of every MAC address on the LAN, as well as the physical bridge port the LAN, as well as the physical bridge port connected to the segment containing that connected to the segment containing that address by listening to all LAN traffic.address by listening to all LAN traffic.

When a frame is addressed to an unknown When a frame is addressed to an unknown MAC address, the bridge will propagate that MAC address, the bridge will propagate that frame to all its attached LAN segments (except frame to all its attached LAN segments (except the segment from which the frame is received).the segment from which the frame is received).

TCP/IP

Important RemarksImportant Remarks

A bridge must adhere to the media access A bridge must adhere to the media access protocol, e.g. an Ethernet bridge must conform protocol, e.g. an Ethernet bridge must conform to the CSMA/CD media access protocol.to the CSMA/CD media access protocol.

No matter how many bridges are in a network, No matter how many bridges are in a network, the entire network will share the same logical the entire network will share the same logical broadcast address space. broadcast address space.

Bridging may increase a latency 10%-30%.Bridging may increase a latency 10%-30%.

TCP/IP

Bridge TypesBridge Types

Some major bridge types are as follows:Some major bridge types are as follows:• Transparent bridgesTransparent bridges

Link together segments of the same LAN typeLink together segments of the same LAN type

• Speed-buffering bridgesSpeed-buffering bridges Similar to transparent bridges except that linked Similar to transparent bridges except that linked

LAN segments may be of different speedsLAN segments may be of different speeds

• Translating bridgesTranslating bridges Similar to transparent bridges except that linked Similar to transparent bridges except that linked

LAN segments may be of different LAN typesLAN segments may be of different LAN types

TCP/IP

Bridging TodayBridging Today

Most bridges are two-port device though multi-Most bridges are two-port device though multi-port bridges are available too.port bridges are available too.

Bridges are becoming obsolete because their Bridges are becoming obsolete because their functions have been almost “subsumed” by functions have been almost “subsumed” by other networking devices, noticeably LAN other networking devices, noticeably LAN switches.switches.

Hubs with high performance up-link ports are in Hubs with high performance up-link ports are in fact bridges in disguise.fact bridges in disguise.

TCP/IP

ExerciseExercise

Connecting network devices arbitrarily to Connecting network devices arbitrarily to different network segments separated by a different network segments separated by a bridge will not be able to make the best use of bridge will not be able to make the best use of a bridge. Why?a bridge. Why?

TCP/IP

SwitchSwitch

TCP/IP

Segmenting with SwitchesSegmenting with Switches

A switch is the multiport data link layer deviceA switch is the multiport data link layer device• It aims to reduce data collisions by associating It aims to reduce data collisions by associating

each port with its own collision domain each port with its own collision domain

• It uses the MAC addressIt uses the MAC address

• It dynamically builds and maintains a MAC It dynamically builds and maintains a MAC filtering table, holding all of the necessary filtering table, holding all of the necessary MAC information for each port MAC information for each port

TCP/IP

Switching IssuesSwitching Issues

Address learning (when a switch is just turned Address learning (when a switch is just turned on OR change in network configuration)on OR change in network configuration)

Forward/filter decisionForward/filter decision Loop avoidanceLoop avoidance

TCP/IP

Address Learning (1/3)Address Learning (1/3)

TCP/IP

Address Learning (2/3)Address Learning (2/3)

TCP/IP

Address Learning (3/3)Address Learning (3/3)

TCP/IP

Forward/Filtering DecisionsForward/Filtering Decisions

When a frame arrives at a switch, the switch checks When a frame arrives at a switch, the switch checks the destination hardware address, which is compared the destination hardware address, which is compared to the forward/filter MAC database. If the destination to the forward/filter MAC database. If the destination hardware address is known, then it will transmit it out hardware address is known, then it will transmit it out the correct port, but if the destination hardware the correct port, but if the destination hardware address is not known, then it will broadcast the frame address is not known, then it will broadcast the frame out of all ports, except the one which it received it out of all ports, except the one which it received it from. If a device (computer) answers to the from. If a device (computer) answers to the broadcast, then the MAC address of that device is broadcast, then the MAC address of that device is added to the MAC database of the switch. added to the MAC database of the switch.

TCP/IP

Loop AvoidanceLoop Avoidance

Any potential problem with the following Any potential problem with the following network configuration?network configuration?

TCP/IP

Store & Forward ModeStore & Forward Mode

When the switch receives a frame from one of When the switch receives a frame from one of it's ports, it will store it in memory, check it for it's ports, it will store it in memory, check it for errors and corruption, and if it passes the test, errors and corruption, and if it passes the test, it will forward the frame out the designated it will forward the frame out the designated port, otherwise, if it discovers that the frame port, otherwise, if it discovers that the frame has errors or is corrupt, it will discard it. has errors or is corrupt, it will discard it.

This method is the safest, but also has the This method is the safest, but also has the highest latency. highest latency.

TCP/IP

Cut-through ModeCut-through Mode

The switch reads the frame until it learns the The switch reads the frame until it learns the destination MAC address of the frame it's destination MAC address of the frame it's receiving. Once it learns it, it will forward the receiving. Once it learns it, it will forward the frame straight out the designated port without frame straight out the designated port without doing any error checking.doing any error checking.

TCP/IP

Memory Requirement for SwitchMemory Requirement for Switch

TCP/IP

RoutingRouting

TCP/IP

RoutingRouting

Concerns with “learning how to get from here Concerns with “learning how to get from here to there”to there”

Works on the network layer, i.e. Layer 3.Works on the network layer, i.e. Layer 3. Two major campsTwo major camps

• Source routing (less common)Source routing (less common)

• Hop-to-hop routing (predominately used in Hop-to-hop routing (predominately used in TCP/IP networks)TCP/IP networks)

TCP/IP

Routing PrinciplesRouting Principles

Correct routeCorrect route Most direct route Most direct route

• Shortest routeShortest route

• Route takes the least time Route takes the least time Most reliable route (which may not be the Most reliable route (which may not be the

shortest one)shortest one)

TCP/IP

Routing Requirements over InternetRouting Requirements over Internet

Static routing cannot help; good routing has Static routing cannot help; good routing has to beto be• dynamicdynamic

• adaptiveadaptive

• decentralizeddecentralized

• scale well, and scale well, and

• resilentresilent

TCP/IP

Source RoutingSource Routing

Routing information is collected by the sourceRouting information is collected by the source Routing information is put into the packets that Routing information is put into the packets that

the source launches toward the destinationthe source launches toward the destination Intervening network (with intermediate links Intervening network (with intermediate links

and systems) read the routing information from and systems) read the routing information from the packets and act on it accordinglythe packets and act on it accordingly

Example: route planning by most people is a Example: route planning by most people is a kind of source routingkind of source routing

TCP/IP

Hop-by-hop RoutingHop-by-hop Routing

Hop-by-hop routing requiresHop-by-hop routing requires• routing protocolsrouting protocols that allow end systems and that allow end systems and

intermediate systems to collect and distribute the intermediate systems to collect and distribute the information necessary to determine routesinformation necessary to determine routes

• a routing information basea routing information base containing information containing information from which routes between end systems can be from which routes between end systems can be computed, andcomputed, and

• a routing algorithm that uses the information a routing algorithm that uses the information contained in the routing information base to derive contained in the routing information base to derive routes between end systemsroutes between end systems

TCP/IP

Example: Hop-by-hop RoutingExample: Hop-by-hop Routing

TCP/IP

Example: Simple RoutingExample: Simple Routing

Connected networkConnected network

TCP/IP

Example: Simple RoutingExample: Simple Routing

Connected network (no routing is required)Connected network (no routing is required)

Q: What is the range of addresses that Node Q: What is the range of addresses that Node B can take such that it can “talk” to Node A?B can take such that it can “talk” to Node A?

TCP/IP

Example: Simple RoutingExample: Simple Routing

Unconnected networkUnconnected network• As A and C are separately connected to As A and C are separately connected to

different networks, they are unconnected.different networks, they are unconnected.• Without setting up routing, no communications Without setting up routing, no communications

can be achieved between A and C.can be achieved between A and C.

TCP/IP

Example: Routing TableExample: Routing Table

TCP/IP

Example: Routing TableExample: Routing Table

TCP/IP

Example: Routing TableExample: Routing Table

TCP/IP

Example: Data Link FrameExample: Data Link Frame

TCP/IP

TCP/IP

ExerciseExercise

Suppose we would like to improve the Suppose we would like to improve the effective bandwidth of a LAN with no subnet effective bandwidth of a LAN with no subnet definition, would a switch be more favorable definition, would a switch be more favorable than a router? Why?than a router? Why?

TCP/IP

Fault Tolerance of SwitchFault Tolerance of Switch

TCP/IP

Fault Tolerance of Router (1/2)Fault Tolerance of Router (1/2)

TCP/IP

Fault Tolerance of Router (2/2)Fault Tolerance of Router (2/2)

TCP/IP

Broadcast Flood (1/2)Broadcast Flood (1/2)

TCP/IP

Broadcast Flood (2/2)Broadcast Flood (2/2)

TCP/IP

Important RemarksImportant Remarks

Switching builds logically fat networks Switching builds logically fat networks whereas routing builds logically hierarchical whereas routing builds logically hierarchical networksnetworks

Switches segment LANs whereas routers Switches segment LANs whereas routers tend to segment WANstend to segment WANs

TCP/IP

Exercise (source: http://www.mpi-inf.mpg.de/~weidenb/Lan2004/ex

ercise8.pdf)

Exercise (source: http://www.mpi-inf.mpg.de/~weidenb/Lan2004/ex

ercise8.pdf)

TCP/IP

ReferencesReferences

Wikipedia’s pages on network switch and routerWikipedia’s pages on network switch and router http://www.ripe.net/meetings/regional/dubai-200

3/presentations/routing-smith.pdf http://www.soi.wide.ad.jp/soi-asia/pkg1/06/inde

x_bar.html http://www.corecom.com/html/OSNconnexions.

html