Sunteți pe pagina 1din 102

Notes by Anita Kanavalli MSRIT

A computer network is a collection of computers and other devices (nodes) that use a
common 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 to
communicate with each other.
The following is a figure which shows a communication model.

Communication Model

• Source
Generates data to be transmitted
• Transmitter
Converts data into transmittable signals
• Transmission System
Carries data
• Receiver
Converts received signal into data
• Destination
Takes incoming data
The 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 Networks


The computer network can be classified based on architecture and access as shown below
• Architecture

1
Common LAN architectures: Ethernet IEEE 802.3, Token Ring, and FDDI.
• Access Possibilities
shared-media networks
switching networks
• Transmission Technology
Broadcast links
Point-to-point links
The architecture based classification will be dealt later. The shared media networks: The
stations connected to the same media and can share all the resources like printers and
scanners and also software resources and share the same communication channel. Where
as incase of switching networks a switching element is used and will route the
information to the relevant output. The information comes from many sources and
forwarded only to the correct output.
Broad cast links have a single communication channel shared by all the machines on the
network. A short message called a packet is sent by any machine and received by all the
others 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 address
where all the machines receive the packet. This type of transmission is called the
Broadcasting. Some broadcast systems allow the message to be sent to only a subset of
the machine or a group by using a bit in the address field to indicate that the message is
intended for the group. This method is called the multicasting. In contrast the point to
point link, the source and the destination have several links. The message may have to
visit an intermediate station before reaching the destination. The point to point link
between 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 wire
or fibre optic. They are many different topologies used to connect the machines. The
figure below shows how the machines are connected using the wire this is an example of
a bus topology.

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

2
To the wired network

router
base
statio
n

mobile
hosts
The above figure shows a wireless network. It consists of mobile machines such as
laptops and there is a base station it is called as access point. The machines can access
other 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 describes
the wireless technology.

Fiber optic network:

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

LANs

3
• 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. It
uses the same technology as LAN. The example is the cable TV network. It uses the
coaxial 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 can
support both voice and data transmission.

WANs

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

• A WAN consists of several transmission lines and routers Internet is an example


of 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 the
telephone network when a sender places a call a dedicated link is established between the
sender and receiver as long as the call exists. Then the link is terminated when the call
ends.

Packet switched network


No dedicated link present between the sender and receiver. When a data frame or packet
is 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 need
not 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 the
link and same channel used for different communication.
Internetwork

• internetwork – interconnection of networks – also called an “internet”


• Subnetwork – a constituent of an internet

5
• Intermediate system – a device used to connect two networks allowing hosts of
the networks to correspond with each other
Bridge
Routers
• Internet is an example of an internetwork.
• network of networks”
• “collection of networks interconnected by routers”
• “a communication medium used by millions”Email, 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 message

Uses 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 the
application in business

Mobile users are connected using network such as laptops palmtops etc
Like 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 data


between 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
• 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 the
complexity. Most of the network are organized as a stack of layers or levels each one
built over the other. The number of layers and the name of the layers and the function of
each layer differ from network to network. The purpose of each layer is to offer service to
layer above it. Layer n on one machine carries conversation with layer n on another
machine. 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 communicate
using protocol. No data is sent from layer n to layer n instead they send to the layer below
until 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 and
services 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 clear
interfaces. A set of protocol and layers is called the network architecture. A list of
protocol used by a certain system one protocol per layer is called a protocol stack.

7
Consider the above figure
This shows how communication happens between two systems. A message M is
produced by the layer 5. It is given to layer 4 and it puts the header in front of the
message and passes to layer 3. The header includes the control information such as
sequence numbers to allow the layer 4 on the destination machine to deliver messages in
the right order. The layer 3 breaks up the message into smaller units called packets
adding layer 3 header to each packet. In this example M is split into 2 packets M1 and
M2. 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 physical
transmission. 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 address
IP or internet address (TCP/IP)
Network service access point or NSAP (OSI)
• Process within the system
Port number (TCP/IP)

8
Service access point or SAP
Addressing Scope
• Global nonambiguity
Global address identifies unique system
There is only one system with address X
• Global applicability
It is possible at any system (any address) to identify any
other system (address) by the global address of the
other system Address X identifies that system from
anywhere on the network
• e.g. MAC address on IEEE 802 networks
Connection 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 detection
Sender inserts error detecting bits
Receiver checks these bits
If OK, acknowledge
If error, discard packet
Retransmission
If no acknowledge in given time, re-transmit
Performed at various layers of protocol
Flow 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
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 bandwidth
Routing
Determine path or route that packets will follow
Use routing protocol based on a routing algorithm
“Good” path should be least cost path
Cost : depends on the following factors.
Average queuing delay
Propagation delay
Bandwidth, mean queue length, etc.
End systems and routers maintain routing tables
Dynamic or static

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 concept
of 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
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 may
proceed 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 data
between 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 destination
Session
• 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
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 offers
Connection oriented
• A connection is established between ES’s (end System) that is used for duration
of call
Call setup
Data transfer
Call termination
E.g: Virtual circuits at this layer
• IS’s ( intermediate system) connect two or more networks
IS appear as ES to each network
Logical connection set up between ESs
-Concatenation of logical connections across networks Individual network virtual circuits
joined 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 ES’s and routers
– Known generically as the internet protocol
• Internet Protocol

12
– 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 the


service. These primitives tell the service to perform some action or report on an action
taken by a peer entity. The set of primitives available depends on the nature of the service
being provided. The primitives for connection oriented are different from the
connectionless service.
The five different service primitives for implementing a simple connection oriented
service
Listen: The server executes LISTEN to indicate that it is prepared to accept the incoming
connection. The server process is blocked until a request for connection appears
Connect: the client process executes a CONNECT call to establish the connection with
the server. Specify the address too.

13
When the server receives this packet it unblocks the server and sends back the
acknowledgement and this releases the client. At this point the client and server both are
running. The connection established.
Receive: the server executes RECEIVE to prepare the first request. This call blocks the
server.
Send: the client executes SEND to transmit its request followed by the execution of
receive to get the reply. If the client has additional requests it makes now
Disconnect: The client use DISCONNECT to end the connection. The server also issues
a 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
Bridge
Routers
• 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
• Uses Internet (TCP/IP and http) technology to deliver documents and
resources
• 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 into
packets
• It operates at the Physical and Data Link layers 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 enterprise
Frame Relay –benefits
• Reduced internetworking costs
• Statistically multiplexed traffic from multiple sources over private backbone
networks 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
• 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 Mbps
Wireless 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
• BSS’s 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 network without AP
• Applications:
– “laptop” meeting in conference room, car
– interconnection of “personal” devices
– battlefield
• IETF MANET (Mobile Ad hoc Networks) working group
LAN generations
• First
– Typified by CSMA/CD and token ring

16
– 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 LAN’s and WAN’s
– 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 cell’s 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 the
transmitting end

17
• 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 virtual
path connection (VPC)
• VPCs are specified by virtual path identifiers (VPIs)
• Virtual connections established
– VCI and VPI assignments are made dynamically by ATM end nodes and
switches 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. Explain client server model with an example.
LAN Protocols

• Ethernet (IEEE 802.3 standard)

• Token Bus (IEEE 802.4 LAN standard)

• Token Ring (IEEE 802.5 LAN standard) and FDDI


This chapter deals in detail about the above technologies.
LAN structure
• defines the structure of the network
• contains both physical topology, which is the actual layout of the wire (media)
[bus, star, ring, extended star, hierarchical, mesh] and the logical topology, which
defines how the media is accessed by the hosts [token passing]
Examples

The above figure shows how the hosts can be connected using any wiring media. This is
called the bus topology. The circle depicts the nodes. They all share the same media. This
is the simplest of all and easy to implement. Cost is less. Used in LAN. But only one
communication can happen at a time.

This is the ring topology the hosts are connected in a ring fashion and uses a special
packet called token for the communication between the hosts. The ring maintenance is a
important issue not as simple as bus to implement

19
The above figure shows the star topology. There is a wiring hub to which the hosts are
connected. The data passes through the hub in the center. This is a very popular structure
used in the LAN. The wiring hub can be a network device switch. The extended star also
is used. When all the nodes are connected to each other by the wiring media it becomes
the 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

NICs
Adapters to connect devices to a network
Perform:
• 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
• NIC works in two modes:
– General mode
– Promiscuous mode
• In general mode, the Ethernet card of the computer will allow following types of
packets:
– 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 framing to organize or group the bits.


• Layer 2 uses an addressing process 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
IEEE has specified the following standards
The 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 specific
LAN 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 PDU
protocol data unit and sends to the MAC through the interface it is called the SDU service
data unit and through the service access point SAP. The header will have DSAP d stands
for destination and SSAP s stands for the source.
MAC: does the framing and the flow control.
Concept of layer 2
1. Layer 2 uses framing to organize or group the data.

22
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 group
in 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 physical
address.
• 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 NIC
number.
• MAC addresses are sometimes referred to as burned-in addresses (BIAs) because
they are burned into read-only memory (ROM) and are copied into random-access
memory (RAM) when the NIC initializes.
• 0000.0c12.3456 or 00-00-0c-12-34-56
MAC address are used by MAC layer to identify the destination.

LAN systems
• Based on LAN architecture just seen
The IEEE 802 Standards are an integral part of the architecture:
• LAN’s
• Ethernet (CSMA/CD)
• Token Ring and FDDI
• Wireless
• ATM LAN’s
CSMA/CD

23
• 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 slot
retransmission extends the range the range by a factor of 2 until the maximum
range of 1210
• The average number of minislots in a contention period is approximately e=2.71
therefore the fraction
• The average number of minislots in a contention period is approximately e=2.71
therefore the fraction of time that the channel is busy transmitting frames is
L/R = 1
L/R+tprop+2etprop 1+6.44a

Where a=tprop R/L


Frame format

24
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 stations
receive the packet.
FCS uses CRC(cyclic redundancy check ) for the error control. Pad bits are used to add
some bits if the length of the data frame is less because Ethernet requires minimum 512
bytes.

Signaling rate - Band - Length (Meters)


(Mbps) (Base or or
Broad) Cable Type

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

10Base-FB 10Base-FL 10Base-FP


Fiber Fiber Link Fiber Passive
Backbone

Medium fiber fiber 850 nm fiber

25
Signaling Baseband - Manchester/ on-off

Topology Point-to-pointPoint-to-point Star


or star

max 2000 m 2000 m 500 m


segment
length

max. Nodes/2 2 33
segment

Max 2500 m 2500 m 2500 m


Diameter

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. If
there is a collision the hub sends the jam signal and the stations execute the backoff
algorithm. The stations are in the same collision domain.

26
The above figure shows that a switch or any other device connected where input port
buffers incoming the transmissions. The incoming frames are examined and transferred to
the 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

max 100 m 412 m (half-100 m


segment duplex)
length 2 km (full-duplex)

network 200 m 400 m 200 m


diameter

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
• 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/10B
Application of fast and gigabit Ethernet

The above figure shows the application of the fast and gigabit Ethernet technology. There
are three departments and has the LANS the hosts are connected using a hub, the
topology is star. The link used is 10Mbps. The other two Lans are also implemented in
the same way. The three LANs are connected to their respective server using a switch and
100Mbps links.
All the three LANs are linked together using routers and a gigabit link in the backbone.

28
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
Two types of token ring frames: Data/Command
and Token
• Tokens are 3 bytes in length and consists of a start delimiter, an access control
byte, and an end delimiter.
• The start delimiter alerts 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 the
frame by violating the encoding scheme used elsewhere in the frame.
• The access control byte contains the priority and reservation field, and a token
and monitor bit. 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 RRR
PPP- 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 frame
FF= 01 indicates data frame
FF=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 where
E- 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

30
• 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 to
the next end station.
• Each station can hold the token for a maximum period of time, depending on the
specific technology that has been implemented.
• When a token is passed to a host that has information to transmit, the host seizes
the 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 this
data to the next station on the ring. There is no token on the network while the
information frame is circling the ring, unless the ring supports early token
releases. Other stations on the ring cannot transmit at this time. They must wait
for the token to become available.
• Token Ring networks have no collisions. If early token release is supported, a new
token can be released when the frame transmission has been completed.
• The information frame circulates around the ring until it reaches the intended
destination station, which copies the information for processing. The information
frame continues around the ring until it reaches the sending station, where it is
removed. The sending station can verify whether the frame was received and
copied by the destination.
• Unlike CSMA/CD networks, such as Ethernet, token-passing networks are
deterministic. This means that you can calculate the maximum time that will pass
before any end station will be able to transmit.
• This feature, and several reliability features, makes Token Ring networks ideal for
applications where any delay must be predictable, and robust network operation is
important. Factory automation environments are examples of predictable robust
network operations.
• Token Ring networks use a sophisticated priority system that permits certain user-
designated, high-priority stations to use the network more frequently. Token Ring
frames have two fields that control priority - the priority field and the reservation
field.

31
• Only stations with a priority equal to, or higher than, the priority value contained
in a token can seize that token.
• Once the token has been seized and changed to an information frame, only
stations with a priority value higher than that of the transmitting station can
reserve 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 when
their transmission has been completed.
• Token Ring networks use several mechanisms for detecting and compensating for
network faults.
• One mechanism is to select one station in the Token Ring network to be the active
monitor. This station acts as a centralized source of timing information for other
ring stations and performs a variety of ring maintenance functions. The active
monitor station can potentially be any station.
• One of this station’s functions is to remove continuously circulating frames from
the 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 the
network. 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 overall
network reliability. Active MSAUs (multi-station access units) can see all
information in a Token Ring network enabling them to check for problems and to
selectively 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) it
sends a beacon frame. The beacon frame defines a failure domain. A failure
domain 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 to
reconfigure 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 together
to 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 removing
stations from the ring.

FDDI

32
Fiber Distributed Data Interface (FDDI) came about because system managers became
concerned with network reliability issues as mission-critical applications were
implemented on high-speed networks.
FDDI is frequently used as a backbone technology and to connect high-speed computers
in a LAN.
FDDI has four specifications:
MediaAccessControl—
defineshowthemediumis accessedframe formattoken handlingaddressing algorithm for
calculating a cyclic redundancy check and error-recovery mechanisms
FDDI has four specifications:
Physical Layer Protocol—defines data encoding/decoding procedures
clocking requirements framing
FDDI has four specifications:
Physical Layer Medium—defines the characteristics of the transmission medium fiber
optic link power levels bit error rates optical components connectors
FDDI has four specifications:
Station Management—defines the FDDI station configuration ring configuration ring
control features stationinsertion and removal initialization fault isolation and recovery
Recovery collection of statistics
Unlike CSMA/CD networks, such as Ethernet, token-passing networks are
deterministic--you can calculate the maximum time that will pass before any end station
will 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 of
different 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 an
FDDI network, while asynchronous traffic can consume the rest.
• Synchronous bandwidth is allocated to those stations requiring continuous
transmission capability. This is useful for transmitting voice and video
information.
• 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
• FDDI uses an encoding scheme called 4B/5B. Every 4 bits of data are sent as a 5
bit 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-optic
transmission 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 OSI
Model.
• 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 a
transmission medium.
• Optical fiber is exploding in popularity as a networking medium, being installed
at a rate of 4000 miles per day in the United States.
• Single-mode fiber is capable of higher bandwidth and greater cable run distances
than 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-building
connectivity.
• Multi-mode fiber uses LEDs as the light-generating devices while single-mode
fiber generally uses lasers.
• FDDI specifies the use of dual 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, or single-attachment stations (SAS), attach to one ring; Class A, or dual
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 power
down, of any given SAS, does not interrupt the ring. This is Particularly useful
when PCs, or similar devices that frequently power on and off, connect to the
ring.
• Each FDDI DAS has two ports, designated A and B. These ports connect the
station to dual FDDI ring; therefore each port provides a connection for both
primary 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
• 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 T’R= 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 is
inserted
• Conclusion-improves efficiency in case of the third case.

35
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 since
the 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<0 only synchronous traffic is allowed
FDDI operation

Wireless LAN 802.11

36
• Protocol stack
• Frame structure
• MAC protocol
• services

The above figure shows the protocol stack of the wireless LAN
Why 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 problem


Infrastructure networks
• Basic Service Set (BSS) contains:
– wireless hosts
– access point (AP): base station

37
• BSS’s combined to form distribution system (DS) to form a extended service set
ESS
• ESS provide gateway access for wireless users into wired network. This access is
done 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 Delivery
Adhoc networks
• Ad hoc network: IEEE 802.11 stations can dynamically form network without AP
• Applications:
– “laptop” meeting in conference room, car
– interconnection of “personal” devices
– battlefield

38
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 and
sequence 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
It is defined using the coordination functions
DCF offers the contention service where the stations have to contend to use the channel.
Uses CSMA/CA
The basic operation is as follows

• 802.11 CSMA: sender


• - if sense channel idle for DISF sec.
• then transmit entire frame (no collision detection)
• -if sense channel busy then binary backoff

• 802.11 CSMA receiver:


• if received OK
• return ACK after SIFS

40
• 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 AP
Physical layer

41
It is defined to operate with its MAC layer
There 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 collision
domain and on total allowed geographical coverage
• cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)
Bridges
• A network component connecting LAN’s 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 smaller
LAN’s.
– split networks that became loaded over time.
– to handle larger distances.

42
– to block some traffic leaking outside the network.
Link Layer devices: operate on Ethernet frames, examining frame header and selectively
forwarding frame based on its destination
Bridge isolates collision domains since it buffers frames
When 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 from
one LAN to the other
A bridged LAN

43
Interconnection by bridge

• The no frills bridge : simply transmit all traffic from one LAN segment onto all
the other segments
– Advantages: two stations can be transmitting at the same time. Bridge
will buffer a packet until it can transmit on a LAN
– Disadvantages: total bandwidth still that can be safely utilized is still the
minimum 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 a
station 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
– 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:
– if destination is on LAN on which frame was received
• then drop the frame
• else { lookup filtering table
• if entry 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 LAN’s together and make
the 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 frame
there.
• 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 is
broadcast onto all networks (except the one its coming from).
• For each incoming frame the bridge also read the source address and
updates the hash table by inserting the source address and the network id
into the tables.
• Entries in the table can live for a certain time, and if there is no packet
traffic 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 bridge
port 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 entry
already exists for an address update if different)

– determine if the destination address is in the cache

45
• If entry then forward only on the appropriate port unless the port is
the same as the arrival port
• If no such entry then forward packet on all segments except the
one 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 source
to dest
• with multiple simultaneous paths, cycles result - bridges may multiply and
forward frame forever
• solution: organize bridges in a spanning tree by disabling subset of interfaces
Disabled

• As the system grows a complex graph of many networks and many bridges
appear.
• 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. LAN’s 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

46
• Elect a single bridge among all bridges as the root bridge. The algorithm will
select the root bridge as the one with the lowest bridge id.
• Each bridge (except root) determines the least cost path (shortest path with respect
to 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 to
that LAN. The designated bride is the one closest to the root bridge. In case of
ties it is the one with the lowest bridge id. The port that connects the designated
bridge and the LAN is the designated port for that LAN.
• Ports in the spanning tree are all root ports and designated ports. Other ports are
in the blocking state.
• Data traffic is forwarded to and received from ports in the spanning tree only.
Example
Sample topology

using spanning tree

47
How algorithm works
• Bridges exchange bridge protocol data units (BPDUs). These have configuration
messages 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, it
compares this with what it would transmit over that port. Note that it will add the
cost to the received message before comparison. It saves the best configuration
message received for each port. If the saved configuration is better than what it
would 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 better
If tie, next compare costs, lower is better
If tie, next compare transmitting ID, lower is better
If still tie, port id is tie breaker
Eventually only the root bridge is transmitting.

Source routing bridges


• CSMA/CD community preferred to use transparent bridges due to their
simplicity.
• The Token Ring community, however, preferred source routing bridges.

48
• In source routing, the sending station knows whether the destination is on the
same network. If it is not, the sender sets the higher destination address bit to 1
and 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 signal
himself. In the return trip bridges record their addresses in the frame header and
the 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 information
field 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 without
the route designator field.
• this frame should appear exactly once and hence selected bridges form spanning
tree
• 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
• Once the receiver gets this frame it broadcasts all routes broadcast frame with no
route designator fields
• This frame generates all possible routes back to the src stn
• After collecting all routes the source station selects the best route and saves it
• To prevent all routes broad cast frames from circulating in the network, the bridge
first checks whether the outgoing LAN number is already recorded, if so it does
not forward the frame

Example

• Assume that B1,B3,B4 and B6 are part of spanning tree


• S1 wants to send a frame to S3
• The next slide shows the routes followed by single route broadcast frame and all
routes broadcast frames
Single frame

50
ALL route broad cast frame

Example

51
• 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
• 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 paths

switch 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
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
– 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 a
router 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 (MAC
address or layer 3 protocol type)
– Frame Tagging--places a unique identifier in the header of each frame as it
is 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 admin’s 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 still
belongs 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 router’s 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
– Replacing hubs with switches is relatively cheap compared to the benefit
gained.
– In the graphic, replacing the core hub in an extended star topology with a
VLAN capable switch effectively microsegments one shared LAN into
six.
_______________________________________________________________________
_

56
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 bytes
Total UDP payload=1500-28=1472 bytes
Total 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 8
Ethernet MAC frame payload from A =1500bytes
These MAC frame includes IP header 20 bytes
Total frame size at A=8 bytes preamble+14 bytes MAC+1500 bytes MAC payload+4
bytes CRC32
= 8+14+1500+4
= 1526bytes single MAC frame or 12208bits
Number of frames from B is 4
Ethernet MAC frame payload from B =40bytes
These MAC frame includes IP header 20 bytes
Total frame size at B=8 bytes preamble+14 bytes MAC+1500 bytes MAC payload+4
bytes CRC32+6 byte PAD
= 8+14+40+4+6
= 72bytes single MAC frame or 576bits
Ignoring the interframe gap
Total utilized bandwidth is
Number of frames from A+number of frames from B
= 12208*8+576*4
=99968 bits
Utilization=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 in
separate modules and at the same time hiding the details of what they do and how they do
it from other layers. This way we could improve the performance of one function or even
change it all together, without having to change the whole protocol stack.

57
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 the
session. 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) may
have to wait (queue) to use resources on a communication link, and each packet may take
a 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 other
interfaces, 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 more
interfaces, operate in full duplex mode, and could be used to connect one LAN or many
together. They are also considered layer 2 devices.
Routers: These are layer-3 devices that operate on the network layer, and route packets or
forward them based on the IP address.
Repeaters: They are devices that take in a signal, interprets it and reconstructs a fresh new
signal exactly like the first but without all the noise and distortion that the original signal
may 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 the
same way it is. In other words, it will also boost any noise or problems that might be
present 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 not
monopolize 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 Wireless
LAN (least secure).
Reason: In the switched LAN, the frames take a path from the source to the destination
directly without having to broadcast it on all the ports, so no other machine could tap or
listen 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 on
the LAN could sniff the packets and see what is being sent even if it weren?t addressed to

58
them. Finally, the wireless is the least secure, because you are not only broadcasting the
frames to all the machines, you are actually doing that all over the medium, so even other
machines 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?s
point 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 the
offset field are multiples of 8bytes), then the max data that can be transferred from IP?s
point of view is = 976bytes.
So we will have Four fragments from A to C
So 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. Let’s assume the client is assigned
the port number 2142004, the socket pair of this connection is 66.35.250.151/80 and
135.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:
Let’s again assume the client will begin at port number 2142004. The server will begin at
port 4999. The control channel will consist of the socket pair developer.apple.com/21 and
135.22.11.18/2142004. Once this is established, the data channel will consist of the
socket pair developer.apple.com/4999 and 135.22.11.18/2142005.

59
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 packet’s bits to an analog signal. How much time elapses from the time
a 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 the
packet 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)= 384µsec.
Propagation delay = 2 msec.
The delay until decoding is
6msec + µ 384 sec + 2msec = 8.384msec
A 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 R
3rd 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 queue
Because the router’s 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 the
average 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
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/48
Total ATM header bytes: 160:32*5
Total Header bytes: 180:160+20
Total bytes transmitted: 1696:32*53
Header 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 be
involved in the connection set up. Instead the switches at the ends of the VP assign an
end-to-end VCI to each
connection.

61
Internet Protocols
• Internet transport services:
• reliable, in-order unicast delivery (TCP)
congestion
flow control
connection setup
• unreliable (“best-effort”), unordered unicast or multicast delivery: UDP
services not available:
real-time
bandwidth guarantees
reliable 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

Bit: 0 16 31
8 Octets

Source Port Destination Port

Length Checksum

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 TCP
UDP Checksum
Sender:
• treat segment contents as sequence of 16-bit integers
• checksum: addition (1’s complement sum) of segment contents

62
• sender puts checksum value into UDP checksum field
Receiver:
• compute checksum of received segment
• check if computed checksum equals checksum field value:
– NO - error detected
– YES - no error detected
Uses 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 conferencing
The following are the port numbers of some applications commonly used

• Both TCP and UDP use port (or socket) numbers to pass information to the upper
layers.
• Port numbers are used to keep track of different conversations that cross the
network at the same time.
• Application software developers have agreed to use the well-known port numbers
that are defined in RFC1700.
• The range of numbers are below 255 for TCP and UDP appilcations.

Applications of UDP

Remote Procedure Call

63
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 involved
Still 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
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 onto
single 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
a p p l i c a t i o n a p p l i c a t i o n
w r i t e s d a t a r e a d s d a t a
s o c k e t s o c k e t
d o o r d o o r
T C P T C P
s e n d b u f f e r r e c e i v e b u f f e r
s e g m e n t

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

TCP
• point-to-point:
– one sender, one receiver
• reliable, in-order byte 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) init’s sender, receiver state before
data exchange
• flow controlled:
– sender will not overwhelm receiver

TCP Header

66
TCP segment structure
Seq. numbers:
– byte stream “number” of first byte in segment’s data
ACKs:
– seq numbers of next byte expected from other side
– cumulative ACK
Q: how receiver handles out-of-order segments
– A: TCP spec doesn’t 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
32 bits
URG: urgent data source port dest port counting
(generally not used) # # by bytes
ACK: ACK #
sequence number of data
valid acknowledgement number (not segments!)
head not
PSH: push data now len used
UA P R S F rcvr window size
# bytes
(generally not used) checksum ptr urgent data rcvr willing
RST, SYN, FIN: Options (variable to accept
connection estab length)
(setup, teardown
commands) application
Internet data
checksum (variable length)
(as in UDP)

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 initiator
Socket clientSocket = new Socket("hostname","port number");
• server: contacted by client
Socket connectionSocket = welcomeSocket.accept();

Three way handshake

Step 1: client end system sends TCP SYN control segment to server
– specifies initial seq number
Step 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

68
The three way handshake is over

Connection Release

client closes socket: clientSocket.close();


Step 1: client end system sends TCP FIN control segment to server
Step 2: server receives FIN, replies with ACK. Closes connection, sends FIN
Step 3: client receives FIN, replies with ACK.
– Enters “timed wait” - will respond with ACK to received FINs
Step 4: server, receives ACK. Connection closed.
Note: with small modification, can handle simultaneous FINs.

The connection management client side can be shown in a flow diagram

The connection management server side can be shown in a flow diagram

69
Connection management

The two figures

(a) TCP connection establishment in the normal case.

(b) Call collision.

The states used in the TCP connection management finite state machine.

70
71
• TCP connection management finite state machine.
• The heavy solid line is the normal path for a client.
• The heavy dashed line is the normal path for a server.
• The light lines are unusual events.
• Each transition is labeled by the event causing it and the action resulting from it,
separated by a slash.

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

72
TCP connection management

• Server waits by executing LISTEN and ACCEPT primtives


• Client executes a CONNECT primitive specifying IP and PORT no, max TCP
segment size and user data
• CONNECT sends TCP segment with SYN bit ON and ACK off
• Server can either accept or reject connection
• In call collision only one connection is established
• Connection released using FIN bit
• One FIN and one ACK in each direction
• possible to combine first ACK and second FIN in the same segment

Finite state machine


• Management on client side
• When client issue CONNECT, TCP entity sends SYN segment
• Separate state for each connection
• When ACK arrives the final ACK sent and switches to new state
• Data transfer
• when no data issue CLOSE primitive sends FIN segment
• One side goes to WAIT and waits for the FIN from other side
• Packet life time taken care too
• Management on server side
• When server issue LISTEN and waits for incoming request
• When SYN comes the server responds with ACK
• When three way handshake complete then server goes to new state
• FIN is sent when server want to close

TCP transmission policy

• Sender & receiver negotiate on window size


• In the figure below the sender sends 2K data and the initial seq no
• The receiver sends the ack for the next seq no it is expecting and also advertises
the widow size
• Suppose the window is zero then sender waits and then sends a probe and then
sends the next set of data
• The diagram shows how the two sides communicate
• Suppose there is only one byte to be sent the 41 byte packet to be sent instead
Nagle algorithm suggest that when the first byte comes it is sent and the other
buffered till the ack received and then send the rest and wait for the ack and like
this a sufficient no of bytes go in one segment

73
Silly window syndrome

At the receiver side even if a byte available at its buffer it advertised and the sender sends
the buffer is full the sender waits again and probes to get the window size so this will
continue and a loop formed to avoid this the receiver is forced to wait till good amount of
buffer space availability and then advertises and avoids the loop.

TCP Congestion control

74
Congestion:
• informally: “too many sources sending too much data too fast for network to
handle”
• different from flow control!
• manifestations:
– lost packets (buffer overflow at routers)
– long delays (queueing in router buffers)

Problems when congestion happens

two senders, two


receivers
one router, infinite
buffers
no retransmission
large delays when
congested
maximum achievable
throughput

75
one router, finite buffers
sender retransmission of lost packet

• four senders Q: what happens λinas


λ
• multihop paths andin increase ?
• timeout/retransmit

76
Another “cost” of congestion:
when packet dropped, any “upstream transmission capacity
used for that packet was wasted!

77
TCP Congestion control
• How TCP prevents congestion
• when connection established, window size chosen
• Receiver specifies seeing its buffer size
• Still congestion occurs
• The two problems are Network Capacity and Receiver Capacity
• Solution?
• Solution
• Sender maintains two windows: one the receiver granted
• the other Congestion Window
• at the connection establishment- the congestion window is set to the size of the
maximum segment in use on the connection
• Each burst acknowledged doubles the congestion window
• Congestion window grow exponentially
• This is called the Slow Start algorithm
• Another Solution?

                     
          
    
initialize: Congwin = 1
  

for (each segment ACKed)


    
Congw      

           
   

    
        
 

 
 

• Solution
• Uses threshold
• initially some value in addition to the receiver and congestion window
• When timeout threshold is set to half of the current congestion window
• Congestion window is set to one max segment
• Slow start is used to find what the network can handle

78
• Exponential growth stops when threshold hit
• From that point congestion window grow linearly
 
 
     
   
   
           
  
   
  
  

  
  

           


• Example
• Segment size=1K
• Congwin=64KB
• when timeout threshold=34KB
• Congwin=1KB
• the congstion window grows exponentially until it hits threshold and then linearly

TCP timer management


Round trip time RTT
how to set TCP timeout value?
• longer than RTT
– note: RTT will vary
• too short: premature timeout
– unnecessary retransmissions
• too long: slow reaction to segment loss
• The algorithm is based on continuous measurements of network performance
• Jacobson algorithm is one used for calculating RTT
• For each connection a value RTT is maintained
• RTT updated using the formula
• RTT=αRTT+(1- α)M
• Where M is time taken for ACK
• And α is the smoothing factor
• And α=7/8

TCP RTT

79
• Jacobson algorithm
• Another smoothed value D deviation it is the difference between the expected
and observed value |RTT-M|
• D= α D+(1- α )|RTT-M|
• Timeout interval =RTT+4*D
• The problem with retransmission answered by Karn’s algorithm
• RTT not updated for retransmitted segment timeout is doubled on each failure till
the segment gets through first time
• There is another timer called the persistence timer- it is used when the sender is
made to wait due to lack of buffer space at the receiver. Once this timer goes off
the sender sends the probe to find about the receiver buffer space otherwise a
deadlock occurs so this timer is used to resolve the same
• The third timer is the keepalive timer- it is used for the connections which are
idle for a long time suppose this timer goes off then the connection is closed

Wireless TCP

• Indirect TCP to split the TCP connection into two separate connections
• first one from sender to base station the second from base station to receiver
• the advantage is both connections are homogeneous
• The disadvantage is that it breaks the semantics of TCP
• There is another solution for keeping the semantics of TCP is the Transactional
TCP

Transactional TCP

80
The above figure (a) shows the normal RPC call where nine messages are exchanged
between the client and the server
Figure (b) shows the one with Transactional TCP T/TCP where request and SYN and
also FIN are sent together thus reducing the messages and providing faster service

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

81
Different performance issues in network

• Performance Problems in Computer Networks


• Network Performance Measurement
• System Design for Better Performance
• Fast TPDU Processing
• Protocols for Gigabit Networks

Performance problems in computer networks


• Overloads Example 1: TPDU containing the bad parameter when broadcast may
clog the n/w results in broadcast storm due to error message
• synchronous overload due to power failure-DHCP contacted for booting
• Apart from this problems due to insufficient memory TPDUs lost
• Not setting the timeout correctly the TPDUs lost
• Gigabit n/w pose new problems
• The next figure explains this here the transmission line used only for .5msec
greatly reducing the efficiency

• The useful quantity is the Bandwidth-Delay product


• The product is the capacity of the pipe from sender to receiver and back to sender
in bits
• In the above example it is 40 million bits but the actual utilisation is only 1.25
percent of the pipe capacity
• therefore for good performance the receiver window must be at least as large as
the Bandwidth-Delay product
• Another performance problem could be jitter to avoid a small standard deviation
is used

82
The basic loop for improving network performance.
• Measure relevant network parameters, performance.
• Try to understand what is going on.
• Change one parameter

Precautions taken while measuring

• Sample size should be large enough


• Samples should be representative
• To be careful while using coarse grained clock
• Nothing unexpected going on while tests are conducted
• Caching problem
• Understanding the measurements
• Extrapolation of the result

System Design for Better Performance

Rules:
• CPU speed is more important than network speed.
• Reduce packet count to reduce software overhead.
• Minimize context switches.
• Minimize copying.
• You can buy more bandwidth but not lower delay.
• Avoiding congestion is better than recovering from it.
• Avoid timeouts.

Fast TPDU Processing

• TPDU processing overhead has two components


• one –overhead per TPDU
• other – overhead per byte
• Example take the sending side
• first the sending side traps to kernel to SEND
• if it is a normal case then the state is ESTABLISHED and typically this path is
taken (fast path) shown in the figure below

83
The fast path from sender to receiver is shown with a heavy line.
The processing steps on this path are shaded.

Another example
• In the TCP header the fields that are same between consecutive TPDUs on a one
way flow are shaded
• All sending TCP entity has to copy from the prototype header into the output
buffer
• It handovers the header and data to the special IP procedure for sending a regular
max TPDU
• IP then copies its prototype header and makes the packet ready

the above figure


(a) TCP header. (b) IP header. In both cases, the shaded fields are taken from the
prototype without change.

Fast path processing at receiver side


• step 1: locating the connection record for the incoming TPDU
• The TPDU checked to see if it is normal case
• If all checks are met then a fast procedure is called
• Many TCP implementations use Header Prediction

84
• The other two areas where major performance gain are possible are
Buffer management
Timer Management
• The timer management done by the timing wheel

• There are some problems and the possible solution posed by the Gigabit protocols
• Problems
Sequence Numbers
Communication Speeds
Go back n protocol and its poor performance
gigabit lines are bandwidth limited
Results of new application

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

85
1: Define the following terms:
(a) Slow start
Answer
The phase in TCP congestion control when the window size starts at one segment and
increases by one segment for every ACK received (that is, it sends first one segment, the
two, the four, then eight, and so on, as ACKs arrive for the segments transmitted.

(b) Three-way handshake


Answer
The mechanism used to set up a connection and agree upon the initial sequence numbers
for that connection. In the normal case, host 1 will send a connection requestion and
sequence number to host 2. Host 2 will acknowledge the request, and make a
corresponding request to host 1 with its own choice of sequence number. Host 1 will
acknowledge the request from host 2. The connection is now established.

2: What is the difference between


flow control and congestion control?
Answer
Flow control prevents a fast sender from overwhelming a slow receiver.
Congestion control prevents many senders from overwhelming the network.

3: When doing a connection setup in TCP both parties are required to pick a random
number for the initial sequence number.
(a) Ignoring security concerns, why do they not just pick 0 or 1?
Answer
This would substantially increase the likelihood of a “lost” segment from a previous
connection re-appearing and messging up an existing connection.

(b) Why do they not just increment the last used sequence number for the particular
source/destination pair (assuming that we could readily keep track of this information)?
Answer
It allows a third party to fake a connection.

4: When TCP receives a segment that it has already received and acknowledged, it will
reply with an acknowledgement.
(a) Why is this acknowledgment necessary?

Answer
The previous acknowledgement may have been lost.

5:The sequence number of the segment received is 1234, and the length of the segment is
10 bytes.
(a) Do we know what the acknowledgement number will be that TCP will reply with?
If so, what is it? If not, why not? What can we say about the acknowledgement number
that TCP will reply with?

86
5:Answer
No. We do not. If this is the greatest contiguous segment currently received, then the
ACK will be 1244. However, if a prior segment has been lost, then the acknowledgement
number will be less than 1234. Likewise, if this is a retransmission of segment 1234, and
a subsequent segment has been received, the acknowledgement may be greater than 1244.
We do know that it will be either less than 1234 or greater than or equal to 1244.

6: If TCP retransmits a segment, what impact, if any, does this have on the RTT
calculation?
Answer
This transmission/retransmission cannot be included in the estimate, as we cannot
distinguish where the acknowledgement came from: the first segment, and it was delayed,
or the second segment.

7: Why does TCP require an RTT estimate?


Answer
To determine if a segment has been lost or not. A segment is deemed lost if the ACK for
it is not received within the timeout period which is derived from that RTT.

8: A network has a maximum packet size of 128 bytes, a maximum packet life time as 10
sec and a 8bit sequence number. Find the maximum data rate per connection
Answer
Given 8 bit sequence numbers 2(pow)8=256 packets sent in 10 sec
In 10 sec 128*8*255=261120 bits can be sent
Max data rate per connection=261120/10 seconds
=26112 bits/sec

9: A TCP machine is sending full windows 65535 bytes over a 1Gbps channel that has a
10msec delay one way. What is the maximum throughput achievable? What is the line
efficiency?
Answer
Given RTT=10+10=20msec=1/20*10(pow)-3
= 50bits/sec
Max throughput=(65535*8)bits*50bits/sec
=26.214Mbps
Line efficiency=Max throughput/Bandwidth
= (26.214Mbps/1Gbps)*100 = 2.62%

10: What is meant by upward and downward multiplexing?


Answer
In upward the multiple connections are multiplexed on to a single connection
In downward a single connection is split and distributed among multiple connection

11: Describe congestion control in TCP


Answer

87
Slow start

12: Explain UDP. When it can be used?


Answer
Connectionless unreliable internet protocol
Applications
RPC
Real time applications

13:What is meant by nesting of TPDUs? Illustrate with the diagram the connection
establishment between a client and a server using TPDUs

14: Illustrate the silly window syndrome in TCP

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

88
Why ATM?
•All digital telephone network
•Need for data applications like computer communications and facsimile
•Nonvoice applications like videoconferencing need to be included in the future networks
•Circuit switching not suitable but packet switching would accommodate this
•ISDN were the first effort to address this

ISDN Overview

•There are many types of WAN technologies that can be used to solve the problems of
users who need network access from remote locations.
•ISDN has been specifically designed to solve the low bandwidth problems that small
offices or dial-in users have with traditional telephone dial-in services.
•Telephone companies developed ISDN with the intention of creating a totally digital
network whilst making use of the existing telephone wiring system.
•ISDN works very much like a telephone - When you make a data call with ISDN, the
WAN link is brought up for the duration of the call and is taken down when the call is
completed
•ISDN allows digital signals to be transmitted over existing telephone wiring.

•This became possible when the telephone company switches were upgraded to handle
digital signals.

•ISDN is generally viewed as an alternative to leased lines, which can be used for
telecommuting and networking small and remote offices into LANs.

•ISDN's ability to bring digital connectivity to local sites has many benefits, including the
following:

•ISDN can carry a variety of user traffic signals including:
–digital video, packet-switched data, and telephone network services.
•ISDN offers much faster call setup than modem connections because it uses out-of-
band (D, or delta, channel) signaling.
–For example, some ISDN calls can be setup in less than one second.
•ISDN provides a faster data transfer rate than modems by using the bearer channel (B
channel of 64kbps).
–With multiple B channels, ISDN offers users more bandwidth on WANs than some
leased lines.
–For example, if you were to use two B channels, the bandwidth capability is 128Kbps
because each B channel handles 64Kbps.

•ISDN can provide a clear data path over which to negotiate PPP links.
BRI (Basic Rate Interface)
Connection from the ISDN office to the user location provides for access to three
channels. The channels are two 64Kb B-channels and one 16Kb D-channel

89
The B-channels and the D-channel provide the user with access to the circuit switched
network
PRI (Primary Rate Interface)
ISDN Primary Rate Interface service provides digital access via a T1 line. A T1 line
provides a 1.544 bandwidth. This bandwidth is divided into 24 64Kb channels. The ISDN
PRI service uses 23 B channel access and uses the 24th (D) channel for signaling
purposes

BSDN Reference Model


•There are three planes
•User Plane
•Control Plane
•Management Plane

User Plane

•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)

Asynchronous Transfer Mode (ATM)

To provide the new B-ISDN services, use of a technology called asynchronous transfer
mode (ATM) is specified by ITU. ATM is a connection-oriented technique based on the
use of fixed size packets termed cells. These cells are 53 octets in size, with 5 octets used
for the cell header, and the remaining 48 octets for data

Figure: An ATM cell


The term asynchronous transfer mode needs some explanation. The words transfer
mode say that this technology is specific way of transmitting and switching through the
network. The term asynchronous refers to the fact that the packets are transmitted using
asynchronous techniques, and the two end-points need not have synchronised clocks.
Also, the use and allocation of cells and their subsequent multiplexing and transmission
through the network is determined in an asynchronous fashion, e.g. on demand, and is
independent of the user. ATM will support both circuit switched and packet switched
(sometimes referred to as circuit mode and packet mode, respectively) services.

90
Figure: The principle of synchronous transfer mode

Figure: The principle of asynchronous transfer mode


There is much to know about ATM, however, here we will consider only the transmission
aspects, by looking at the Physical layer and the ATM layer.
There are several types of cells to consider, some are passed all the way through to the
ATM layer, while others never proceed beyond the Physical layer:

• Assigned Cell. (ATM Layer) A cell which is used to provide the service to the
higher layers. This is the cell type that is used in transporting the higher level
PDU.
• Unassigned cell. (ATM Layer) An ATM layer cell which is not an assigned cell.
• Valid cell. (Physical layer) Any cell that does not contain header errors, either
through successful transmission or after being corrected by the physical layer.
• Invalid cell. (Physical layer) A cell with an error in its header that can not be
corrected. It will be discarded by the physical layer.
• Idle cell. (Physical layer) A cell that is inserted/extracted by the physical layer for
the purposes of payload capacity adaptation.

As explained earlier, there are two interfaces to the B-ISDN to consider -- the user-to-
network interface (UNI) and the network-to-network interface (NNI). For these two
interfaces the internal structure of the ATM cell header is slightly different, as shown in
Figure
The various parts of the cell header are:

• Generic flow control (GFC). (4 bits) Default value 0000. The exact use of this
field is, as yet, not fully defined. This is used only in assigned or unassigned (i.e.
ATM layer cells).
• Virtual path identifier (VPI). (8 or 12 bits) This is used for physical layer
routing, together with the;
• Virtual circuit identifier (VCI). (16 bits) This is used in conjunction with the
VPI field to provide physical level routing. Many cells with different VCIs may
have the same VPI. Some VCI/VPI values are pre-assigned for special purposes

91
• Payload type (PT). (3 bits) Some PT values -- PT identifiers (PTIs) -- are pre-
assigned for special purposes.
• Cell loss priority (CLP). (1 bit) Flag stating whether or not this cell can be
dropped in the prescence of network congestion or other network difficulties. A
value of 0 means that this cell has high priority and should not be discarded.
• Header error control (HEC). (8 bits) This is used by the physical layer for
detecting and correcting errors in the cell header.

Figure: ATM cell header for UNI

Figure: ATM cell header for NNI

Table: Pre-assigned VCI/VPI values for ATM cells

92
Table: Pre-assigned PTI values for ATM cells

Physical Layer; SONET and SDH

For B-ISDN, two transmission rates are currently specified; 155Mb/s and 622Mb/s,
although it is highly likely that other higher rates will be standardised

Table: SONET and SDH data rates and payload rates


To achieve these rates, the physical layer uses a structuring called synchronous digital
hierarchy (SDH). This is a ITU standard based heavily on earlier work by ANSI called
synchronous optical network (SONET). For our interests the two are practically
identical, and so further, only reference to SDH will be made, with specific differences in
SONET being highlighted where necessary. SDH specifies a hierarchy of signals that are
multiples of 155.52Mb/s to achieve higher data rates. For instance, the 155Mb/s rate,
SDH uses a 9 270 octet frame. This frame is repeated with a frequency of 8KHz, so
achieving a rate of 155Mb/s (Figure ). The frame consists of 81 octets of section
overhead (SOH) and the rest of the frame, which we will call the payload, is filled with
ATM cells. The capacity available to the network user is then the payload rate. The path
overhead (POH) are special control octets. The AU-4 pointer give the location of the
VC-4 container which holds the ATM cells. There may not be an integral number of cells
in the VC-4.
The 622Mb/s rate can be achieved simply extending the 155Mb/s SDH frame by
increasing the field sizes

93
Figure: Frame structure for 155.520Mb/s SDH-based interface

Figure: Frame structure for 622.080Mb/s SDH-based interface


Some of the Physical layer specifications for the optical transmission of the signal are
given in Table

Table: Optical interface characteristics for SDH

94
ATM Adaptation Layer

The purpose of the ATM Adaptation Layer (AAL) is to adapt the PDUs passed down
from the higher layer onto ATM cells. As the higher level PDUs may in general be of an
arbitrary size, so one of the two sublayers in the AAL is responsible for segmentation
and reassembly (SAR) of the higher layer PDUs. The other sublayer, the convergence
sublayer (CS), is responsible for packaging the higher layer PDU with any additional
information required for the adaptation necessary and offering an interface to the B-ISDN
user. As mentioned previously, there are many and varied requirements for applications
using the B-ISDN and as there are several AAL protocols defined. The classification of
these protocols was guided by considering the following parameters:

• Timing relationship. The (non-)requirement for synchronisation between the


receiver and sender.
• Bit rate. Constant or variable.
• Connection mode. Connection oriented or connectionless.

A summary of the (sensible) combinations of these parameters is given in Figure . Each


of these classes may be looseley associated with the the ATM Forum classes described
previously: Class A, CBR; Class B, VBR; Class C, ABR(ish); Class D, UBR. This
mapping also give example use of the various classes. The various AAL classes are
provided by several AAL protocols identified by a type number. The use of a particular
AAL type for the provision of a particular service is not wholy well defined.

Figure: AAL service classification


AAL Type 0. This is effectively a NULL AAL. It is not really an official AAL type but
is mentioned for completeness.
AAL Type 1. This AAL type is normally used by Class A (CBR) services. The function
performed by this AAL are:

• Segmentation and reassembly of user information.


• Handling of cell delay variation (jitter).
• Handling of cell reassembly variation.
• Handling of lost and misinserted cells.
• Source clock frequency recovery at receiver.
• Source data structure recovery at receiver.
• Monitoring and handling of AAL-PCI bit errors.
• Monitoring and (possibly) correcting the bit errors in the user information field.

95
• For circuit emulation, monitoring and maintenance of end-to-end QoS.

AAL Type 2. This AAL type would be used with Class B (VBR). This type is not well
defined and it seems possible that the it may be merged with AAL Type 1 in the future.
Some of its functions are similar to ALL Type 1:

• Segmentation and reassembly of user information.


• Handling of cell delay variation (jitter).
• Handling of lost and misinserted cells.
• Source clock frequency recovery at receiver.
• Monitoring and handling of AAL-PCI bit errors.
• Monitoring and (possibly) correcting the bit errors in the user information field.

It also has the additional functions:

• Handle SDUs from a variable bit rate source.


• Transfer timing information between source and destination.
• Notify the higher layers of uncorrectable errors in AAL.

AAL Type 3/4. There was once separate Type 3 and Type 4 AALs, but they have now
been merged. This AAL is now intended to support both Class C (ABR) and Class D
(UBR) services.
In this AAL, the convergence sublayer is split into two (Figure ), the service specific
convergence subslayer (SSCS) and the common part convergence sublayer (CPCS).
The SSCS is application dependent, i.e. it could be for a VBR video application. The
CPCS is responsible for constructing PDUs that can be sent to the other end user. There
are two modes of operation of ALL Type 3/4; message mode and streaming mode.

Figure: AAL Type 3/4 sub-layering


The message mode is intended for use framed data where the AAL-SDU is a logical unit
of data with respect to the B-ISDN user (Figure ). It allows the the transport of a single
AAL-SDU in one or (optionally) more than one CS-PDU. The CS-PDU may be then
further spilt into several SAR-PDUs. The AAL-SDU can be of an arbitrary size.

96
Figure: AAL Type 3/4 message mode service
In streaming mode, the AAL-SDUs are of fixed size and one or more of them may be
transported in a single CS-PDU (Figure ). Each AAL-SDU is delivered in a separate
SAR-PDU.

Figure: AAL Type 3/4 streaming mode service


In both cases, the SAR sublayer provides error detection and both these modes can offer
the following operational procedures:

• Assured operation. Flow control and retransmission of missing or erroneous


AAL-SDUs. Flow control restricted to point-to-point connections at the ATM
layer and point-to-multipoint flow control possible.
• Non-assured operation. No retransmission of missing or erroneous SAR-PDUs.
Optionally deliver erroneous PDUs to user. Allow flow control for point-to-point
connections but not point-to-multipoint.

This AAL type also provides multiplexing at the SAR sublayer.


AAL Type 5.
This AAL type provides similar services as AAL Type 3/4, but has a reduced overhead
when compared to AAL Type 3/4. It is intended for use by VBR sources with timing
relationship between source and destination. It has identical modes and operational
procedures as AAL Type 3/4. The difference is that this AAL does not provide the AAL
Type 3/4 multiplexing capability. The SAR sublayer accepts only AAL-SDUs that are an
integer multiple of 48 octets. So, it would be possible for this AAL to offer an efficient
cell based interface to the B-ISDN user.

97
AAL Types 1 and Type 2 are not used much.
AAL Type 3/4 has been chosen for the provision of the Bellcore switched multi-
megabit data service (SMDS), the European version of which is the connectionless
broadband data service (CBDS).
AAL Type 5 has been selected by the IETF to provide IP services over ATM.

98
1: Describe B-ISDN model (model QP 8marks)
Answer:
Contains three planes
User plane-concerned with transfer of data, flow control and error recovery
Control plane-deals with the signaling required to setup manage and release connections
Management plane-deals with management of n/w resources and coordination of other
planes
User plane has three layers Physical-2 sublayers
ATM layer-sequenced transfer adds 5 byte header
AAL layer-has different types
ATM provides Qos parameters

2: Take any two Qos parameters under the ATM standard and describe. (August
2005 6 marks)
Answer:
There are 6 the first three not negotiated but the next three may be negotiated
Cell error ratio-CER-ratio of number of cells delivered with one or more bit error to the
total no of cells. CER depends on PM
Cell misinsertion rate-CMR-average no of cells/sec that are delivered by mistake to
wrong connection
Severely errored cell block ratio-SECBR-it is the ratio of errored to the total no of cells
determined by the error mechanism
The next three are
Cell loss ratio-CLR-ratio of the lost cells to the total no of cells transmitted can be
specified or not. Depends on buffer allocation strategy
Cell transfer delay-CTD-is the time that elapses from the instant when a cell enters the
network at the source UNI to the instant when it exits at the destination UNI.CTD
includes propagation delays, processing delays and queuing delays in mux and switches.
Cell delay variation-CDV- measures the variability of the total delay encountered by cells
in a connection.

3: Draw the diagram of the ATM cell header format and give the brief description
of the different fields (August 2005 8 marks)
Answer: Draw the figure

GFC-provide flow control has significance for UNI currently not specified
VPI-8 bit long 256 virtual path in a given UNI link.
VCI-16 bit long allows 65536 virtual channels per virtual path
PT-eight type payload can be specified (refer table in book)
CLP-two levels of priority-CLP=0 higher priority used during congestion
HEC-8 bit checksum uses CRC recomputed at every switch since VPI/VCI changes at
every hop (since they are local identifiers)

4: Describe the function of ATM adaptation layer (August 2005 6 marks)


Answer:

99
ATM Adaptation Layer (AAL): “adapts” upper layers (IP or native ATM applications)
to ATM layer below
• AAL present only in end systems, not in switches
• AAL layer segment (header/trailer fields, data) fragmented across multiple ATM
cells
– analogy: TCP segment in many IP packets
• Different versions of AAL layers, depending on ATM service class:
• AAL1: for CBR (Constant Bit Rate) services, e.g. circuit emulation
• AAL2: for VBR (Variable Bit Rate) services, e.g., MPEG video
• AAL3/4:for the bursty data e.g, multiple users
• AAL5: for data (eg, IP datagrams)
• AAL is divided into two sublayers
• Segmentation and reassembly-SAR
• Convergence sublayer-CS
• CS subdivided into Common part-CPCS
• Service specific part-SSCS

5: Explain how the notion of layering and internetworking make the rapid growth
of applications such as the World Wide Web possible?
Answer:
Internetworking allows many component networks each with different underlying
technology and operation to work together and form one large network. This provides the
ubiquitous connectivity for applications like WWW.
The layering concept hides the specific underlying network technology from the upper
layers and provides a common networking platform. Using the communication service
provided by the layers below, new applications can be introduced independently and at a
rapid rate.

6: Can a connection-oriented, reliable message transfer service be provided across a


connectionless packet network? Explain.
Answer:
Yes. To provide connection-oriented service, the transport layer can establish a logical
connection across the connectionless packet network by setting up state information (for
example, packet sequence number) at the end systems. During the connection setup, the
message is broken into separate packets, and each packet is assigned a sequence number.
Using the sequence numbers, the end-system transport-layer entities can acknowledge
received packets, determine and retransmit lost packets, delete duplicate packets,
and rearrange out-of-order packets. In so doing, the connectionless packet network is
implementing reliable packet transfer. Once all packets have arrived at the receiving end,
they are reassembled into the original message. For example, TCP provides a connection-
oriented reliable transfer service over IP, a connectionless packet transfer service.

7:Suppose an application layer entity wants to send an L-byte message to its peer
process, using an existing TCP connection. The TCP segment consists of the message
plus 20 bytes of header. The segment is encapsulated into an IP packet that has an
additional 20 bytes of header. The IP packet in turn goes inside an Ethernet frame

100
that has 18 bytes of header and trailer. What percentage of the transmitted bits in
the physical layer correspond to message information, if L = 100 bytes, 500 bytes,
1000 bytes?
Answer:
TCP/IP over Ethernet allows data frames with a payload size up to 1460 bytes. Therefore,
L = 100,
500 and 1000 bytes are within this limit.
The message overhead includes:
· TCP: 20 bytes of header
· IP: 20 bytes of header
· Ethernet: total 18 bytes of header and trailer.
Therefore
L = 100 bytes, 100/158 = 63% efficiency.
L = 500 bytes, 500/558 = 90% efficiency.
L = 1000 bytes, 1000/1058 = 95% efficiency.

8:Suppose that the TCP entity receives a 1.5 megabyte file from the application
layer and that the IP layer is willing to carry blocks of maximum size 1500 bytes.
Calculate the amount of overhead incurred from segmenting the file into packet-
sized units.
Answer:
1500 - 20 -20 = 1460 bytes
1.5 Mbyte / 1460 byte = 1027.4, therefore 1028 blocks are needed to transfer the file.
Overhead = ((1028 x 1500 - 1.5M)/1.5M) x 100 = 2.8%

9:Suppose we need a communication service to transmit real-time voice over the


Internet. What features of TCP and what features of UDP are appropriate?
Answer:
TCP is desirable in that it provides a connection for the transfer of a stream of
information, which characterizes a digital voice stream. However, to provide reliable
service TCP uses acknowledgments and retransmissions that result in packet delay that
can not be tolerated by real-time traffic.
UDP provides connectionless service and delivers packets quickly. In case of packet loss,
UDP does not provide retransmission, but some degree of packet loss can be tolerated by
voice.

10: Use IEEE 802.3 and IEEE 802.11 to discuss three differences between wired and
wireless LANs.
Answer:
Error rate: Unlike wired LANs, wireless LANs have high error rate due to interference
and noise. Wireless LANs needs to implement ARQ and error correction to increase the
reliability
of the communication channel.
Station mobility: Unlike wired LANs where stations connected to the LANs are static, in
wireless LANs, the stations can be mobile and portable. Wireless LAN protocols may

101
have to implement dynamic traffic routing and service handoff when the station moves
from one service area to another.
Collision detection: Collision detection is not possible in wireless LANs due to physical
limitations. So the sender must wait for explicit acknowledgment (e.g. RTS/CTS) from
the receiver to know whether or not a collision has occurred. The wireless LAN protocol
implements a collision avoidance algorithm rather than the collision detection in wired
LAN, and the delay in the contention period is longer the round-trip delay of 2tprop of
wired LAN because of waiting for the receiver’s acknowledgment.

Other differences:
Security: In wired LAN, the transmission medium is physically secured. In wireless
LAN, any device within the geographic transmission area can intercept the transmissions.
To provide
data security, wireless LAN need to implement encryption at the expense of higher cost
and reduced performance.
Power consumption: Portable and mobile devices are usually battery powered, and thus
have
limited power capacity. The wireless LAN protocol must be designed to be power
efficient.
All these issues are addressed in the IEEE 802.11 wireless LAN protocol.

102

S-ar putea să vă placă și