COMP312

15
Local Area Networks COMP312 Richard Nelson [email protected] http://www.cs.waikato.ac.nz Department of Computer Science University of Waikato COMP312 - Local Area Networks – p. 1/58 OSI Protocol Model 7. Application 6. Presentation 5. Session 4. Transport 3. Network 2. Link 1. Physical LANs are L2 networks COMP312 - Local Area Networks – p. 2/58 Lecture Outline Protocols and Standards. Hubs, Bridges and Switches Modern Ethernet. COMP312 - Local Area Networks – p. 3/58 Protocols and Standards LAN Protocols. LAN Standards. Ethernet Frame Format. COMP312 - Local Area Networks – p. 4/58

Transcript of COMP312

Page 1: COMP312

Local Area Networks

COMP312

Richard [email protected]

http://www.cs.waikato.ac.nz

Department of Computer Science

University of Waikato

COMP312 - Local Area Networks – p. 1/58

OSI Protocol Model

7. Application

6. Presentation

5. Session

4. Transport

3. Network

2. Link

1. Physical

LANs are L2 networks

COMP312 - Local Area Networks – p. 2/58

Lecture Outline

• Protocols and Standards.• Hubs, Bridges and Switches• Modern Ethernet.

COMP312 - Local Area Networks – p. 3/58

Protocols and Standards

• LAN Protocols.• LAN Standards.• Ethernet Frame Format.

COMP312 - Local Area Networks – p. 4/58

Page 2: COMP312

LAN Protocols

1. Physical

COMP312 - Local Area Networks – p. 5/58

LAN Framing

Data

Network DataNetwork Header

LLC DataLLC Header

MAC DataMAC Header

COMP312 - Local Area Networks – p. 6/58

IEEE 802.2

• Most MAC Layers provide and unreliable Datagram service• IEEE 802.2 provides a link layer service based on HDLC• There are three classes of service

◦ Unacknowledged connectionless-mode service only.◦ Connection-mode service plus service◦ Acknowledged connectionless service

• 802.2 Also provides◦ Addressing.◦ Service Access Points

• 802.2 Uses Sliding Window flow control and Go-Back-N ARQerror control

Return to Section ToC

COMP312 - Local Area Networks – p. 7/58

LAN Standards

• Most LAN Standards are set by the IEEE• Most LANs started outside the IEEE in industry or academia but

later got taken to the IEEE• The IEEE 802 committee is responsible for LANs.

COMP312 - Local Area Networks – p. 8/58

Page 3: COMP312

IEEE 802 Standards

IEEE Number Name

802.1 Bridging and Management

802.2 Logical Link Control

802.3 CSMA/CD - Ethernet

802.4 Token Bus - ARCNet

802.5 Token Ring

802.6 MANs - DQDB

802.10 Security

802.11 Wireless LANs

802.12 Demand Priority Access

802.15 PANs (Bluetooth)

802.16 Broadband Wireless MANs

802.17 Resilient Packet Ring

802.20 Mobile Broadband Access

COMP312 - Local Area Networks – p. 9/58

IEEE 802 Standards

PHY802.3

CSMA/CD802.3

PHY802.4

802.4Token Bus

PHY

802.5

802.5

Token Ring

PHY PHY PHY PHY802.6 802.11 802.12 802.15

PHY802.16

802.6 802.11 802.12 802.15 802.16DQDB W−LAN WB−MANW−PANDPA

802.1 Bridging

802.2 Logical Link Control

PhysicalLayer

DataLink Layer

Return to Section ToC

COMP312 - Local Area Networks – p. 10/58

Ethernet Frame Format

There are four different Ethernet frame formats

1. Ethernet Version II. This is from the original Ethernet specificationreleased by Xerox, Intel and DEC.

2. Novell Proprietary ("802.3 Raw"). This format was used by NovellNetware and was based on an early version of the 802.3specification.

3. 802.3. The 802.3 standard specifies a header that includes the802.2 LLC fields.

4. 802.3 SNAP. This provides an extended header that allowsbackwards compatibility with the original Version II header.

COMP312 - Local Area Networks – p. 11/58

Ethernet (802.2) Addresses

• Addresses are six bytes long, Normally written as hyphenated hexe.g. AB-CD-EF-12-34-56.

• The first three bytes are an IEEE assigned OrganizationallyUnique Identifier (OUI)

• The second three bytes are assigned by the manufacturer.• Properly assigned addresses are globally unique.• Some hardware allows manually assigned addresses.• Destination address of all ones is the broadcast address.• Some addresses are reserved for multicast applications (normally

specific addresses are assigned for specific protocols).

COMP312 - Local Area Networks – p. 12/58

Page 4: COMP312

Ethernet Version II

Dst Src Etype Data FCS

• Dst: Destination Address - 6 bytes.

• Src: Source Address - 6 bytes.

• Ethertype: Specifies the protocol being carried within the data section. Used formultiplexing protocols. Ethertypes are all greater than 1536 and are assigned byXerox- 2 bytes.

• Data: Variable length payload. Must be padded if less than the minimum length -46-1500 bytes.

• FCS - Frame Check Sequence used for CRC - 4 bytes.

COMP312 - Local Area Networks – p. 13/58

Novell Proprietary

Dst Src Length Data FCS

• Dst: Destination Address - 6 bytes.

• Src: Source Address - 6 bytes.

• Length: The length of the entire frame not including the preamble or CRC - 2 bytes.

• Data: Variable length payload. Netware Packets always start with 0xFFFF. Must bepadded if less than the minimum length - 46-1500 bytes.

• FCS - Frame Check Sequence used for CRC - 4 bytes.

COMP312 - Local Area Networks – p. 14/58

802.3

Dst Src Length DSAPSSAP Ctrl Data FCS

802.2 LLC Header

• DSAP: Destination Service Access Point. References the process associated withthe protocol of data section of the packet at the receiving station - 1 byte.

• SSAP: Source Service Access Point. References the process associated with theprotocol of data section of the packet at the sending station - 1 byte.

• Ctrl: Specifies the type of packet as used by the LLC protocol. May beInformational, Control or Data.

Common DSAP/SSAP values include:

04 - IBM SNA 06 - IP

80 - 3Com AA - SNAP

BC - Banyan E0 - Novell

F4 - Lan Manager

COMP312 - Local Area Networks – p. 15/58

802.3 SNAP

Dst Src Length DSAPSSAP Ctrl SNAP Data FCS

802.2 LLC Header

• SNAP: SubNetwork Access Protocol - 5 bytes. The first three bytes carry theOrganisation Unique Identifier and are usually the same as the first three bytes ofthe source address. The last two bytes carry a protocol identifier that is usually anEthertype.

COMP312 - Local Area Networks – p. 16/58

Page 5: COMP312

Protocols and Standards - Summary

• The IEEE has separated Link Layer functions from Media Access• This makes all IEEE standard LANs compatible in terms of the

services they offer.• The Ethernet Frame format has evolved as the standard has

progressed.

Return to Section ToC Return to ToC

COMP312 - Local Area Networks – p. 17/58

Hubs, Bridges and Switches

• Hubs.• Bridges.• Switches.

COMP312 - Local Area Networks – p. 18/58

Hubs

• A hub is a collapsed broadcast bus.• stations connected to hubs must run CSMA/CD.• Hubs are normally used with UTP wiring and provide digital

regeneration of the signal.• Stations connected to hubs see all packets and select those with

addresses that are of interest.

COMP312 - Local Area Networks – p. 19/58

Broadcast Bus

A B C D

COMP312 - Local Area Networks – p. 20/58

Page 6: COMP312

Hub

A B C D

COMP312 - Local Area Networks – p. 21/58

Bridges

• Bridges are intelligent repeaters. They forward packets withoutchanging them.

• Bridges are Layer 2 devices so they are transparent to endstations.

• Identical L2 protocols are required on both sides of a bridge (maybe LLC identical).

• They divide up collision domains so CSMA/CD runs either side ofa bridge, but not across it.

• Bridges can buffer packets to ensure they are not lost without theoriginal transmitter knowing.

COMP312 - Local Area Networks – p. 22/58

Bridge Advantages

• LAN coverage by increasing the distance that packets can cover.• Performance by reducing collision domain size and so lowering

the rate of collisions.• Throughput and security by not forwarding packets that do not

need to be forwarded.• Bridges may be used to connect incompatible media (e.g. coax to

UTP) or even networks that are use incompatible MACs, butcompatible LLC layers (e.g. WLANs are normally bridged toEthernet networks).

• Bridges may be used to connect remote networks using a widearea link.

• Collision Detection does not work on fibre optic links so they haveto be point to point links and bridged to the rest of the network.

COMP312 - Local Area Networks – p. 23/58

Bridge

A B C D

COMP312 - Local Area Networks – p. 24/58

Page 7: COMP312

Loops

• Loops may be formed with multiple bridges on a LAN segments◦ Deliberately for redundancy.◦ Accidentally through misconfiguration.

• This can cause significant problems◦ Multiple copies of packets◦ Bridges learning the wrong location of stations and not

forwarding packets◦ Cascading multiplication of packets

COMP312 - Local Area Networks – p. 25/58

Spanning Tree

• A spanning tree is a subset of the bridge topology that:◦ Covers the entire network (spanning),◦ Includes no loops (tree).

• Spanning Tree works by:◦ Bridges exchange topology information using specific bridge

topology packets and a multicast address,◦ A root bridge is elected,◦ Bridges then caculate their path cost to the root bridge,◦ A designated bridge is elected to each lan segment,◦ Redundant bridge interfaces are set to not forward packets.

• Changes in link costs or link availability result in re-calculation ofthe spanning tree.

COMP312 - Local Area Networks – p. 26/58

Spanning Tree

COMP312 - Local Area Networks – p. 27/58

Switches

• Switches are multiport bridges.◦ Each port is regarded as a separate LAN segment.◦ They perform MAC learning◦ They participate in spanning tree calculations

• Forwarding speed is not limited by the segment speed.• Different ports may run at different speeds• Ports that have only one device attached may send and receive

simultaneously, i.e. full duplex.• The main disadvantage of switches over hubs is traditionally cost

but this is now much less significant than it used to be.

COMP312 - Local Area Networks – p. 28/58

Page 8: COMP312

Switch

A B C D

A B C D

COMP312 - Local Area Networks – p. 29/58

Switch Buffering

• Switches and bridges can buffer packets that cannot beimmediately sent to a segment.◦ The receiving segment is busy or experiencing collisions.◦ The sending segment runs at a higher speed than the

receiving segment.◦ Multiple segments are sending packets to the same receiving

segment.

COMP312 - Local Area Networks – p. 30/58

Switch Buffering -2

• It is possible that the buffering requirements may exceed thememory of the switch.

• The switch can respond in various ways◦ Do Nothing; assume higher layer flow/error control will

respond.◦ Backpressure; Cause collisions on the sending segments to

slow down the sender.◦ Flow control; uses special Pause 802.3x Mac Control Frame

to tell senders to stop sending for a short period of time.

COMP312 - Local Area Networks – p. 31/58

Autonegotiation

• Switches may be connected to devices of varying speeds.• UTP Ethernet uses the same connector for 10Mbps, 100Mbps,

1000Mbps• 10Mbps UTP Ethernet sends a half pulse every 16ms to verify the

link status, called Normal Link Pulse - NLP. Reception of thispulse causes the link status LED to light on a NIC and above aswitch port .

NLP16ms

COMP312 - Local Area Networks – p. 32/58

Page 9: COMP312

Autonegotiation - 2

• 100Mbps and 1000Mbps send multiple clock and data pulses atthe same time intervals, called Fast Link Pulse - FLP.

• The clock signals are used to determine the speed capability ofthe communicating entities.

• The data pulses contain information describing the devicecapabilities (e.g. full duplex).

• The link speed defaults to the lowest capability level of the twostations.

• Autoconfiguration is useful to decrease the chance of usermis-configuration.

COMP312 - Local Area Networks – p. 33/58

Autonegotiation - 3

16ms

clock

datai

1

data data data data

clock clock clock clock2 3 4

16432

16

2ms burstof 33 pulses

FLP

Return to Section ToC

COMP312 - Local Area Networks – p. 34/58

Hubs Bridges and Switches - Summary

• Hubs are compressed busses used to allow star wiring (UTP).• Bridges break up collision domains and extend LANs.• Bridges use spanning tree routing to break up loops.• Switches are multiport bridges.

Return to Section ToC Return to ToC

COMP312 - Local Area Networks – p. 35/58

Modern Ethernet

• Speeds.• VLANS.• Other Features.

COMP312 - Local Area Networks – p. 36/58

Page 10: COMP312

Speeds

Ethernet has rapidly increased in speeds• 1973 - Original experimental Ethernet at Xerox PARC - 3Mbps• 1980 - DEC, Intel, Xerox (DIX) Ethernet - 10Mbps• 1982 - Ethernet II (DIX v2.0) - 10 Mbps• 1985 - IEEE 802.3 CSMA/CD - 10Mbps• 1995 - IEEE 802.3u Fast Ethernet - 100Mbps• 1998 - IEEE 802.3z - Gigabit Ethernet• 2002 - IEEE 802.3ae - 10 Gigabit Ethernet

COMP312 - Local Area Networks – p. 37/58

Modern Ethernet Timeline

COMP312 - Local Area Networks – p. 38/58

Thick Ethernet (10base5)

COMP312 - Local Area Networks – p. 39/58

Thick Ethernet (10base5)

COMP312 - Local Area Networks – p. 40/58

Page 11: COMP312

Thin Ethernet (10base2)

COMP312 - Local Area Networks – p. 41/58

UTP Ethernet

COMP312 - Local Area Networks – p. 42/58

Fibre Optic Ethernet

COMP312 - Local Area Networks – p. 43/58

Ethernet Physical Layers

1000BaseSX

1000BaseT

100BaseFX

100BaseTX (UTP)

10BaseF

10BaseT

10Base2

10Base5

UTP

Fiber

Fiber

UTP

5mm 50 ohm Coax

10mm 50 ohm Coax

Medium Signaling

Manchester

Mancheter

Manchester

Manchester

4B5B MLT−3

4B5B NRZI

PAM5x5

8B10B 2

NodesMax SegmentTopology

100

30

2

2

2

2

2UTP

1000BaseSX

Bus

Bus

Star

Star

Star

Star

Star

Star

185m

100m

100m

550m

100m

100m

500m

500m

50micron Fiber

8B10B Star 2

8B10B

8B10B

8B10B

Star

Star

Star

550m 2

2

2

62.5micron Fiber 275m

1000BaseLX 50/72.5micron Fiber

1000BaseLX 9micron Fiber 5000m

1000BaseLH ~9micron Fiber 50~100km

COMP312 - Local Area Networks – p. 44/58

Page 12: COMP312

MLT3 Line Coding

MLT−3

0110 110 11 0 0 1 1 1 1 0 0 0 0 1 0 1 1 1

• Three level code - transition on 1, not on 0.• Lower bandwidth than NRZI - less crosstalk

COMP312 - Local Area Networks – p. 45/58

Block Coding

• Used with NRZI or MLT3 coding• Ensures that there are always several 1s in a block.• Ensure transitions for synchronisation.• 4B5B 4bits coded as five.• 8B10B 8 bits coded as 10 -gives better DC balance.

COMP312 - Local Area Networks – p. 46/58

4B5B Block Coding

11111

11000

10001

01101

00111

00100

other invalid

idle

delimiter

delimiter

delimiter

delimiter

transmit error

1111

1110

1101

1100

4B5B

111100000

0001

0010

0011

0100

0101

0110

0111

1000

1001

1010

1011

01001

10100

10101

01010

01011

01110

01111

10010

10011

10110

10111

11010

11011

11100

11101

COMP312 - Local Area Networks – p. 47/58

10 Gigabit Ethernet Physical Layers

Ten Gigabit Ethernet has many different physical layer options. Mostare optical, but differences arise due to:

• The length of the link may be from 2 m to 40 km or more.• The type of fibre and its characteristics: multimode/ singlemode,

dispersion shifted etc.• The wavelength of the laser used.• Whether a 10Gb/s LAN interface is required or a 9.9532Gb/s SDH

compatible WAN interface.

Copper interface was added to the 10GB specification in Feb 2004. Itrequires special shielded cable and connectors and has a maximumdistance of 15m.Return to Section ToC

COMP312 - Local Area Networks – p. 48/58

Page 13: COMP312

Virtual LANs

• The logical and physical structure of an organisation are notalways the same.

• Dividing a network according to the logical organisation may havesecurity and performance advantages through traffic localisation.

• Virtual LANs (VLANs) allow a single physical network to besubdivided arbitrarily into multiple virtual networks.

• Packets are tagged according to which VLAN they belong to.• Switches maintain separate forwarding tables for separate VLANs

and will not forward packets from one VLAN to another

COMP312 - Local Area Networks – p. 49/58

VLAN Concept

COMP312 - Local Area Networks – p. 50/58

Virtual LAN Tags

• There is no support for VLANs in any standard Ethernet headertype.

• A new extension header IEEE 802.1Q has been defined that addsVLAN information.

• Normally this runs only between switches although newerinterface cards may add VLAN support.

• Packets may be assigned to a VLAN in three different ways:◦ A switch port may be assigned to a VLAN.◦ MAC addresses may be assigned to specific VLANs.◦ Layer 3 protocols or IP addresses may be assigned to specific

VLANs.

COMP312 - Local Area Networks – p. 51/58

VLAN Tagging

priority CFI reserved VLAN ID

CFI indicated if routing data is present

3 1 4 8 bits

proto =0x8100

informationrouting

(optional)dest src Tag Control type CRCdata

2266

VLAN Header

2−302 octets4

Return to Section ToC

COMP312 - Local Area Networks – p. 52/58

Page 14: COMP312

Other Features

• Link Aggregation• Packet Priority• Management

COMP312 - Local Area Networks – p. 53/58

Link Aggregation

• Link aggregation is combining multiple switched links to appear asa single high speed link.

• Can be used to provide redundancy on a network connection.• Proprietry solutions offered for several years, then standardised

asIEEE 802.3ad in 1999.• Used for switch to switch links and also server-switch links.• Tends to become redundant as higher speed Ethernet becomes

available at reasonable prices.

COMP312 - Local Area Networks – p. 54/58

Packet Priority

• Standardised by the IEEE as 802.1p.• Uses three priority bits of VLAN header.• Indicates a relative priority.• Higher priority packets are transmitted first.• Lower priority packets are dropped first.• At low loads there may be no packets in a switch buffer so it has

no effect.• Priorities may be assigned by switches the same way VLAN

membership is.• Priorities may be assigned by stations if they support 802.1Q

headers.• The standard has no admission control so it provides relative

service classification, but not strict service quality levels.

COMP312 - Local Area Networks – p. 55/58

Management

• Many of the features of switches need some management controlto set up (e.g. VLANs).

• Switches can count traffic and provide usage statistics.• Large networks may have hundreds of switches.• Most large equipment vendors provide some form switch

management.• There are some standards e.g. SNMP.• Support for proprietry management systems is sometimes added,

e.g. Cisco.• Often a simple telnet interface and a web based interface is

provided.

COMP312 - Local Area Networks – p. 56/58

Page 15: COMP312

Layer 3 Switches

• Although bridges and switches break up collision domains, theydo not break up broadcast domains.

• Traditional LAN protocols (e.g. Netware, Netbios) often usebroadcast extensively.

• Every broadcast packet must be forwarded to every node on theLAN so the load grows as the square of the number of packets.

• Dividing Layer 2 broadcast domains requires Layer 3 devices;routers in IP terminology.

• Traditional routers use general purpose CPUs running UNIX andare much slower than hardware based Ethernet switches.

• The solution is to implement some Layer 3 (IP) functions in switchcircuits.

• Such devices are called Layer 3 switches.

COMP312 - Local Area Networks – p. 57/58

Modern Ethernet - Summary

• Ethernet is now a switched network technology: for most links onlythe frame format is the same as the original 802.3 specifications.

• Ethernet speeds have grown 1000x since the originalspecifications.

• Ethernet links are limited in distance only by the choice oftransmission technology and can span hundreds of kilometers.

• Ethernet switches have sophisticated features to manage packetflows, priorities and security.

Return to Section ToC Return to ToC

COMP312 - Local Area Networks – p. 58/58