computer networks compiled

Upload: dhirajsinghavit

Post on 08-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Computer Networks Compiled

    1/102

    Notes by Anita Kanavalli MSRIT

    A computer network is a collection of computers and other devices (nodes) that use acommon network protocol to share resources with each other over a network medium.interconnected collection of autonomous computers connected by a single technology[Tanenbaum]To share information or receive a service via a network, group members must be able tocommunicate with each other.The following is a figure which shows a communication model.

    Communication Model

    SourceGenerates data to be transmitted

    TransmitterConverts data into transmittable signals Transmission System

    Carries data Receiver

    Converts received signal into data Destination

    Takes incoming dataThe figure also shows an example of a public telephone network.The networks can be classified as shown below

    Wired, Wireless and Fiber Optic Networks

    LANs, MANs and WANs

    Circuit Switched, Packet Switched and Virtual Circuit Switched Networks

    Access, Edge and Core NetworksThe computer network can be classified based on architecture and access as shown below

    Architecture

    1

  • 8/7/2019 Computer Networks Compiled

    2/102

    Common LAN architectures: Ethernet IEEE 802.3, Token Ring, and FDDI. Access Possibilities

    shared-media networksswitching networks

    Transmission Technology

    Broadcast linksPoint-to-point linksThe architecture based classification will be dealt later. The shared media networks: Thestations connected to the same media and can share all the resources like printers andscanners and also software resources and share the same communication channel. Whereas incase of switching networks a switching element is used and will route theinformation to the relevant output. The information comes from many sources andforwarded only to the correct output.Broad cast links have a single communication channel shared by all the machines on thenetwork. A short message called a packet is sent by any machine and received by all theothers in the network. The address of the receiver is present in the message all the

    machine simply ignores. Actually there is a special address called broadcast addresswhere all the machines receive the packet. This type of transmission is called theBroadcasting. Some broadcast systems allow the message to be sent to only a subset ofthe machine or a group by using a bit in the address field to indicate that the message isintended for the group. This method is called the multicasting. In contrast the point topoint link, the source and the destination have several links. The message may have tovisit an intermediate station before reaching the destination. The point to point linkbetween one sender and the receiver is also called as unicasting.Wired network: All the machines are connected using a wire, that could be a copper wireor fibre optic. They are many different topologies used to connect the machines. Thefigure below shows how the machines are connected using the wire this is an example ofa bus topology.

    All the machines are connected using a wire and can share all the resources.Wireless network:

    2

  • 8/7/2019 Computer Networks Compiled

    3/102

    The above figure shows a wireless network. It consists of mobile machines such aslaptops and there is a base station it is called as access point. The machines can accessother network using the access point. The access point is wired to the router which is a

    switching element and is inturn connected to the wired network. IEEE 802.11 describesthe wireless technology.

    Fiber optic network:

    The machines can be connected using the fiber optic cable. This is mainly used inconnecting the systems in the backbone. Different servers and ISP provider equipmentare the examples of the systems in the backbone. The fiber optic cable uses light as thesignal to transmit information in the cable. It offers good bandwidth and less interferencebut it is expensive to use this cable.

    LANs

    basestatio

    n

    mobilehosts

    router

    To the wired network

    3

  • 8/7/2019 Computer Networks Compiled

    4/102

    company/univ local area network (LAN) connects end system to edge router Ethernet:

    shared or dedicated link connects end system and router10 Mbs,100Mbps,Gigabit Ethernet

    deployment: institutions, home LANs happening now Occupies a small geographical area. Use only one type media and different

    topologies. Printers scanners and machines can be connected. LANs give lot of flexibility, speed ,reliability, adaptability, security private

    ownership. Connection to other LANs and WANs

    MANs

    It is larger than the LAN and occupies a city or a group of nearby corporate offices. Ituses the same technology as LAN. The example is the cable TV network. It uses thecoaxial cable. The service provider connects the home TVs this forms a large network.The service is provided by the cable TV operator. Fiber optic cable is also used. It cansupport both voice and data transmission.

    WANs

    4

  • 8/7/2019 Computer Networks Compiled

    5/102

    Spans a large geographic area, e.g., a country or a continent

    A WAN consists of several transmission lines and routers Internet is an exampleof a WAN

    All the machines are connected using the subnets. Compared to LAN the speed is very less Used to connect different LANs

    Circuit switched network

    The sender and the receiver has a dedicated link between them. For example consider thetelephone network when a sender places a call a dedicated link is established between thesender and receiver as long as the call exists. Then the link is terminated when the callends.

    Packet switched network

    No dedicated link present between the sender and receiver. When a data frame or packetis sent it is sent to the subnet and to the intermediate system and reaches the destination.The same message is broken into small packets and sent on the subnet all packets neednot take the same route. The switching elements decide the route.

    Virtual circuit switched network

    It is like circuit switched and a dedicated link present and a identifier is assigned to thelink and same channel used for different communication.Internetwork

    internetwork interconnection of networks also called an internet Subnetwork a constituent of an internet

    5

  • 8/7/2019 Computer Networks Compiled

    6/102

    Intermediate system a device used to connect two networks allowing hosts ofthe networks to correspond with each other

    BridgeRouters

    Internet is an example of an internetwork.

    network of networks collection of networks interconnected by routers a communication medium used by millionsEmail, chat, Web surfing,

    streaming media millions of connected computing devices: hosts, end-systems

    PCs workstations, servers PDAs phones, toasters running network apps

    communication links fiber, copper, radio, satellite Links have different bandwidth

    routers: forward packets

    Packet: a piece of messageUses of computer network

    Business applications Resource sharing: end systems (hosts):

    run application programs e.g. Web, email at edge of network

    client/server model client host requests, receives service from always-on server e.g. Web browser/server; email client/server

    Client/server model is applicable in an intranet.

    E-mail: Now all the companies uses email as the means of communication

    E-commerce: Now teleshopping and marketing is very popular and finding theapplication in business

    Mobile users are connected using network such as laptops palmtops etcLike wise even home users have increased now and becoming popular.

    Notes

    A Protocol can be defined as a set of rules governing the exchange of databetween two entities.

    Used for communications between entities in a system Two entities have to speak the same language to successfully communicate Networks are complex and consist of many pieces:

    6

  • 8/7/2019 Computer Networks Compiled

    7/102

    hosts routers switches links of various media applications

    protocols reliability connection type

    How to simplify the complex structures. A layered structured can be used to reduce thecomplexity. Most of the network are organized as a stack of layers or levels each onebuilt over the other. The number of layers and the name of the layers and the function ofeach layer differ from network to network. The purpose of each layer is to offer service tolayer above it. Layer n on one machine carries conversation with layer n on anothermachine. The rules and conventions used collectively known as the layer n protocol.For example consider a five layered network.

    The entities comprising the corresponding layers on different machines are called peers.The peers may be processes or hardware devices or human beings. Peers communicateusing protocol. No data is sent from layer n to layer n instead they send to the layer belowuntil the last layer is reached. Between the layers it is the virtual communication.Between each pair of layers is the interface. It defines the primitive operation andservices what the lower layer makes available to the upper one. Network designers decide

    about the function and the number of layers. It is very important to define a clearinterfaces. A set of protocol and layers is called the network architecture. A list ofprotocol used by a certain system one protocol per layer is called a protocol stack.

    7

  • 8/7/2019 Computer Networks Compiled

    8/102

    Consider the above figureThis shows how communication happens between two systems. A message M isproduced by the layer 5. It is given to layer 4 and it puts the header in front of themessage and passes to layer 3. The header includes the control information such assequence numbers to allow the layer 4 on the destination machine to deliver messages inthe right order. The layer 3 breaks up the message into smaller units called packetsadding layer 3 header to each packet. In this example M is split into 2 packets M1 andM2. Layer 3 decides which of the outgoing line to use and sends on that line to layer 2.

    Layer 2 adds a header and also a trailer and give the resulting unit to layer 1 for physicaltransmission. At the receiving machine the message move upwards from layer to layer,with header being stripped off as it progresses.

    Design issues for layers

    Addressing Error Control Flow Control Multiplexing Routing

    Addressing Level

    Level in architecture at which entity is named Unique address for each end system (computer) and each intermediate system(router)

    Network level addressIP or internet address (TCP/IP)Network service access point or NSAP (OSI)

    Process within the systemPort number (TCP/IP)

    8

  • 8/7/2019 Computer Networks Compiled

    9/102

    Service access point or SAPAddressing Scope

    Global nonambiguityGlobal address identifies unique systemThere is only one system with address X

    Global applicability It is possible at any system (any address) to identify anyother system (address) by the global address of the

    other system Address X identifies that system fromanywhere on the network

    e.g. MAC address on IEEE 802 networksConnection Identifiers

    Connection oriented data transfer (virtual circuits) Allocates a connection name during the transfer phase the advantages are:

    Reduced overhead as connection identifiers are shorter than global

    addresses Routing may be fixed and identified by connection name

    Entities may want multiple connections multiplexing

    State information

    Error Control

    Guard against loss or damage of data and control information

    Error control is implemented as two separate functions:Error detectionSender inserts error detecting bitsReceiver checks these bitsIf OK, acknowledgeIf error, discard packetRetransmissionIf no acknowledge in given time, re-transmitPerformed at various layers of protocolFlow Control

    Done by receiving entity

    Function to limit amount or rate of data sent by a transmitting entity

    Simplest form: stop-and-wait procedure

    More efficient protocols: Credit systems Sliding window

    Needed at application as well as network layers

    9

  • 8/7/2019 Computer Networks Compiled

    10/102

    Multiplexing

    -Supporting multiple connections on one machine

    -Mapping of multiple connections at one level to a single connection at another-Carrying a number of connections on one fiber optic cable

    -Aggregating or bonding ISDN lines to gain bandwidthRoutingDetermine path orroute that packets will followUse routing protocolbased on a routing algorithmGood path should be leastcost pathCost : depends on the following factors.Average queuing delayPropagation delayBandwidth, mean queue length, etc.End systems and routers maintain routing tablesDynamic orstatic

    OSI Model

    Not a network architecture, because it does not specify the exact services and

    protocols to be used in each layer, it just formally defines and codifies the conceptof layered network architecture Each layer describe what happens at each stage in the processing of data for

    transmission Layers help to reduce complexity Each layer relies on the next lower layer to perform more primitive functions Each layer provides services to the next higher layer Changes in one layer should not require changes in other layers

    10

  • 8/7/2019 Computer Networks Compiled

    11/102

    The functions of different layers

    Physical

    responsible for transmitting raw bits over a communication path concerned with issues such as

    -mechanical interfaces, e.g. design of a network connector

    -electrical interfaces, e.g. voltage level of bits-procedural interfaces, e.g. whether transmission mayproceed simultaneously in both directions

    Data Link

    Responsible for the transfer of data between the ends of a physical link Provides for error detection, "framing", and flow control Resolves problems due to damaged, lost, or duplicate frames Formatted messages are referred to as frames rather than packets

    Network

    Responsible for the source to destination routing

    Addresses and resolves all inherent problems related to the transmission of databetween heterogeneous networks Formatted messages are referred to as packets In broadcast networks the network layer is often thin or nonexistent, because of

    easy to solve routing problems Sometimes no need for a network layer if using point-to-point link

    Transport

    Provides for error-free delivery of data Accepts data from the session layer and splits data into smaller packets if

    necessary passes these packets to the network layer, and ensures that packets arrive in

    sequence, with no losses or duplications, at their destinationSession

    Provides for coordination between communicating processes between nodes. Manages dialog control (e.g. Can allow traffic to go in both direction at the same

    time, or in only one direction at time.) Responsible for synchronizing the flow of data, and reestablishing a connection

    in the event a failure occurs.Presentation

    Provides for data formats, and code conversions Concerned with syntax and semantics of data being transmitted Encodes messages in a form that is suitable for electronic transmission Data compression and encryption is done at this layer

    Application

    Consists of protocols that define specific user-oriented applications such as e-mail, file transfer, and virtual terminal

    11

  • 8/7/2019 Computer Networks Compiled

    12/102

    Notes

    Differences between a computer network (CN) and a distributed system(DS) CN collection of computers connected by single technology DS collection independent computers appears as one coherent system

    Middleware responsible for the DS WWW is the example of DS DS software system built on top of network

    The two services a network offersConnection oriented

    A connection is established between ESs (end System) that is used for durationof call

    Call setupData transferCall terminationE.g: Virtual circuits at this layer

    ISs ( intermediate system) connect two or more networksIS appear as ES to each networkLogical connection set up between ESs

    -Concatenation of logical connections across networks Individual network virtual circuitsjoined by IS

    Advantages Fixed path Order of message preserved No loss of data

    Reliable But the process of acknowledgement adds overhead and delay Example: telephone, ftp

    Connectionless

    Each packet sent independently Routing decisions made at every IS Corresponds to datagram service in packet switched network Network layer protocol common to all ESs and routers

    Known generically as the internet protocol Internet Protocol

    12

  • 8/7/2019 Computer Networks Compiled

    13/102

    One such internet protocol developed for ARPANET Example: Telegraph systems, email, remote login

    Advantages Flexibility Robust

    No unnecessary overhead Unreliable Not guaranteed delivery Not guaranteed order of delivery

    Packets can take different routes Reliability is responsibility of next layer up (e.g. TCP)

    The following table shows an example of 6 different services

    Service primitives

    A service is specified by a set of primitives available to a user process to access theservice. These primitives tell the service to perform some action or report on an actiontaken by a peer entity. The set of primitives available depends on the nature of the servicebeing provided. The primitives for connection oriented are different from theconnectionless service.

    The five different service primitives for implementing a simple connection orientedserviceListen: The server executes LISTEN to indicate that it is prepared to accept the incomingconnection. The server process is blocked until a request for connection appearsConnect: the client process executes a CONNECT call to establish the connection withthe server. Specify the address too.

    13

  • 8/7/2019 Computer Networks Compiled

    14/102

    When the server receives this packet it unblocks the server and sends back theacknowledgement and this releases the client. At this point the client and server both arerunning. The connection established.Receive: the server executes RECEIVE to prepare the first request. This call blocks theserver.

    Send: the client executes SEND to transmit its request followed by the execution ofreceive to get the reply. If the client has additional requests it makes nowDisconnect: The client use DISCONNECT to end the connection. The server also issuesa acknowledgement to terminate the connection it send the disconnect.

    The following figure shows the relationship between the service and the protocol

    A service is the set of primitives or operations where as protocol are the rules.

    Example networks

    Internet

    internetwork interconnection of networks also called an internet Subnetwork a constituent of an internet Intermediate system a device used to connect two networks allowing hosts of

    the networks to correspond with each other

    BridgeRouters Internet is an example of an internetwork. internet : collection of networks interconnected by router and/or bridges The Internet

    The global collection of thousands of individual machines and networks Intranet

    Corporate internet operating within the organization

    14

  • 8/7/2019 Computer Networks Compiled

    15/102

    Uses Internet (TCP/IP and http) technology to deliver documents andresources

    End System (ES) Device attached to one of the networks of an internet Supports end-user applications or services

    ES sometimes called DTE Intermediate System (IS) Device used to connect two networks Permits communication between end systems attached to different

    networks Examples: Routers and Bridges

    Bridge IS used to connect two LANs using similar LAN protocols Address filter passing on packets to the required network only OSI layer 2 (Data Link)

    Router

    Connects two (possibly dissimilar) networks Uses internet protocol present in each router and end system OSI Layer 3 (Network)

    X.25

    First public data network Connection number used for data transfer of packets data packets contain 3 byte header and upto 128 bytes of data X.25 replaced by Frame Relay

    Frame Relay

    Frame Relay is a way of sending information over a WAN by dividing data intopackets

    It operates at the Physical and Data Linklayers of the OSI reference model It relies on upper-layer protocols such as TCP for error correction Frame Relay is a switched data link-layer protocol that handles multiple virtual

    circuits using (HDLC) encapsulation Frame Relay interface can be either a carrier-provided public network or a

    network of privately owned equipment, serving a single enterpriseFrame Relay benefits

    Reduced internetworking costs

    Statistically multiplexed traffic from multiple sources over private backbonenetworks can reduce the number of circuits and corresponding cost of bandwidth

    Lower Equipment Costs

    Lower cost than dedicated leased lines

    Increased performance & reduced network complexity

    Reduces the amount of processing (as compared to X.25) Efficiently utilizing high speed digital transmission lines, frame relay can improve

    performance and response times of applications. Increased interoperability via international standards

    15

  • 8/7/2019 Computer Networks Compiled

    16/102

    Frame relay can be implemented over existing technology Access devices often require only software changes or simple hardware

    modifications to support the interface standard Existing packet switching equipment and T1/E1 multiplexers often can be

    upgraded to support frame relay over existing backbone networks.

    Frame Relay overwiew Packet Switched

    Uses Virtual Circuits (Connection Oriented Service) Logical connection created between two (DTE) devices

    across a Frame Relay packet-switched network (PSN)Ethernet

    dominant LAN technology: cheap $20 for 100Mbs! first wildey used LAN technology Simpler, cheaper than token LANs and ATM

    Kept up with speed race: 10, 100, 1000 MbpsWireless LAN

    wireless LANs: untethered (often mobile) networking IEEE 802.11 standard: MAC protocol unlicensed frequency spectrum: 900Mhz, 2.4Ghz Basic Service Set (BSS) contains: wireless hosts access point (AP): base station

    BSSs combined to form distribution system (DS)Advantages

    Mobility Flexibility Hard to wire areas Reduced cost of wireless systems Improved performance of wireless systems

    Adhoc networks

    Ad hoc network: IEEE 802.11 stations can dynamically form networkwithoutAP

    Applications: laptop meeting in conference room, car interconnection of personal devices battlefield

    IETF MANET (Mobile Ad hoc Networks) working groupLAN generations

    First Typified by CSMA/CD and token ring

    16

  • 8/7/2019 Computer Networks Compiled

    17/102

    Provided terminal to host and client server Moderate data rates

    Second Typified by FDDI Needed for backbone LANs

    Support of high performance workstations Third Typified by ATM Provide the aggregate throughput and real time support for multimedia

    applications

    ATM

    ATM is a high-speed switching network architecture ATM can be used to carry data, voice, and video

    separately or simultaneously over same network path ATM has a robust quality of service (QoS)

    can provide seamless interconnectivity between LANs and WANs supports a wide range of data rates: 25 to 155 Mbps over copper 100 to 622 Mbps and higher over fiber common implementation is 155-Mbps ATM

    ATM is specified via a three-layer reference model: Physical layer (OSIs physical layer) ATM layer (generally OSIs data link layer) ATM adaptation layer (AAL) (generally OSIs higher-level layers (transport,

    session, and application) Physical layer (2 sublayers)

    Physical medium PM (lower sublayer) definition for the medium the bit-timing capabilities.

    Transmission convergence (TC) (upper sublayer) makes sure that valid cells are being created and transmitted involves breaking off individual cells from the data stream of the

    higher layer (the ATM layer) checking the cells header Encoding the bit values

    ATM layer service-independent layer creates cell headers and trailers defines virtual channels and paths and gives them unique identifiers cells are multiplexed or demultiplexed. ATM layer creates the cells and uses the physical layer to transmit them.

    ATM adaptation layer (AAL) (2 sublayers) Segmentation and reassembly SAR (lower sublayer)

    packages variable size packets into fixed-size cells at thetransmitting end

    17

  • 8/7/2019 Computer Networks Compiled

    18/102

    repackages the cells at the receiving end responsible for finding and dealing with cells that are out of order

    or lost convergence sublayer CS (upper sublayer)

    provides the interface for the various services (e.g. data, voice, and

    video). users connect to CS through service access points (SAPs).

    ATM cells are always 53 bytes long partitioned into

    5 byte header contains addressing information 48 byte payload contains user data

    ATM virtual connections consist of either permanent or switched virtual circuits that logically connect source and destination sites Virtual circuits are identified by specific virtual channel identifiers (VCIs).

    A collection of virtual channels that all have the same endpoints is called a virtualpath connection (VPC) VPCs are specified by virtual path identifiers (VPIs) Virtual connections established

    VCI and VPI assignments are made dynamically by ATM end nodes andswitches at the time data are to be transmitted

    VCI is not of interest to e.g. public switches they would only use the VPI

    ATM LAN Local area network emulation (LANE) interface

    can provide a service interface for the network layer that functions exactly

    as the same as Ethernet/802.3 and token ring LANs with this interface Emulated LANs (ELAN) involve special client/server processes that enables MAC-to-ATM

    address resolution support connectionless nature of local area networks

    Questions:

    1. Compare computer networks and distributed systems. What are the

    applications of computer networks?

    2. A system has a n layer hierarchy. Applications generate messages of M

    bytes.At each of the layer a n byte header is added. What fraction of the

    network bandwidth is filled with the headers?3. Bring out the design issues of computer networks. Differentiate between

    services and protocols.

    4. Explain the following with respect to network software; protocol hierarchy,

    protocol layers

    5. Compare the connection oriented and connectionless services

    6. Differentiate between broadcasting and multicasting

    7. Why does ATM uses cells?

    18

  • 8/7/2019 Computer Networks Compiled

    19/102

  • 8/7/2019 Computer Networks Compiled

    20/102

    The above figure shows the star topology. There is a wiring hub to which the hosts areconnected. The data passes through the hub in the center. This is a very popular structureused in the LAN. The wiring hub can be a network device switch. The extended star alsois used. When all the nodes are connected to each other by the wiring media it becomesthe MESH topology.

    The nodes are connected like a tree structure.

    Satellite

    nodes use an antenna to send and receive data point-to-point from land based antenna to satellite broadcast from the satellite to one or more ground stations

    Hardware used in the hosts

    NICsAdapters to connect devices to a networkPerform:

    framing monitor the medium for transmissions capture data from the medium and pass them to their hosts nodes for

    processing check errors responsible for token passing

    Also perform layer-1 function: convert bits to physical signals

    20

  • 8/7/2019 Computer Networks Compiled

    21/102

    NIC works in two modes: General mode Promiscuous mode

    In general mode, the Ethernet card of the computer will allow following types ofpackets:

    Packets send to the computer.

    Broadcast Packet Multicast packet and if computer is part of that multicast group. In promiscuous mode, the Ethernet card of the computer will allow all the packets

    that it receives.Limitations of layer 1

    Cannot organize streams of bits. Cannot name or identify computers. Cannot communicate with the upper-level layers. Cannot decide which computer will transmit binary data.

    And hence the layer 2 provides the following functions

    Layer 2 uses framingto organize or group the bits. Layer 2 uses an addressingprocess to identify computers. Layer 2 uses Logical Link Control (LLC) to communicate with the upper-level

    layers. Layer 2 uses Media Access Control (MAC) to decide which computer will

    transmit.

    Various LAN standards

    21

  • 8/7/2019 Computer Networks Compiled

    22/102

    IEEE has specified the following standardsThe Institute of Electrical and Electronic Engineers.LAN standards:802.1d: Spanning tree.

    802.2: LLC.

    802.3: MAC ~ Ethernet.

    802.5: MAC ~ Token ring.

    802.11: Wireless LAN.

    Logical Link Control (LLC): Transitions up to the network layer.Media Access Control (MAC): Transitions down to media.

    LLC serves to communicate upward to Network layer, independent of the specificLAN technology used and Upper layer.

    MAC serves to access and communicate downward to the technology-specific

    Physical layer.LLC: receives a packet from the network layer and attaches a header it is called the PDUprotocol data unit and sends to the MAC through the interface it is called the SDU servicedata unit and through the service access point SAP. The header will have DSAP d standsfor destination and SSAP s stands for the source.MAC: does the framing and the flow control.Concept of layer 21. Layer 2 uses framing to organize or group the data.

    22

  • 8/7/2019 Computer Networks Compiled

    23/102

    2. Layer 2 uses a flat addressing convention.3. Layer 2 communicates with the upper-level layers through LLC.4. Layer 2 uses MAC to choose which computer will transmit binary data, from a groupin which all computers are trying to transmit at the same time.MAC Address

    Every computer has a unique way of identifying itself : MAC address or physicaladdress. The physical address is located on the Network Interface Card (NIC). MAC addresses have no structure, and are considered flat address spaces.

    It has 48 bits the first 24 bits are for the vendor and the next 24 bits are unique NICnumber.

    MAC addresses are sometimes referred to as burned-in addresses (BIAs) becausethey are burned into read-only memory (ROM) and are copied into random-accessmemory (RAM) when the NIC initializes.

    0000.0c12.3456 or 00-00-0c-12-34-56MAC address are used by MAC layer to identify the destination.

    LAN systems

    Based on LAN architecture just seenThe IEEE 802 Standards are an integral part of the architecture:

    LANs Ethernet (CSMA/CD) Token Ring and FDDI Wireless ATM LANs

    CSMA/CD

    23

  • 8/7/2019 Computer Networks Compiled

    24/102

    Architecture that combines standards, topologies and protocols. Carriers Sense Multiple Access with Collision Detection is the most commonly

    used medium access control technique Developed by Xerox as part of Ethernet Basis for IEEE 802.3

    Most popular ~ 70% With CSMA, collision occupies medium for duration of transmission Stations listen whilst transmitting If medium idle, transmit If busy, listen for idle, then transmit If collision detected, jam, then cease transmission After jam, wait random time then start again

    802.3 operation parameters

    Slot Time = 2 x prog delay + safety margin 10Mbps coaxial cable, 2.5 Km it is 512 bits

    Times between retransmission attempts is a number R x slot time 0 to R < 2K, where K = min(N, backoff limit)

    CSMA/CD parameters

    Mini slot time: time duration that is at least as big as two propagation delay Mini slot is basis for contention resolution Backoff algorithm: The first retransmission time involves zero or one minislot

    times, the second involves 0,1,2,3 minislot times and each additional slotretransmission extends the range the range by a factor of 2 until the maximumrange of 1210

    The average number of minislots in a contention period is approximately e=2.71therefore the fraction

    The average number of minislots in a contention period is approximately e=2.71therefore the fraction of time that the channel is busy transmitting frames is

    L/R = 1L/R+tprop+2etprop 1+6.44a

    Where a=tprop R/LFrame format

    24

  • 8/7/2019 Computer Networks Compiled

    25/102

    There are three type of addresses unicast: permanently assigned to NIC multicast address:identify the group. Broadcast address: indicated by all 1s physical address. All stationsreceive the packet.FCS uses CRC(cyclic redundancy check ) for the error control. Pad bits are used to addsome bits if the length of the data frame is less because Ethernet requires minimum 512bytes.

    Signaling rate(Mbps) - Band -(Base orBroad)

    Length (Meters)orCable Type

    IEEE 802.3 are designated using the format above. For example 10BaseT means 10 is thesignalling rate in Mbps. Base is the Baseband. T stands for twisted pair.IEEE 802.3: 10Mbps specification (Ethernet)

    10Base-FB

    Fiber

    Backbone

    10Base-FL

    Fiber Link

    10Base-FP

    Fiber Passive

    Medium fiber fiber 850 nm fiber

    25

  • 8/7/2019 Computer Networks Compiled

    26/102

    Signaling Baseband - Manchester/ on-off

    Topology Point-to-pointPoint-to-point

    or star

    Star

    max

    segment

    length

    2000 m 2000 m 500 m

    max. Nodes/

    segment

    2 2 33

    Max

    Diameter

    2500 m 2500 m 2500 m

    The above table shows the summary of the Ethernet 10Mbps

    Ethernet hub and switch topologies using twisted pair cabling

    The above figure shows the star topology and hub is used and it repeats the signal. Ifthere is a collision the hub sends the jam signal and the stations execute the backoffalgorithm. The stations are in the same collision domain.

    26

  • 8/7/2019 Computer Networks Compiled

    27/102

    The above figure shows that a switch or any other device connected where input portbuffers incoming the transmissions. The incoming frames are examined and transferred tothe appropriate output port.

    10BaseT

    Provides three approaches to operating the LAN First-stations are in collision domain Second-hub operates as ethernet switch Third- stations transmit in full duplex mode

    Fast Ethernet

    100Base-TX 100Base-FX 100Base-T4

    Medium Twisted pair fiber UTP

    Signaling MLT-3 4B5B, NRZI 8B6T, NRZ

    Topology Star Star Star

    maxsegmentlength

    100 m 412 m (half-duplex)2 km (full-duplex)

    100 m

    networkdiameter

    200 m 400 m 200 m

    The above table summarizes the fast Ethernet technology.Giga bit Ethernet

    1000Base-SX (short wavelength fiber) Short wavelength (770-860 nm) support duplex links of

    220- 275 m using 62.5 m multimode fiber 500- 550 m using 50 m multimode fiber

    1000Base-LX (long wavelength fiber) Long wavelength (1270-1355 nm) support duplex links of

    550 m using 62.5 m or 50 m multimode fiber

    27

  • 8/7/2019 Computer Networks Compiled

    28/102

    5000 m using 9 m single-mode fiber 1000Base-CX (short haul copper)

    supports 1-Gbps links within a single room or equipment rack uses copper jumpers , special shielded twisted pair that spans no more

    than 25 m

    1000Base-T uses 4 pairs of cat 5 UTP support devices over a range of 100m

    Encoding scheme for Gigabit Ethernet is 8B/10BApplication of fast and gigabit Ethernet

    The above figure shows the application of the fast and gigabit Ethernet technology. Thereare three departments and has the LANS the hosts are connected using a hub, thetopology is star. The link used is 10Mbps. The other two Lans are also implemented inthe same way. The three LANs are connected to their respective server using a switch and100Mbps links.

    All the three LANs are linked together using routers and a gigabit link in the backbone.

    28

  • 8/7/2019 Computer Networks Compiled

    29/102

    Token Ring 802.5

    MAC protocol Small frame (token) circulates when idle Station waits for token Changes one bit in token to make it SOF for data frame Append rest of data frame Frame makes round trip and is absorbed by transmitting station Station then inserts new token when transmission has finished and leading

    edge of returning frame arrives Under light loads, some inefficiency Under heavy loads, round robin

    Token ring format

    29

  • 8/7/2019 Computer Networks Compiled

    30/102

    Tokens are 3 bytes in length and consists of a start delimiter, an access control

    byte, and an end delimiter. The start delimiteralerts each station to the arrival of a token, or data/command

    frame. This field also includes signals that distinguish the byte from the rest of theframe by violating the encoding scheme used elsewhere in the frame.

    The access controlbyte contains the priority and reservation field, and a tokenand monitorbit. The token bit distinguishes a token from a data/command frame,and a monitor bit determines whether a frame is continuously circling the ring.The bit pattern for access control is PPP T M RRRPPP- indicate priority of token

    T- token bit, T=0 -indicates token frame and T=1 indicates data frame

    M- monitor bit used by monitor to remove orphan frames.

    RRR- is used for reserving token priority Frame control byte has the pattern FF ZZZZZZ to distinguish between data

    frame and control frameFF= 01 indicates data frameFF=00 indicates control frame then ZZZZZZ indicates type of control frame. SA and DA are as in 802.3 FCS - frame check sequence having CRC checksum Ending delimiter has last two bits to be I and E whereE- error bit, this bit is set if any station detects an error like line coding violation or

    frame check sequence error.I- intermediate frame bit , it is set one to indicate last frame in the sequence of frames

    that are transmitted. Frame status - has the pattern A C XX A C XX and it allows receiving station to

    convey the data transfer status to sending station.A= 1 indicates destination address was recognized by receiving station.C=1 indicates that the frame was copied to receivers boffer properly

    Token ring passing

    Two types of token ring frames: Data/Commandand Token

    30

  • 8/7/2019 Computer Networks Compiled

    31/102

    Token-passing networks move a small frame, called a token, around the network.

    Possession of the token grants the right to transmit data. If a node that receives a token has no information to send, it passes the token tothe next end station.

    Each station can hold the token for a maximum period of time, depending on thespecific technology that has been implemented.

    When a token is passed to a host that has information to transmit, the host seizesthe token and alters 1 bit of it. The token becomes a start-of-frame sequence.

    Next, the station appends the information to transmit to the token and sends thisdata to the next station on the ring. There is no token on the network while theinformation frame is circling the ring, unless the ring supports early tokenreleases. Other stations on the ring cannot transmit at this time. They must waitfor the token to become available.

    Token Ring networks have no collisions. If early token release is supported, a newtoken can be released when the frame transmission has been completed.

    The information frame circulates around the ring until it reaches the intendeddestination station, which copies the information for processing. The informationframe continues around the ring until it reaches the sending station, where it isremoved. The sending station can verify whether the frame was received andcopied by the destination.

    Unlike CSMA/CD networks, such as Ethernet, token-passing networks aredeterministic. This means that you can calculate the maximum time that will passbefore any end station will be able to transmit.

    This feature, and several reliability features, makes Token Ring networks ideal forapplications where any delay must be predictable, and robust network operation isimportant. Factory automation environments are examples of predictable robustnetwork operations.

    Token Ring networks use a sophisticated priority system that permits certain user-designated, high-priority stations to use the network more frequently. Token Ringframes have two fields that control priority - the priority field and the reservationfield.

    31

  • 8/7/2019 Computer Networks Compiled

    32/102

    Only stations with a priority equal to, or higher than, the priority value containedin a token can seize that token.

    Once the token has been seized and changed to an information frame, onlystations with a priority value higher than that of the transmitting station canreserve the token for the next network pass.

    The next token generated includes the higher priority of the reserving station.Stations that raise a token's priority level must reinstate the previous priority whentheir transmission has been completed.

    Token Ring networks use several mechanisms for detecting and compensating fornetwork faults.

    One mechanism is to select one station in the Token Ring network to be the activemonitor. This station acts as a centralized source of timing information for otherring stations and performs a variety of ring maintenance functions. The activemonitor station can potentially be any station.

    One of this stations functions is to remove continuously circulating frames fromthe ring. When a sending device fails, its frame may continue to circle the ring

    and prevent other stations from transmitting their frames, which can lock up thenetwork. The active monitor can detect these frames, remove them from the ring,and generate a new token.

    The IBM Token Ring network's physical star topology also contributes to overallnetwork reliability. Active MSAUs (multi-station access units) can see allinformation in a Token Ring network enabling them to check for problems and toselectively remove stations when necessary.

    Beaconing - a Token Ring formula - detects and tries to repair network faults.When a station detects a serious problem with the network (e.g. a cable break) itsends a beacon frame. The beacon frame defines a failure domain. A failuredomain includes the station that is reporting the failure, its nearest active

    upstream neighbor (NAUN), and everything in between. Beaconing initiates a process called autoreconfiguration, where nodes within the

    failure domain automatically perform diagnostics. This is an attempt toreconfigure the network around the failed areas.

    Physically, MSAUs can accomplish this through electrical reconfiguration. The 4/16 Mbps Token Ring networks use differential Manchester encoding. Token Ring uses the differential Manchester encoding method to encode clock

    and data bit information into bit symbols.Token Ring network stations are directly connected to MSAUs and can be wired togetherto form one large ring.Patch cables connect MSAUs to other MSAUs that are adjacent.Lobe cables connect MSAUs to stations. MSAUs include bypass relays for removingstations from the ring.

    FDDI

    32

  • 8/7/2019 Computer Networks Compiled

    33/102

    Fiber Distributed Data Interface (FDDI) came about because system managers becameconcerned with network reliability issues as mission-critical applications wereimplemented on high-speed networks.FDDI is frequently used as a backbone technology and to connect high-speed computersin a LAN.FDDI has four specifications:MediaAccessControldefineshowthemediumis accessedframe formattoken handlingaddressing algorithm forcalculating a cyclic redundancy check and error-recovery mechanisms

    FDDI has four specifications:Physical Layer Protocoldefines data encoding/decoding proceduresclocking requirements framingFDDI has four specifications:Physical Layer Mediumdefines the characteristics of the transmission medium fiberoptic link power levels bit error rates optical components connectorsFDDI has four specifications:Station Managementdefines the FDDI station configuration ring configuration ringcontrol features stationinsertion and removal initialization fault isolation and recoveryRecovery collection of statisticsUnlike CSMA/CD networks, such as Ethernet, token-passing networks aredeterministic--you can calculate the maximum time that will pass before any end stationwill be able to transmit. FDDI's dual ring makes FDDI very reliable.FDDI supports real-time allocationof network bandwidth, making it ideal for a variety ofdifferent application types. FDDI provides this support by defining two types of traffic synchronous and asynchronous.

    Synchronous traffic can consume a portion of the 100 Mbps total bandwidth of anFDDI network, while asynchronous traffic can consume the rest.

    Synchronous bandwidth is allocated to those stations requiring continuoustransmission capability. This is useful for transmitting voice and videoinformation.

    The remaining bandwidth is used for asynchronous transmissions. The FDDI SMT specification defines a distributed bidding scheme to allocate

    FDDI bandwidth Asynchronous bandwidth is allocated using an eight-level priority scheme. Each

    station is assigned an asynchronous priority level. FDDI also permits extended dialogues, in which stations may temporarily use all

    asynchronous bandwidth. The FDDI priority mechanism can lock out stations that cannot use synchronous

    bandwidth and that have too low an asynchronous priority.

    33

  • 8/7/2019 Computer Networks Compiled

    34/102

    FDDI uses an encoding scheme called 4B/5B. Every 4 bits of data are sent as a 5bit code. The signal sources in FDDI transceivers are LEDs or lasers.

    FDDI specifies a 100 Mbps, token-passing, dual-ring LAN that uses a fiber-optictransmission medium.

    It defines the physical layer and media access portion of the data link layer,

    which is similar to IEEE 802.3 and IEEE 802.5 in its relationship to the OSIModel. Although it operates at faster speeds, FDDI is similar to Token Ring. The two networks share a few features, such as topology (ring) and media access

    technique (token-passing). A characteristic of FDDI is its use of optical fiber as atransmission medium.

    Optical fiber is exploding in popularity as a networking medium, being installedat a rate of 4000 miles per day in the United States.

    Single-mode fiber is capable of higher bandwidth and greater cable run distancesthan multi-mode fiber.

    Because of these characteristics, single-mode fiber is often used for inter-

    building connectivity while multi-mode fiber is often used for intra-buildingconnectivity. Multi-mode fiber uses LEDs as the light-generating devices while single-mode

    fiber generally uses lasers. FDDI specifies the use ofdual rings for physical connections. Traffic on each

    ring travels in opposite directions. Physically, the rings consist of two or more point-to-point connections between

    adjacent stations. One of the two FDDI rings is called the primary ring; the other is called the

    secondary ring. The primary ring is used for data transmission; the secondary ring is generally

    used as a back up. Class B, orsingle-attachment stations(SAS), attach to one ring; Class A, ordual

    attachment stations(DAS), attach to both rings. SASs are attached to the primary ring through a concentrator, which provides

    connections for multiple SASs. The concentrator ensures that a failure, or powerdown, of any given SAS, does not interrupt the ring. This is Particularly usefulwhen PCs, or similar devices that frequently power on and off, connect to thering.

    Each FDDI DAS has two ports, designated A and B. These ports connect thestation to dual FDDI ring; therefore each port provides a connection for bothprimary and secondary rings.

    Example Ring Latency and Token reinsertion

    Let there be M stations b bits delay in stations The delay in interface is Mb bits typically b=2.5 d total ring length additional delay is d/v or dR/v v-delay in medium

    34

  • 8/7/2019 Computer Networks Compiled

    35/102

    v=2*108 m/sec therefore it is 5microsec to travel 1 kms ring latency is defined as the time that it takes for a bit to travel around ring is

    given by T=d/v+Mb/R and TR= dR/v+Mb bits

    Example Let R=4Mbps M=20 stations separated by 100m b=2.5 Latency= 20*100*4*106 /2*108 +20*2.5=90 bits

    IEEE 802.5-After the last bit arrives the token is inserted

    IBM token ring-after the header bit arrives the token is inserted IEEE 802.5 and IBM token ring 26Mbps- after last bit transmitted the token isinserted

    Conclusion-improves efficiency in case of the third case.

    35

  • 8/7/2019 Computer Networks Compiled

    36/102

    FDDI MAC Protocol

    As for 802.5 except: Station seizes token by aborting token transmission Once token captured, one or more data frames transmitted New token released as soon as transmission finished (early token release in 802.5) Handle two type of traffic synchronous-tight transfer delay requirement-voice or video asynchronous-greater delay tolerance-data TTRT-target token rotation time-all stations agree to operate Every station is allotted time S during which it can send the synchronous traffic. If the sum of Si times is smaller than TTRT then token will return to every node

    in less than 2 TTRT sec.

    and hence meets the delay requirement Each station maintains TRT-token rotation timer: measures the time elapsed sincethe station last received the token.

    When a station receives the token it calculates THT-token hold time:THT=TTRT=TRT

    if THT>0 all synchronous and asynchronous traffic is sent if THT

  • 8/7/2019 Computer Networks Compiled

    37/102

    Protocol stack Frame structure MAC protocol services

    The above figure shows the protocol stack of the wireless LANWhy not Ethernet ?Several reasons as to why it cannot be used

    difficult to detect collisions not controlled as the wired ones Hidden station problem

    The above figure shows the hidden station problemInfrastructure networks

    Basic Service Set (BSS) contains: wireless hosts access point (AP): base station

    37

  • 8/7/2019 Computer Networks Compiled

    38/102

    BSSs combined to form distribution system (DS) to form a extended service setESS

    ESS provide gateway access for wireless users into wired network. This access isdone through a device called portal

    The figure shows the distributed system.

    Different services associated with the wireless lan are Association Disassociation Reassociation Distribution Integration

    Intracell services

    Authentication Deauthentication Privacy

    Data DeliveryAdhoc networks Ad hoc network: IEEE 802.11 stations can dynamically form networkwithoutAP Applications:

    laptop meeting in conference room, car interconnection of personal devices battlefield

    38

  • 8/7/2019 Computer Networks Compiled

    39/102

    Frame structure

    There are three types of frames Management frame-used for station association and dissociation with the AP

    timing and synchronization and authentication and deauthentication Control frame-used for handshaking and for positive ack Data frame-for transmission of data

    MAC header provides information on frame control, duration, addressing andsequence control

    MAC sublayer is responsible for channel access procedures, pdu addressing,formatting, fragmentation and reassembly of MSDUs

    supports security services through authentication and privacy mechanisms management services support roaming within and ESS and assist stations in

    power management. The figure on the next figure shows the MAC architecture

    39

  • 8/7/2019 Computer Networks Compiled

    40/102

    It is defined using the coordination functionsDCF offers the contention service where the stations have to contend to use the channel.Uses CSMA/CAThe basic operation is as follows

    802.11 CSMA: sender - if sense channel idle forDISF sec. then transmit entire frame (no collision detection) -if sense channel busy then binary backoff

    802.11 CSMA receiver: if received OK return ACK afterSIFS

    40

  • 8/7/2019 Computer Networks Compiled

    41/102

    CSMA/CA: explicit channel reservation sender: send short RTS: request to send receiver: reply with short CTS: clear to send

    CTS reserves channel for sender, notifying (possibly hidden) stations avoid hidden station collisions RTS and CTS short:

    collisions less likely, of shorter duration end result similar to collision detection

    IEEE 802.11 alows: CSMA

    CSMA/CA: reservations polling from APPhysical layer

    41

  • 8/7/2019 Computer Networks Compiled

    42/102

    It is defined to operate with its MAC layerThere are three types of frame format.

    Frequency hopping spread spectrum Direct sequence spread spectrum Infrared frame format

    LAN bridges

    Limitations of hubs

    single collision domain results in no increase in max throughput multi-tier throughput same as single segment throughput

    individual LAN restrictions pose limits on number of nodes in same collisiondomain and on total allowed geographical coverage

    cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)

    Bridges A network component connecting LANs together. Operates only in the data link layer, thus is can handle any network protocol used. May be used

    to divide the large expensive and hard to manage network into smallerLANs.

    split networks that became loaded over time. to handle larger distances.

    42

  • 8/7/2019 Computer Networks Compiled

    43/102

    to block some traffic leaking outside the network.Link Layer devices: operate on Ethernet frames, examining frame header and selectivelyforwarding frame based on its destinationBridge isolates collision domains since it buffers framesWhen frame is to be forwarded on segment, bridge uses CSMA/CD to access segment

    and transmit Bridge advantages: Isolates collision domains resulting in higher total max throughput, and

    does not limit the number of nodes nor geographical coverage

    Can connect different type Ethernet since it is a store and forward device

    Transparent: no need for any change to hosts LAN adapters

    bridges filter packets same-LAN -segment frames not forwarded onto other LAN segments

    forwarding: how to know which LAN segment on which to forward frame? looks like a routing problem (more shortly!)

    Reasons for bridges Limited number of stations on a LAN segment or ring Limited distance for executing CSMA / CD algorithm or distance one

    wants a token traveling on a ring Limited traffic on a single LAN: available bandwidth must be shared by

    all stations Interconnecting networks

    Networks connected at the physical layer are connected by a repeater Networks connected at the MAC or link layer are connected by bridges Networks connected at the network layer are connected by routers Higher layer interconnection devices that perhaps execute additional

    functions such as protocol conversion are often called gateways Bridges

    Devices for gluing together LANs so that packets can be forwarded fromone LAN to the other

    A bridged LAN

    43

  • 8/7/2019 Computer Networks Compiled

    44/102

    Interconnection by bridge

    The no frills bridge : simply transmit all traffic from one LAN segment onto allthe other segments

    Advantages: two stations can be transmitting at the same time. Bridgewill buffer a packet until it can transmit on a LAN

    Disadvantages: total bandwidth still that can be safely utilized is still theminimum bandwidth of each LAN segment

    Keeping a database of all stations on each LAN segment

    Manually enter addresses in such a database Partition addresses into ranges on each LAN Eg. LAN 1 has 1-50, LAN 2 has 51-100, LAN 3 has 101-150

    Have the MAC address be hierarchically divided into a LAN address and astation address (like the IP address)

    None of these solutions are really used Better solution: the transparent learning bridge

    Learn on which segment a station resides

    44

  • 8/7/2019 Computer Networks Compiled

    45/102

    Transmit a packet only onto the correct segment bridges learn which hosts can be reached through which interfaces: maintain

    filtering tables when frame received, bridge learns location of sender: incoming LAN

    segment

    records sender location in filtering table filtering table entry: (Node LAN Address, Bridge Interface, Time Stamp) stale entries in Filtering Table dropped (TTL can be 60 minutes)

    filtering procedure: ifdestination is on LAN on which frame was received

    then drop the frame else{ lookup filtering table ifentry found for destination

    then forward the frame on interface indicated; else flood; /* forward on all but the interface on

    which the frame arrived*/ }

    Transparent bridge

    Main idea: A bridge should easily connect any set of LANs together and makethe connection transparent to the stations.

    No maintenance, software upgrade and routing table upload should be necessary. The bridge listens to both network at all times. Any frame received is buffered. Next the bridge should be able to decide if the frame was addressed to a station in

    the same network. If not, it should select the proper LAN and broadcast the framethere.

    Backward Learning: The bridge keeps a table containing hashed (address, network) entry pairs. The bridge accepts any frame, if the destination address is in the table then

    the frame is forwarded to the proper network, otherwise the frame isbroadcast onto all networks (except the one its coming from).

    For each incoming frame the bridge also read the source address andupdates the hash table by inserting the source address and the network idinto the tables.

    Entries in the table can live for a certain time, and if there is no packettraffic from or to that an address the entry is removed from the table.

    Maintain a forwarding database or cache of station MAC addresses and the bridgeport that the stations are on

    Promiscuously listen to packets arriving on any port For each packet arriving at the bridge:

    Store the stations source address and arriving port in the cache (if an entryalready exists for an address update if different)

    determine if the destination address is in the cache

    45

  • 8/7/2019 Computer Networks Compiled

    46/102

    If entry then forward only on the appropriate port unless the port isthe same as the arrival port

    If no such entry then forward packet on all segments except theone the packet was received on.

    Age each entry in the cache and delete after an appropriate time

    Spanning tree bridge

    for increased reliability, desirable to have redundant, alternate paths from sourceto dest

    with multiple simultaneous paths, cycles result - bridges may multiply andforward frame forever

    solution: organize bridges in a spanning tree by disabling subset of interfaces

    As the system grows a complex graph of many networks and many bridgesappear.

    Frames may loop through networks! Bridges communicate to build dynamic spanning tree graph, showing the

    topology of the network. Spanning tree graphs avoid loops.

    First the bridge with the smallest serial number becomes the root of the tree. Next the tree is constructed. LANs are placed on the nodes, and bridges are

    placed on the vertices. If a LAN or bridge is no longer present the tree is updated. All networks are on the tree but to prevent loops some of the bridges are left off

    the graph. This makes the graph a tree

    Disabled

    46

  • 8/7/2019 Computer Networks Compiled

    47/102

    Elect a single bridge among all bridges as the root bridge. The algorithm willselect the root bridge as the one with the lowest bridge id.

    Each bridge (except root) determines the least cost path (shortest path with respectto some metric, say hops) from itself to the root bridge through each of its ports.The port with least cost is the root port for that bridge. In case of ties use the

    smallest port id. Elect a designated bridge for each LAN from the bridges directly connecting tothat LAN. The designated bride is the one closest to the root bridge. In case ofties it is the one with the lowest bridge id. The port that connects the designatedbridge and the LAN is the designated port for that LAN.

    Ports in the spanning tree are all root ports and designated ports. Other ports arein the blocking state.

    Data traffic is forwarded to and received from ports in the spanning tree only.Example

    Sample topology

    using spanning tree

    47

  • 8/7/2019 Computer Networks Compiled

    48/102

    How algorithm works

    Bridges exchange bridge protocol data units (BPDUs). These have configurationmessages consisting of:

    Root ID, bridge assumed by sending bridge to be the root Transmitting bridge ID Cost of least cost path to the root of which the transmitting bridge is aware

    When a bridge receives a configuration message from a neighbor bridge, itcompares this with what it would transmit over that port. Note that it will add thecost to the received message before comparison. It saves the best configuration

    message received for each port. If the saved configuration is better than what itwould transmit it stops transmitting BPDUs over that

    All bridges start by transmitting on all ports: Root id is own id Transmitting id is own id Cost is 0 (Port id of port) Which is a better message?

    First compare root ID, lower is betterIf tie, next compare costs, lower is better

    If tie, next compare transmitting ID, lower is betterIf still tie, port id is tie breakerEventually only the root bridge is transmitting.

    Source routing bridges

    CSMA/CD community preferred to use transparent bridges due to theirsimplicity.

    The Token Ring community, however, preferred source routing bridges.

    48

  • 8/7/2019 Computer Networks Compiled

    49/102

    In source routing, the sending station knows whether the destination is on thesame network. If it is not, the sender sets the higher destination address bit to 1and includes the exact path to the frame header.

    The path is a sequence of alternating bridge and LAN addresses (4bits/12bits). This requires that each machine know the topology and can construct a path to

    any receiver. Instead, the sender first broadcasts a discovery frame asking the receiver to signalhimself. In the return trip bridges record their addresses in the frame header andthe path is formed.

    Problem: Too many frame loose in the network.

    Frame format

    The routing information field is inserted only if the stations are on different LANs

    if this field is present, then I/G bit in src addr field is 1 otherwise it is 0 The routing control field defines: type of frame, length of routing informationfield and direction of the route designator field(L to R or R to L)

    Route discovery

    First the src stn. Transmits the single route broadcast frame on its LAN withoutthe route designator field.

    this frame should appear exactly once and hence selected bridges form spanningtree

    Once the selected bridge at the first hop receives this frame inserts an incoming LAN number

    bridge number outgoing LAN number in the routing information field

    Then forwards on outgoing LAN At the other hop when a selected bridge receives this frame inserts bridge number

    and outgoing LAN number and forwards on outgoing LAN Non selected bridge simply ignore this frame

    49

  • 8/7/2019 Computer Networks Compiled

    50/102

  • 8/7/2019 Computer Networks Compiled

    51/102

    ALL route broad cast frame

    Example

    51

  • 8/7/2019 Computer Networks Compiled

    52/102

    Suppose C sends frame to D and D replies back with frame to C

    C sends frame, bridge has no info about D, so floods to both LANs bridge notes that C is on port 1 frame ignored on upper LAN frame received by D D generates reply to C, sends bridge sees frame from D bridge notes that D is on interface 2 bridge knows C on interface 1, so selectively forwards frame out via

    interface

    Mixed media bridges

    Interconnect LANs of different types Example ethernet and token ring These differ in frame format, opeartion and speed and these issues to be taken

    care of Since the frame formats are different reformatting is done and new FCS is used.

    But adds processing overhead. Since the data rate is different the bridge should have sufficient buffering capacity Two approaches used are : translational bridging

    source route transparent bridging

    Switch

    52

  • 8/7/2019 Computer Networks Compiled

    53/102

    used to concentrate connectivity combine the connectivity of a hub with the traffic regulation of a bridge switch frames from incoming ports to outgoing ports providing each port with full

    bandwidth

    provide separate data pathsswitch functions

    Address learning Forward/filter decision Loop avoidance

    VLANs

    In a typical shared LAN... Users are grouped physically based on the hub they are plugged into Routers segment the LAN and provide broadcast firewalls

    In VLANs... you can group users logically by function, department or application in use configuration is done through proprietary software VLANs can logically segment users into different subnets (broadcast

    domains) Broadcast frames are only switched between ports on the switch or

    switches with the same VLAN ID. Users can be logically group via software based on:

    port number MAC address protocol being used application being used

    53

  • 8/7/2019 Computer Networks Compiled

    54/102

    The above figure shows the difference between a LAN and a VLAN VLANs...

    work at Layer 2 & 3 control network broadcasts allow users to be assigned by net admin. provide tighter network security

    The figure shows the formation of a VLAN

    A router provides connection between different VLANs For example, you have VLAN1 and VLAN2.

    54

  • 8/7/2019 Computer Networks Compiled

    55/102

    Within the switch, users on separate VLANs cannot talk to each other(benefit of a VLAN!)

    However, users on VLAN1 can email users on VLAN2 but they need arouter to do it.

    Switches make filtering and forwarding decisions based on data in the frame.

    There are two techniques used. Frame Filtering--examines particular information about each frame (MACaddress or layer 3 protocol type)

    Frame Tagging--places a unique identifier in the header of each frame as itis forwarded throughout the network backbone.

    Three methods for implementing VLANs Port-Centric Static Dynamic

    Each switched port can be assigned to a VLAN. This... ensures ports that do not share the same VLAN do not share broadcasts.

    ensures ports that do share the same VLAN will share broadcasts.VLAN benefits

    Traveling Users 20% to 40% of work force moves every year

    net admins biggest headache largest expense in managing networks. Moves may require...

    recabling readdressing and reconfiguration

    VLANs provide a way to control these costs. As long as the user stillbelongs to the same VLAN...

    simply configure the new switch port to that VLAN router configuration remains intact

    Routers provide an effective firewall against broadcasts Adding VLANs can extend a routers firewall capabilities to the switch

    fabric The smaller the VLAN, the smaller the number of users that are effected

    by broadcasts Shared LANs are easy to penetrate...simply plug into the shared hub. VLANs increase security by ...

    restricting number of users in a VLAN preventing user access without authorization configuring all unused ports to the Disabled setting control access by

    addresses application types protocol types

    Hub Replacement & Segmentation The ports on a non-intelligent hub can only be assigned one VLAN.

    55

  • 8/7/2019 Computer Networks Compiled

    56/102

  • 8/7/2019 Computer Networks Compiled

    57/102

    1: An end system sends 50 packets per second using UDP over a full duplex 100

    Mbps ethernet LAN connection. Each packet consists of 1500 bytes of ethernet

    frame payload data. What is the throughput when measured at UDP layer?

    Answer:

    The frame size is 1500 bytes

    The total header in each packet =IP header+UDP header=20+8 bytesTotal UDP payload=1500-28=1472 bytesTotal bits sent per second is=1472*8*50=588800bps or 588Kbps

    2:The following frame transition diagram shows an exchange of ethernet frames

    between two computers A and B connected via a 10 BT hub. Each frame sent by

    computer A contains 1500bytes of ethernet payload data and the one sent by B has

    40 bytes of ethernet payload data. Calculate the average utilization of the media

    during exchange.

    (refer presentation for diagram)

    Answer:Number of frames from A is 8Ethernet MAC frame payload from A =1500bytesThese MAC frame includes IP header 20 bytesTotal frame size at A=8 bytes preamble+14 bytes MAC+1500 bytes MAC payload+4bytes CRC32

    = 8+14+1500+4= 1526bytes single MAC frame or 12208bits

    Number of frames from B is 4Ethernet MAC frame payload from B =40bytesThese MAC frame includes IP header 20 bytesTotal frame size at B=8 bytes preamble+14 bytes MAC+1500 bytes MAC payload+4bytes CRC32+6 byte PAD

    = 8+14+40+4+6= 72bytes single MAC frame or 576bits

    Ignoring the interframe gapTotal utilized bandwidth isNumber of frames from A+number of frames from B= 12208*8+576*4=99968 bitsUtilization=1.7%

    3:Why do we have layers in the OSI model and protocols in general?

    Answer:

    So the main idea here is ABSTRACTION. This helps in putting various functions inseparate modules and at the same time hiding the details of what they do and how they doit from other layers. This way we could improve the performance of one function or evenchange it all together, without having to change the whole protocol stack.

    57

  • 8/7/2019 Computer Networks Compiled

    58/102

    4:What are the differences between the circuit switched and packet switched

    networks? Give examples of each.

    Answer:

    Circuit switched: The resources needed along a path are reserved for the duration of thesession. It is one fixed physical path from source to destination. (Ex: Telephone

    networks).Packet switched: The resources are not reserved, such that a message (or packet) mayhave to wait (queue) to use resources on a communication link, and each packet may takea different route. Today?s Internet

    5:What is the difference between hubs, switches, bridges, routers, repeaters and

    amplifiers?

    Answer:

    Hubs: Physical layer (layer-1) devices that simply broadcasts the bit on all otherinterfaces, so it operates on bits rather than frames.Bridges: Are layer-2 devices that operate on frames, and are used to connect different

    LANs together while filtering data link layer packets from one network to the other.Switches: Are very similar to bridges, except that they usually have many moreinterfaces, operate in full duplex mode, and could be used to connect one LAN or manytogether. They are also considered layer 2 devices.Routers: These are layer-3 devices that operate on the network layer, and route packets orforward them based on the IP address.Repeaters: They are devices that take in a signal, interprets it and reconstructs a fresh newsignal exactly like the first but without all the noise and distortion that the original signalmay have suffered. (layer-1 device, used to make signals propagate over long distances)Amplifiers: Similar to repeaters, except that they simply boost the incoming signal thesame way it is. In other words, it will also boost any noise or problems that might bepresent in the signal.

    6:What is the minimum and maximum length for an Ethernet frame? Why do we

    have those minimum and maximum lengths?

    Answer:

    Min length is: 64 bytes. Reason: So that collisions can be detected.Max length is: 1518 bytes. Reason: Mainly fairness (so that one node would notmonopolize the channel), and also for easier error detection (checksumming).

    7:Rank the following LANs from most secure to least secure: Switched LAN,

    Wireless LAN and Shared LAN. Explain your reasoning.

    Answer:

    The sequence would be: Switched LAN (most secure) then Shared LAN then WirelessLAN (least secure).Reason: In the switched LAN, the frames take a path from the source to the destinationdirectly without having to broadcast it on all the ports, so no other machine could tap orlisten to the medium since nothing is being sent to those machines in the first place.Shared LAN is less secure because of its broadcasting property, so all the machines onthe LAN could sniff the packets and see what is being sent even if it weren?t addressed to

    58

  • 8/7/2019 Computer Networks Compiled

    59/102

    them. Finally, the wireless is the least secure, because you are not only broadcasting theframes to all the machines, you are actually doing that all over the medium, so even othermachines that do not or should not belong to the LAN may sniff the frames.

    8:Assume each packet has typical TCP and IP headers each 20bytes long. If we have

    three computers, A, B and C. The link between A and B has an MTU of 3000 bytes,while the link between B and C has an MTU of 1000 bytes. Consider the case where

    a packet needs to be sent from A to C that has a size of 3000 bytes (including

    headers). How many fragments will we have from B to C, and how much data will

    be in each fragment (i.e. excluding headers)? (all connections are assumed to be

    Ethernet)

    Answer:

    The packet/frame of size 3000 bytes will have:3000 ? 20 (IP header) ? 20 (TCP header) = 2960 bytes of data.Since the MTU is 1000 bytes (including headers), so the max amount of data from IP?spoint of view ( including the TCP header if needed) that could be sent is: 1000 ? 20 (IP

    header)? = 980 bytes.But since fragments have to be divided into offsets that are divisible by 8 (because theoffset field are multiples of 8bytes), then the max data that can be transferred from IP?spoint of view is = 976bytes.So we will have Four fragments from A to CSo the first packet will include 976 ? 20(TCP header) = 956 bytes of data.The second packet will have 976 bytes.The third packet will have 976 bytes.And the fourth packet will have: 2960 ? (956 + 976*2) = 52 bytes.

    9:Assume the web server www.slashdot.org has IP address 66.35.250.151. A client at

    address 135.22.11.18 downloads a file from the slashdot web site. Assuming the

    client has an

    arbitrary port number > 1024, what is the socket pair comprising this

    connection?

    Answer:

    There are several possible answers to this question. Lets assume the client is assignedthe port number 2142004, the socket pair of this connection is 66.35.250.151/80 and135.22.11.18/2142004.

    10:The server developer.apple.com provides a public ftp server. The client (at

    address 135.22.11.18) wants to download a file from the ftp server using a passive

    connection. Assuming both the client and server assign arbitrary port numbers

    number > 1024, what is a possible socket pair comprising this connection?

    Answer:

    Lets again assume the client will begin at port number 2142004. The server will begin atport 4999. The control channel will consist of the socket pair developer.apple.com/21 and135.22.11.18/2142004. Once this is established, the data channel will consist of thesocket pair developer.apple.com/4999 and 135.22.11.18/2142005.

    59

  • 8/7/2019 Computer Networks Compiled

    60/102

    11:Consider sending voice from Host A to Host B over a packet-switched network.

    Host A converts analog voice to a digital 64 kbps bit stream on the fly. Host A then

    groups the bits into 48-byte packets. There is one link between Host A and B; its

    transmission rate is 1 Mbps and its propagation delay is 2 msec. As soon as Host A

    gathers a packet, it sends it to Host B. As soon as Host B receives an entire packet, it

    converts the packets bits to an analog signal. How much time elapses from the timea bit is created (from the original analog signal at Host A) until the bit is decoded (as

    part of an analog signal at Host B).

    Consider the first bit in a packet. Before this bit can be transmitted, all of the bits in thepacket must be generated. This requires(48bytes* 8bits/byte )/(64 *103bits / sec)= 6 msec.The time required to transmit the packet is(48bytes* 8bits /byte)/(1*106bits/sec)= 384sec.Propagation delay = 2 msec.The delay until decoding is

    6msec + 384 sec + 2msec = 8.384msecA similar analysis shows that all bits experience a delay of 8.384 msec.

    12:Suppose there is a router between A and B as shown in the Figure below. If the

    link RB has the maximum capacity of sending 4 packets per round trip time while

    the capacity of

    the link AR is 8 packets per round trip time. The router R has the queue that can

    support at most 3 packets in waiting, not counting the one that is transmitting.

    Answer

    A starts a TCP connection to B, and the packets has sequence number 0, 1, 2, N.Whatwill be the first lost packet? After: 1st RTT: [0] pass through R

    2nd RTT: [1][2] pass through R3rd RTT: [3][4][5] [6] pass though R

    4th RTT: [7] pass through R, [8][9][10] in queue[8] passing through R, [9][10][11][12] in queueBecause the routers queue only holds 3 packets, packet 12 is lost

    Suppose it takes 10 seconds for TCP to send a file of size 10,000 packets. What is theaverage packet loss rate?

    13:A CSMA/CD LAN is 1 km in length, and has a bandwidth of 50 Mbps. There are

    no repeaters. Data frames are 512 bits long, including 32 bits used for header, CRC

    etc. The first bit slot following a successful data transmission is reserved for use by

    the receiver to send back a 32 bit acknowledgment frame. What is the maximum

    effective

    data rate this channel can achieve, assuming no collisions? (Assume a

    transmission speed of 200 m/sec.)

    60

  • 8/7/2019 Computer Networks Compiled

    61/102

    14:An IP packet consists of 20 bytes of header and 1500 bytes of payload. Now

    suppose that the packet is mapped into ATM cells that have 5 bytes of header and

    48 bytes of payload. How much of the resulting cell stream is header overhead?

    Answer:

    Total payload for ATM: 1520 bytes

    This implies 32 ATM frames:1520/48Total ATM header bytes: 160:32*5Total Header bytes: 180:160+20Total bytes transmitted: 1696:32*53Header overhead = 180 / 1696 = 10.61%

    15:Suppose that virtual paths are set up between every pair of nodes in an ATM

    network. Explain why connection set up can be greatly simplified in this case.

    Answer:

    When two nodes need to communicate, each switch in the path does not have to beinvolved in the connection set up. Instead the switches at the ends of the VP assign an

    end-to-end VCI to eachconnection.

    61

  • 8/7/2019 Computer Networks Compiled

    62/102

    Internet Protocols

    Internet transport services: reliable, in-order unicast delivery (TCP)

    congestionflow control

    connection setup unreliable (best-effort), unordered unicast or multicast delivery: UDPservices not available:real-timebandwidth guaranteesreliable multicast

    UDP

    no frills, bare bones Internet transport protocol best effort service, UDP segments may be:

    lost delivered out of order to applications

    connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others

    Why is there a UDP?

    no connection establishment (which can add delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired

    UDP header

    Header details

    Source and destination port numbers The source and destination processes

    Length = length of header + data Checksum covers header and data

    Optional in UDP but mandatory in TCPUDP Checksum

    Sender: treat segment contents as sequence of 16-bit integers checksum: addition (1s complement sum) of segment contents

    62

    Length Checksum

    Source Port Destination Port

    0 16 31Bit:

    8Octets

  • 8/7/2019 Computer Networks Compiled

    63/102

    sender puts checksum value into UDP checksum fieldReceiver:

    compute checksum of received segment check if computed checksum equals checksum field value:

    NO - error detected

    YES - no error detectedUses of UDP

    Inward and Outward data collection/dissemination SNMP for network management RIP routing table updates NFS remote file server

    Request-Response Eg. DNS uses UDP for name translation

    Real time application Streaming multimedia and internet telephony

    Video conferencingThe following are the port numbers of some applications commonly used

    Both TCP and UDP use port (or socket) numbers to pass information to the upperlayers.

    Port numbers are used to keep track of different conversations that cross thenetwork at the same time.

    Application software developers have agreed to use the well-known port numbersthat are defined in RFC1700.

    The range of numbers are below 255 for TCP and UDP appilcations.

    Applications of UDP

    Remote Procedure Call

    63

  • 8/7/2019 Computer Networks Compiled

    64/102

    Mechanisms

    Client process calls the client stub Marshalling-packing the parameters Kernel receives from client stub and sends to server machine Kernel on server OS passes the message to server stub The server stub processes it and the reply follows the same path in the other

    direction

    Problems may occur in RPC Passing pointer parameters from client place to server space weakly typed language- C may not be suitable Type conversion Use of global variables since two different space involvedStill UDP is commonly used in RPC

    Another application of UDP a protocol uses UDP

    (a) The position of RTP in the protocol stack.

    (b) Packet nesting.

    64

  • 8/7/2019 Computer Networks Compiled

    65/102

    RTP Real time transport protocol

    UDP is used with real time multimedia applications the applications are: internet radio, internet telephony, music on demand, video

    on demand, video conferencing RTP is used for different formats like GSM, MP3 for sound and MPEG and

    H.263 for video The basic function of RTP is to multiplex several real time data stream ontosingle stream of UDP packets. The UDP stream can be sent to single destination(unicast) and multiple destination (multicast)

    RTP Header details

    P padded bit X extension header present or not CC contributing sources

    M marker bit Version field Payload type Seq no Time stamp Synchronization and contributing source identifier

    RTP Header

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

    Transport Protocol TCP

    65

  • 8/7/2019 Computer Networks Compiled

    66/102

    Specially designed to provide a reliable end to end byte stream over a unreliable networkThe inter network differs from a single network in terms of topology and bandwidthdelay packet size. TCP adapts to properties of such network. Each machine supportingTCP has TCP entity. IP layer provide no guarantee that the datagrams will be deliveredso the TCP has to provide the reliability

    TCP

    point-to-point: one sender, one receiver

    reliable, in-orderbyte steam: no message boundaries

    pipelined: TCP congestion and flow control set window size at the time of

    connection setup send & receive buffers the buffer size negotiated full duplex data:

    bi-directional data flow in same connection MSS: maximum segment size

    connection-oriented: handshaking (exchange of control msgs) inits sender, receiver state before

    data exchange flow controlled:

    sender will not overwhelm receiver

    TCP Header

    66

    s o c k e t

    d o o r

    T C Ps e n d b u f f e r

    T C Pr e c e i v e b u f f e

    s o c k e

    d o o r

    s e g m e n t

    a p p l i c a t i o n

    w r i t e s d a t aa p p l i c a t i o n

    r e a d s d a t a

  • 8/7/2019 Computer Networks Compiled

    67/102

    TCP segment structure

    Seq. numbers: byte stream number of first byte in segments data

    ACKs: seq numbers of next byte expected from other side cumulative ACK

    Q: how receiver handles out-of-order segments A: TCP spec doesnt say, - up to implementor

    Every segment of TCP has a sequence number so it is easy to reassemble and also take

    care of the loss of packet and retransmission is done

    The segment details are shown below

    The SYN bit used for connection setup and the FIN bit for the release

    Urgent data means it has to be delivered faster which indicate by the pointer

    The Checksum uses CRC

    67

  • 8/7/2019 Computer Networks Compiled

    68/102

    TCP connection establishment

    TCP sender, receiver establish connection before exchanging data segments initialize TCP variables: seq. nubers buffers, flow control info (e.g. RcvWindow)

    client: connection initiatorSocket clientSocket = new Socket("hostname","port number");

    server: contacted by clientSocket connectionSocket = welcomeSocket.accept();

    Three way handshake

    Step 1: client end system sends TCP SYN control segment to server specifies initial seq numberStep 2: server end system receives SYN, replies with SYNACK control segment

    ACKs received SYN allocates buffers specifies server-> receiver initial seq. number

    Step 3: client sends the request and the ack for the server seq number

    source port#

    dest port#

    32 bits

    applicationdata

    (variable length)

    sequence number

    acknowledgement number

    rcvr window size

    ptr urgent datachecksum

    FSRPAUhead

    len

    not

    used

    Options (variable

    length)

    URG: urgent data(generally not used)

    ACK: ACK #

    valid

    PSH: push data now

    (generally not used)

    RST, SYN, FIN:

    connection estab

    (setup, teardown

    commands)

    # bytes

    rcvr willing

    to accept

    countingby bytes

    of data

    (not segments!)

    Internet

    checksum

    (as in UDP)

    68