btech 2012

Upload: sujy-cau

Post on 04-Jun-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 BTech 2012

    1/204

    K.Balachandran

  • 8/13/2019 BTech 2012

    2/204

    To introduce the concepts, terminologies andtechnologies used in modern days data

    communication and computer networking.

  • 8/13/2019 BTech 2012

    3/204

    To understand the concepts of datacommunications.

    To study the functions of different layers. To introduce IEEE standards employed in

    computer networking. To make the students to get familiarized with

    different protocols and network components.

  • 8/13/2019 BTech 2012

    4/204

    Text book: Behrouz A. Forouzan, Data communication and

    Networking, Tata McGraw-Hill, 2004. Reference books James F. Kurose and Keith W. Ross, Computer

    Networking: A Top-Down Approach Featuring theInternet, Pearson Education, 2003.

    Larry L.Peterson and Peter S. Davie, ComputerNetworks, Harcourt Asia Pvt. Ltd., Second Edition.

    Andrew S. Tanenbaum, Computer Networks, PHI, FourthEdition, 2003.

    William Stallings, Data and Computer Communication,Sixth Edition, Pearson Education, 2000.

  • 8/13/2019 BTech 2012

    5/204

    DATA COMMUNICATIONS DATA LINK LAYER

    NETWORK LAYER TRANSPORT LAYER APPLICATION LAYER

  • 8/13/2019 BTech 2012

    6/204

    Components Direction of Data flow networks Components and Categories

    types of Connections Topologies Protocolsand Standards ISO / OSI model Transmission Media Coaxial Cable FiberOptics Line Coding Modems RS232Interfacing sequences.

  • 8/13/2019 BTech 2012

    7/2047

    Why study data communications? Data communication exchange of data

    between two devices via a transmissionmedium

    Effectiveness depends on:

    Delivery, Accuracy, Timeliness, Jitter

  • 8/13/2019 BTech 2012

    8/204

    Sender Receiver

    Message Medium Protocol

  • 8/13/2019 BTech 2012

    9/2049

  • 8/13/2019 BTech 2012

    10/20410

    Text represented as a bit pattern; codesoften used:

    ASCII; Extended ASCII; Unicode; ISO Numbers represented by binary equivalent Images bit patterns representing pixels Audio Video

  • 8/13/2019 BTech 2012

    11/20411

    Simplex unidirectional; one transmits, otherreceives

    Half-duplex each can transmit/receive;communication must alternate

    Full-duplex both can transmit/receivesimultaneously

  • 8/13/2019 BTech 2012

    12/20412

    Set of devices (nodes) connected by media Distributed processing

    Advantages

  • 8/13/2019 BTech 2012

    13/20413

    Performance affected by # users, type ofmedium, HW/SW

    Reliability measured by freq of failure,recovery time, catastrophe vulnerability Security protection from unauthorized

    access, viruses/worms

  • 8/13/2019 BTech 2012

    14/204

    14

    Point-to-point dedicated

    Multipoint shared

  • 8/13/2019 BTech 2012

    15/204

    15

    Physical or logical arrangement 4 basic types: mesh, star, bus, ring

    May often see hybrid

  • 8/13/2019 BTech 2012

    16/204

    LAN MAN

    WAN

  • 8/13/2019 BTech 2012

    17/204

    Protocols:

    Syntax: structure and format of the data

    Semantics: meaning of each section of bits Timing

  • 8/13/2019 BTech 2012

    18/204

    De facto: standards not approved by standardagencies

    De jure: legislated and officially recognized

    Standards Organizations: ISO

    ITU- International Telecommunication Union

    CCITT: Consultative committee for InternationalTelegraphy and Telephony

    ANSI: American National Standards Institute

    IEEE: institute of Electrical and Electronics Engineers

    EIA: Electronics Industries Association

  • 8/13/2019 BTech 2012

    19/204

    OSI (Open Systems Interconnect) Network architecture based on a proposal developed by

    ISO (International Standards Organization) to standardize the protocols used in various layers

  • 8/13/2019 BTech 2012

    20/204

    20

    Dedicated point-to-pointlinks to every other device

    Advantages Disadvantages

  • 8/13/2019 BTech 2012

    21/204

    21

    Dedicated point-to-pointlinks to central controller(hub)

    Controller acts as exchange Advantages Disadvantages

  • 8/13/2019 BTech 2012

    22/204

    22

    Transmission Medium and Physical Layer

  • 8/13/2019 BTech 2012

    23/204

  • 8/13/2019 BTech 2012

    24/204

    24

    Categories of unshielded twisted-pair cables

  • 8/13/2019 BTech 2012

    25/204

    25

    (a)Category 3 UTP

    (b)Category 5 UTP

  • 8/13/2019 BTech 2012

    26/204

    26

    UTPconnector

  • 8/13/2019 BTech 2012

    27/204

  • 8/13/2019 BTech 2012

    28/204

  • 8/13/2019 BTech 2012

    29/204

    Physical description:

    Each wire with copper conductor

    Separately insulated wires

    Twisted together to reduce cross talk Often bundled into cables of two or four twisted pairs

    If enclosed in a sheath then is shielded twisted pair (STP)

    otherwise often for home usage unshielded twisted pair (UTP).

    Must be shield from voltage lines

  • 8/13/2019 BTech 2012

    30/204

    Application:

    Common in building for digital signaling used at

    speed of 10s Mb/s (CAT3) and 100Mb/s (CAT5)over 100s meters.

    Common for telephone interconnection at home

    and office buildings

    Less expensive medium; limited in distance,bandwidth, and data rate.

  • 8/13/2019 BTech 2012

    31/204

    Category Maximum data

    rate

    Usual application

    CAT 1 Less than 1 Mbps analog voice (plain old telephone

    service) Integrated Services Digital

    Network Basic Rate Interface in ISDN

    Doorbell wiringCAT 2 4 Mbps Mainly used in the IBM Cabling System

    for token ring networks

    CAT 3 16 Mbps Voice and data on 10BASE-T Ethernet

    (certify 16Mhz signal)

    CAT 4 20 Mbps Used in 16Mbps Token Ring

    Otherwise not used much

    CAT 5 100 Mbps 100 Mbps TPDDI

    155 Mbps asynchronous transfer

    mode (certify 100 Mhz signal)

  • 8/13/2019 BTech 2012

    32/204

    Widely installed for use in business and corporationEthernet and other types of LANs.

    Consists of inter copper insulator covered by claddingmaterial, and then covered by an outer jacket

    Physical Descriptions

    Covered by sheath material

    Outer conductor is braided shielded (ground)

    Separated by insulating material

    Inner conductor is solid copper metal

  • 8/13/2019 BTech 2012

    33/204

    Applications:

    TV distribution (cable tv); long distance telephone transmission;short run computer system links

    Local area networks Transmission characteristics: Can transmit analog and digital signals

    Usable spectrum for analog signaling is about 400 Mhz

    Amplifier needed for analog signals for less than 1 Km and less

    distance for higher frequency Repeater needed for digital signals every Km or less distance for

    higher data rates

    Operation of 100s Mb/s over 1 Km.

  • 8/13/2019 BTech 2012

    34/204

    Physical Description: Glass or plastic core of optical fiber = 2 to125 m

    Cladding is an insulating material

    Jacket is a protective cover

    Laser or light emitting diode providestransmission light source

  • 8/13/2019 BTech 2012

    35/204

    Applications:

    Long distance telecommunication

    Greater capacity; 2 Gb/s over 10s of Km

    Smaller size and lighter weight

    Lower attenuation (reduction in strength of signal)

    Electromagnetic isolation not effected by externalelectromagnetic environment. more privacy

    Greater repeater spacing fewer repeaters, reduces lineregeneration cost

  • 8/13/2019 BTech 2012

    36/204

    multimode fiber is optical fiber that is designedto carry multiple light rays or modesconcurrently, each at a slightly different

    reflection angle within the optical fiber core.used for relatively short distances because themodes tend to disperse over longer lengths (thisis called modal dispersion) .

    For longer distances, single mode fiber(sometimes called monomode) fiber is used. Insingle mode fiber a single ray or mode of lightact as a carrier

  • 8/13/2019 BTech 2012

    37/204

  • 8/13/2019 BTech 2012

    38/204

  • 8/13/2019 BTech 2012

    39/204

  • 8/13/2019 BTech 2012

    40/204

    0.85, 1.30, 1.55 bands Bands are 25000 to 30000 GHz wide

    Dispersion: Spreading out in length as theypropagate- Hyperbolic cosine Solitons: pulses which can travel 1000s of

    KMs without any appreciable shape

    dispersion

  • 8/13/2019 BTech 2012

    41/204

    Band Range Propagation Application

    VLF 330 KHz Ground Long-range radio navigation

    LF 30300 KHz GroundRadio beacons and

    navigational locators

    MF 300 KHz3 MHz Sky AM radio

    HF 330 MHz SkyCitizens band (CB),

    ship/aircraft communication

    VHF 30300 MHzSky and

    line-of-sight

    VHF TV,

    FM radio

    UHF 300 MHz3 GHz Line-of-sightUHF TV, cellular phones,

    paging, satellite

    SHF 330 GHz Line-of-sight Satellite communication

    EHF 30300 GHz Line-of-sight Long-range radio navigation

  • 8/13/2019 BTech 2012

    42/204

  • 8/13/2019 BTech 2012

    43/204

    43

  • 8/13/2019 BTech 2012

    44/204

    44

    Process of converting binary data to a digital signal

  • 8/13/2019 BTech 2012

    45/204

    45

    Residual direct-current(dc) components or zerofrequencies areundesirable

    Some systems do not allow

    passage of a dc component;

    may distort the signal and

    create output errors DC component is extra

    energy and is useless

  • 8/13/2019 BTech 2012

    46/204

    46

    Includes timinginformation in the databeing transmitted toprevent misinterpretation

    Lack of synchronization

  • 8/13/2019 BTech 2012

    47/204

    47

    Unipolar Polar

    Bipolar

  • 8/13/2019 BTech 2012

    48/204

    48

    Simplest method; inexpensive Uses only one voltage level Polarity is usually assigned to binary 1; a 0 is

    represented by zero voltage

  • 8/13/2019 BTech 2012

    49/204

    49

    Potential problems:

    DC component

    Lack of synchronization

  • 8/13/2019 BTech 2012

    50/204

    50

    Uses two voltage levels, one positive and onenegative

    Alleviates DC component Variations

    Nonreturn to zero (NRZ)

    Return to zero (RZ)

    Manchester

    Differential Manchester

  • 8/13/2019 BTech 2012

    51/204

    51

    Value of signal is always positive or negative NRZ-L Signal level depends on bit represented; positive

    usually means 0, negative usually means 1 Problem: synchronization of long streams of 0s or

    1s NRZ-I (NRZ-Invert)

    Inversion of voltage represents a 1 bit 0 bit represented by no change Allows for synchronization

  • 8/13/2019 BTech 2012

    52/204

    52

    Uses an inversion at the middle of each bit interval forboth synchronization and bit representation

    Negative-to-positive represents binary 1 Positive-to-negative represents binary 0

    Achieves same level of synchronization with only 2levels of amplitude

  • 8/13/2019 BTech 2012

    53/204

    53

    Inversion at middle of bit interval is used for synchronization Presence or absence of additional transition at beginning ofinterval identifies the bit

    Transition means binary 0; no transition means 1 Requires two signal changes to represent binary 0; only one to

    represent 1

  • 8/13/2019 BTech 2012

    54/204

    54

    RS-232 is the Serial interface on the PC

    Three major wires for the Serial interface:

    Transmit -Pin 2

    Receive -Pin 3

    Ground -Pin 7 (25 pin connector)

    - Pin 5 (9 pin connector)

    Tx Tx

    RxRx

    GndGnd

    Computer

    Device

    Transmit connects to Receive

  • 8/13/2019 BTech 2012

    55/204

    55

    TD: transmitted data RD: received data DSR: data set ready

    indicate whether DCE is powered on DTR: data terminal ready

    indicate whether DTR is powered on

    turning off DTR causes modem to hang up the line

    RI: ring indicator ON when modem detects phone call

  • 8/13/2019 BTech 2012

    56/204

    56

    DCD: data carrier detect ON when two modems have negotiated successfully and

    the carrier signal is established on the phone line RTS: request to send

    ON when DTE wants to send data Used to turn on and off modems carrier signal in multi-

    point (i.e. multi-drop) lines

    Normally constantly ON in point-to-point lines CTS: clear to send

    ON when DCE is ready to receive data SG: signal ground

  • 8/13/2019 BTech 2012

    57/204

    57

    Means to ask the transmitter to stop/resume sending indata

    Required when: DTE to DCE speed > DCE to DCE speed

    (e.g. terminal speed = 115.2kbps and line speed = 33.6kbps, inorder to benefit from modems data compression protocol)

    without flow control, the buffer within modem will overflow sooner or later

    the receiving end takes time to process the data and thus

    cannot be always ready to receive

    Position of the data-linklayer

  • 8/13/2019 BTech 2012

    58/204

    Data link layer duties

  • 8/13/2019 BTech 2012

    59/204

    LLC and MAC sublayers

  • 8/13/2019 BTech 2012

    60/204

    IEEE standards for LANs

  • 8/13/2019 BTech 2012

    61/204

  • 8/13/2019 BTech 2012

    62/204

    Error Detection

    and

    Correction

  • 8/13/2019 BTech 2012

    63/204

    Data can be corrupted during

    transmission. For reliablecommunication, errors must be detected

    and corrected.

    Note:

    T

    f E

  • 8/13/2019 BTech 2012

    64/204

    Types of Error

    Single-Bit Error

    Burst Error

  • 8/13/2019 BTech 2012

    65/204

    In a single-bit error, only one bit in the

    data unit has changed.

    Note:

    Single-bit error

  • 8/13/2019 BTech 2012

    66/204

  • 8/13/2019 BTech 2012

    67/204

    A burst error means that 2 or more bits

    in the data unit have changed.

    Note:

    Burst error of length 5

  • 8/13/2019 BTech 2012

    68/204

    D t ti

  • 8/13/2019 BTech 2012

    69/204

    Detection

    Redundancy

    Parity Check

    Cyclic Redundancy Check (CRC)

    Checksum

  • 8/13/2019 BTech 2012

    70/204

    Error detection uses the concept of

    redundancy, which means adding extrabits for detecting errors at the

    destination.

    Note:

  • 8/13/2019 BTech 2012

    71/204

    Detection methods

  • 8/13/2019 BTech 2012

    72/204

    Even-pari ty concept

  • 8/13/2019 BTech 2012

    73/204

  • 8/13/2019 BTech 2012

    74/204

    In parity check, a parity bit is added to

    every data unit so that the total numberof 1s is even

    (or odd for odd-parity).

    Note:

    Example 1

  • 8/13/2019 BTech 2012

    75/204

    Example 1

    Suppose the sender wants to send the word world. In

    ASCII the five characters are coded as

    1110111 1101111 1110010 1101100 1100100

    The following shows the actual bits sent

    11101110 11011110 11100100 11011000 11001001

    Example 2

  • 8/13/2019 BTech 2012

    76/204

    Example 2

    Now suppose the word world in Example 1 is received by

    the receiver without being corrupted in transmission.

    11101110 11011110 11100100 11011000 11001001

    The receiver counts the 1s in each character and comes up

    with even numbers (6, 6, 4, 4, 4). The data are accepted.

    Example 3

  • 8/13/2019 BTech 2012

    77/204

    Example 3

    Now suppose the word world in Example 1 is corrupted

    during transmission.

    11111110 11011110 11101100 11011000 11001001

    The receiver counts the 1s in each character and comes up

    with even and odd numbers (7, 6, 5, 4, 4). The receiver

    knows that the data are corrupted, discards them, and asks

    for retransmission.

  • 8/13/2019 BTech 2012

    78/204

    Simple parity check can detect all

    single-bit errors. It can detect bursterrors only if the total number of errors

    in each data unit is odd.

    Note:

    Two-dimensional pari ty

  • 8/13/2019 BTech 2012

    79/204

    Example 4

  • 8/13/2019 BTech 2012

    80/204

    Example 4

    Suppose the following block is sent:

    10101001 00111001 11011101 11100111 10101010

    However, it is hit by a burst noise of length 8, and some

    bits are corrupted.

    10100011 10001001 11011101 11100111 10101010

    When the receiver checks the parity bits, some of the bits

    do not follow the even-parity rule and the whole block is

    discarded.

    10100011 10001001 11011101 11100111 10101010

  • 8/13/2019 BTech 2012

    81/204

    In two-dimensional parity check, a block

    of bits is divided into rows and aredundant row of bits is added to the

    whole block.

    Note:

    CRC generator and checker

  • 8/13/2019 BTech 2012

    82/204

    Binary division in a CRC generator

  • 8/13/2019 BTech 2012

    83/204

    Binary division in CRC checker

  • 8/13/2019 BTech 2012

    84/204

  • 8/13/2019 BTech 2012

    85/204

    A polynomial representi ng a divisor

  • 8/13/2019 BTech 2012

    86/204

  • 8/13/2019 BTech 2012

    87/204

    Standardpolynomials

    Name Polynomial Application

    CRC-8 x8 +x2 +x+1 ATM header

    CRC-10 x10+x9 +x5 +x4 +x2+1 ATM AAL

    ITU-16 x16+x12+x5 + 1 HDLC

    ITU-32x32+x26 +x23+x22+x16+x12+x11+x10

    +x8+x7+x5+x4+x2+x +1LANs

    Example 5

  • 8/13/2019 BTech 2012

    88/204

    p 5

    It is obvious that we cannot choose x(binary 10) or x2+ x

    (binary 110) as the polynomial because both are divisibleby x. However, we can choose x + 1(binary 11) because

    it is not divisible by x, but is divisible by x + 1. We can

    also choose x2+ 1(binary 101) because it is divisible by

    x + 1 (binary division).

    Example 6

  • 8/13/2019 BTech 2012

    89/204

    p

    The CRC-12

    x12+ x11+ x3+ x + 1

    which has a degree of 12, will detect all burst errors

    affecting an odd number of bits, will detect all bursterrors with a length less than or equal to 12, and will

    detect, 99.97 percent of the time, burst errors with a

    length of 12 or more.

    Checksum

  • 8/13/2019 BTech 2012

    90/204

    Data uni t and checksum

  • 8/13/2019 BTech 2012

    91/204

  • 8/13/2019 BTech 2012

    92/204

    The sender follows these steps:

    The unit is divided into k sections, each of n bits.

    All sections are added using ones complement to get the sum.

    The sum is complemented and becomes the checksum.

    The checksum is sent with the data.

    Note:

  • 8/13/2019 BTech 2012

    93/204

    The receiver follows these steps:

    The unit is divided into k sections, each of n bits.

    All sections are added using ones complement to get the sum.

    The sum is complemented.

    If the result is zero, the data are accepted: otherwise, rejected.

    Note:

    Example 7

  • 8/13/2019 BTech 2012

    94/204

    Suppose the following block of 16 bits is to be sent using a

    checksum of 8 bits.10101001 00111001

    The numbers are added using ones complement

    10101001

    00111001

    ------------

    Sum 11100010

    Checksum 00011101

    The pattern sent is 10101001 00111001 00011101

    Example 8

  • 8/13/2019 BTech 2012

    95/204

    Now suppose the receiver receives the pattern sent in Example 7

    and there is no error.10101001 00111001 00011101

    When the receiver adds the three sections, it will get all 1s, which,

    after complementing, is all 0s and shows that there is no error.

    10101001

    00111001

    00011101

    Sum 11111111

    Complement 00000000 means that the pattern is OK.

    Example 9

  • 8/13/2019 BTech 2012

    96/204

    Now suppose there is a burst error of length 5 that affects 4 bits.

    10101111 11111001 00011101

    When the receiver adds the three sections, it gets

    10101111

    11111001

    00011101

    Partial Sum 111000101

    Carry 1

    Sum 11000110

    Complement 00111001 the pattern is corrupted.

    Correction

  • 8/13/2019 BTech 2012

    97/204

    Correction

    Retransmission

    Forward Error Correction

    Burst Error Correction

  • 8/13/2019 BTech 2012

    98/204

    Data and redundancy bits

    Number of

    data bits

    m

    Number of

    redundancy bits

    r

    Total

    bits

    m + r

    1 2 3

    2 3 5

    3 3 6

    4 3 7

    5 4 9

    6 4 10

    7 4 11

    Positions of redundancy bits in Hamming code

  • 8/13/2019 BTech 2012

    99/204

    Redundancy bits calculation

  • 8/13/2019 BTech 2012

    100/204

    Example of redundancy bit calculation

  • 8/13/2019 BTech 2012

    101/204

    Er ror detection using Hamming code

  • 8/13/2019 BTech 2012

    102/204

    Burst error correction example

  • 8/13/2019 BTech 2012

    103/204

  • 8/13/2019 BTech 2012

    104/204

    How to find an error? Introducing redundancy -- using 2 bits message to send 1 bit

    information in the previous example.

    Message = information bits + redundant bits (checksum).

    How to design codes that have errorcorrection/detection capability? Hamming distancebetween two code words: the

    number of different bits between the two code words.

    E.g 010101 and 111000? Hamming distance = ?

    Hamming distanceof a complete code: the minimum

    Hamming distance any of the two codewords in the code.

    E.g 010101, 111000, 000111, 111111 Hamming_distance= ?

  • 8/13/2019 BTech 2012

    105/204

  • 8/13/2019 BTech 2012

    106/204

  • 8/13/2019 BTech 2012

    107/204

    Redundancy bits calculation

  • 8/13/2019 BTech 2012

    108/204

    10.16 Example of redundancy bit calculation

  • 8/13/2019 BTech 2012

    109/204

  • 8/13/2019 BTech 2012

    110/204

    Data transmission in one direction only Both Transmitting and receiving host are always

    ready for operation Processing time can be ignored

    Infinite buffer size available Communication channels between IMPs never

    damages or loses frame No sequence Number, No acknowledgements Only event is FrameArrival arrival of undamaged

    frame

  • 8/13/2019 BTech 2012

    111/204

    typedef enum {frme_arraival} event_type;#include protocol.hvoid sender1(void){ frame s; /*buffer for an outbound frame*/

    packet buffer; /*buffer for an outbound packet*/while (true)

    {from_network_layer(&buffer);s.info = buffer;

    to_physical_layer(&s);}

  • 8/13/2019 BTech 2012

    112/204

    void receiver1(void){

    frame r;/*buffers for the frames*/

    event_type event;while (true){

    wait_for_event(&event);from_physical_layer(&r);to_network_layer(&r.info);

  • 8/13/2019 BTech 2012

    113/204

  • 8/13/2019 BTech 2012

    114/204

    typedef enum {frme_arraival} event_type;#include protocol.hvoid sender2(void){ frame s; /*buffer for an outbound frame*/

    packet buffer; /*buffer for an outbound packet*/

    while (true){

    from_network_layer(&buffer);s.info = buffer;

    to_physical_layer(&s);wait_for_event(&event);}

  • 8/13/2019 BTech 2012

    115/204

    void receiver1(void){frame r,s;/*buffers for the frames*/event_type event;while (true)

    {wait_for_event(&event);from_physical_layer(&r);to_network_layer(&r.info);

    to_physical_layer(&s); /*sending dummy frame to awaken sender */}

  • 8/13/2019 BTech 2012

    116/204

  • 8/13/2019 BTech 2012

    117/204

    ACKs introduce a new issue how long doesreceiver wait before sending ONLY an ACKframe.

    We need anACKTimer!!sender timeout periodneeds to set longer.

  • 8/13/2019 BTech 2012

    118/204

    Each outbound frame must contain a sequence number. With nbits for the sequence number field, the numbers range from 0to maxseq.

    Sliding window :: sender has a windowof frames and maintainsa list of consecutive sequence numbers for frames that it ispermitted to send without waiting for ACKs.

    receiver has a window that is a list of frame sequence numbersit is permitted to accept.

    Notesending and receiving windows do NOT have to be the

    same size.Windows can be fixed size or dynamically growing and

    shrinking.

  • 8/13/2019 BTech 2012

    119/204

    Host is oblivious, message order at transportlevel is maintained.

    senders window ::frames sent but not yet ACKed.

    new packets from the Host cause the upper

    edge inside sender window to be incremented.

    ACKed frames from the receiver cause the

    lower edge inside window to be incremented.

    All frames in the senders window must be savedfor possible retransmission and we need onetimer per frame in the window.

  • 8/13/2019 BTech 2012

    120/204

    If the maximum sender window size is B,the sender needs B buffers.

    If the sender windowgets full (i.e., reaches

    its maximum window size, the protocolmust shut off the Host (the network layer)until buffers become available.

    receiver window

    Frames received with sequence numbers outsidethe receiver windoware not accepted.

  • 8/13/2019 BTech 2012

    121/204

    receiver window Frames received with sequence numbers

    outside the receiver windoware not accepted.

    The receiver window size is normally static.The set of acceptable sequence numbers isrotated as acceptable frames arrive.

    a receiver window size = 1the protocol

    only accepts frames in order.There is referred to as Go Back N.

  • 8/13/2019 BTech 2012

    122/204

  • 8/13/2019 BTech 2012

    123/204

    A sliding window of size 1, with a 3-bit sequence number.(a)Initially.(b)After the first frame has been sent.(c)After the first frame has been received.

    (d)After the first acknowledgement hasbeen received.

  • 8/13/2019 BTech 2012

    124/204

    (a) Normal case. (b) Abnormal case.The notation is (seq, ack, packet number). Anasterisk indicates where a network layer accepts apacket.

    Go Back N

  • 8/13/2019 BTech 2012

    125/204

    A

    B

    fr0

    timefr1

    fr2

    fr3

    fr4

    fr5

    fr6

    fr3

    ACK

    1 error

    Out-of-sequence frames

    Go-Back-4: 4 frames are outstanding; so go back 4

    fr5

    fr6

    fr4

    fr7

    fr8

    fr9

    ACK

    2

    ACK

    3

    ACK

    4

    ACK

    5

    ACK

    6

    ACK7

    ACK

    8

    ACK

    9

    ACKing next frame expected

    Go Back Nwith NAK error recovery

  • 8/13/2019 BTech 2012

    126/204

    A

    B

    fr0

    timefr1

    fr2

    fr3

    fr4

    fr5

    fr1

    fr2

    ACK

    1

    error

    Out-of-sequenceframes

    Go-Back-7:

    fr4

    fr5

    fr3

    fr6

    fr7

    fr0

    NAK

    1

    ACK

    3

    ACK

    4

    ACK

    5

    ACK

    6

    ACK

    7

    ACK

    2

    Transmitter goes back to frame 1

    Figure 5.17Leon-Garcia & Widjaja: Communication NetworksCopyright 2000 The McGraw Hill Companies

  • 8/13/2019 BTech 2012

    127/204

    A

    B

    fr0

    timefr1

    fr2

    fr3

    fr4

    fr5

    fr6

    fr2

    AC

    K1 error

    fr8

    fr9

    fr7

    fr10

    fr11

    fr12

    AC

    K2

    NA

    K2

    AC

    K7

    AC

    K8

    AC

    K9

    AC

    K10

    AC

    K11

    AC

    K12

    AC

    K2

    AC

    K2

    AC

    K2

    Figure 5.21

    Selective Repeatwith NAK error recovery

    Leon-Garcia & Widjaja: Communication NetworksCopyright 2000 The McGraw Hill Companies

  • 8/13/2019 BTech 2012

    128/204

    HDLC

  • 8/13/2019 BTech 2012

    129/204

    Con f igu rat ions and Trans fer Modes

    Frames

    Frame Format

    Examples

    Data Transparency

    HDLC frame

  • 8/13/2019 BTech 2012

    130/204

    HDLC frame types

  • 8/13/2019 BTech 2012

    131/204

    I-frame

  • 8/13/2019 BTech 2012

    132/204

    S-frame control field in HDLC

  • 8/13/2019 BTech 2012

    133/204

  • 8/13/2019 BTech 2012

    134/204

    Table 11.1 U

    -

    frame control command and response

    Command/response Meaning

  • 8/13/2019 BTech 2012

    135/204

    SNRM Set normal response mode

    SNRME Set normal response mode (extended)

    SABM Set asynchronous balanced mode

    SABME Set asynchronous balanced mode (extended)

    UP Unnumbered poll

    UI Unnumbered information

    UA Unnumbered acknowledgmentRD Request disconnect

    DISC Disconnect

    DM Disconnect mode

    RIM Request information mode

    SIM Set initialization mode

    RSET Reset

    XID Exchange ID

    FRMR Frame reject

  • 8/13/2019 BTech 2012

    136/204

    Address Control Upper-layer data FCS

    DSAP

    SSAP

    Control

    Upperlayerdata

    MACheader

    MACpayload

    FCS

  • 8/13/2019 BTech 2012

    137/204

    CS 640 137

    Most popular packet-switched LAN technology Bandwidths: 10Mbps, 100Mbps, 1Gbps Max bus length: 2500m

    500m segments with 4 repeaters

    Bus and Star topologies are used to connect hosts

    Hosts attach to network via Ethernet transceiver or hub or switch

    Detects line state and sends/receives signals

    Hubs are used to facilitate shared connections

    All hosts on an Ethernet are competing for access to the medium

    Switches break this model

    Problem: Distributed algorithm that provides fair access

  • 8/13/2019 BTech 2012

    138/204

    CS 640 138

    Ethernet by definition is a broadcastprotocol Any signal can be received by all hosts

    Switching enables individual hosts tocommunicate Network layer packets are transmitted

    over an Ethernet by encapsulating

    Frame Format

    Destaddr

    64 48 32

    CRCPreambleSrcaddr

    Type Body

    1648

  • 8/13/2019 BTech 2012

    139/204

    CS 640 139

    Physical layer configurations are specified in three parts Data rate (10, 100, 1,000)

    10, 100, 1,000Mbps Signaling method (base, broad)

    Baseband Digital signaling

    Broadband Analog signaling

    Cabling (2, 5, T, F, S, L) 5 - Thick coax (original Ethernet cabling)

    F Optical fiber

    S Short wave laser over multimode fiber

    L Long wave laser over single mode fiber

  • 8/13/2019 BTech 2012

    140/204

    CS 640 140

    Developed in late 60s by Norm Abramson at Univ. of Hawaii(!!) for use with packet radio systems Any station can send data at any time

    Receiver sends an ACK for data

    Timeout for ACK signals that there was a collision What happens if timeout is poorly timed?

    If there is a collision, sender will resend data after a random backoff

    Utilization (fraction of transmitted frames avoiding collisionfor N nodes) was pretty bad

    Max utilization = 18% Slotted Aloha (dividing transmit time into windows) helped Max utilization increased to 36%

  • 8/13/2019 BTech 2012

    141/204

    CS 640 141

    In Aloha, decisions to transmit are made without paying

    attention to what other nodes might be doing Ethernet uses CSMA/CD listens to line before/during sending If line is idle (no carrier sensed) send packet immediately upper bound message size of 1500 bytes

    must wait 9.6us between back-to-back frames If line is busy (carrier sensed) wait until idle and transmit packet immediately

    called 1-persistent sending If collision detected Stop sending and jam signal Try again later

  • 8/13/2019 BTech 2012

    142/204

    CS 640 142

    Packet?

    Sense

    Carrier

    Discard

    Packet

    Send Detect

    Collision

    Jam channel

    b=CalcBackoff();wait(b);

    attempts++;

    No

    Yes

    attempts < 16

    attempts == 16

  • 8/13/2019 BTech 2012

    143/204

    CS 640 143

    A B

    A B

    Collisions are caused when two adaptors transmit at the samtime (adaptors sense collision based on voltage differences)

    Both found line to be idleBoth had been waiting to for a busy line to become idle

    A starts attime 0

    Message almostthere at time T when

    B starts collision!

    How can we be sure A knows about the collision?

  • 8/13/2019 BTech 2012

    144/204

    CS 640 144

    How can A know that a collision has taken place? There must be a mechanism to insure retransmission on collision As message reaches B at time T Bs message reaches A at time 2T So, A must still be transmitting at 2T

    IEEE 802.3 specifies max value of 2T to be 51.2us This relates to maximum distance of 2500m between hosts At 10Mbps it takes 0.1us to transmit one bit so 512 bits (64B) take 51.2us to send So, Ethernet frames must be at least 64B long

    14B header, 46B data, 4B CRC

    Padding is used if data is less than 46B Send jamming signal after collision is detected to insure all hosts see

    collision 48 bit signal

  • 8/13/2019 BTech 2012

    145/204

    CS 640 145

    A B

    A B

    A B

    time = 0

    time = T

    time = 2T

  • 8/13/2019 BTech 2012

    146/204

    CS 640 146

    If a collision is detected, delay and try again Delay time is selected using binary exponential backoff 1st time: choose K from {0,1} then delay = K * 51.2us 2nd time: choose K from {0,1,2,3} then delay = K * 51.2us nthtime: delay = K x51.2us, for K=0..2n1

    Note max value for k = 1023

    give up after several tries (usually 16) Report transmit error to host

    If delay were not random, then there is a chance that sourceswould retransmit in lock step

    Why not just choose from small set for K

    This works fine for a small number of hosts

    Large number of nodes would result in more collisions

  • 8/13/2019 BTech 2012

    147/204

    CS 640 147

    Senders handle all access control Receivers simply read frames with acceptable

    address

    Address to host

    Address to broadcast

    Address to multicast to which host belongs

    All frames if host is in promiscuous mode

  • 8/13/2019 BTech 2012

    148/204

    CS 640 148

    Fast Ethernet (100Mbps) has technology very similar to10Mbps Ethernet Uses different physical layer encoding (4B5B)

    Many NICs are 10/100 capable Can be used at either speed

    Gigabit Ethernet (1,000Mbps) Compatible with lower speeds

    Uses standard framing and CSMA/CD algorithm

    Distances are severely limited

    Typically used for backbones and inter-router connectivity

    Becoming cost competitive

    How much of this bandwidth is realizable?

  • 8/13/2019 BTech 2012

    149/204

    a carrier-sense, multiple access with collisiondetection (CSMA/CD) protocol for a bustopology

  • 8/13/2019 BTech 2012

    150/204

    Token Bus protocol for a token-passingaccess method on a bus topology

    The topology of the computer network can

    include groups of workstations connectedby long trunk cables

    token busis used in some manufacturing

    environments, Ethernet and token ringstandards have become more prominent inthe office environment.

  • 8/13/2019 BTech 2012

    151/204

    Token Ring protocol which, like Token Bus, isanother token-passing access method, butfor a ring topology

  • 8/13/2019 BTech 2012

    152/204

    TOKEN RING NETWORK LIKE IEEE 802.5

    TOKEN: A SPECIAL SEQUENCE OF BITS TOKEN CIRCULATES AROUND THE RING

    A STATION REMOVES THE TOKEN FROM RINGBEFORE TRANSMISSION

    AFTER TRANSMISSION, THE STATION

    RETURNS THE TOKEN TO THE RING

    COLLISIONS ARE PREVENTED AS THERE ISONLY ONE TOKEN IN THE RING

  • 8/13/2019 BTech 2012

    153/204

    DUAL-COUNTER-ROTATING TOKENRING ARCHITECTURE

    ONE RING IS PRIMARY AND THEOTHER SECONDARY

    UP TO 500 STATIONS WITH A

    MAXIMUM DISTANCE OF 2 KMBETWEEN ANY PAIR OF STATIONS

    FOR MULTIMODE FIBER

    WITH SINGLE-MODE FIBER THE

    DISTANCE CAN BE UP TO 40 KM

    MAXIMUM RING LENGTH IS 100 KM(TOTAL FIBER LENGTH IS 200 KM

    FOR TWO RINGS)

    USES 4B/5B ENCODING

  • 8/13/2019 BTech 2012

    154/204

    154

    FEATURES FDDI ETHERNET TOKEN RING

    TRANSMISSION

    RATE

    125 MBAUD 20 MBAUD 8 & 32 MBAUD

    DATA RATE 100 MBPS 10 MBPS 4 & 16 MBPS

    SIGNALENCODING

    4B/5B (80%EFFICIENT)

    MANCHESTER(50%

    EFFICIENT)

    DIFFERENTIALMANCHESTER

    (50% EFFICIENT)

    MAXIMUM

    COVERAGE

    100 KM 2.5 KM CONFIGURATION

    DEPENDENT

    MAXIMUMNODES

    500 1024 250

    MAXIMUM

    DISTANCE

    BETWEEN

    NODES

    2 KM (MULTIMODE

    FIBER)

    40 KM (SINGLE-

    MODE FIBER)

    2.5 KM 300 M

    (RECOMMENDED

    100 M)

  • 8/13/2019 BTech 2012

    155/204

    802.11 is primarily concerned withthe lower layers of the OSI model.

    Data Link Layer

    Logical Link Control (LLC).

    Medium Access Control (MAC).

    Physical Layer

    Physical Layer ConvergenceProcedure (PLCP).

    Physical Medium Dependent (PMD).

  • 8/13/2019 BTech 2012

    156/204

    Well-supported, stable, and cost effective,but runs in the 2.4 GHz range that makes itprone to interference from other devices(microwave ovens, cordless phones, etc) andalso has security disadvantages.

    Limits the number of access points in rangeof each other to three.

    Has 11 channels, with 3 non-overlapping, and

    supports rates from 1 to 11 Mbps, butrealistically about 4-5 Mbps max.

    Uses direct-sequence spread-spectrumtechnology.

  • 8/13/2019 BTech 2012

    157/204

  • 8/13/2019 BTech 2012

    158/204

    Completely different from 11b and 11g. Flexible because multiple channels can be combined for

    faster throughput and more access points can be co-located. Shorter range than 11b and 11g. Runs in the 5 GHz range, so less interference from other

    devices. Has 12 channels, 8 non-overlapping, and supports rates from

    6 to 54 Mbps, but realistically about 27 Mbps max Uses frequency division multiplexing

  • 8/13/2019 BTech 2012

    159/204

  • 8/13/2019 BTech 2012

    160/204

    Speed Slower than cable. Range Affected by various medium. Travels best through open space.

    Reduced by walls, glass, water, etc Security Greater exposure to risks. Unauthorized access.

    Compromising data.

    Denial of service.

    N t

  • 8/13/2019 BTech 2012

    161/204

    A bridge has a table used in filtering

    decisions.

    Note:

    Bridge

  • 8/13/2019 BTech 2012

    162/204

  • 8/13/2019 BTech 2012

    163/204

    Networks: SONET 163

    Digital carrier systems

    The hierarchy of digital signals that the telephone networkuses.

    Trunks and access links organized in DS (digital signal)hierarchy

    Problem: rates are not multiples of each other.

    In the 1980s Bellcore developed the Synchronous

    Optical Network (SONET) standard. Previous efforts include: ISDNand BISDN.

  • 8/13/2019 BTech 2012

    164/204

    SONET:: encodes bit streams into optical signals propagatedover optical fiber. SONET defines a technology for carryingmany signals of different capacities through a synchronous,flexible, optical hierarchy.

    A bit-way implementation providing end-to-end transportof bit streams.

    All clocks in the network are locked to a common masterclock so that simple TDM can be used.

    Multiplexing done by byte interleaving.

    SONETis backward compatible to DS-1 and E-1 and forwardcompatible to ATM cells.

    Demultiplexing is easy.

  • 8/13/2019 BTech 2012

    165/204

    Networks: SONET 165

    SONET topology can be a mesh, but mostoften it is a dual ring.

    Standard component of SONET ring is an

    ADM (Add/Drop Multiplexer) Drop one incoming multiplexed stream and

    replace it with another stream.

    Used to make up bi-directional line switchingrings.

  • 8/13/2019 BTech 2012

    166/204

    Networks: SONET

    a

    b

    c

    d

    a

    b

    c

    d

    (a) Dual ring (b) Loop-around in response to fault

    Figure 4.12

    ADM

    ADM

    ADM

    ADM

    Leon-Garcia & Widjaja: Communication NetworksCopyright 2000 The McGraw Hill Companies

  • 8/13/2019 BTech 2012

    167/204

    Networks: SONET

    SONET Ring

    (a)

    STS

    PTE

    STS

    PTE

    SONET Architecture

  • 8/13/2019 BTech 2012

    168/204

    STE: Section Terminating Equipment, e.g. a repeaterLTE: Line Terminating Equipment, e.g. a STS-1 to STS-3 multiplexer

    PTE: Path Terminating Equipment, e.g. an STS-1 multiplexer

    optical

    section

    optical

    section

    optical

    section

    optical

    section

    line

    optical

    section

    line

    optical

    section

    line

    path

    optical

    section

    line

    path

    (b)

    PTELTE

    STE

    STS-1 Path

    STS Line

    Section Section

    Mux Muxreg reg reg

    SONETTerminal

    STE STELTE

    SONETTerminal

    Learning bridge

  • 8/13/2019 BTech 2012

    169/204

    Loop problem

  • 8/13/2019 BTech 2012

    170/204

    Prior to spanning tree application

  • 8/13/2019 BTech 2012

    171/204

  • 8/13/2019 BTech 2012

    172/204

    Position of network layer

  • 8/13/2019 BTech 2012

    173/204

    Network layer duties

  • 8/13/2019 BTech 2012

    174/204

    Internetwork

  • 8/13/2019 BTech 2012

    175/204

    Links in an internetwork

  • 8/13/2019 BTech 2012

    176/204

    Network layer in an internetwork

  • 8/13/2019 BTech 2012

    177/204

    Network layer at the source

  • 8/13/2019 BTech 2012

    178/204

    Note

    :

  • 8/13/2019 BTech 2012

    179/204

    An IP address is a 32-bit address.

    Note:

    Note

    :

  • 8/13/2019 BTech 2012

    180/204

    The IP addresses are unique

    and universal.

    Note:

    Dotted-decimal notation

  • 8/13/2019 BTech 2012

    181/204

    Note

    :

  • 8/13/2019 BTech 2012

    182/204

    The binary, decimal, and hexadecimal

    number systems are reviewed in

    Appendix B.

    Note:

    Example 1

    Change the following IP addresses from binary notation to

  • 8/13/2019 BTech 2012

    183/204

    dotted-decimal notation.

    a. 10000001 00001011 00001011 11101111

    b. 11111001 10011011 11111011 00001111

    Solution

    We replace each group of 8 bits with its equivalent decimalnumber (see Appendix B) and add dots for separation:

    a. 129.11.11.239b. 249.155.251.15

    Example 2

    Change the following IP addresses from dotted-decimal notation

  • 8/13/2019 BTech 2012

    184/204

    to binary notation.

    a. 111.56.45.78

    b. 75.45.34.78

    SolutionWe replace each decimal number with its binary equivalent (seeAppendix B):

    a. 01101111 00111000 00101101 01001110b. 01001011 00101101 00100010 01001110

    Finding the address class

  • 8/13/2019 BTech 2012

    185/204

    Example 3

    Find the class of each address:

  • 8/13/2019 BTech 2012

    186/204

    a. 00000001 00001011 00001011 11101111b. 11110011 10011011 11111011 00001111

    Solution

    See the procedure in Figure 19.11.

    a. The first bit is 0; this is a class A address.b. The first 4 bits are 1s; this is a class E address.

    Finding the class in decimal notation

  • 8/13/2019 BTech 2012

    187/204

    Example 4

    Find the class of each address:

  • 8/13/2019 BTech 2012

    188/204

    a. 227.12.14.87b. 252.5.15.111

    c. 134.11.78.56

    Solutiona. The first byte is 227 (between 224 and 239); the class is D.

    b. The first byte is 252 (between 240 and 255); the class is E.c. The first byte is 134 (between 128 and 191); the class is B.

    Netid and hostid

  • 8/13/2019 BTech 2012

    189/204

    Blocks in class A

  • 8/13/2019 BTech 2012

    190/204

    Blocks in class B

  • 8/13/2019 BTech 2012

    191/204

    Blocks in class C

  • 8/13/2019 BTech 2012

    192/204

    Network address

  • 8/13/2019 BTech 2012

    193/204

  • 8/13/2019 BTech 2012

    194/204

    First Octet IP Address Characteristics

    MostSignificant

    BITS

    ValueRanges

    Addr.Class

    Networkvs.

    Host

    #NETWORK

    S# HOSTS

    0000 0-126 A N.h.h.h 256 16,777,214

    -- 127 - - Special - Local Loopback1000 128-191 B N.N.h.h 65,536 65,534

    1100 192-223 C N.N.N.h 16,777,216 254

    1110 224 - 239 D Special N/A N/A

    1111 240 + E Special N/A N/A

  • 8/13/2019 BTech 2012

    195/204

    5-4

    The Optimality Principle

  • 8/13/2019 BTech 2012

    196/204

    The Optimality Principle

    Shortest Path Routing Flooding Distance Vector Routing

    Link State Routing

    Hierarchical Routing

    Broadcast Routing

    Multicast Routing

    Routing for Mobile Hosts Routing in Ad Hoc Networks

  • 8/13/2019 BTech 2012

    197/204

    The first 5 steps used in computing the shortest path from A to D.The arrows indicate the working node.

  • 8/13/2019 BTech 2012

    198/204

    (a)A subnet. (b)Input from A, I, H, K, and the newrouting table for J.

  • 8/13/2019 BTech 2012

    199/204

    The count-to-infinity problem.

    Each router must do the following:

  • 8/13/2019 BTech 2012

    200/204

    Each router must do the following:

    1. Discover its neighbors, learn their network address.2. Measure the delay or cost to each of its neighbors.3. Construct a packet telling all it has just learned.

    4. Send this packet to all other routers.

    5. Compute the shortest path to every other router.

  • 8/13/2019 BTech 2012

    201/204

    (a)Nine routers and a LAN. (b)A graph modelof (a).

    A subnet in which the East and West parts are

  • 8/13/2019 BTech 2012

    202/204

    A subnet in which the East and West parts areconnected by two lines.

  • 8/13/2019 BTech 2012

    203/204

    (a) A subnet. (b) The link state packets for thissubnet.

  • 8/13/2019 BTech 2012

    204/204

    The packet buffer for router B in the previousslide (Fig. 5-13).