Computer networks unit one, Lecture notes for Computer Networks
prabhu3582
prabhu3582

Computer networks unit one, Lecture notes for Computer Networks

20 pages
10Number of visits
Description
computer networks computer networks computer networks computer networks computer networks computer networks
20 points
Download points needed to download
this document
Download the document
Preview3 pages / 20
This is only a preview
3 shown on 20 pages
This is only a preview
3 shown on 20 pages
This is only a preview
3 shown on 20 pages
This is only a preview
3 shown on 20 pages

Cherraan’s Arts Science College Thittuparai, Kangayam – 638 701

CLASS : III B.Sc. - CS & V - SEM

SUBJECT: COMPUTER NETWORKS DATE: 28.06.2019

UNIT – I

NETWORK HARDWARE There are two types of transmission technology. They are as follows:

1. Broadcast links. 2. Point-to-point links.

Broadcast networks have a single communication channel that is shared by all the

machines on the network. Short messages, called packets in certain contexts, sent by any

machine are received by all the others. An address field within the packet specifies the intended

recipient. Upon receiving a packet, a machine checks the address field. If the packet is intended

for the receiving machine, that machine processes the packet; if the packet is intended for some

other machine, it is just ignored.

Broadcast systems generally also allow the possibility of addressing a packet to all

destinations by using a special code in the address field. When a packet with this code is

transmitted, it is received and processed by every machine on the network. This mode of

operation is called broadcasting. Some broadcast systems also support transmission to a subset of

the machines, something known as multicasting.

In contrast, point-to-point networks consist of many connections between individual pairs

of machines. To go from the source to the destination, a packet on this type of network may have

to first visit one or more intermediate machines. Often multiple routes, of different lengths, are

possible, so finding good ones is important in point-to-point networks. As a general rule

(although there are many exceptions), smaller, geographically localized networks tend to use

broadcasting, whereas larger networks usually are point-to-point. Point-to-point transmission

with one sender and one receiver is sometimes called unicasting.

An alternative criterion for classifying networks is their scale. In Fig. 1-6. We classify

multiple processor systems by their physical size. At the top are the personal area networks,

networks that are meant for one person. For example, a wireless network connecting a computer

with its mouse, keyboard, and printer is a personal area network.

Figure 1-6. Classification of interconnected processors by scale.

Local Area Networks

Local area networks, generally called LANs, are privately-owned networks within a

single building or campus of up to a few kilometers in size. They are widely used to connect

personal computers and workstations in company offices and factories to share resources (e.g.,

printers) and exchange information. LANs are distinguished from other kinds of networks by

three characteristics: (1) their size, (2) their transmission technology, and (3) their topology.

LANs may use a transmission technology consisting of a cable to which all the machines

are attached, like the telephone company party lines once used in rural areas. Traditional LANs

run at speeds of 10 Mbps to 100 Mbps, have low delay (microseconds or nanoseconds), and

make very few errors. Newer LANs operate at up to 10 Gbps. In this book, we will adhere to

tradition and measure line speeds in megabits/sec (1 Mbps is 1,000,000 bits/sec) and gigabits/sec

(1 Gbps is 1,000,000,000 bits/sec).

Various topologies are possible for broadcast LANs. Figure 1-7 shows two of them. In a

bus (i.e., a linear cable) network, at any instant at most one machine is the master and is allowed

to transmit. All other machines are required to refrain from sending. An arbitration mechanism is

needed to resolve conflicts when two or more machines want to transmit simultaneously. The

arbitration mechanism may be centralized or distributed. IEEE 802.3, popularly called Ethernet,

for example, is a bus-based broadcast network with decentralized control, usually operating at 10

Mbps to 10 Gbps. Computers on an Ethernet can transmit whenever they want to; if two or more

packets collide, each computer just waits a random time and tries again later.

(C)

Figure 1-7. Two broadcast networks. (a) Bus. (b) Ring. (c) Star.

A second type of broadcast system is the ring. In a ring, each bit propagates around on its

own, not waiting for the rest of the packet to which it belongs. Typically, each bit

circumnavigates the entire ring in the time it takes to transmit a few bits, often before the

complete packet has even been transmitted. As with all other broadcast systems, some rule is

needed for arbitrating simultaneous accesses to the ring. Various methods, such as having the

machines take turns, are in use. IEEE 802.5 (the IBM token ring), is a ring-based LAN operating

at 4 and 16 Mbps. FDDI is another example of a ring network.

Broadcast networks can be further divided into static and dynamic, depending on how the

channel is allocated. A typical static allocation would be to divide time into discrete intervals and

use a round-robin algorithm, allowing each machine to broadcast only when its time slot comes

up. Static allocation wastes channel capacity when a machine has nothing to say during its

allocated slot, so most systems attempt to allocate the channel dynamically (i.e., on demand).

A star topology is a topology for a Local Area Network (LAN) in which all nodes are

individually connected to a central connection point, like a hub or a switch. A star takes more

cable than e.g. a bus, but the benefit is that if a cable fails, only one node will be brought down.

All traffic emanates from the hub of the star. The central site is in control of all the nodes

attached to it. The central hub is usually a fast, self contained computer and is responsible for

routing all traffic to other nodes.

The main advantages of a star network is that one malfunctioning node does not affect

the rest of the network. However this type of network can be prone to bottleneck and failure

problems at the central site.

A star network is often combined with a bus topology. The central hub is then connected

to the backbone of the bus. This combination is called a tree.

Metropolitan Area Networks

A metropolitan area network, or MAN, covers a city. The best-known example of a MAN

is the cable television network available in many cities. This system grew from earlier

community antenna systems used in areas with poor over-the-air television reception. In these

early systems, a large antenna was placed on top of a nearby hill and signal was then piped to the

subscribers' houses.

At first, these were locally-designed, ad hoc systems. Then companies began jumping

into the business, getting contracts from city governments to wire up an entire city. The next step

was television programming and even entire channels designed for cable only. Often these

channels were highly specialized, such as all news, all sports, all cooking, all gardening, and so

on. But from their inception until the late 1990s, they were intended for television reception only.

Starting when the Internet attracted a mass audience, the cable TV network operators

began to realize that with some changes to the system, they could provide two-way Internet

service in unused parts of the spectrum. At that point, the cable TV system began to morph from

a way to distribute television to a metropolitan area network. To a first approximation, a MAN

might look something like the system shown in Fig. 1-8. In this figure we see both television

signals and Internet being fed into the centralized head end for subsequent distribution to

people's homes.

Figure 1-8. A metropolitan area network based on cable TV.

Cable television is not the only MAN. Recent developments in high-speed wireless

Internet access resulted in another MAN, which has been standardized as IEEE 802.16.

Wide Area Networks

A wide area network, or WAN, spans a large geographical area, often a country or

continent. It contains a collection of machines intended for running user (i.e., application)

programs. The hosts are connected by a communication subnet, or just subnet for short. The

hosts are owned by the customers (e.g., people's personal computers), whereas the

communication subnet is typically owned and operated by a telephone company or Internet

service provider. The job of the subnet is to carry messages from host to host.

In most wide area networks, the subnet consists of two distinct components: transmission

lines and switching elements. Transmission lines move bits between machines. They can be

made of copper wire, optical fiber, or even radio links. Switching elements are specialized

computers that connect three or more transmission lines. When data arrive on an incoming line,

the switching element must choose an outgoing line on which to forward them. These switching

computers have been called by various names in the past; the name router is now most

commonly used.

In this model, shown in Fig. 1-9, each host is frequently connected to a LAN on which a

router is present, although in some cases a host can be connected directly to a router. The

collection of communication lines and routers (but not the hosts) form the subnet.

Figure 1-9. Relation between hosts on LANs and the subnet.

In this model, shown in Fig. 1-9, each host is frequently connected to a LAN on which a router is

present,

although in some cases a host can be connected directly to a router. The collection of

communication lines and routers (but not the hosts) form the subnet.

Subnet is the collection of routers and communication lines that moved packets from the

source host to the destination host.

In most WANs, the network contains numerous transmission lines, each one connecting a

pair of routers. If two routers that do not share a transmission line wish to communicate, they

must do this indirectly, via other routers. When a packet is sent from one router to another via

one or more intermediate routers, the packet is received at each intermediate router in its entirety,

stored there until the required output line is free, and then forwarded. A subnet organized

according to this principle is called a store-and-forward or packet-switched subnet. Nearly all

wide area networks (except those using satellites) have store-and-forward subnets. When the

packets are small and all the same size, they are often called cells.

Generally, when a process on some host has a message to be sent to a process on some

other host, the sending host first cuts the message into packets, each one bearing its number in

the sequence. These packets are then injected into the network one at a time in quick succession.

The packets are transported individually over the network and deposited at the receiving host,

where they are reassembled into the original message and delivered to the receiving process. A

stream of packets resulting from some initial message is illustrated in Fig.1-10.

Figure 1-10. A stream of packets from sender to receiver.

In this figure, all the packets follow the route ACE, rather than ABDE or ACDE. In some

networks all packets from a given message must follow the same route; in others each packet is

routed separately. Of course, if ACE is the best route, all packets may be sent along it, even if

each packet is individually routed. Routing decisions are made locally. When a packet arrives at

router A,itis up to A to decide if this packet should be sent on the line to B or the line to C. How

A makes that decision is called the routing algorithm.

Not all WANs are packet switched. A second possibility for a WAN is a satellite system.

Each router has an antenna through which it can send and receive. All routers can hear the output

from the satellite, and in some cases they can also hear the upward transmissions of their fellow

routers to the satellite as well. Sometimes the routers are connected to a substantial point-to-point

subnet, with only some of them having a satellite antenna. Satellite networks are inherently

broadcast and are most useful when the broadcast property is important.

Wireless Networks

Wireless networks can be divided into three main categories:

1. System interconnection.

2. Wireless LANs.

3. Wireless WANs.

System interconnection is all about interconnecting the components of a computer using

short-range radio. Almost every computer has a monitor, keyboard, mouse, and printer connected

to the main unit by cables. So many new users have a hard time plugging all the cables into the

right little holes (even though they are usually color coded) that most computer vendors offer the

option of sending a technician to the user's home to do it. Consequently, some companies got

together to design a short-range wireless network called Bluetooth to connect these components

without wires. Bluetooth also allows digital cameras, headsets, scanners, and other devices to

connect to a computer by merely being brought within range. No cables, no driver installation,

just put them down, turn them on, and they work.

system interconnection networks use the master-slave paradigm of Fig. 1-11(a). The

system unit is normally the master, talking to the mouse, keyboard, etc., as slaves. The master

tells the slaves what addresses to use, when they can broadcast, how long they can transmit, what

frequencies they can use, and so on.

Figure 1-11. (a) Bluetooth configuration. (b) Wireless LAN.

The next steps up in wireless networking are the wireless LANs. These are systems in

which every computer has a radio modem and antenna with which it can communicate with other

systems. Often there is an antenna on the ceiling that the machines talk to, as shown in Fig. 1-

11(b). However, if the systems are close enough, they can communicate directly with one

another in a peer-to-peer configuration. Wireless LANs are becoming increasingly common in

small offices and homes, where installing Ethernet is considered too much trouble, as well as in

older office buildings, company cafeterias, conference rooms, and other places. There is a

standard for wireless LANs, called IEEE 802.11,

The third kind of wireless network is used in wide area systems. The radio network used

for cellular telephones is an example of a low-bandwidth wireless system. This system has

already gone through three generations. The first generation was analog and for voice only. The

second generation was digital and for voice only. The third generation is digital and is for both

voice and data. In a certain sense, cellular wireless networks are like wireless LANs, except that

the distances involved are much greater and the bit rates much lower. Wireless LANs can operate

at rates up to about 50 Mbps over distances of tens of meters. Cellular systems operate below 1

Mbps, but the distance between the base station and the computer or telephone is measured in

kilometers rather than in meters.

The initial focus is high-speed wireless Internet access from homes and businesses,

bypassing the telephone system. This service is often called local multipoint distribution service.

A standard for it, called IEEE 802.16.

Almost all wireless networks hook up to the wired network at some point to provide

access to files, databases, and the Internet. There are many ways these connections can be

realized, depending on the circumstances. For example, in Fig. 1-12(a), we depict an airplane

with a number of people using modems and seat-back telephones to call the office. Each call is

independent of the other ones. A much more efficient option, however, is the flying LAN of Fig.

1-12(b). Here each seat comes equipped with an Ethernet connector into which passengers can

plug their computers. A single router on the aircraft maintains a radio link with some router on

the ground, changing routers as it flies along. This configuration is just a traditional LAN, except

that its connection to the outside world happens to be a radio link instead of a hardwired line.

Figure 1-12. (a) Individual mobile computers. (b) A flying LAN.

Home Networks

Every device in the home will be capable of communicating with every other device, and

all of them will be accessible over the Internet.

Many devices are capable of being networked. Some of the more obvious categories

(with examples) are as follows:

1. Computers (desktop PC, notebook PC, PDA, shared peripherals).

2. Entertainment (TV, DVD, VCR, camcorder, camera, stereo, MP3).

3. Telecommunications (telephone, mobile telephone, intercom, fax).

4. Appliances (microwave, refrigerator, clock, furnace, airco, lights).

5. Telemetry (utility meter, smoke/burglar alarm, thermostat, babycam).

Home computer networking is already here in a limited way. Many homes already have a

device to connect multiple computers to a fast Internet connection. Networked entertainment is

not quite here, but as more and more music and movies can be downloaded from the Internet,

there will be a demand to connect stereos and televisions to it. Also, people will want to share

their own videos with friends and family, so the connection will need to go both ways.

Telecommunications gear is already connected to the outside world, but soon it will be digital

and go over the Internet.

Home networking has some fundamentally different properties than other network types. They

are: First, the network and devices have to be easy to install. The author has installed numerous

pieces of hardware and software on various computers over the years, with mixed results. A

series of phone calls to the vendor's helpdesk typically resulted in answers like (1) Read the

manual, (2) Reboot the computer, (3) Remove all hardware and software except ours and try

again, (4) Download the newest driver from our Web site, and if all else fails, (5) Reformat the

hard disk and then reinstall Windows from the CD-ROM. Telling the purchaser of an Internet

refrigerator to download and install a new version of the refrigerator's operating system is not

going to lead to happy customers.

Second, the network and devices have to be foolproof in operation. Air conditioners used

to have one knob with four settings: OFF, LOW, MEDIUM, and HIGH. Now they have 30-page

manuals. Once they are networked, expect the chapter on security alone to be 30 pages. This will

be beyond the comprehension of virtually all the users.

Third, low price is essential for success. People will not pay a $50 premium for an

Internet thermostat because few people regard monitoring their home temperature from work that

important. For $5 extra, it might sell, though.

Fourth, the main application is likely to involve multimedia, so the network needs

sufficient capacity. There is no market for Internet-connected televisions that show shaky movies

at 320 x 240 pixel resolutions and 10 frames/sec. Fast Ethernet, the workhorse in most offices, is

not good enough for multimedia. Consequently,home networks will need better performance

than that of existing office networks and at lower prices before they become mass market items.

Fifth, it must be possible to start out with one or two devices and expand the reach of the

network gradually. This means no format wars. Telling consumers to buy peripherals with IEEE

1394 (FireWire) interfaces and a few years later retracting that and saying USB 2.0 is the

interface-of-the-month is going to make consumers skittish. The network interface will have to

remain stable for many years; the wiring (if any) will have to remain stable for decades.

Sixth, security and reliability will be very important. Losing a few files to an e-mail virus

is one thing; having a burglar disarm your security system from his PDA and then plunder your

house is something quite different.

Internetworks

A common form of internet is a collection of LANs connected by a WAN. Fig 1.5 shows the

Internetworks.

Fig: 1.5 Relation between hosts on LANs and the WAN.

The only real technical distinction between a subnet and a WAN in this case is whether

hosts are present. If the system within the gray area contains only routers, it is a subnet; if it

contains both routers and hosts, it is a WAN. The real differences relate to ownership and use.

Subnets, networks, and internetworks are often confused. Subnet makes the most sense in

the context of a wide area network, where it refers to the collection of routers and

communication lines owned by the network operator. As an analogy, the telephone system

consists of telephone switching offices connected to one another by high-speed lines, and to

houses and businesses by low-speed lines. These lines and equipment, owned and managed by

the telephone company, form the subnet of the telephone system. The telephones themselves (the

hosts in this analogy) are not part of the subnet. The combination of a subnet and its hosts forms

a network. In the case of a LAN, the cable and the hosts form the network. There really is no

subnet.

An internetwork is formed when distinct networks are interconnected. In our view,

connecting a LAN and a WAN or connecting two LANs forms an internetwork, but there is little

agreement in the industry over terminology in this area. One rule of thumb is that if different

organizations paid to construct different parts of the network and each maintains its part, we have

an internetwork rather than a single network. Also, if the underlying technology is different in

different parts (e.g., broadcast versus point-to-point), we probably have two networks.

NETWORK SOFTWARE

Protocol Hierarchies

Most networks are organized as a stack of layers or levels, each one built upon the one

below it. The number of layers, the name of each layer, the contents of each layer, and the

function of each layer differ from network to network. The purpose of each layer is to offer

certain services to the higher layers, shielding those layers from the details of how the offered

services are actually implemented. In a sense, each layer is a kind of virtual machine, offering

certain services to the layer above it.

Layer n on one machine carries on a conversation with layer n on another machine. The

rules and conventions used in this conversation are collectively known as the layer n protocol.

Basically, a protocol is an agreement between the communicating parties on how communication

is to proceed. As an analogy, when a woman is introduced to a man, she may choose to stick out

her hand. He, in turn, may decide either to shake it or talk it, depending.

A five-layer network is illustrated in Fig. 1-13. The entities comprising the corresponding

layers on different machines are called peers. The peers may be processes, hardware devices, or

even human beings. In other words, it is the peers that communicate by using the protocol.

Figure 1-13. Layers, protocols, and interfaces.

In reality, no data are directly transferred from layer n on one machine to layer n on

another machine. Instead, each layer passes data and control information to the layer

immediately below it, until the lowest layer is reached. Below layer 1 is the physical medium

through which actual communication occurs. In Fig. 1-13, virtual communication is shown by

dotted lines and physical communication by solid lines.

Between each pair of adjacent layers is an interface. The interface defines which

primitive operations and services the lower layer makes available to the upper one. When

network designers decide how many layers to include in a network and what each one should do,

one of the most important considerations is defining clean interfaces between the layers.

A set of layers and protocols is called a network architecture. The interfaces is part of the

architecture because these are hidden away inside the machines and not visible from the outside.

It is not even necessary that the interfaces on all machines in a network be the same, provided

that each machine can correctly use all the protocols. A list of protocols used by a certain system,

one protocol per layer, is called a protocol stack.

An analogy may help explain the idea of multilayer communication. Imagine two philosophers

(peer processes in layer 3), one of whom speaks Urdu and English and one of whom speaks

Chinese and French. Since they have no common language, they each engage a translator (peer

processes at layer 2), each of whom in turn contacts a secretary (peer processes in layer 1).

Philosopher 1 wishes to convey his affection for oryctolagus cuniculus to his peer. To do so, he

passes a message (in English) across the 2/3 interface to his translator, saying ''I like rabbits,'' as

illustrated in Fig. 1-14. The translators have agreed on a neutral language known to both of them,

Dutch, so the message is converted to ''Ik vind konijnen leuk.'' The choice of language is the

layer 2 protocol and is up to the layer 2 peer processes.

Figure 1-14. The philosopher-translator-secretary architecture.

The translator then gives the message to a secretary for transmission, by, for example, fax (the

layer 1 protocol). When the message arrives, it is translated into French and passed across the 2/3

interface to philosopher 2. Note that each protocol is completely independent of the other ones as

long as the interfaces are not changed. The translators can switch from Dutch to say, Finnish, at

will, provided that they both agree, and neither changes his interface with either layer 1 or layer

3. Similarly, the secretaries can switch from fax to e-mail or telephone without disturbing (or

even informing) the other layers. Each process may add some information intended only for its

peer. This information is not passed upward to the layer above.

Design Issues for the Layers

Some of the key design issues that occur in computer networks are present in several

layers. Some of the important ones are mentioned below:

Every layer needs a mechanism for identifying senders and receivers. Since a network

normally has many computers, some of which have multiple processes, a means is needed for a

process on one machine to specify with whom it wants to talk. As a consequence of having

multiple destinations, some form of addressing is needed in order to specify a specific

destination.

Another set of design decisions concerns the rules for data transfer. In some systems, data

only travel in one direction; in others, data can go both ways. The protocol must also determine

how many logical channels the connection corresponds to and what their priorities are. Many

networks provide at least two logical channels per connection, one for normal data and one for

urgent data.

Error control is an important issue because physical communication circuits are not

perfect. Many error-detecting and error-correcting codes are known, but both ends of the

connection must agree on which one is being used. In addition, the receiver must have some way

of telling the sender which messages have been correctly received and which have not.

An issue that occurs at every level is how to keep a fast sender from swamping a slow

receiver with data. Various solutions have been proposed and will be discussed later. Some of

them involve some kind of feedback from the receiver to the sender, either directly or indirectly,

about the receiver's current situation. Others limit the sender to an agreed-on transmission rate.

This subject is called flow control.

When it is inconvenient or expensive to set up a separate connection for each pair of

communicating processes, the underlying layer may decide to use the same connection for

multiple, unrelated conversations. As long as this multiplexing and demultiplexing is done

transparently, it can be used by any layer. Multiplexing is needed in the physical layer, for

example, where all the traffic for all connections has to be sent over at most a few physical

circuits.

When there are multiple paths between source and destination, a route must be chosen.

Sometimes this decision must be split over two or more layers. For example, to send data from

London to Rome, a high-level decision might have to be made to transit France or Germany

based on their respective privacy laws. Then a low-level decision might have to made to select

one of the available circuits based on the current traffic load. This topic is called routing.

Connection-Oriented and Connectionless Services

Layers can offer two different types of service to the layers above them: connection-

oriented and connectionless. These two types and examine the differences between them.

Connection-oriented service is modeled after the telephone system. To talk to someone,

you pick up the phone, dial the number, talk, and then hang up. Similarly, to use a connection-

oriented network service, the service user first establishes a connection, uses the connection, and

then releases the connection. The essential aspect of a connection is that it acts like a tube: the

sender pushes objects (bits) in at one end, and the receiver takes them out at the other end. In

most cases the order is preserved so that the bits arrive in the order they were sent.

Connectionless service is modeled after the postal system. Each message (letter) carries

the full destination address, and each one is routed through the system independent of all the

others. Normally, when two messages are sent to the same destination, the first one sent will be

the first one to arrive. However, it is possible that the first one sent can be delayed so that the

second one arrives first.

Each service can be characterized by a quality of service. Reliable connection-oriented

service has two minor variations: message sequences and byte streams. In the former variant,

the message boundaries are preserved. When two 1024-byte messages are sent, they arrive as

two distinct 1024-byte messages, never as one 2048-byte message. In the latter, the connection is

simply a stream of bytes, with no message boundaries. When 2048 bytes arrive at the receiver,

there is no way to tell if they were sent as one 2048-byte message, two 1024-byte messages, or

2048 1-byte messages. If the pages of

a book are sent over a network to a phototypesetter as separate messages, it might be important

to preserve the message boundaries. On the other hand, when a user logs into a remote server, a

byte stream from the user's computer to the server is all that is needed.

For some applications, the transit delays introduced by acknowledgements are

unacceptable. One such application is digitized voice traffic. It is preferable for telephone users

to hear a bit of noise on the line from time to time than to experience a delay waiting for

acknowledgements. Similarly, when transmitting a video conference, having a few pixels wrong

is no problem, but having the image jerk along as the flow stops to correct errors is irritating.

Figure 1-16. Six different types of service.

Not all applications require connections. For example, as electronic mail becomes more

common, electronic junk is becoming more common too. The electronic junk-mail sender

probably does not want to go to the trouble of setting up and later tearing down a connection just

to send one item. Nor is 100 percent reliable delivery essential, especially if it costs more. All

that is needed is a way to send a single message that has a high probability of arrival, but no

guarantee. Unreliable (meaning not acknowledged) connectionless service is often called

datagram service, in analogy with telegram service, which also does not return an

acknowledgement to the sender.

The convenience of not having to establish a connection to send one short message is

desired, but reliability is essential. The acknowledged datagram service can be provided for

these applications. It is like sending a registered letter and requesting a return receipt. When the

receipt comes back, the sender is absolutely sure that the letter was delivered to the intended

party and not lost along the way.

Still another service is the request-reply service. In this service the sender transmits a

single datagram containing a request; the reply contains the answer. For example, a query to the

local library asking where Uighur is spoken falls into this category. Request-reply is commonly

used to implement communication in the client-server model: the client issues a request and the

server responds to it.

Service Primitives

A service is formally specified by a set of primitives (operations) 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. If the protocol stack is located in the operating system, as it

often is, the primitives are normally system calls. These calls cause a trap to kernel mode, which

then turns control of the machine over to the operating system to send the necessary packets.

The set of primitives available depends on the nature of the service being provided. The

primitives for connection-oriented service are different from those of connectionless service. An

example of the service primitives that might be provided to implement a reliable byte stream in a

client-server environment, consider the primitives listed in Fig. 1-17.

Figure 1-17. Five service primitives for implementing a simple connection-oriented service

First, the server executes LISTEN to indicate that it is prepared to accept incoming

connections. A common way to implement LISTEN is to make it a blocking system call. After

executing the primitive, the server process is blocked until a request for connection appears.

Next, the client process executes CONNECT to establish a connection with the server.

The CONNECT call needs to specify who to connect to, so it might have a parameter giving the

server's address. The operating system then typically sends a packet to the peer asking it to

connect, as shown by (1) in Fig. 1-18.

Figure 1-18. Packets sent in a simple client-server interaction on a connection-oriented

network.

The client process is suspended until there is a response. When the packet arrives at the

server, it is processed by the operating system there. When the system sees that the packet is

requesting a connection, it checks to see if there is a listener. If so, it does two things: unblocks

the listener and sends back an acknowledgement (2). The arrival of this acknowledgement then

releases the client. At this point the client and server are both running and

they have a connection established. It is important to note that the acknowledgement (2) is

generated by the protocol code itself, not in response to a user-level primitive. If a connection

request arrives and there is no listener, the result is undefined. In some systems the packet may

be queued for a short time in anticipation of a LISTEN.

The next step is for the server to execute RECEIVE to prepare to accept the first request.

Normally, the server does this immediately upon being released from the LISTEN, before the

acknowledgement can get back to the client. The RECEIVE call blocks the server.

Then the client executes SEND to transmit its request (3) followed by the execution of

RECEIVE to get the reply. The arrival of the request packet at the server machine unblocks the

server process so it can process the request. After it has done the work, it uses SEND to return

the answer to the client (4). The arrival of this packet unblocks the client, which can now inspect

the answer. If the client has additional requests, it can make them now. If it is done, it can use

DISCONNECT to terminate the connection.

Usually, an initial DISCONNECT is a blocking call, suspending the client and sending a

packet to the server saying that the connection is no longer needed (5). When the server gets the

packet, it also issues a DISCONNECT of its own, acknowledging the client and releasing the

connection. When the server's packet (6) gets back to the client machine, the client process is

released and the connection is broken.

The Relationship of Services to Protocols

A service is a set of primitives (operations) that a layer provides to the layer above it. The

service defines what operations the layer is prepared to perform on behalf of its users, but it says

nothing at all about how these operations are implemented. A service relates to an interface

between two layers, with the lower layer being the service provider and the upper layer being the

service user.

A protocol, in contrast, is a set of rules governing the format and meaning of the packets,

or messages that are exchanged by the peer entities within a layer. Entities use protocols to

implement their service definitions. They are free to change their protocols at will, provided they

do not change the service visible to their users. In this way, the service and the protocol are

completely decoupled.

Services relate to the interfaces between layers, as illustrated in Fig. 1-19.

Figure 1-19. The relationship between a service and a protocol.

An analogy with programming languages is worth making. A service is like an abstract

data type or an object in an object-oriented language. It defines operations that can be performed

on an object but does not specify how these operations are implemented. A protocol relates to the

implementation of the service and as such is not visible to the user of the service.

REFERENCE MODELS

The two important network architectures, the OSI reference model and the TCP/IP

reference model.

The OSI Reference Model

This model is based on a proposal developed by the International Standards Organization

(ISO) as a first step toward international standardization of the protocols used in the various

layers. The model is called the ISO OSI (Open Systems Interconnection) Reference Model

because it deals with connecting open systems—that is, systems that are open for communication

with other systems.

Figure 1-20. The OSI reference model.

The OSI model has seven layers. The principles that were applied to arrive at the seven layers

can be briefly summarized as follows:

1. A layer should be created where a different abstraction is needed. 2. Each layer should perform a well-defined function. 3. The function of each layer should be chosen with an eye toward defining internationally

standardized protocols.

4. The layer boundaries should be chosen to minimize the information flow across the interfaces.

5. The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity and small enough that the architecture does not

become unwieldy.

The Physical Layer

The physical layer is concerned with transmitting raw bits over a communication

channel. The design issues have to do with making sure that when one side sends a 1 bit, it is

received by the other side as a 1 bit, not as a 0 bit. Typical questions here are how many volts

should be used to represent a 1 and how many for a 0, how many nanoseconds a bit lasts,

whether transmission may proceed simultaneously in both directions, how the initial connection

is established and how it is torn down when both sides are finished, and how many pins the

network connector has and what each pin is used for. The design issues here largely deal with

mechanical, electrical, and timing interfaces, and the physical transmission medium, which lies

below the physical layer.

The Data Link Layer

The main task of the data link layer is to transform a raw transmission facility into a line

that appears free of undetected transmission errors to the network layer. It accomplishes this task

by having the sender break up the input data into data frames (typically a few hundred or a few

thousand bytes) and transmit the frames sequentially. If the service is reliable, the receiver

confirms correct receipt of each frame by sending back an acknowledgement frame. Another

issue that arises in the data link layer (and most of the higher layers as well) is how to keep a fast

transmitter from drowning a slow receiver in data. Some traffic regulation mechanism is often

needed to let the transmitter know how much buffer space the receiver has at the moment.

Frequently, this flow regulation and the error handling are integrated.

Broadcast networks have an additional issue in the data link layer: how to control access

to the shared channel. A special sublayer of the data link layer, the medium access control

sublayer, deals with this problem.

The Network Layer

The network layer controls the operation of the subnet. A key design issue is determining

how packets are routed from source to destination. Routes can be based on static tables that are

''wired into'' the network and rarely changed. They can also be determined at the start of each

conversation, for example, a terminal session (e.g., a login to a remote machine). Finally, they

can be highly dynamic, being determined anew for each packet, to reflect the current network

load. If too many packets are present in the subnet at the same time, they will get in one another's

way, forming bottlenecks. The control of such congestion also belongs to the network layer.

More generally, the quality of service provided (delay, transit time, jitter, etc.) is also a network

layer issue.

When a packet has to travel from one network to another to get to its destination, many

problems can arise. The addressing used by the second network may be different from the first

one. The second one may not accept the packet at all because it is too large. The protocols may

differ, and so on. It is up to the network layer to overcome all these problems to allow

heterogeneous networks to be interconnected.

In broadcast networks, the routing problem is simple, so the network layer is often thin or even

nonexistent.

The Transport Layer

The basic function of the transport layer is to accept data from above, split it up into

smaller units if need be, pass these to the network layer, and ensure that the pieces all arrive

correctly at the other end. Furthermore, all this must be done efficiently and in a way that isolates

the upper layers from the inevitable changes in the hardware technology.

The transport layer also determines what type of service to provide to the session layer,

and, ultimately, to the users of the network. The most popular type of transport connection is an

error-free point-to-point channel that delivers messages or bytes in the order in which they were

sent. However, other possible kinds of transport service are the transporting of isolated messages,

with no guarantee about the order of delivery, and the broadcasting of messages to multiple

destinations. The type of service is determined when the connection is established.

The transport layer is a true end-to-end layer, all the way from the source to the

destination. In other words, a program on the source machine carries on a conversation with a

similar program on the destination machine, using the message headers and control messages. In

the lower layers, the protocols are between each machine and its immediate neighbors, and not

between the ultimate source and destination machines, which may be separated by many routers.

The difference between layers 1 through 3, which are chained, and layers 4 through 7, which are

end-to-end, is illustrated in Fig. 1-20.

The Session Layer

The session layer allows users on different machines to establish sessions between them.

Sessions offer various services, including dialog control (keeping track of whose turn it is to

transmit), token management (preventing two parties from attempting the same critical operation

at the same time), and synchronization (check pointing long transmissions to allow them to

continue from where they were after a crash).

The Presentation Layer

Unlike lower layers, which are mostly concerned with moving bits around, the presentation layer

is concerned with the syntax and semantics of the information transmitted. In order to make it

possible for computers with different data representations to communicate, the data structures to

be exchanged can be defined in an abstract way, along with a standard encoding to be used ''on

the wire.'' The presentation layer manages these abstract data structures and allows higher-level

data structures (e.g., banking records), to be defined and exchanged.

The Application Layer

The application layer contains a variety of protocols that are commonly needed by users. One

widely-used application protocol is HTTP (HyperText Transfer Protocol), which is the basis for

the World Wide Web. When a browser wants a Web page, it sends the name of the page it wants

to the server using HTTP. The server then sends the page back. Other application protocols are

used for file transfer, electronic mail, and network news.

The TCP/IP Reference Model

The ARPANET was a research network sponsored by the DoD (U.S. Department of

Defense). It eventually connected hundreds of universities and government installations, using

leased telephone lines. When satellite and radio networks were added later, the existing protocols

had trouble interworking with them, so a new reference architecture was needed. Thus, the

ability to connect multiple networks in a seamless way was one of the major design goals from

the very beginning. This architecture later became known as the TCP/IP Reference Model.

The Internet Layer

All these requirements led to the choice of a packet-switching network based on a

connectionless internetwork layer. This layer, called the internet layer, is the linchpin that holds

the whole architecture together. Its job is to permit hosts to inject packets into any network and

have them travel independently to the destination (potentially on a different network). They may

even arrive in a different order than they were sent, in which case it is the job of higher layers to

rearrange them, if in-order delivery is desired. Note that ''internet'' is used here in a generic sense,

even though this layer is present in the Internet.

The analogy here is with the (snail) mail system. A person can drop a sequence of

international letters into a mail box in one country, and with a little luck, most of them will be

delivered to the correct address in the destination country. Probably the letters will travel through

one or more international mail gateways along the way, but this is transparent to the users.

Furthermore, that each country (i.e., each network) has its own stamps, preferred envelope sizes,

and delivery rules is hidden from the users.

The internet layer defines an official packet format and protocol called IP (Internet

Protocol). The job of the internet layer is to deliver IP packets where they are supposed to go.

Packet routing is clearly the major issue here, as is avoiding congestion. For these reasons, it is

reasonable to say that the TCP/IP internet layer is similar in functionality to the OSI network

layer. Figure 1-21 shows this correspondence.

Figure 1-21. The TCP/IP reference model.

The Transport Layer

The layer above the internet layer in the TCP/IP model is now usually called the transport

layer. It is designed to allow peer entities on the source and destination hosts to carry on a

conversation, just as in the OSI transport layer. Two end-to-end transport protocols have been

defined here. The first one, TCP (Transmission Control Protocol ), is a reliable connection-

oriented protocol that allows a byte stream originating on one machine to be delivered without

error on any other machine in the internet. It fragments the incoming byte stream into discrete

messages and passes each one on to the internet layer. At the destination, the receiving TCP

process reassembles the received messages into the output stream. TCP also handles flow control

to make sure a fast sender cannot swamp a slow receiver with more messages than it can handle.

The second protocol in this layer, UDP (User Datagram Protocol), is an unreliable,

connectionless protocol for applications that do not want TCP's sequencing or flow control and

wish to provide their own. It is also widely used for one-shot, client-server-type request-reply

queries and applications in which prompt delivery is more important than accurate delivery, such

as transmitting speech or video. The relation of IP, TCP, and UDP is shown in Fig. 1-22. Since

the model was developed, IP has been implemented on many other networks.

Figure 1-22. Protocols and networks in the TCP/IP model initially.

The Application Layer

The TCP/IP model does not have session or presentation layers. No need for them was

perceived, so they were not included. Experience with the OSI model has proven this view

correct: they are of little use to most applications.

On top of the transport layer is the application layer. It contains all the higher-level

protocols. The early ones included virtual terminal (TELNET), file transfer (FTP), and electronic

mail (SMTP), as shown in Fig. 1-22. The virtual terminal protocol allows a user on one machine

to log onto a distant machine and work there. The file transfer protocol provides a way to move

data efficiently from one machine to another. Electronic mail was originally just a kind of file

transfer, but later a specialized protocol (SMTP) was developed for it. Many other protocols have

been added to these over the years: the Domain Name System (DNS) for mapping host names

onto their network addresses, NNTP, the protocol for moving USENET news articles around,

and HTTP, the protocol for fetching pages on the World Wide Web, and many others.

The Host-to-Network Layer

Below the internet layer is a great void. The TCP/IP reference model does not really say much

about what happens here, except to point out that the host has to connect to the network using

some protocol so it can send IP packets to it. This protocol is not defined and varies from host to

host and network to network.

A Comparison of the OSI and TCP/IP Reference Models

OSI(Open System Interconnection) TCP/IP(Transmission Control Protocol / Internet Protocol)

1.OSI is a generic, protocol independent standard, acting as a communication gateway between the network and end user.

1. TCP/IP model is based on standard protocols around which the Internet has developed. It is a communication protocol, which allows connection of hosts over a network.

2. In OSI model the transport layer guarantees the delivery of packets.

2. In TCP/IP model the transport layer does not guarantees delivery of packets. Still the TCP/IP model is more reliable.

3. Follows vertical approach. 3. Follows horizontal approach.

4. OSI model has a separate Presentation layer and Session layer.

4. TCP/IP does not have a separate Presentation layer or Session layer.

5. Transport Layer is Connection Oriented. 5. Transport Layer is both Connection Oriented and Connection less.

6. Network Layer is both Connection Oriented and Connection less.

6. Network Layer is Connection less.

7. OSI model has a problem of fitting the protocols into the model.

7. TCP/IP model does not fit any protocol

8. Protocols are hidden in OSI model and are easily replaced as the technology changes.

8. In TCP/IP replacing protocol is not easy.

9. OSI model defines services, interfaces and protocols very clearly and makes clear distinction between them. It is protocol independent.

9. In TCP/IP, services, interfaces and protocols are not clearly separated. It is also protocol dependent.

10. It has 7 layers 10. It has 4 layers

A Critique of the OSI Model and Protocols

Some of these criticisms are:

1. bad timing 2. bad technology 3. bad implementation 4. bad politics Bad timing essential that standards are written in between trough

1) written too early - subject is poorly understood

2) written too late - they are ignored by companies who have committed billions of dollars

3) OSI protocol became crushed

4) TCP/IP already in use by research universities by time ISO OSI appeared - vendors were

offering TCP/IP products (cautiously).

5) no company wanted to be first offering ISO OSI - I t never happened.

Bad technology

1. model and protocol flawed - session layer little used & presentation layer tiny in most applications

2. modelled after IBM SNA (Systems Network Architecture) 3. bulky solution which was difficult to understand - from the initial printed standards

Bad implementation

1. initial implementations were slow - ISO OSI-7 layer model was associated with bad quality

2. TCP/IP available within Berkeley UNIX - was free and reasonably good

Bad politics

1) TCP/IP & UNIX was much loved in academia 2) people on the ground reacted badly to this and supported TCP/IP 3) ISO OSI-7 layer model throught to be a creature of:

- European telecommincation - also thought to be technically inferior to TCP/IP.

A Critique of The TCP/IP Model and Protocols

 No definitions of general networking concepts  Not a general reference model  Host-to-network layer is rather an interface  No definition of data link nor physical layers  Some application layer protocols were designed and implemented ad hoc.

End of UNIT - I

no comments were posted
This is only a preview
3 shown on 20 pages