CN1 Notes Compiled by Anita Kanavalli

Embed Size (px)

DESCRIPTION

CN1 Notes Compiled by Anita Kanavalli

Citation preview

www.bookspar.com | Website for students | VTU NOTES

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 NetworksThe computer network can be classified based on architecture and access as shown below

Architecture

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 linksThe 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:

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

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

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

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 millionsEmail, chat, Web surfing, streaming media

millions of connected computing devices: hosts, end-systems PCs workstations, servers

PDAs phones, toasters running network apps communication links fiber, copper, radio, satellite

Links have different bandwidth routers: forward packets

Packet: a piece of 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 communicationE-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:

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.

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)

Service access point or SAPAddressing 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

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

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 directionsData 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 linkTransport

Provides for error-free delivery of data

Accepts data from the session layer and splits data into smaller packets if necessary

passes these packets to the network layer, and ensures that packets arrive in sequence, with no losses or duplications, at their destinationSession Provides for coordination between communicating processes between nodes.

Manages dialog control (e.g. Can allow traffic to go in both direction at the same time, or in only one direction at time.)

Responsible for synchronizing the flow of data, and reestablishing a connection in the event a failure occurs.Presentation Provides for data formats, and code conversions

Concerned with syntax and semantics of data being transmitted

Encodes messages in a form that is suitable for electronic transmission

Data compression and encryption is done at this layer

Application

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

NotesDifferences 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 ESs (end System) that is used for duration of call

Call setup

Data transfer

Call termination

E.g: Virtual circuits at this layer

ISs ( 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 ESs and routers

Known generically as the internet protocol

Internet Protocol

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 primitivesA 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.

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

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 RelayFrame 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

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

BSSs combined to form distribution system (DS)Advantages

Mobility

Flexibility

Hard to wire areas

Reduced cost of wireless systems

Improved performance of wireless systems

Adhoc networks Ad hoc network: IEEE 802.11 stations can dynamically form 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

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 applicationsATM ATM is a high-speed switching network architecture

ATM can be used to carry data, voice, and video

separately or simultaneously over same network path

ATM has a robust quality of service (QoS)

can provide seamless interconnectivity between LANs and WANs

supports a wide range of data rates:

25 to 155 Mbps over copper

100 to 622 Mbps and higher over fiber

common implementation is 155-Mbps ATM ATM is specified via a three-layer reference model:

Physical layer (OSIs physical layer)

ATM layer (generally OSIs data link layer)

ATM adaptation layer (AAL) (generally OSIs higher-level layers (transport, session, and application)

Physical layer (2 sublayers)

Physical medium PM (lower sublayer)

definition for the medium

the bit-timing capabilities.

Transmission convergence (TC) (upper sublayer)

makes sure that valid cells are being created and transmitted

involves breaking off individual cells from the data stream of the higher layer (the ATM layer)

checking the cells header

Encoding the bit values

ATM layer

service-independent layer

creates cell headers and trailers

defines virtual channels and paths and gives them unique identifiers

cells are multiplexed or demultiplexed.

ATM layer creates the cells and uses the physical layer to transmit them.

ATM adaptation layer (AAL) (2 sublayers)

Segmentation and reassembly SAR (lower sublayer)

packages variable size packets into fixed-size cells at the transmitting end

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 networksQuestions:

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?

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

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 stationsHardware used in the hostsNICs

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

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

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.

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:

LANs

Ethernet (CSMA/CD)

Token Ring and FDDI

Wireless

ATM LANs

CSMA/CD

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

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

(Mbps)- Band -

(Base or

Broad)Length (Meters)

or

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

Fiber Backbone10Base-FL

Fiber Link10Base-FP

Fiber Passive

Mediumfiberfiber850 nm fiber

SignalingBaseband - Manchester/ on-off

TopologyPoint-to-pointPoint-to-point

or starStar

max segment length2000 m2000 m500 m

max. Nodes/ segment2233

Max Diameter2500 m2500 m2500 m

The above table shows the summary of the Ethernet 10Mbps

Ethernet hub and switch topologies using twisted pair cabling

The above figure shows the star topology and hub is used and it repeats the signal. 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.

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 modeFast Ethernet

100Base-TX100Base-FX100Base-T4

MediumTwisted pairfiber

UTP

SignalingMLT-34B5B, NRZI8B6T, NRZ

TopologyStarStarStar

max segment length100 m412 m (half-duplex)

2 km (full-duplex)100 m

network diameter200 m400 m200 m

The above table summarizes the fast Ethernet technology.

Giga bit Ethernet

1000Base-SX (short wavelength fiber)

Short wavelength (770-860 nm)

support duplex links of

220- 275 m using 62.5 (m multimode fiber

500- 550 m using 50 (m multimode fiber

1000Base-LX (long wavelength fiber)

Long wavelength (1270-1355 nm)

support duplex links of

550 m using 62.5 (m or 50 (m multimode fiber

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.

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

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

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.

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 stations 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

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:

MediaAccessControldefineshowthemediumis accessedframe formattoken handlingaddressing algorithm for calculating a cyclic redundancy check and error-recovery mechanismsFDDI has four specifications:

Physical Layer Protocoldefines data encoding/decoding procedures

clocking requirements framing

FDDI has four specifications:

Physical Layer Mediumdefines the characteristics of the transmission medium fiber optic link power levels bit error rates optical components connectors

FDDI has four specifications:

Station Managementdefines 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.

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

v=2*108 m/sec

therefore it is 5microsec to travel 1 kms

ring latency is defined as the time that it takes for a bit to travel around ring is given by

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

Example

Let R=4Mbps M=20 stations separated by 100m b=2.5

Latency= 20*100*4*106 /2*108 +20*2.5=90 bits

IEEE 802.5-After the last bit arrives the token is inserted IBM token ring-after the header bit arrives the token is inserted IEEE 802.5 and IBM token ring 26Mbps- after last bit transmitted the token is inserted Conclusion-improves efficiency in case of the third case.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 1024, what is the socket pair comprising this connection?

Answer:

There are several possible answers to this question. Lets 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:

Lets 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.

11:Consider sending voice from Host A to Host B over a packet-switched network. Host A converts analog voice to a digital 64 kbps bit stream on the fly. Host A then groups the bits into 48-byte packets. There is one link between Host A and B; its transmission rate is 1 Mbps and its propagation delay is 2 msec. As soon as Host A gathers a packet, it sends it to Host B. As soon as Host B receives an entire packet, it converts the packets bits to an analog signal. How much time elapses from the 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)= 384sec.

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 routers queue only holds 3 packets, packet 12 is lost

Suppose it takes 10 seconds for TCP to send a file of size 10,000 packets. What is 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.)

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.

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

Header details

Source and destination port numbers

The source and destination processes

Length = length of header + data

Checksum covers header and data

Optional in UDP but mandatory in TCPUDP Checksum

Sender: treat segment contents as sequence of 16-bit integers

checksum: addition (1s complement sum) of segment contents

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

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 directionProblems 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 RPCAnother application of UDP a protocol uses UDP

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

(b) Packet nesting.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

Specially designed to provide a reliable end to end byte stream over a unreliable networkThe inter network differs from a single network in terms of topology and 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) inits sender, receiver state before data exchange

flow controlled:

sender will not overwhelm receiver

TCP Header

TCP segment structure

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

ACKs: seq numbers of next byte expected from other side

cumulative ACK

Q: how receiver handles out-of-order segments

A: TCP spec doesnt say, - up to implementor

Every segment of TCP has a sequence number so it is easy to reassemble and also take care of the loss of packet and retransmission is done

The segment details are shown below

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

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

The Checksum uses CRC

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 numberStep 2: server end system receives SYN, replies with SYNACK control segment

ACKs received SYN

allocates buffers

specifies server-> receiver initial seq. number

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

The three way handshake is overConnection Releaseclient 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 FINStep 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

Connection managementThe two figures

(a) TCP connection establishment in the normal case.

(b) Call collision.

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

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.

---------------------------------------------------------------------------------------------------------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 segmentFinite 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

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

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

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?

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

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 RTThow 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/8TCP RTT 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 Karns 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

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

--------------------------------------------------------------------------------------------------Different performance issues in network Performance Problems in Computer Networks

Network Performance Measurement

System Design for Better Performance

Fast TPDU Processing

Protocols for Gigabit NetworksPerformance 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 usedThe 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 PerformanceRules:

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

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

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

------------------------------------------------------------------------------------------------------------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?

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

Slow start

12: Explain UDP. When it can be used?

Answer

Connectionless unreliable internet protocol

Applications

RPC

Real time applications13: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

-----------------------------------------------------------------------------------------------------Why ATM?

All digital telephone networkNeed 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-channelThe 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 planesUser 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.

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

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

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

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

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 varia