multimedie- och kommunikationssystem, lektion 9

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

Upload: lars-sutton

Post on 03-Jan-2016

28 views

Category:

Documents


0 download

DESCRIPTION

Kapitel 8: LAN. Multiple-access. CSMA/CD. The spanning tree algorithm. Multimedie- och kommunikationssystem, lektion 9. Multiple Access. Figure 13.1 Multiple-access protocols. Evolution of random access protocols. Aloha - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Multimedie- och kommunikationssystem, lektion 9

Multimedie- och kommunikationssystem, lektion 9

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

Page 2: Multimedie- och kommunikationssystem, lektion 9

MultipleAccess

Page 3: Multimedie- och kommunikationssystem, lektion 9

Figure 13.1 Multiple-access protocols

Page 4: Multimedie- och kommunikationssystem, lektion 9

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

Page 5: Multimedie- och kommunikationssystem, lektion 9

Figure 13.5 Collision in CSMA

Page 7: Multimedie- och kommunikationssystem, lektion 9

Figure 13.8 CSMA/CA procedure

Page 8: Multimedie- och kommunikationssystem, lektion 9

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

Page 9: Multimedie- och kommunikationssystem, lektion 9

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

Page 10: Multimedie- och kommunikationssystem, lektion 9

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

Page 11: Multimedie- och kommunikationssystem, lektion 9

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

Page 12: Multimedie- och kommunikationssystem, lektion 9

Figure 8.31 LAN protocols: (a) protocol framework;

Page 13: Multimedie- och kommunikationssystem, lektion 9

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

Page 14: Multimedie- och kommunikationssystem, lektion 9

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)

Page 15: Multimedie- och kommunikationssystem, lektion 9

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

Page 16: Multimedie- och kommunikationssystem, lektion 9

Figure 14.2 802.3 MAC frame

Page 17: Multimedie- och kommunikationssystem, lektion 9

Figure 14.3 Minimum and maximum length

Page 18: Multimedie- och kommunikationssystem, lektion 9

Figure 14.10 Categories of traditional Ethernet

Page 19: Multimedie- och kommunikationssystem, lektion 9

Figure 14.12 Connection of stations to the medium using 10Base2

Page 20: Multimedie- och kommunikationssystem, lektion 9

Reflektioner

Animering:Se

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

Page 21: Multimedie- och kommunikationssystem, lektion 9

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

Page 22: Multimedie- och kommunikationssystem, lektion 9

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.

Page 23: Multimedie- och kommunikationssystem, lektion 9

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

Page 24: Multimedie- och kommunikationssystem, lektion 9

100Base-FX

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

one for reception

Page 25: Multimedie- och kommunikationssystem, lektion 9

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

Page 26: Multimedie- och kommunikationssystem, lektion 9

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

Page 27: Multimedie- och kommunikationssystem, lektion 9

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

Page 28: Multimedie- och kommunikationssystem, lektion 9

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

Page 29: Multimedie- och kommunikationssystem, lektion 9

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)

Page 30: Multimedie- och kommunikationssystem, lektion 9

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.

Page 31: Multimedie- och kommunikationssystem, lektion 9

Figure 16.3 Function of a repeater

A repeater is a regenerator

Page 32: Multimedie- och kommunikationssystem, lektion 9

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.

Page 33: Multimedie- och kommunikationssystem, lektion 9

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

Page 34: Multimedie- och kommunikationssystem, lektion 9

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

Page 35: Multimedie- och kommunikationssystem, lektion 9

Figure 8.12 Bridge filtering

A bridge has a table used for filtering

Page 36: Multimedie- och kommunikationssystem, lektion 9

Figure 16.5 Bridge

A bridge has a table used in filtering decisions

Page 37: Multimedie- och kommunikationssystem, lektion 9

Learning (transparent) bridge

Page 38: Multimedie- och kommunikationssystem, lektion 9

Figure 8.13 Effect of dual paths on learning algorithm

Page 39: Multimedie- och kommunikationssystem, lektion 9

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.

Page 40: Multimedie- och kommunikationssystem, lektion 9

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.

Page 41: Multimedie- och kommunikationssystem, lektion 9

Figure 16.9 Applying spanning tree

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

Page 42: Multimedie- och kommunikationssystem, lektion 9

Another example

B3

B5

B7B2

B1

B6 B4

B8

Cost for eachport is 1 (hop-count)

Page 43: Multimedie- och kommunikationssystem, lektion 9

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)

**

Page 44: Multimedie- och kommunikationssystem, lektion 9

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

Page 45: Multimedie- och kommunikationssystem, lektion 9

(b) Root port selection.

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

Page 46: Multimedie- och kommunikationssystem, lektion 9

(c) Designated port selection.

DPC = Designated Port Cost.

Page 47: Multimedie- och kommunikationssystem, lektion 9

(d) Active topology.

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

Page 48: Multimedie- och kommunikationssystem, lektion 9

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.

Page 49: Multimedie- och kommunikationssystem, lektion 9
Page 50: Multimedie- och kommunikationssystem, lektion 9

Figure 14.17 Collision domains in a nonbridged and bridged network

Page 51: Multimedie- och kommunikationssystem, lektion 9

Figure 14.18 Switched Ethernet

Page 52: Multimedie- och kommunikationssystem, lektion 9

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

Page 53: Multimedie- och kommunikationssystem, lektion 9

Figure 16.15 Virtual LANs (VLANs)

Page 54: Multimedie- och kommunikationssystem, lektion 9

VLANs create broadcast domains.

NoteNote::

Page 55: Multimedie- och kommunikationssystem, lektion 9

Figure 16.16 Two switches in a backbone using VLAN software