local area networks part a © prof. aiman hanna department of computer science concordia university...

30
Local Area Networks Local Area Networks Part A Part A © Prof. Aiman Hanna © Prof. Aiman Hanna Department of Computer Science Department of Computer Science Concordia University Concordia University Montreal, Canada Montreal, Canada

Upload: charlotte-mckinney

Post on 28-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Local Area NetworksLocal Area NetworksPart APart A

© Prof. Aiman Hanna© Prof. Aiman HannaDepartment of Computer Science Department of Computer Science

Concordia University Concordia University Montreal, CanadaMontreal, Canada

22

LL ocal Area Networks ocal Area Networks Local Area Networks (LAN) covers limited geographic area, Local Area Networks (LAN) covers limited geographic area,

e.g. 1 or 2 buildingse.g. 1 or 2 buildings

In contrast, a Wide Area Network (WAN) covers large area In contrast, a Wide Area Network (WAN) covers large area from cities, states, countries to the entire worldfrom cities, states, countries to the entire world

LAN protocols & cabling are different than those of WANLAN protocols & cabling are different than those of WAN

Stations or Nodes are typically PCs, Printers, File servers,..Stations or Nodes are typically PCs, Printers, File servers,..

LAN topologies are: LAN topologies are: • Bus, Bus, • Ring, Ring, • Star, Star, • Fully connectedFully connected

33

LL ocal Area Networks ocal Area Networks

Figure 9.1 – Network Topologies

44

LL ocal Area Networks ocal Area Networks Bus TopologyBus Topology The medium, referred to as a The medium, referred to as a segmentsegment, is a single , is a single

communication line, typically a coaxial cable or optical communication line, typically a coaxial cable or optical fiber fiber

Devices uses a contention protocol to send over the Devices uses a contention protocol to send over the segment segment

Only one device can send at a time for collision not to Only one device can send at a time for collision not to occuroccur

55

LL ocal Area Networks ocal Area Networks Bus TopologyBus Topology

Figure 9.2 – Bus Topology Connecting Multiple Locations

66

LL ocal Area Networks ocal Area Networks Ring TopologyRing Topology Devices are arranged into a ring, where each device is Devices are arranged into a ring, where each device is

connected directly to its two neighbors connected directly to its two neighbors

For two devices to communicate, frames must be For two devices to communicate, frames must be passed through all the devices in between passed through all the devices in between

A ring can be unidirectional or bidirectional A ring can be unidirectional or bidirectional

77

LL ocal Area Networks ocal Area Networks Star TopologyStar Topology A central devices is connected to all other devicesA central devices is connected to all other devices

Communication must go through that central deviceCommunication must go through that central device

Fully Connected TopologyFully Connected Topology A direct connection is there between any two devices A direct connection is there between any two devices

This topology is rarely used This topology is rarely used

88

DD ata Link Control ata Link Control Where LAN standers fit in a layered protocol Where LAN standers fit in a layered protocol

Figure 9.3 – Data Link Refinement

99

DD ata Link Control ata Link Control IEEE 802.3 Ethernet & IEEE 802.5 Token Ring standards are IEEE 802.3 Ethernet & IEEE 802.5 Token Ring standards are

MAC protocolsMAC protocols

Many different data link protocols can sit above the MACMany different data link protocols can sit above the MAC

All of these protocols however have a common ancestor, the All of these protocols however have a common ancestor, the Synchronous Data Link ControlSynchronous Data Link Control ( (SDLCSDLC) protocol) protocol

SDLC was designed by IBM in the early 1970sSDLC was designed by IBM in the early 1970s

SDLC was designed as a bit-oriented protocolSDLC was designed as a bit-oriented protocol

Prior to SDLC, protocols were byte oriented; that is frames are Prior to SDLC, protocols were byte oriented; that is frames are interpreted as sequence of bytes interpreted as sequence of bytes

1010

DD ata Link Control ata Link Control IBM submitted SDLC to ISO for approval, however IBM submitted SDLC to ISO for approval, however

ISO created their own standard out of it, which is called ISO created their own standard out of it, which is called High-level Data High-level Data Link ControlLink Control ( (HDLCHDLC))

IBM also submitted SDLC to ANSI for acceptance, however IBM also submitted SDLC to ANSI for acceptance, however ANSI modified and renamed it ANSI modified and renamed it Advanced Data Communication Advanced Data Communication Control ProcedureControl Procedure ( (ADCCPADCCP) )

ITU adopted and modified SDLC to ITU adopted and modified SDLC to Link Access ProtocolLink Access Protocol ( (LAPLAP) and later ) and later to to LAPBLAPB; B for Balanced; B for Balanced

IEEE has then created the IEEE has then created the Logical Link ControlLogical Link Control ( (LLCLLC) protocol, for ) protocol, for LANs, out of HDLCLANs, out of HDLC

LLC also allows LANs to connect to other LANs and WANsLLC also allows LANs to connect to other LANs and WANs

1111

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC) Bit-oriented frames; that is it treats frames as bit streams Bit-oriented frames; that is it treats frames as bit streams

Supports both half/full duplex modes Supports both half/full duplex modes

Communicating stations running HDLC can be: Communicating stations running HDLC can be: • Primary Primary • Secondary Secondary • Combined Combined

1212

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC)

Figure 9.4 – HDLC Configuration

1313

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC) Devices running HDLC can communicate in one of the Devices running HDLC can communicate in one of the

following modes:following modes:• Normal Response Mode (NRM)Normal Response Mode (NRM)

Primary station controls communication; secondary sends only Primary station controls communication; secondary sends only when instructedwhen instructed

This mode is common in point-to-point and multipoint linksThis mode is common in point-to-point and multipoint links

• Asynchronous Response Mode (ARM) Asynchronous Response Mode (ARM) Secondary station can send data, but no commands, to primary Secondary station can send data, but no commands, to primary

station without explicit instruction station without explicit instruction

• Asynchronous Balanced Mode (ABM) Asynchronous Balanced Mode (ABM) Either station can send data or commandsEither station can send data or commands This mode is typical to point-to-point link between combined This mode is typical to point-to-point link between combined

stationsstations

1414

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC)Frame FormatFrame Format

Two sizes of frames exist (standard and extended) Two sizes of frames exist (standard and extended)

Flag fields, which mark the start and end of a frame, have a Flag fields, which mark the start and end of a frame, have a special bit stream: 01111110special bit stream: 01111110

Bit-stuffingBit-stuffing is needed in case 01111110 is part of the data sent is needed in case 01111110 is part of the data sent

Figure 9.5 – HDLC Frame Format

1515

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC)

Figure 9.6 – Bit Stuffing

1616

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC)Frame FormatFrame Format (continue …) (continue …)

Frame Check Sequence (FCS) is used for CRC error detectionFrame Check Sequence (FCS) is used for CRC error detection Control field is used to send status (control) or commands Control field is used to send status (control) or commands The value of the control depends on the frame typeThe value of the control depends on the frame type In general, there are 3 types of frames: In general, there are 3 types of frames:

• Information Information • SupervisorySupervisory• Unnumbered Unnumbered

Figure 9.7 – Control Fields for HDLC Frame

1717

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC)Frame FormatFrame Format (continue …) (continue …)

N(S)N(S) indicates the Number of Frame being Sent. indicates the Number of Frame being Sent. N(R)N(R) indicates the Number of Frame that is expected to be Received; that indicates the Number of Frame that is expected to be Received; that

is, it acknowledges up to is, it acknowledges up to N(R) - 1N(R) - 1 P/FP/F stands for Poll/Final. It is P if the frame is sent by primary station and F stands for Poll/Final. It is P if the frame is sent by primary station and F

if sent by a secondary stationif sent by a secondary station

The The SS field in supervisory has the following meanings: field in supervisory has the following meanings: 0000: Receive ready (: Receive ready (RRRR) – device is ready to receive ) – device is ready to receive 0101: Reject (: Reject (REJREJ) – that is NACK) – that is NACK 1010: Receive Not Ready (: Receive Not Ready (RNRRNR) – device not ready) – device not ready 1111: Selective Reject (: Selective Reject (SREJSREJ): NACK for selective repeat; it ): NACK for selective repeat; it

NACKS the frame specified in NACKS the frame specified in N(R)N(R)

The combination of the 5-bit values of The combination of the 5-bit values of MM define how the protocol will define how the protocol will proceedproceed

1818

H H igh-level Data Link Control igh-level Data Link Control (HDLC)(HDLC)HDLC ExampleHDLC Example

RIM:RIM: Request Initialization Mode Request Initialization ModeSIM:SIM: Set Initialization Mode Set Initialization Mode UA:UA: Unnumbered ACK Unnumbered ACKSARM:SARM: Set Asynchronous Set Asynchronous

Response ModeResponse Mode

Figure 9.8 – Communicating Using HDLC

1919

Mac LayerMac Layer DHLC and similar protocols describes how devices DHLC and similar protocols describes how devices

can exchange frames, independent of the mediumcan exchange frames, independent of the medium

MAC layer techniques consider the physical medium MAC layer techniques consider the physical medium

Three formal standards were defined by IEEE:Three formal standards were defined by IEEE:• IEEE standard 802.3 – IEEE standard 802.3 – The EthernetThe Ethernet

Proposed by Xerox, Intel & DECProposed by Xerox, Intel & DEC

• IEEE standard 802.4 – IEEE standard 802.4 – Token BusToken Bus Proposed by General MotorsProposed by General Motors

• IEEE standard 802.5 – IEEE standard 802.5 – Token RingToken Ring Proposed by IBMProposed by IBM

2020

EE thernetthernet Designed as a bus topology with some form of CSMA/CD Designed as a bus topology with some form of CSMA/CD

contention protocolcontention protocol

Today, it is considered as the dominant LAN standard Today, it is considered as the dominant LAN standard

Figure 9.11 – Possible Ethernet Connection

2121

EE thernetthernet The The transceiver’stransceiver’s primary purpose is to create an interface between the computer and the cable primary purpose is to create an interface between the computer and the cable

One of its main functions is to transmit bits onto the cable using CSMA/CD contentionOne of its main functions is to transmit bits onto the cable using CSMA/CD contention

The connection to the network interface card is through a The connection to the network interface card is through a transceiver cabletransceiver cable; sometimes referred ; sometimes referred to as to as Attachment Unit InterfaceAttachment Unit Interface ( (AUIAUI) cable) cable

Can communicate with several devices through a multiplexer Can communicate with several devices through a multiplexer

Ethernet TransceiverEthernet Transceiver

2222

EE thernetthernet The The network interface card (NIC) network interface card (NIC) contains the logic contains the logic

necessary to buffer data and move it between the transceiver necessary to buffer data and move it between the transceiver and the computer’s memoryand the computer’s memory

It also recognizes frames on the LAN that is destined for its It also recognizes frames on the LAN that is destined for its computercomputer

Network Interface CardNetwork Interface Card

2323

EE thernetthernet Activities of sending from one machine to another:Activities of sending from one machine to another:

At the sending end:At the sending end:• Put packet into memory and signal NIC through internal busPut packet into memory and signal NIC through internal bus

• NIC creates correct frame format & stores packet into data fieldNIC creates correct frame format & stores packet into data field

• NIC waits for a transceiver signal that the segment is clearNIC waits for a transceiver signal that the segment is clear

• Once this signal is received, NIC send the frame to the transceiver, which Once this signal is received, NIC send the frame to the transceiver, which forwards it, as bits, onto the cable then listens for collision forwards it, as bits, onto the cable then listens for collision

• If no collision, transceiver informs NICIf no collision, transceiver informs NIC

• If collision occurs, NIC uses binary exponential backoff algorithm to determine If collision occurs, NIC uses binary exponential backoff algorithm to determine when it should try againwhen it should try again

• If number of retry attempts is exhausted, NIC signals network software, which If number of retry attempts is exhausted, NIC signals network software, which in turn signals the error to the userin turn signals the error to the user

2424

EE thernetthernet Activities of sending from one machine to another (continue…):Activities of sending from one machine to another (continue…):

At the receiving end:At the receiving end:• Transceiver monitors cable traffic, gets the frames and route them to Transceiver monitors cable traffic, gets the frames and route them to

NICNIC

• NIC performs CRC error check and if the frame is error free, then check NIC performs CRC error check and if the frame is error free, then check the destination address the destination address

• If the destination address matches the machine of that NIC, then NIC If the destination address matches the machine of that NIC, then NIC extracts the packet from the frame, buffer it and sends an interrupt to extracts the packet from the frame, buffer it and sends an interrupt to the CPU the CPU

• The machine executes network software and determines whether the The machine executes network software and determines whether the packet should be accepted according to the used flow control algorithmpacket should be accepted according to the used flow control algorithm

• If all okay, the computer receives the packet; otherwise the network If all okay, the computer receives the packet; otherwise the network software responds according to the protocol at the next higher layer software responds according to the protocol at the next higher layer

2525

EE thernetthernetRepeatersRepeaters Since signals degrade over distance, the original standard set the maximum length of the Since signals degrade over distance, the original standard set the maximum length of the

segment to 500 meters segment to 500 meters

In many situations, this limit is smaller than the distance neededIn many situations, this limit is smaller than the distance needed

This problem was resolved by allowing multiple segments to be connected through This problem was resolved by allowing multiple segments to be connected through repeaters repeaters

A repeater receives the signal, regenerates and retransmits itA repeater receives the signal, regenerates and retransmits it

The standard states that the maximum number of repeaters between any two devices is 4The standard states that the maximum number of repeaters between any two devices is 4

Figure 9.12 – Connecting Two Segments Repeater

2626

EE thernetthernetFrame FormatFrame Format

Figure 9.13 – Ethernet Frame Format

Figure 9.14 – Maximum Time to Detect a Collision

2727

EE thernetthernetWhat is the lower bound of data bytes?What is the lower bound of data bytes?

Maximum segment size with maximum repeaters: 500 * (4 + 1) = 2500 mMaximum segment size with maximum repeaters: 500 * (4 + 1) = 2500 m Signals travel on a copper wire with a speed of about 200 m / Signals travel on a copper wire with a speed of about 200 m / µµsecsec It takes about 12.5 It takes about 12.5 µµsec to travel from one end to anothersec to travel from one end to another Total time to travel and come back is 25 Total time to travel and come back is 25 µµsecsec Considering the different delays due to collision and repeaters processing Considering the different delays due to collision and repeaters processing

for both the signal and the noise, worst case was set as double that time, for both the signal and the noise, worst case was set as double that time, which is 50 which is 50 µµsecsec

Each frame must take at least 50 Each frame must take at least 50 µµsec to sendsec to send At 10Mbps (10 bits/At 10Mbps (10 bits/µµsec) rate, the device needs to send 500 bits in 50 sec) rate, the device needs to send 500 bits in 50 µµsecsec The was rounded, for safety, to 512 bits or 64 bytesThe was rounded, for safety, to 512 bits or 64 bytes

Finally, the data lower bound was set to 46 bytes to make sure that the Finally, the data lower bound was set to 46 bytes to make sure that the frame will be large enough for CSMA/CD to work correctly frame will be large enough for CSMA/CD to work correctly

2828

EE thernetthernetThickNet, ThinNet & HubsThickNet, ThinNet & Hubs Original implementation of the Ethernet used Original implementation of the Ethernet used 10Base510Base5 cable (a wide cable cable (a wide cable

of 10 mm diameter); this was referred to as of 10 mm diameter); this was referred to as ThickNetThickNet ThickNet had the advantage of allowing one segment to be up to 500 mThickNet had the advantage of allowing one segment to be up to 500 m However, the size of the wire represented a major disadvantage However, the size of the wire represented a major disadvantage Alternatively, transceiver logics were placed on NIC, and Alternatively, transceiver logics were placed on NIC, and 10Base210Base2 (a much (a much

thinner wire, referred to as thinner wire, referred to as ThinNetThinNet) replaced 10Base5 wire) replaced 10Base5 wire ThinNet however has a higher resistance and so it allows a maximum ThinNet however has a higher resistance and so it allows a maximum

segment size of 185 msegment size of 185 m

Figure 9.15 – ThinNet Connections Using T-Connector

2929

EE thernetthernetThickNet, ThinNet & HubsThickNet, ThinNet & Hubs

10Base2 T-Connector Possible Transceiver Settings

3030

EE thernetthernetThickNet, ThinNet & HubsThickNet, ThinNet & Hubs A A HubHub, sometimes referred to as , sometimes referred to as multiportmultiport repeaters repeaters, is a device with , is a device with

many ports; each connects to a device using 10BaseT cablemany ports; each connects to a device using 10BaseT cable A hub can also be connected to another hubA hub can also be connected to another hub With that, Ethernet has no longer a With that, Ethernet has no longer a physicalphysical bus topology; so how does this bus topology; so how does this

affect the NICs, CSMA/CD mechanism, …etc.? affect the NICs, CSMA/CD mechanism, …etc.?

Figure 9.16 – Connecting PCs with a Hub

10BaseT Cable