Upload
sreekanth-pagadapalli
View
217
Download
2
Embed Size (px)
Citation preview
RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE 11
Networking EssentialsNetworking Essentials
Chapter 7 – Data Link Control Chapter 7 – Data Link Control ProtocolsProtocols
22 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Data Link ProtocolsData Link Protocols
Data Link Protocols are protocols for Data Link Protocols are protocols for the OSI Model, Layer 2the OSI Model, Layer 2Data Link Protocols handle Data Link Protocols handle transmission over a single circuit (link); transmission over a single circuit (link); not end-to-end!not end-to-end!Various Layer 2 encapsulations may Various Layer 2 encapsulations may occur from end-to-endoccur from end-to-end
33 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Terms You Should KnowTerms You Should KnowData Terminating Equipment (DTE) – Data Terminating Equipment (DTE) – the the device at both ends of a transmission; e.g., device at both ends of a transmission; e.g., PC, Router, Server. (We will tighten this PC, Router, Server. (We will tighten this definition later in the course)definition later in the course)Full Duplex Communications – Full Duplex Communications – allows allows transmissions in both directions transmissions in both directions simultaneouslysimultaneouslyHalf Duplex Communications – Half Duplex Communications – allows allows transmissions in both directions, but not at transmissions in both directions, but not at the same timethe same time
44 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Data Link Protocol FunctionsData Link Protocol Functions
Communication StartupCommunication Startup: rules for initiating : rules for initiating communication (if any)communication (if any)Character Identification and FramingCharacter Identification and Framing: DTE : DTE must reassemble bit streams into frames; must reassemble bit streams into frames; must recognize framing and control must recognize framing and control characterscharactersMessage IdentificationMessage Identification: : huh? huh? I think this I think this should read Frame Identification; there are should read Frame Identification; there are many different types of frames depending many different types of frames depending upon the protocol being used.upon the protocol being used.
55 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Data Link Protocol FunctionsData Link Protocol Functions
Line ControlLine Control: rules for positive : rules for positive acknowledgement (if any) and flow acknowledgement (if any) and flow control (if any)control (if any)Error ControlError Control: rules for error detection : rules for error detection and notificationand notificationTerminationTermination: rules for ending the : rules for ending the communication (if any)communication (if any)
66 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Desirable Attributes of Data Link Desirable Attributes of Data Link ProtocolsProtocols
Transparency – Transparency – transmission and transmission and reception of any bit patternreception of any bit patternCode Independence – Code Independence – Transmission Transmission and reception of any recognized coding and reception of any recognized coding schemeschemeEfficiency – Efficiency – minimum number of minimum number of characters used for controlcharacters used for control
77 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Some Predetermined ParametersSome Predetermined Parameters
The coding scheme (ASCII, EBCDIC,…)The coding scheme (ASCII, EBCDIC,…)Parity scheme (even, odd, none)Parity scheme (even, odd, none)Transmission Speed (may be Transmission Speed (may be determined by modems and error rates)determined by modems and error rates)These parameters must be agreed to by These parameters must be agreed to by sender and receiver before sender and receiver before transmission can occur successfullytransmission can occur successfully
88 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Media Access - ContentionMedia Access - ContentionCommonly used for Bus topologies Commonly used for Bus topologies (e.g., Ethernet)(e.g., Ethernet)A station transmits only when it A station transmits only when it detects that the medium is not busydetects that the medium is not busyWhile a station can “hog” the While a station can “hog” the medium, most protocols enforce a medium, most protocols enforce a maximum frame length to prevent this maximum frame length to prevent this from happeningfrom happeningWorks best if (1) only 2 DTE’s, (2) low Works best if (1) only 2 DTE’s, (2) low traffic with multiple DTE’s, or (3) fast traffic with multiple DTE’s, or (3) fast link speedlink speed
99 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Media Access - PollingMedia Access - PollingSingle Master asks other stations for Single Master asks other stations for data transmissiondata transmissionRoll Call Polling - Roll Call Polling - master sends each master sends each station address in its polling list. Busier station address in its polling list. Busier stations may appear many times in the stations may appear many times in the list. Stations respond to their addresslist. Stations respond to their addressFast Select PollingFast Select Polling – master does not – master does not wait for NAK (negative wait for NAK (negative acknowledgement) but continues pollingacknowledgement) but continues polling
1010 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Media Access - PollingMedia Access - Polling
Hub Polling – Hub Polling – Polling circulates Polling circulates among all stations; each station polls among all stations; each station polls it’s downstream neighborit’s downstream neighborPolling has the disadvantage of high Polling has the disadvantage of high overhead (inefficient)overhead (inefficient)
1111 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Media Access – Token PassingMedia Access – Token Passing
Commonly used for Ring TopologyCommonly used for Ring TopologyToken (special frame) is passed in a Token (special frame) is passed in a ring from node to nodering from node to nodeA station ready to transmit must first A station ready to transmit must first access the token and then change it access the token and then change it into a messageinto a messageA very deterministic protocolA very deterministic protocol
1212 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Message (Frame) FormatMessage (Frame) Format
HeaderHeader: contains addresses, length of : contains addresses, length of frame, special controlsframe, special controlsTextText: the data portion of the frame or : the data portion of the frame or acknowledgement informationacknowledgement informationTrailerTrailer: Block Check or CRC character: Block Check or CRC characterSOHSOH: Start of Header (beginning of : Start of Header (beginning of header character)header character)
1313 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Message (Frame) FormatMessage (Frame) Format
STXSTX: Start of Text character; denotes : Start of Text character; denotes end of header, beginning of textend of header, beginning of textETXETX: End of Text character: End of Text characterSYNSYN: Synchronization character; : Synchronization character; maintains proper timing and can maintains proper timing and can occur anywhere in the transmissionoccur anywhere in the transmission
1414 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Flow ControlFlow Control
Process that ensures transmitter is Process that ensures transmitter is not sending faster than the receiver not sending faster than the receiver can process the datacan process the dataFlow control at Layer 2 is link orientedFlow control at Layer 2 is link orientedFlow control at Layer 2 is usually Flow control at Layer 2 is usually handled by positive (ACK) and handled by positive (ACK) and negative (NAK) acknowledgmentnegative (NAK) acknowledgment
1515 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Stop-and-Wait Flow ControlStop-and-Wait Flow Control
Send a block; wait for ACK or NAK Send a block; wait for ACK or NAK before continuing transmissionbefore continuing transmissionIf ACK, send next blockIf ACK, send next blockIf NAK, resend last blockIf NAK, resend last blockLeast efficient method; too much wait Least efficient method; too much wait time for line to “turn around”time for line to “turn around”
1616 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Sliding Window Flow ControlSliding Window Flow ControlSend several blocks before waiting for Send several blocks before waiting for acknowledgementacknowledgementGo-back-n: Go-back-n: receiver NAKs if frame receiver NAKs if frame damaged or out of order; transmitter damaged or out of order; transmitter resends damaged or correct frame and all resends damaged or correct frame and all subsequent frames of the original subsequent frames of the original transmissiontransmissionSelective Repeat: Selective Repeat: both ends buffer so that both ends buffer so that only a single frame needs to be resent on a only a single frame needs to be resent on a NAKNAK
1717 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Asynchronous ProtocolsAsynchronous Protocols
Earliest protocols (teletype)Earliest protocols (teletype)Character oriented; not blockCharacter oriented; not blockCharacter framed by start and stop-Character framed by start and stop-parity bitsparity bitsLess expensive to implement, but Less expensive to implement, but very inefficientvery inefficientMore elaborate Asynchronous More elaborate Asynchronous protocols allow block transmissionprotocols allow block transmission
1818 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Point-to-Point Protocol (PPP)Point-to-Point Protocol (PPP)
Commonly used for dial-up to the Commonly used for dial-up to the Internet Service Provider (ISP)Internet Service Provider (ISP)Circuit can be switched or dedicatedCircuit can be switched or dedicatedCircuit must be full duplex capableCircuit must be full duplex capablePPP performs authentication, data PPP performs authentication, data compression, error detection and compression, error detection and correction, and packet sequencingcorrection, and packet sequencing
1919 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Point-to-Point Protocol (PPP)Point-to-Point Protocol (PPP)
Replaces SLIP (Serial Line Internet Replaces SLIP (Serial Line Internet Protocol) which is IP onlyProtocol) which is IP onlyFrame structure shown in Figure 7-4Frame structure shown in Figure 7-4Escape mechanism for transparencyEscape mechanism for transparencyMultiplexes several Layer 3 protocols Multiplexes several Layer 3 protocols over one link, e.g., IP, IPX, AppleTalkover one link, e.g., IP, IPX, AppleTalk
2020 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
XMODEM ProtocolXMODEM Protocol
Developed for PC to PC transfersDeveloped for PC to PC transfersHalf duplex protocol; i.e., each block Half duplex protocol; i.e., each block is acknowledgedis acknowledgedETX – stops the transmissionETX – stops the transmissionVery inefficient on full duplex capable Very inefficient on full duplex capable circuitscircuits
2121 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Synchronous ProtocolsSynchronous ProtocolsBlock orientedBlock orientedCharacter OrientedCharacter Oriented: special control : special control characters indicate beginning and end characters indicate beginning and end of blocksof blocksByte-Count orientedByte-Count oriented: special : special character marks the header which character marks the header which contains the length of the blockcontains the length of the blockBit orientedBit oriented: blocks framed by special : blocks framed by special flag which can not appear in the textflag which can not appear in the text
2222 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
BSC or BISYNCBSC or BISYNC
BSC – Binary Synchronous ControlBSC – Binary Synchronous ControlIntroduced by IBM in 1967Introduced by IBM in 1967Half-duplex, character oriented Half-duplex, character oriented protocolprotocolMany control characters (Figure 7-5)Many control characters (Figure 7-5)Transparent or non-transparent Transparent or non-transparent modes of operationmodes of operation
2323 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
BSC or BISYNCBSC or BISYNC
Synchronization maintained with SYN Synchronization maintained with SYN characterscharactersAlternating Block Acknowledgement: Alternating Block Acknowledgement: ACK0 and ACK1ACK0 and ACK1Point-to-point and Multi-point Point-to-point and Multi-point operationoperation
2424 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Digital Data Communications Digital Data Communications Message Protocol (DDCMP)Message Protocol (DDCMP)Introduced by DEC (now part of HP)Introduced by DEC (now part of HP)Byte-count orientedByte-count orientedSOH is only unique control characterSOH is only unique control characterData message is the header and dataData message is the header and dataControl message is the header onlyControl message is the header onlyAcknowledgment in the headerAcknowledgment in the header
2525 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Digital Data Communications Digital Data Communications Message Protocol (DDCMP)Message Protocol (DDCMP)Point-to-point and multi-point Point-to-point and multi-point operationoperationFull or half duplex supportFull or half duplex supportSequence number allows Sliding Sequence number allows Sliding Window approachWindow approachMore efficient than BSCMore efficient than BSCVirtually replaced by TCP/IP stacksVirtually replaced by TCP/IP stacks
2626 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
High-level Data Link Control High-level Data Link Control (HDLC)(HDLC)
Most common Layer 2 protocol with Most common Layer 2 protocol with many descendantsmany descendantsBit-oriented protocolBit-oriented protocolHalf or full duplex operationHalf or full duplex operation
2727 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC Station TypesHDLC Station Types
PrimaryPrimary – issues commands; – issues commands; establishes and manages connection to establishes and manages connection to other stationsother stationsSecondarySecondary – responds to commands – responds to commands from only 1 Primary station; only sends from only 1 Primary station; only sends datadataCombinedCombined – as it says – as it saysSee Figure 7-12See Figure 7-12
2828 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC Operating ModesHDLC Operating ModesNormal Response Mode (NRM) – Normal Response Mode (NRM) – point-to-point-to-point or multipoint; primary station polls, point or multipoint; primary station polls, secondary respondssecondary respondsAsynchronous Balanced Mode (ABM) – Asynchronous Balanced Mode (ABM) – combined stations; no polling; point-to-pointcombined stations; no polling; point-to-pointAsynchronous Response Mode (ARM) – Asynchronous Response Mode (ARM) – point to point or multipoint; secondary point to point or multipoint; secondary stations can transmit data without stations can transmit data without permission; no polling; full duplexpermission; no polling; full duplex
2929 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC FramingHDLC Framing
All HDLC frames are delimited by a All HDLC frames are delimited by a special flag character: 01111110special flag character: 01111110Flag character synchronizes Flag character synchronizes communicationcommunicationFlag character never appears in the Flag character never appears in the data because of zero bit stuffing and data because of zero bit stuffing and removalremoval
3030 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC AddressingHDLC AddressingAddress field in frame is the Address field in frame is the destination node address if sent by the destination node address if sent by the primaryprimarySecondary node always uses its own Secondary node always uses its own address in the frame; primary can address in the frame; primary can figure out who sent whatfigure out who sent whatBroadcastBroadcast – all secondary stations – all secondary stationsGroupGroup – all secondary stations in a pre- – all secondary stations in a pre-defined group defined group
3131 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Other HDLC Frame FieldsOther HDLC Frame Fields
Control FieldControl Field – identifies format as – identifies format as InformationInformation (I), (I), SupervisorySupervisory (S) or (S) or Un-numberedUn-numbered (U) (U)Data FieldData Field – present in I and – present in I and sometimes U frames; variable sometimes U frames; variable lengthlengthFrame Check Sequence (FCS)Frame Check Sequence (FCS) – 16 – 16 or 32 bit CRCor 32 bit CRC
3232 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC I-FamesHDLC I-Fames
Data field has the text being Data field has the text being transmittedtransmittedReceived Number Field – used for Received Number Field – used for sliding window effectsliding window effectFrame Check Sequence (FCS)Frame Check Sequence (FCS) – 16 – 16 or 32 bit CRCor 32 bit CRC
3333 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC S-FramesHDLC S-FramesIndicates status of communicationIndicates status of communication RR – receive ready – able to receive RR – receive ready – able to receive
datadata RNR – receive not ready (flow RNR – receive not ready (flow
control); tells sender to stop sendingcontrol); tells sender to stop sendingNegative AcknowledgementNegative Acknowledgement REJ – reject and request resendREJ – reject and request resend SREJ – reject and request resend of a SREJ – reject and request resend of a
given framegiven frame
3434 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC U-FramesHDLC U-Frames
Used to negotiate parametersUsed to negotiate parametersNormal or Extended frame formatNormal or Extended frame formatSelective Repeat of Go-back-nSelective Repeat of Go-back-nInitiates and terminates Initiates and terminates transmissionstransmissions
3535 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
HDLC Frame FlowHDLC Frame Flow
See Figure 7-16See Figure 7-16Flow depends on which mode is in Flow depends on which mode is in use (ARM, ABM,…)use (ARM, ABM,…)
3636 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Other Data Link ProtocolsOther Data Link ProtocolsLink Access Procedure, Balanced Link Access Procedure, Balanced (LAPB)(LAPB) – ABM mode, full duplex, point- – ABM mode, full duplex, point-to-pointto-pointLink Access Procedure, D-channel Link Access Procedure, D-channel (LAPD)(LAPD) – ABM mode, ISDN D channel – ABM mode, ISDN D channelLink Access Procedure, Frame (LAPF)Link Access Procedure, Frame (LAPF) – used for Frame Relay WAN– used for Frame Relay WANAsynchronous Transfer Mode (ATM)Asynchronous Transfer Mode (ATM) – – fixed length cell, full duplex, point-to-fixed length cell, full duplex, point-to-pointpoint
3737 RVCC - CISY 219 - Fall 2004 - TWERVCC - CISY 219 - Fall 2004 - TWE
Case StudyCase StudyPORNOGRAPHY ON THE INTERNETPORNOGRAPHY ON THE INTERNET What is it?What is it? What problems does it cause ( if any)What problems does it cause ( if any) Should it be left alone, censored, eliminated? Should it be left alone, censored, eliminated?
How? Implications?How? Implications?You need to reach a consensus OR provide You need to reach a consensus OR provide two responses. What is the path forward two responses. What is the path forward on this issue? What else can be done on this issue? What else can be done technologically?technologically?