Top Banner
Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008
23

Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Internetworking Fundamentals

(Lecture #5)

Andres Rengifo Copyright 2008

Page 2: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges

• A LAN bridge is a device that interconnects two separate LAN segments.

• It works on the data link layer or it is referred to as a layer 2 device.

• It is a bit more intelligent because it can make “routing” and “switching” decisions of frames within network topologies.

Data

LLC

MACPhysical

MACPHY PHY

Data

LLC

MACPhysical

User A User B

Bridge Protocol ArchitectureThe IEEE 802.1D specification defines the

protocol architecture for MAC bridges. Within the 802, architecture, the endpoint, or station

address is designated at the MAC level. Thus, it is at the MAC level that a bridge can

function. A frame destined to a final destination is captured by the MAC Bridge, stored temporally, and then sent over the next segment. The LLC sub layer is not

involved because the bridge is simply relaying MAC frames.

Page 3: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• There are many reasons why multiple LAN’s should be separated by bridges or routers, such as:

1. Reliability: If there are issues on a device that connects to LAN1, LAN2, LAN3, etc connected to the bridge will not be affected as the separation creates an individual domain.

2. Performance: The more devices you connect to a LAN, the less efficient performance will be. If there are multiple networks attached through a bridge, each segment can grow to its optimal capacity without affecting every LAN attached to the bridge.

3. Security: Different LAN segments have different needs. A “Research and Development LAN” has different traffic patterns then a Human Resources LAN. Security is important to protect data that is restricted to the public. A bridge allows separate physical interfaces to deal with other LANs own data patterns.

4. Geography: The obvious reason to use a bridge is to interconnect two separate topologies that could be located in different buildings, regions, etc.

Page 4: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• It can filter and drop unwanted traffic by checking its internal Media Access Control tables, which are tables created by understanding the physical topology of the local segment.

• A basic bridge can only interconnect segments that use the same data link and physical layer protocols.

• Translation bridges are able to take a specific PDU frame from one topology and convert it to another frame type in another topology like a token ring frame to an Ethernet frame.

Page 5: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• There are two types of bridging mechanisms:– Transparent Bridging

• Also referred as to the learning bridge. Frames are sent one hop at a time towards the destination.

• There is no pre-determined path between source and destination.

• Each bridge along the way will process the frame according to its “learning” table obtained by analyzing each bridge local segments.

Page 6: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• Source Route Bridging – The path between source and destination is predetermined and

included on the frame as it traverses the network.’

– Each frame has a “map” or topology of bridges that need to be followed.

– Obtained via explorer or discovery frames that leave prior to the data transfer to determine the path to be taken from source to destination.

– Very deterministic way of sending data. If the path is broken a new explore frame has to be released to discover the new path.

Page 7: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• How does the learning bridge work?

A

B

1

3 6

4 5

2 2

3 6

4 5

1

B1 B2

A

B

1

3 6

4 5

2 2

3 6

4 5

1

B1 B2

A

B

1

3 6

4 5

2 2

3 6

4 5

1

B1 B2

B1 knows that A is connected directly to Port 1

B1 still does not know where D is so it "floods" all ports except port 1.B2 also examines incoming frames and knows that A is reachable via

the directly connected port that attaches to B1 (port 2)

When D responds, B2 knows that D is directly connected to port 1. B2already knows how to get to A and sends the frame. When the frame

gets to B1, it then examines the incoming frame and determines that Dis reachable via ports 2 of B1 and B2

D

D

D

Copyright 2003Andres Rengifo

Page 8: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• Spanning Tree Algorithm

– Purpose is to have bridges dynamically create loop free topologies to provide a path between every pair of LANs in the network.

– A loop is created when there are alternate routes between two hosts.

– Bridges can forward traffic indefinitely which can degrade a network.

Page 9: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• Bridges exchange special messages with each other that allow them to calculate a spanning tree or a subset of the topology, which is loop free.

– Special messages are called BPDUs or Bridge Protocol Data Units.

• Functions of the BPDUs are the following:– Find one Root Bridge among all the bridges exchanging BPDUs– Determine the shortest path distance between the Root Bridge and

themselves.– Elect a Designated Bridge for each LAN.– Choose which interface or port, know as the root port, gives them

the best path from themselves to the Root Bridge.– Determine and select ports that should be included in the

spanning tree. Only forward traffic to and from these ports.

Page 10: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)• BPDU's are sent every 2 seconds on every port in order to

ensure a stable, loop-free topology.

– How is a root bridge selected? First the bridge is turned on. Every time a bridge comes up it assumes that it is the root bridge. They set their ID equal to the root ID. The bridge ID is actually made up of two components, as follows:

• 1. A two byte priority. The switch sets this number which, by default, is the same for all switches. The default priority on Cisco switches is 32,768 or 0x8000.

• 2. A 6 byte Media Access Control (MAC) address. This is the MAC address of the switch or the bridge. The combination of these two numbers determines which switch will become the root bridge. The lower the number the more likely this switch will become the root. By exchanging BPDUs, the switches determine which one is the root bridge.

Page 11: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Bridges (Cont.)

• In Spanning Tree Algorithm, there are 5 Spanning Tree Protocol Port States:

– 1) Blocking, 2) Listening, 3) Learning, 4) Forwarding and 5) Disabled

– Blocking - All ports start in this mode to prevent the bridge from creating a bridging loop. (20 seconds to Listening mode)

– Listening - All ports attempt to learn if there are any other paths to the root bridge. (15 seconds to Learning mode)

– Learning - Similar to Listening state except the port can add information that the port learned into its address table.(15 seconds to Forwarding mode)

– Forwarding - The port is capable of sending and receiving data.

Page 12: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Spanning Tree Algorithm Example

B1 B2 B3

Subnet A

Subnet B

Host A

Host B

Page 13: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Spanning Tree Algorithm Example

• Assume that there are two LANs interconnected with three bridges. Host A is sending from Subnet A to Subnet B.

• Since there is no notion of where destination is all three bridges store the frame, begin to look up their tables to see where the destination is, and forward the frame to Subnet B.

• All three bridges know about host A and add that device to their table.

• By nature, one of the devices will be the first one to forward the frame across to Subnet B. Since each bridge is transparent to the other, it will look as if host A is directly connected to Subnet B from the point of view of B1 and B2.

• Bridge #1 and Bridge #2 will take in the frame re-compute their “learning” tables by re-defining host A to be residing on Subnet B and the frame is then forward to Subnet A.

Page 14: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Spanning Tree Algorithm (Cont.)

• This has created a loop. Now assume that Bridge#1 succeeds in forwarding a frame back to Subnet B. Bridge#2 will note that A is still on Subnet B but Bridge#3 realizes that host A has now “moved” to Subnet A.

• It then prepares itself to forward the frame towards Subnet A.

• Now assume that Bridge#1 sends a frame onto Subnet A. Bridges#2 and #3 will take notice of host A has now moved to Subnet A and will re-compute their “learning” tables and begin forwarding towards Subnet B.

• Not only has there been a loop but also frames have been duplicated out of proportion causing a network to break. The introduction of the Spanning Tree Algorithm will prevent these loops by “blocking” specific ports and only allowing proper ports to forward the given traffic.

Page 15: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Switching Basics

• Reasoning for migration to switching architectures:

– Faster CPUs were developed which can process a lot more instructions per second.

– Faster Operating Systems which allow for multi-thread network transactions.

– “Heavier” Application developing requires faster access to the wire with better buffering capabilities.

Page 16: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Switching Basics (Cont.)

• Switching is defined as the process by which packets are moved at a very fast rate through a device called a switch which can handle high throughputs using a few specific algorithms such as:

– Cut- Through

– Store and Forward

– Adaptive Cut-Through

– Fragment Free Cut-Through

Page 17: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Switching Basics (Cont.)• Switches are bridges in “steroids”

– Switches take in frames from sources which are then analyzed against a MAC table used to forward the frame to the specific physical destination defined on the frame’s header. If the destination is not “listed” on the MAC table, then the process of “flooding” will take effect until a destination was found.

– Switches separate multiple LAN segments and allow for multiple user connectivity since the amount of ports available by the device addresses bridge’s capacity issues such as speed and port density.

– Switches allow for another option not available with bridging architectures referred to as Virtual LANs.

Page 18: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Boolean Basics

• To understand where the conversion comes from, the base 2 number system has to be understood:

– For example if binary number 10111100 is provided to you, then the base-2 numbering scheme will be represented in this way:

• Each digit in a binary number is multiplied by 2 (the base) to the power of the digit’s position in the binary number, with the first position being the power of (0).

• 1*(27)+0*(26)+1*(25)+1*(24)+1*(23)+1*(22)+0*(21)+0*(20)= 188 in decimal.

Page 19: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Boolean Basics (Cont.)

• To convert a binary number to decimal,I like to use a graphical method which helps understand why the each binary integer or bit in an octet has a specific decimal value. – Think of each “box” as a light switch. So that when you are given

a decimal number, you can actually turn the “light switch” ON for that value until you get the desired result.

1 0 1 1 1 1 0 0

128 64 32 16 8 4 2 1

27 26 25 24 23 22 21 20

128 + 32 + 16 + 8 + 4 = 188

Page 20: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Logic Tables• When dealing with binary numbers, rules of addition, subtraction,

division and multiplication are not really followed like we normally do with base-10 numbering schemes.

– Two very important operations

• OR operation – Assume there are two binary bits available. The number of combinations that

these two bits can provide can be OFF/OFF, OFF/ON, ON/OFF or ON/ON. This is the same as saying 00, 01, 10, and 11. If two bits are OR together, the answer will be always 1 provided that at least one of the bits is equal to 1. It will be 0 always when both bits are 0.

» B1 B2 OR » 0 0 0» 0 1 1» 1 0 1» 1 1 1

Page 21: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Logic Tables (Cont.)

• AND operation– Assume there are two binary bits available. The number

of combinations that these two bits provide has already been described above. If two bits are AND together, the answer will be always 1 provide that both bits are 1, otherwise the answer will be 0.

» B1 B0 AND » 0 0 0» 0 1 0» 1 0 0» 1 1 1

Page 22: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Logic Tables (Cont.)• Should there be three bits instead of two, there will be a total of 8

different combinations of 0s and 1s as shown below:

• B2 B1 B0 • 0 0 0• 0 0 1• 0 1 0• 0 1 1• 1 0 0• 1 0 1• 1 1 0• 1 1 1

Page 23: Internetworking Fundamentals (Lecture #5) Andres Rengifo Copyright 2008.

Hexadecimal numbering vs Decimal numbering

• Hexadecimal (Hex) numbering uses 0-F (A=10, B=11, C=12, D=13, E=14 and F=15). It is a base-16 numbering system. F is the largest digit that can be used in any position. This is the same as having 9 be the largest number that can be used in any position in a decimal number.

– Each digit in a hex number is multiplied by 16 to the power of the digit’s position in the hex number, with the first position being the power of (0).