Sei sulla pagina 1di 34

VFSTR UNIVERSITY DEPT OF ECE

COMPUTER NETWORKS
LAB

Page |1 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

List of Experiments
S.No. Title of Experiment
1 Study of Network Devices
2 Study of Network IP
3 Implementation of Datalink framing methods(Character count, Bit
stuffing and destuffing)
4 Implementation of Error detection methods(Even and Odd parity CRC
polynomials)
5 Implementation of Unrestricted simplex protocol
6 Implementation of Stop and Wait Protocol
7 Implementation of Djkstra’s algorithm
8 Design of client server application for file transfer

Page |2 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

1. STUDY OF NETWORK DEVICES


AIM: To study the following network devices in detail
 Repeater
 Hub
 Switch
 Bridge
 Router
 Gate Way

APPARATUS: No Software needed

PROCEDURE:

Following should be done to understand this practical.

1. Repeater: Functioning at Physical Layer. A repeater is an


electronic device that receives a signal and retransmits it at a higher
level and/or higher power, or onto the other side of an obstruction,
so that the signal can cover longer distances. Repeater have two
ports ,so cannot be use to connect for more than two devices

2. Hub: An Ethernet hub, active hub, network hub, repeater hub, hub or
concentrator is a device for connecting multiple twisted pair or fiber
optic Ethernet devices together and making them act as a single network
segment. Hubs work at the physical layer (layer 1) of the OSI model. The
device is a form of multiport repeater. Repeater hubs also participate in
collision detection, forwarding a jam signal to all ports if it detects a
collision.

Page |3 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

3. Switch: A network switch or switching hub is a computer


networking device that connects network segments. The term
commonly refers to a network bridge that processes and routes data
at the data link layer (layer 2) of the OSI model. Switches that
additionally process data at the network layer (layer 3 and above)
are often referred to as Layer 3 switches or multilayer switches.

4. Bridge: A network bridge connects multiple network segments at


the data link layer (Layer 2) of the OSI model. In Ethernet
networks, the term bridge formally means a device that behaves
according to the IEEE 802.1D standard. A bridge and switch are
very much alike; a switch being a bridge with numerous ports.
Switch or Layer 2 switch is often used interchangeably with bridge.
Bridges can analyze incoming data packets to determine if the
bridge is able to send the given packet to another segment of the
network.

Page |4 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

5. Router: A router is an electronic device that interconnects two or


more computer networks, and selectively interchanges packets of
data between them. Each data packet contains address information
that a router can use to determine if the source and destination are
on the same network, or if the data packet must be transferred from
one network to another. Where multiple routers are used in a large
collection of interconnected networks, the routers exchange
information about target system addresses, so that each router can
build up a table showing the preferred paths between any two
systems on the interconnected networks.

6. Gate Way: In a communications network, a network node


equipped for interfacing with another network that uses different
protocols. A gateway may contain devices such as protocol
translators, impedance matching devices, rate converters, fault
isolators, or signal translators as necessary to provide system
interoperability. It also requires the establishment of mutually
acceptable administrative procedures between both networks. A
protocol translation/mapping gateway interconnects networks with
different network protocol technologies by performing the required
protocol conversions.

RESULT:

Page |5 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

2. STUDY OF NETWORK IP
AIM: To study the Network IP
 Classification of IP address
 Sub netting
 Super netting

APPARATUS: No software needed


PROCEDURE:
Following is required to be study under this practical.

 Classification of IP address

As shown in table we teach how the IP addresses are classified and when they
are used.

Class Address Range Supports


Class A 1.0.0.1 to 126.255.255.254 Supports 16 million hosts on each of 127 networks.
Class B 128.1.0.1 to 191.255.255.254 Supports 65,000 hosts on each of 16,000 networks.
Class C 192.0.1.1 to 223.255.254.254 Supports 254 hosts on each of 2 million networks.
Class D 224.0.0.0 to 239.255.255.255 Reserved for multicast groups.

Class E 240.0.0.0 to 254.255.255.254 Reserved.

TCP/IP defines five classes of IP addresses: class A, B, C, D, and E. Each class has
a range of valid IP addresses. The value of the first octet determines the class. IP
addresses from the first three classes (A, B and C) can be used for host addresses.
The other two classes are used for other purposes – class D for multicast and class
E for experimental purposes.

 Sub netting

When a bigger network is divided into smaller networks, in order to


maintain security, then that is known as Subnetting. so, maintenance is
easier for smaller networks.
so to divide a network into two parts, you need to choose one bit for each

Page |6 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

Subnet from the host ID part.

In the above diagram there are two Subnets.


It is a class C IP so, there are 24 bits in the network id part and 8 bits in the host
id part.
For Subnet-1: The first bit which is chosen from the host id part is zero and the
range will be from (193.1.2.00000000 till you get all 1’s in the host ID part i.e,
193.1.2.01111111) except for the first bit which is chosen zero for subnet id part.
Thus, the range of subnet-1: 193.1.2.0 to 193.1.2.127
For Subnet-2: The first bit chosen from the host id part is one and the range will
be from (193.1.2.100000000 till you get all 1’s in the host ID part i.e,
193.1.2.11111111).
Thus, the range of subnet-2: 193.1.2.128 to 193.1.2.255
 Super netting

Supernetting is the opposite of Subnetting. In subnetting, a single big network is


divided into multiple smaller subnetworks. In Supernetting, multiple networks
are combined into a bigger network termed as a Supernetwork or Supernet.
Supernetting is mainly used in Route Summarization, where routes to multiple
networks with similar network prefixes are combined into a single routing entry,
with the routing entry pointing to a Super network, encompassing all the
networks. This in turn significantly reduces the size of routing tables and also the
size of routing updates exchanged by routing protocols.

There are some points which should be kept in mind while supernetting:

Page |7 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

• All the IP address should be contiguous.


• Size of all the small networks should be equal and must be in form of 2 n.
• First IP address should be exactly divisible by whole size of supernet.

Example – Suppose 4 small networks of class C:


200.1.0.0
200.1.1.0
200.1.2.0
200.1.3.0
Build a bigger network which have a single Network Id.

RESULT:

Page |8 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

3. DATA LINK FRAMING METHODS-


CHARACTERCOUNT, BIT STUFFING AND
DESTUFFING

AIM: To implement Data link framing methods – character count, Bit stuffing
and Destuffing using C language.

APPARATUS: PC with Windows OS & C-Language

THEORY:

Framing is a point-to-point connection between two computers or devices consists


of a wire in which data is transmitted as a stream of bits. However, these bits must
be framed into discernible blocks of information. Framing is a function of the data
link layer. It provides a way for a sender to transmit a set of bits that are
meaningful to the receiver. Ethernet, token ring, frame relay, and other data link
layer technologies have their own frame structures. Frames have headers that
contain information such as error-checking codes.
There are two types of framing:

1. Fixed size – The frame is of fixed size and there is no need to provide
boundaries to the frame, length of the frame itself acts as delimiter.

2. Variable size – In this there is need to define end of frame as well as


beginning of next frame to distinguish. This can be done in two ways:

 Length field – We can introduce a length field in the frame to


indicate the length of the frame. Used in Ethernet(802.3). The
problem with this is that sometimes the length field might get
corrupted.
 End Delimeter (ED) – We can introduce an ED(pattern) to indicate
the end of the frame. Used in Token Ring. The problem with this is
that ED can occur in the data.
This can be solved by:

Character/Byte Stuffing: Used when frames consist of character. If data contains

Page |9 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

ED then, byte is stuffed into data to diffentiate it from ED.

Bit Stuffing: Let ED = 01111 and if data = 01111


–> Sender stuffs a bit to break the pattern i.e. here appends a 0 in data = 011101.
–> Receiver receives the frame.
–> If data contains 011101, receiver removes the 0 and reads the data.

P a g e | 10 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

PROCEDURE:

PROGRAM:

#include<stdio.h>
#include<stdlib.h>
#define MAXSIZE 100

int main()
{
char *p,*q;
char temp;
char in[MAXSIZE];
char stuff[MAXSIZE];
chardestuff[MAXSIZE];

int count=0;

printf("enter the input character string (0‘s & 1‘s only):\n");


scanf("%s",in);

p=in;
q=stuff;

while(*p!='\0')
{
if(*p=='0')
{

P a g e | 11 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

*q=*p;
q++;
p++;
}
else
{
while(*p=='1' && count!=5)
{
count++;
*q=*p;
q++;
p++;
}

if(count==5)
{
*q='0';
q++;
}
count=0;
}
}
*q='\0';
printf("\nthe stuffed character string is");
printf("\n%s",stuff);

p=stuff;

P a g e | 12 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

q=destuff;
while(*p!='\0')
{
if(*p=='0')
{
*q=*p;
q++;
p++;
}
else
{
while(*p=='1' && count!=5)
{
count++;
*q=*p;
q++;
p++;
}
if(count==5)
{
p++;
}
count=0;
}
}
*q='\0';
printf("\nthedestuffed character string is");

P a g e | 13 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

printf("\n%s\n",destuff);
return 0;
}

OUTPUT:

RESULT:

P a g e | 14 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

4. ERROR DETECTION METHOD-EVEN AND ODD


PARITY AND CRC POLYNOMIALS

AIM: To implement error detection method-even and odd parity and CRC polynomials using
C language.

APPARATUS: PC with Windows OS & C-Language

THEORY:

A condition when the receiver’s information does not matches with the sender’s
information. During transmission, digital signals suffer from noise that can
introduce errors in the binary bits travelling from sender to receiver. That means a
0 bit may change to 1 or a 1 bit may change to 0. To avoid this, we use error-
detecting codes which are additional data added to a given digital message to help
us detect if any error has occurred during transmission of the message.
Basic approach used for error detection is the use of redundancy bits, where
additional bits are added to facilitate detection of errors. One of the most popular
technique for error detection is CRC(Cyclic Redundancy Check).

Cyclic redundancy check (CRC)

Unlike checksum scheme, which is based on addition, CRC is based on binary


division. In CRC, a sequence of redundant bits, called cyclic redundancy check
bits, are appended to the end of data unit so that the resulting data unit becomes
exactly divisible by a second, predetermined binary number. At the destination, the
incoming data unit is divided by the same number. If at this step there is no
remainder, the data unit is assumed to be correct and is therefore accepted. A
remainder indicates that the data unit has been damaged in transit and therefore
must be rejected.

P a g e | 15 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

PROCEDURE:

PROGRAM:

#include<stdio.h>
char text[100];
char key[100];
char rem[100];
void crc()
{
inti,j;
intkeylen,textlen;
char temp[100];
strcpy(temp,text);
keylen=strlen(key);
for(i=0;i<keylen-1;i++)
strcat(temp,"0");

P a g e | 16 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

textlen=strlen(temp);
strncpy(rem,temp,keylen);
while(i!=textlen)
{
if(rem[0]=='0')
{
strcpy(rem,&rem[1]);
rem[keylen-1]=temp[++i];
rem[keylen]='\0';
continue;
}
for(j=0;j<keylen;j++)
rem[j]=((rem[j]-'0')^(key[j]-'0'))+'0';
}
}
main()
{
int i;
int choice;
while(1)
{
printf("\n1.find crc\t2.check crc\t3.exit crc\nyour choice\t");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("Enter the input string\n");
scanf("%s",text);
printf("Enter the key\n");
scanf("%s",key);
crc();
printf("the transmitted message is %s\n",strcat(text,rem));
break;
case 2:
printf("Enter the input string\n");
scanf("%s",&text);
printf("Enter the key\n");
scanf("%s",key);
crc();
for(i=0;i<strlen(key)-1;i++)

P a g e | 17 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

if(rem[i]=='1')
break;
if(i==strlen(key)-1)
printf("There is no error in the message\n");
else
printf("There is error in the message\n");
break;
case 3:
exit(0);
}
}
}

OUTPUT:

RESULT:

P a g e | 18 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

5. UNRESTRICTED SIMPLEX PROTOCOL-DATA


LINK PROTOCOL

AIM: To implement a Data link protocol – Unrestricted Simplex protocol using C


language.

APPARATUS: PC with Windows OS & C-Language

THEORY:

Before learning the protocol, we must assume some facts like :


 Data is transmitted in only one direction.
 Both the network layers are always ready for transmitting and receiving.
 we will ignore the processing time and most of all the communication
channel between the data link layer will never damage or loose the frames.

This protocol consists of two procedures - sender and receiver. The sender sends
the data to the receiver and runs on the data link layer of the sender’s machine and
receiver receives the data from the sender and it runs on the data link layer of the
receiver’s machine. And here a frame arrival is used which sends the information
that an undamaged frame has arrived.

This is a very simple protocol in which the sender uses a while loop and it
continuously sends the data to the receiver. The initial work of the receiver is to
wait for the frame. as soon as it starts receiving the frame it set the event to frame
arrival or else event is set to wait for frame.

PROCEDURE:

PROGRAM:

#include<stdio.h>
#include<fcntl.h>
#include<string.h>

P a g e | 19 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

typedefstruct
{
intseqno;
intackno;
char data[50];
}frame;
voidfrom_network_layer(char buffer[])
{
printf("Enter Data : ");
scanf("%s",buffer);
}
voidto_physical_layer(int pid1,frame *f)
{
write(pid1,f,sizeof(frame));
}
voidfrom_physical_layer(int pid1,frame *f)
{
read(pid1,f,sizeof(frame));
}
voidto_network_layer(char buffer[])
{
printf("\n%s",buffer);
}
[ SENDER SIDE ]
#include<stdio.h>
#include<fcntl.h>
#include<string.h>

P a g e | 20 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

#include "header.h"
void main()
{
int pid1,i,no;
char buffer[50];
frame f;
system(">pipe1");
pid1=open("pipe1",O_WRONLY);
printf("Enter NUMBER OF DATA : ");
scanf("%d",&no);
write(pid1,&no,sizeof(no));
for(i=0;i<no;i++)
{
from_network_layer(buffer);
strcpy(f.data,buffer);
to_physical_layer(pid1,&f);
}
close(pid1);
}
[ RECEIVER SIDE ]

#include<stdio.h>
#include<fcntl.h>
#include<string.h>
#include "header.h"
void main()

P a g e | 21 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

{
int pid1,no,i;
char buffer[50];
frame f;
pid1=open("pipe1",O_RDONLY);
read(pid1,&no,sizeof(no));
printf("DATA RECEIVED : %d",no);
printf("\nDATA");
for(i=0;i<no;i++)
{
from_physical_layer(pid1,&f);
strcpy(buffer,f.data);
to_network_layer(buffer);
}
close(pid1);
unlink("pipe1");
}

OUTPUT:

RESULT:

P a g e | 22 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

6. STOP AND WAIT PROTOCOL-DATA LINK


PROTOCOL

AIM: To implement a Data link protocol – Stop and Wait protocol using C
language.

APPARATUS: PC with Windows OS & C-Language

THEORY:

In this method of flow control, the sender sends a single frame to receiver & waits
for an acknowledgment. The next frame is sent by sender only when
acknowledgment of previous frame is received. This process of sending a frame &
waiting for an acknowledgment continues as long as the sender has data to
send. To end up the transmission sender transmits end of transmission (EOT)
frame. The main advantage of stop & wait protocol is its accuracy. Next frame is
transmitted only when the first frame is acknowledged. So there is no chance of
frame being lost. The main disadvantage of this method is that it is inefficient. It
makes the transmission process slow. In this method single frame travels from
source to destination and single acknowledgment travels from destination to
source. As a result each frame sent and received uses the entire time needed to
traverse the link. Moreover, if two devices are distance apart, a lot of time is
wasted waiting for ACKs that leads to increase in total transmission time.

P a g e | 23 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

PROCEDURE:

PROGRAM:

[ SENDER SIDE ]

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int i, n, ch;
char input[20];
FILE *in;
randomize();
printf(“\n\t\t Stop and Wait Protocol \n”);
printf(“\n 1. Send \n2. Check ACK\n3.EOT\n”);
while(1)
{
printf(“Enter your choice….”);
scanf(“%d”, &ch);
switch(ch)
{
case 1:
in = fopen(“data.txt”, “w”);
printf(“Enter the Data: “);
scanf(“%s”, input);
n = strlen(input);

P a g e | 24 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

for(i=0; i<n+1; i++)


fprintf(in, “%s”, input);
fclose(in);
printf(“——->Data Sent\n”);
break;
getch();
}
}
}

[ RECEIVER SIDE ]

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int i, n,one;
char output[20];
FILE *out;
clrscr();
out=fopen(“data_parity.txt”, “r”);
fscanf(out, “%s”, output);
n = strlen(output);
for(i=0; i<n; i++)
if(output[i]==’1’)

P a g e | 25 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

one++;
if(one%2==0)
{
printf(“Received Data has Even Parity\n”);
printf(“Data Accepted\n”);
}
else
{
printf(“Received Data has Odd Parity\n”);
printf(“Data Rejected\n”);
}
printf(“Received Data: “);
for(i=0;i<n-1; i++)
printf(“%c”, output[i];
fclose(out);
getch();
}

OUTPUT:

RESULT:

P a g e | 26 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

7. ROUTING ALGORITHM-DJKSTRA’S ALGORITHM

AIM: To implement a Routing algorithm – Djkstra’s algorithm using C language


for the following graph.

APPARATUS: PC with Windows OS & C-Language

THEORY:

Dijkstra’s algorithm is very similar to Prim’s algorithm for minimum spanning


tree. Like Prim’s MST, we generate a SPT (shortest path tree) with given source as
root. We maintain two sets, one set contains vertices included in shortest path tree,
other set includes vertices not yet included in shortest path tree. At every step of
the algorithm, we find a vertex which is in the other set (set of not yet included)
and has a minimum distance from the source.
Below are the detailed steps used in Dijkstra’s algorithm to find the shortest path
from a single source vertex to all other vertices in the given graph.
Algorithm

1) Create a set sptSet (shortest path tree set) that keeps track of vertices included in
shortest path tree, i.e., whose minimum distance from source is calculated and
finalized. Initially, this set is empty.

2) Assign a distance value to all vertices in the input graph. Initialize all distance
values as INFINITE. Assign distance value as 0 for the source vertex so that it is
picked first.

3) While sptSet doesn’t include all vertices

P a g e | 27 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

….a) Pick a vertex u which is not there in sptSet and has minimum distance value.
….b) Include u to sptSet.
….c) Update distance value of all adjacent vertices of u. To update the distance
values, iterate through all adjacent vertices. For every adjacent vertex v, if sum of
distance value of u (from source) and weight of edge u-v, is less than the distance
value of v, then update the distance value of v.

PROCEDURE:

PROGRAM:

#include<stdio.h>
#include<conio.h>
#define INFINITY 9999
#define MAX 10

voiddijkstra(int G[MAX][MAX],intn,intstartnode);

int main()
{
int G[MAX][MAX],i,j,n,u;
printf("Enter no. of vertices:");
scanf("%d",&n);
printf("\nEnter the adjacency matrix:\n");
for(i=0;i<n;i++)
for(j=0;j<n;j++)
scanf("%d",&G[i][j]);
printf("\nEnter the starting node:");
scanf("%d",&u);

P a g e | 28 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

dijkstra(G,n,u);
return 0;
}

voiddijkstra(int G[MAX][MAX],intn,intstartnode)
{

int cost[MAX][MAX],distance[MAX],pred[MAX];
int visited[MAX],count,mindistance,nextnode,i,j;
//pred[] stores the predecessor of each node
//count gives the number of nodes seen so far
//create the cost matrix
for(i=0;i<n;i++)
for(j=0;j<n;j++)
if(G[i][j]==0)
cost[i][j]=INFINITY;
else
cost[i][j]=G[i][j];
//initialize pred[],distance[] and visited[]
for(i=0;i<n;i++)
{
distance[i]=cost[startnode][i];
pred[i]=startnode;
visited[i]=0;
}
distance[startnode]=0;
visited[startnode]=1;

P a g e | 29 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

count=1;
while(count<n-1)
{
mindistance=INFINITY;
//nextnode gives the node at minimum distance
for(i=0;i<n;i++)
if(distance[i]<mindistance&&!visited[i])
{
mindistance=distance[i];
nextnode=i;
}
//check if a better path exists through nextnode
visited[nextnode]=1;
for(i=0;i<n;i++)
if(!visited[i])
if(mindistance+cost[nextnode][i]<distance[i])
{
distance[i]=mindistance+cost[nextnode][i];
pred[i]=nextnode;
}
count++;
}

//print the path and distance of each node


for(i=0;i<n;i++)
if(i!=startnode)
{

P a g e | 30 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

printf("\nDistance of node%d=%d",i,distance[i]);
printf("\nPath=%d",i);
j=i;
do
{
j=pred[j];
printf("<-%d",j);
}while(j!=startnode);
}
}

OUTPUT:

RESULT:

P a g e | 31 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

8. DESIGN OF CLIENT SERVER APPLICATION FOR


FILE TRANSFER
AIM: To implement a Data link protocol – Stop and Wait protocol using C
language.

APPARATUS: PC with Windows OS & C-Language

THEORY:

An application that runs on the client side and accesses the


remote server for information is called a client/server application whereas an
application that runs entirely on a web browser is known as a web application. The
client server always makes requests to the remote server to get some information.
The user interaction with the server is always through a user interface or
application on the client side. The user interaction in a web application is through a
web browser. A client server application can be platform specific as well as cross
platform depending on the programming language used. A web application is
platform independent because they require only a web browser. The cross platform
language makes an application look native to the platform or the
operation system of the client.
The client/server application is always installed on the client’s computer unlike a
web application. Web applications can run on the browsers directly and hence do
not require any installation. A client server application uses a two-tier architecture
whereas a web application uses multi-tier architecture which consists of; user
client, middle tier, and application server. A web application uses a single-user
system unlike a client server application which uses two users: client and server.
A web application is hosted in a browser-controlled environment, or it is often
programmed in a language that supports the browser. JavaScript is the most widely
used browser-supported language. In client/server applications, the server machine
is a host that runs single or multiple-server programs sharing their resources with
clients. A client always requests from a server information or content without
sharing any of its resources.
In a client/server application, it is difficult to test scripting errors whereas in web
applications it is easy to test scripting errors. Specific types of clients used in a
client/server model are web browsers, email clients, and online chat clients. The
types of servers used are: web servers, ftp servers, application servers, data base
servers, name servers, file servers, mail servers, terminal and print servers.

P a g e | 32 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

In a client/server model, the server often gets overloaded as the number of


simultaneous client requests increases. In a web application, this problem is ruled
out as a compatible web browser is all that is needed to get the web application
working. Some of the examples of web applications include: Yahoo mail, Gmail,
WebOffice, Google Apps, Microsoft Office Live, WebEx, etc.

PROCEDURE:
On the host computer

On the host computer, follow these steps to share the Internet connection:
1. Log on to the host computer as Administrator or as Owner.
2. Click Start, and then click Control Panel.
3. Click Network and Internet Connections.
4. Click Network Connections.
5. Right-click the connection that you use to connect to the Internet. For
example, if you connect to the Internet by using a modem, right-click
the connection that you want under Dial-up / other network available.
6. Click Properties.
7. Click the Advanced tab.
8. Under Internet Connection Sharing, select the Allow other network
users to connect through this computer's Internet connection check box.
9. If you are sharing a dial-up Internet connection, select the Establish a
dial-up connection whenever a computer on my network attempts to
access the Internet check box if you want to permit your computer to
automatically connect to the Internet.
10. Click OK. You receive the following message:
When Internet Connection Sharing is enabled, your LAN adapter
will be set to use IP address 192.168.0.1. Your computer may lose
connectivity with other computers on your network. If these other
computers have static IP addresses, it is a good idea to set them to
obtain their IP addresses automatically. Are you sure you want to
enable Internet Connection Sharing?
11. Click Yes.
The connection to the Internet is shared to other computers on the
local area network (LAN). The network adapter that is connected to the

P a g e | 33 COMPUTER NETWORKS LAB


VFSTR UNIVERSITY DEPT OF ECE

LAN is configured with a static IP address of 192.168.0.1 and a subnet


mask of 255.255.255.0

On the client computer

To connect to the Internet by using the shared connection, you must


confirm the LAN adapter IP configuration, and then configure the client
computer. To confirm the LAN adapter IP configuration, follow these
steps:
1. Log on to the client computer as Administrator or as Owner.
2. Click Start, and then click Control Panel.

3. Click Network and Internet Connections.


4. Click Network Connections.
5. Right-click Local Area Connection and then click Properties.
6. Click the General tab, click Internet Protocol (TCP/IP) in the
connection uses the following items list, and then click Properties.
7. In the Internet Protocol (TCP/IP) Properties dialog box, click Obtain
an IP address automatically (if it is not already selected), and then click
OK.
Note: You can also assign a unique static IP address in the range of
192.168.0.2 to 192.168.0.254. For example, you can assign the
following static IP address, subnet mask, and default gateway:
8. IP Address 192.168.31.202
9. Subnet mask 255.255.255.0
10. Default gateway 192.168.31.1
11. In the Local Area connection properties dialog box, click OK.
12. Quit Control Panel.

RESULT:

P a g e | 34 COMPUTER NETWORKS LAB

Potrebbero piacerti anche