local area network lesson 7 nets2150/2850. lesson outline common lan topologies logical link control...

50
Local Area Network Lesson 7 NETS2150/2850

Post on 15-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Local Area Network

Lesson 7NETS2150/2850

Page 2: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Lesson OutlineCommon LAN topologiesLogical Link Control sublayerMedium Access Control sublayerARP protocol for IP MAC mapLAN interconnection devices

Page 3: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

TopologiesLAN topology refers to the ways end systems are interconnectedCommon topologies:

TreeBus

Special case of tree

RingStar

Page 4: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

LAN Topologies

Page 5: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Bus and TreeTransmission propagates throughout medium Heard by all stations

Need to identify target stationEach station has unique address

Full duplex connection between station and tapAllows for simultaneous transmission and reception

Need to regulate transmissionTo avoid collisionsTo avoid hogging

Data in small frames (fragmentation!)

Terminator absorbs frames at end of mediumPrevent from being reflected into the channel

Page 6: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Frame Transmissionon Bus LAN

Page 7: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Ring TopologyRepeaters joined by point to point links in closed loop

Receive data on one link and retransmit on anotherLinks unidirectionalStations attach to repeaters

Data in framesCirculate past all stationsDestination recognizes address and copies frameFrame circulates back to source where it is removed

MAC protocol determines when station can insert frame

Page 8: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Frame TransmissionRing LAN

Page 9: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Star TopologyEach station connected directly to central node

Usually via two point to point links

Central node can broadcastOnly one station can transmit at a time

Or central node can act as frame switch

More stations can transmit at a time

Page 10: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

IEEE 802 v OSI RM

Page 11: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

802 Layers - PhysicalEncoding/decodingPreamble generation/removal

7 bytes with pattern 10101010 followed by one byte with pattern 10101011used to synchronise receiver, sender clock rates

Bit transmission/receptionTransmission medium and topology

Page 12: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

802 Layers -Logical Link Control

Based on HDLCProvides interface to higher levelsTransmission of LLC PDU between two stations

Flow and error control

Must support multiaccess, shared LAN media

Link access handled by MAC layer

Page 13: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

LLC ServicesUnacknowledged connectionless service

No handshake and no ack (unreliable)

Connection mode serviceUse handshake and ack

Acknowledged connectionless service

No handshake but uses ack

Page 14: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Media Access ControlAssembly of data into frame with address and error detection fieldsDisassembly of frame

Address recognitionError detection

Govern access to transmission medium

Page 15: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

MAC Frame FormatMAC layer receives data from LLC layer and adds:

MAC controlDestination MAC address (6-octet or 48-bit)Source MAC addressCRC

MAC layer detects errors and discards framesMAC broadcast address: FF FF FF FF FF FF16

LLC optionally retransmits unsuccessful frames

Page 16: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

IEEE 802.3 MAC Frame Format

Addresses: 6 octetsif adapter receives frame with matching destination address, or with broadcast address, it passes data in frame to net-layer protocolotherwise, adapter discards frame

Length: length of data field in octets, max frame size is 1518 octets (excluding preamble & SFD)CRC: checked at receiver, if error is detected, the frame is simply dropped (32-bit CRC)

Octets: 8 6 6 2 46-1500 4

Length

Page 17: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

MAC protocolsAssume single shared broadcast channel Two or more simultaneous transmissions by nodes will cause interference

only one node can send successfully at a time

MAC protocol:distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit

Page 18: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

MAC Protocols: A taxonomyThree broad classes:

Channel Partitioning or Reservationdivide channel into smaller “pieces” (time slots, frequency, code)allocate a piece to node for exclusive use

Random Access or Contentionchannel not divided, thus can’t avoid collisionsNeed to “recover” from collisions

“Taking turns” or Round Robintightly coordinate shared access to avoid collisions

Page 19: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Address Resolution Protocol (ARP)

Even if you have the IP address of your destination, you need its MAC to get your data across a physical networkSo, we need a way to do this mappingARP performs dynamic mapping between IP and MACAny resolved mapping is stored in a host’s ARP cache

Page 20: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

ARP operation

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Page 21: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

An ARP request is broadcast; an ARP reply is unicast.

NoteNote::

An ARP reply is only generated by the destined node.

Page 22: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

ARP Packet Format

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Page 23: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Encapsulation of ARP Packet

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Length

Page 24: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Interconnecting LAN segments

HubsBridgesSwitches

Page 25: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

HubsHub acts as a repeater (physical layer device)When single station transmits, hub repeats signal on outgoing line to each stationLimited to about 100 mOptical fibre may be used

Max about 500 m

Physically star, logically busTransmission from any station received by all other stationsForms a single collision domain

Two stations transmit at the same time collision!!

Page 26: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Interconnecting with hubsBackbone hub interconnects LAN segmentsExtends max distance between stationsBut individual segments’ collision domain become one large collision domain

when a node in CS and a node in EE transmit at same time collision!!

Can’t interconnect 10BaseT & 100BaseT

Page 27: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

BridgesLink layer device (layer-2 device)

stores and forwards Ethernet framesexamines frame header and selectively forwards frame based on MAC dest address

transparentstations are unaware of presence of bridges

plug-and-play, self-learningbridges do not need to be configured

Page 28: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Bridges: traffic isolationBridge installation breaks LAN into LAN segments

bridges filter packets: same-LAN-segment frames not usually forwarded onto other LAN segmentssegments become separate collision domains

bridge collision domain

collision domain

= hub

= station

LAN

LAN segment LAN segment

Page 29: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Forwarding

How to determine to which LAN segment to forward frame?• Looks like a routing problem...

Page 30: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Self learningA bridge has a bridge tableentry in bridge table:

(Station MAC Address, Bridge Interface, Timestamp)stale entries in table dropped (TTL can be ~ 60 min)

bridges learn which hosts can be reached through which interfaces

when frame received, bridge “learns” location of sender: incoming LAN segmentrecords sender/location pair in bridge table

Page 31: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Bridge exampleSuppose C sends frame to D and D replies

back with frame to C.

Bridge receives frame from from Cupdates bridge table, C is on interface/port 1because D is not in table, bridge sends frame into interfaces 2 and 3

frame received by D

Page 32: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Bridge Learning: example

D generates frame for C, and sends it

bridge receives frame notes in bridge table that D is on interface 2 bridge knows C is on interface 1, so selectively forwards frame to interface 1

C 1

Page 33: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Interconnection without backbone

Not recommended for two reasons:- single point of failure at Computer Science hub- all traffic between EE and SE must path over CS segment

Page 34: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Backbone configuration

Recommended !

Note: A bridge does not change the physical (MAC) addresses in a frame.

Page 35: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Loop of Bridges

Page 36: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Spanning Tree AlgorithmAddress learning works for tree layout

i.e. no closed loops (or cycles)But not for cyclic connected graph!

Spanning Tree Algo. builds a network including all the nodes with selected links (i.e. edges) without closed loops

Known as a spanning tree!

Page 37: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Spanning Treefor increased reliability, desirable to have redundant, alternative paths from source to dest but need to avoid cyclessolution: organize bridges in a spanning tree by disabling subset of interfaces

Disabled

Page 38: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Some bridge featuresIsolates collision domains resulting in higher total max throughput (i.e. amount of data transmitted within an interval)Transparent (“plug-and-play”): no configuration necessary

Page 39: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Routers vs. Bridges (1)both store-and-forward devices

routers: network layer devices (examine network layer headers)bridges are link layer devices

routers maintain routing tables, implement routing algorithmsbridges maintain bridge tables, implement filtering, learning and spanning tree algorithms

Page 40: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Routers vs. Bridges (2)Bridges pros (+) and cons (-)+ Bridge operation is simpler requiring

less data unit processing+ Bridge tables are self learning - All traffic confined to spanning tree,

even when alternative bandwidth is available

- Bridges do not offer protection from broadcast storms (i.e. forwarding of broadcast traffic)

Page 41: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Routers vs. Bridges (3)Routers + and -+ arbitrary topologies can be supported,

cycling is limited by TTL counters (and good routing protocols)

+ provide protection against broadcast storms- require IP address configuration (not plug and

play)- require higher packet processing

bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts)

Page 42: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Ethernet SwitchesEssentially a multi-interface bridge

layer 2 (frame) forwarding, filtering using LAN addresses

Incoming frame from particular station switched to appropriate output lineUnused lines can switch other trafficMore than one station can transmit at a time

Multiplying capacity of LAN

Page 43: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Shared Hub and Switch

Page 44: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Types of Ethernet Switches

Store-and-forward switchAccepts frame on input lineBuffers it briefly, then forwards it to appropriate output lineError checking, boosts integrity of network

Cut-through switchTakes advantage of dest address appearing at beginning of frameSwitch begins repeating frame onto output line as soon as it recognizes dest addressHighest possible throughput Risk of propagating bad frames

Switch unable to check CRC prior to retransmission

Netgear GS108UK GB SwitchLatency ~ 10 µs for 64-byte framesThroughput 32 MfpsMAC database (8000 entries)

Page 45: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Ethernet Switch BenefitsNo change to attached stations to convert bus LAN or hub LAN to switched LANFor Ethernet LAN, each station uses Ethernet MAC protocol Each station has dedicated capacity equal to original LAN

Assuming switch has sufficient capacity to keep up with all devices

Switch scales easilyCon: still has broadcast storm problem!

Page 46: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Subnetwork with layer-3 device!

Solution: break up network into subnetworks connected by routers or layer-3 switch (faster!)Packet forwarding done in the hardwareMAC broadcast frame limited to stations and switches contained within a single subnetwork

Page 47: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Typical Large LAN Organization

Thousands to tens of thousands of stationsDesktop systems links 10 Mbps to 100 Mbps

Into layer 2 switch

Wireless LAN connectivity available for mobile usersLayer 3 switches at local network's core

Form local backboneInterconnected at 1 GbpsConnect to layer 2 switches at 100 Mbps to 1 Gbps

Servers connect directly to layer 2 or layer 3 switches at 1 Gbps

Page 48: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Typical Large LAN OrganizationDiagram

Page 49: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

Summary comparisonhubs bridges routers switches

traffi cisolation

no yes yes yes

plug & play yes yes no yes

optimalrouting

no no yes no

cutthrough

yes no no yes

Page 50: Local Area Network Lesson 7 NETS2150/2850. Lesson Outline Common LAN topologies Logical Link Control sublayer Medium Access Control sublayer ARP protocol

SummaryLAN topologiesIEEE 802 reference modelTypes of MAC protocolsInterconnection Devices

Hubs, bridges, switches, routers

Read Stallings chapter 15Next: Specific MAC protocols