multimedie- och kommunikationssystem, lektion 9 kapitel 8: lan. multiple-access. csma/cd. the...

55
Multimedie- och kommunikationssystem, lektion 9 Kapitel 8: LAN. Multiple-access. CSMA/CD. The spanning tree algorithm.

Upload: nancy-caldwell

Post on 31-Dec-2015

226 views

Category:

Documents


0 download

TRANSCRIPT

Multimedie- och kommunikationssystem, lektion 9

Kapitel 8: LAN. Multiple-access. CSMA/CD. The spanning tree algorithm.

MultipleAccess

Figure 13.1 Multiple-access protocols

Evolution of random access protocols

Aloha “Try and error”. Developed in 1970 to be used

on radio- LAN on Hawaiian islands. The access to the channel is random.

Slotted Aloha Improvement to Aloha: Start transmission only

at fixed time slots

Carrier Sense Multiple Access (CSMA) Start transmission only if no transmission is

ongoing

CSMA/CA=Collision Avoidance Used in today’s WLAN:s

CSMA/CD=Collision Detection Stop ongoing transmission if collision is detected Used in the Ethernet protocol

Figure 13.5 Collision in CSMA

Figure 13.8 CSMA/CA procedure

CSMA/CD

Sense for carrier. If carrier present, wait until carrier ends. Send packet and sense for collision. If no collision detected, consider packet delivered. Otherwise, abort immediately, perform “exponential

back off” and send packet again. CSMA/CD is used in traditional Ethernet LAN

Animering som illustrerar kollisionshantering i CSMA/CD: www.itm.mh.se/~mageri/animations/bjnil/anim1.exe

Figure 8.4 CSMA/CD MAC sublayer operation: (a) transmit;

Exponential Back-off

When a sender detects a collision, it sends a “jam signal”. Jam signal is necessary to make sure that all nodes are

aware of the collision Length of the jam signal 48 bits

When collision is detected, the sender resends the signal after a random time The random time is picked from an interval of 0 to 2N x

maximum propagation time N is the number of attempted retransmission Length of the interval increases with every retransmission

Figure 8.4 CSMA/CD MAC sublayer operation: (b) Receive.

Figure 8.31 LAN protocols: (a) protocol framework;

IEEE standards for LANs and similar technologies.

IEEE 802.1 Station management802.1d Transparent bridges802.2 Logical link control (LLC)IEEE 802.3 CSMA/CD (Ethernet) busIEEE 802.3u Fast EthernetIEEE 802.3x Hop-by-hop switch flow controlIEEE 802.3z Gigabit EthernetIEEE 802.5 Token ringIEEE 802.11 Wireless LANsIEEE 802.15 Wireless Personal Area Networks (PANs)IEEE 802.16 Broadband Wireless Access (”WiMAX”)IEEE 802.20 Mobile Broadband Wireless Access

Traditional Ethernet

Work started back in 1973 by Bob Metcalfe and David Boggs from Xerox Palo Alto Research Center, as an improvement of the ALOHA

Experimental Ethernet implemented in 1975. Cooperative effort between Digital, Intel, and Xerox

produced Ethernet Version 1.0 in 1980. Ethernet was adopted with modifications by the standards

committees IEEE 802.3 and ANSI 8802/3. Structure of Ethernet frame

(Length)

Structure of Ethernet Frame Preamble:

7 bytes with pattern 10101010 followed by one byte with pattern 10101011

Used to synchronize receiver, sender clock rates Addresses: 6 bytes, the frame is received by all adapters

on a LAN and dropped if address does not match Type: 2 bytes, is actually a length field in 802.3 CRC: 4 bytes, checked at receiver, if error is detected, the

frame is simply dropped Data payload: maximum 1500 bytes, minimum 46 bytes. If

data is less than 46 bytes, pad with zeros to 46 bytes

Figure 14.2 802.3 MAC frame

Figure 14.3 Minimum and maximum length

Figure 14.10 Categories of traditional Ethernet

Figure 14.12 Connection of stations to the medium using 10Base2

Reflektioner

Animering:Se

www.itm.mh.se/~mageri/animations/ledningsreflex/

Classic 10Mbps Ethernet

Four different implementation at the physical layer for the baseband 10Mbps Ethernet Thick Ethernet (10base5) – obsolete

• Thick coaxial cable (0.5” diameter)• 500meter max length, bus physical topology

Thin Ethernet (10base2 802.3a) - obsolete• RG58 coaxial cable• 185 meter max length, bus physical topology

Twisted Pair Ethernet (10baseT 802.3i) • 4 pair UTP (unshielded twisted pair) cable• 100 meter max length, star physical topology

Fiber-link Ethernet (10Base-FL)• Fiber cable connected to external transceiver• Star topology is used

Fast Ethernet

Go from 10mbit/s to 100mbit/s 3 competing standards:

100Base-TX 100Base-T4 100VG-Anylan

100Base-T4 and 100VG-Anylan are the losers (were not very well accepted).

100Base TX is the winner. It is almost a standard everywhere.

100Base - TX

100 Mbps over 2 pairs of wire (just like 10base-T)

Requires Category 5 UTP wiring or STP De facto standard today Very small price difference with 10Mbps-only

equipment Has clearly won over 100baseT4 and 100VG-

Anylan by now

100Base-FX

Fast Ethernet with fiber optic cables Uses two optical fibers, one for transmission and

one for reception

Gigabit Ethernet

Provides speeds of 1000 Mbps (i.e., one billion bits per second capacity) for half-duplex and full-duplex operation.

Uses Ethernet frame format and MAC technology CSMA/CD access method Backward compatible with 10Base-T,100Base-T and

100BaseTX

Can be shared (hub) or switched

Gigabit Ethernet Implementations

Fiber 1000 Base – SX

• Short wavelengths, two fiber-optic cables 1000 Base – LX

• Long wavelengths, two fiber-optic cables Copper

1000 Base – CX

• Uses shielded twisted pair copper jumpers 1000 Base – TX

• Uses category 5 twisted pair copper cable

1000Base - T

Four pairs of Category 5 UTP IEEE 802.3ab ratified in June 1999. Category 5, 6 and 7 copper up to 100 meters Uses encoding scheme 4D-PAM5 Five level of pulse amplitude modulation are

used Complicated technique

Limitations of Ethernet Technologies

Distance (the length of the cable) 200 m in Thin Ethernet (10Base2) 100 m in twisted pair Ethernet (10BaseT or

100BaseT or Fast Ethernet)

Number of collisions when too many stations are connected to the same segment

The situation is similar in other LAN technologies

Devices that Extend Local Networks

Physical layer devices (Repeaters and hubs)

MAC layer devices (Bridges and two-layer switches)

Network layer devices (Routers and three layers switches)

Figure 16.2 Repeater

A repeater connects segments of a LAN.

A repeater forwards every frame bit-by-bit; it has no packet queues, no filtering capability and no collision detection.

Figure 16.3 Function of a repeater

A repeater is a regenerator

Hubs

A hub is a multiport repeater used in 10BaseT and Fast Ethernet

Hubs give a possibility to have a physical star topology but logical bus topology.

Hub’s Limitations Hubs and repeaters resolve the problem with the distance, but

does not resolve the problem with collisions. A hub network can have lower throughput than several

separate networks. The maximum

througput of the three separate networks = 3x10Mbps

The throughput of the connected network = 10Mbps

Bridges – A Simple Example

B1B1P1P2

LAN segment 1

LAN segment 2

H1

H4

H2 H3

H6H5

A frame from H1 to H4 is forwarded by the bridge

A frame from H1 to H3 is dropped by the bridge

Figure 8.12 Bridge filtering

A bridge has a table used for filtering

Figure 16.5 Bridge

A bridge has a table used in filtering decisions

Learning (transparent) bridge

Figure 8.13 Effect of dual paths on learning algorithm

Figure 16.10 Forwarding ports and blocking ports

Dotted lines = blocking (non-active redundant) ports. May be used if one of the other bridges or links fails.

Continuous black lines = forwarding (active) ports. These constitute a spanning tree (ett spännande träd) without loops.

The Spanning Tree Algorithm

1. Assign costs to each port, based on for example delay, distance, bandwith, or number of hops (1 per port).

2. Elect a root bridge. (The bridge with lowest ID number.)3. Calculate the Root Path Cost for each bridge, i.e. the

cost of the min-cost path (the “nearest” path) to the root. 4. Choose a root port for every bridge for minimum root

path cost.5. Chose a designated bridge for each LAN, for minimum

cost between the LAN and the root bridge. Mark the corresponding port as a designated port.

6. Mark the root ports and designated ports as forwarding (active) ports, and the others as blocking (non-active) ports.

Figure 16.9 Applying spanning tree

Root ports: Minimum one star.Designated ports: Two stars.The other ports are blocking ports.

Another example

B3

B5

B7B2

B1

B6 B4

B8

Cost for eachport is 1 (hop-count)

The Root Bridge and the Spanning Tree

B3

B5

B7B2

B1

B6 B4

Root

B8

B2 B4 B5 B7

B8

B1

Spanning Tree:

*

*

*

*

*

*

**

**

**

**

**

**** **

**

***

**A spanning tree is a connected graph which has no loops (cycles)

**

Figure 8.14 Active topology derivation example: (a) LAN topology.

(b) Root port selection.

PC = Port cost. RPC = Root Path Cost. RP = Root Port. Dashed lines are non-root ports.

(c) Designated port selection.

DPC = Designated Port Cost.

(d) Active topology.

DP = Designated ports. RP = Root ports. The rest (dashed lines) are non-active

Example 8.2: Spanning Tree

To illustrate how the various elements of the spanning tree algorithmwork, consider the bridged LAN shown in Figure 8.14(a). The uniqueidentifier of each bridge is shown inside the box representing thebridge together with the port numbers in the inner boxes connectingthe bridge to each segment. Typically, the additional bridges on eachsegment are added to improve reliability in the event of a bridge failure.Also, assume that the LAN is just being brought into service, allbridges have equal priority, and all segments have the same designatedcost (bit rate) associated with them. Determine the active (spanningtree) topology.

Figure 14.17 Collision domains in a nonbridged and bridged network

Figure 14.18 Switched Ethernet

Figure 8.30 Example network configuration with a Fast Ethernet switch and 10/100BaseT hubs.

Figure 16.15 Virtual LANs (VLANs)

VLANs create broadcast domains.

NoteNote::

Figure 16.16 Two switches in a backbone using VLAN software