Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

COMPUTER NETWORKS

(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

1


Practical : - 1

AIM :- To study different types of computer network, network topology and
network device.

Computer Network :-
A computer network is a group of computer systems
and other computing hardware devices that are linked together through
communication channels to facilitate communication and resource-sharing among
a wide range of users. Networks are commonly categorized based on their
characteristics.
Types of Computer network :-
Depending upon the geographical area covered by a network, it is classified
as:
Local Area Network (LAN)
Metropolitan Area Network (MAN)
Wide Area Network (WAN)

Local Area Network (LAN) :-
A local area network (LAN) is a computer network within a small
geographical area such as a home, school, computer laboratory, office building or
group of buildings.
Is limited in size, typically spanning a few hundred meters, and no more than a mile.
Is fast, with speeds from 10 Mbps to 10 Gbps.
Requires little wiring, typically a single cable connecting to each device.
Has lower cost compared to MANs or WANs.

COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

2

Advantages of LAN :-
Speed
Cost
Security
E-mail
Resource Sharing
Disadvantages of LAN:-
Expensive To Install
Requires Administrative Time
File Server May Fail
Cables May Break
Metropolitan Area Network (MAN):-
A metropolitan area network (MAN) is similar to a local area network (LAN)
but spans an entire city or campus. MANs are formed by connecting multiple LANs.
Thus, MANs are larger than LANs but smaller than wide area networks (WAN).
MANs are extremely efficient and provide fast communication via high-speed
carriers, such as fibre optic cables.


Wide Area Network (WAN):-

A wide area network (WAN) is a network that exists over a large-scale
geographical area. A WAN connects different smaller networks, including local
area networks (LAN) and metro area networks (MAN). This ensures that
computers and users in one location can communicate with computers and users in
other locations. WAN implementation can be done either with the help of the
public transmission system or a private network.
COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

3

A WAN works in a similar fashion to a LAN, just on a larger scale. Typically,
TCP/IP is the protocol used for a WAN in combination with devices such as
routers, switches, firewalls and modems.


Networking Topology :-
Network topology is the interconnected pattern of network elements. A
network topology may be physical, mapping hardware configuration, or logical,
mapping the path that the data must take in order to travel around the network.
There are basic types of physical topology :-

Bus (point-to-multipoint) topology
Star topology
Ring topology
Tree topology
Mesh topology

BUS Topology :-
Bus topology is a specific kind of network topology in which all of the
various devices in the network are connected to a single cable or line. In general,
the term refers to how various devices are set up in a network.

COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

4

Star Topology :-
Star topology is a network topology where each individual piece of a
network is attached to a central node (often called a hub or switch). The attachment of
these network pieces to the central component is visually represented in a form similar
to a star.


Ring Topology :-
Ring topology refers to a specific kind of network setup in which
devices are connected in a ring and pass information to or from each other
according to their adjacent proximity in the ring structure. This type of topology is
highly efficient and handles heavier loads better than bus topology.

COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

5

Tree Topology :-
A tree topology is a type of network topology that includes at least
three specific levels in a topology hierarchy. Tree topologies are valued for their
scalability and accessibility for troubleshooting.


Mesh Topology :-
A mesh network is a local area network (LAN) that employs one of
two connection arrangements, full mesh topology or partial mesh topology. In the
full mesh topology, each node (workstation or other device) is connected directly
to each of the others. In the partial mesh topology, some nodes are connected to
all the others, but some of the nodes are connected only to those other nodes with
which they exchange the most data.


COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

6

Network Devices :-

Network devices are components used to connect computers or other electronic
devices together so that they can share files or resources like printers or fax machines.
Devices used to setup a Local Area Network (LAN) are the most common type of
network devices used by the public. A LAN requires a hub, router, cabling or radio
technology, network cards, and if online access is desired, a high-speed modem.
Happily this is much less complicated than it might sound to someone new to
networking.

List of Network Devices:-

Workstation and Server
Hub Device
Switch Device
Bridge Device
Router Device
Brouter Device
Gateway Device

Workstation and server:-

"Workstation" - This is a computer that is directly used by someone
to do work (or have fun). A workstation often acts as a server when file or printer
sharing is enabled. Workstations usually run Windows 95, 98, ME, NT Workstation,
2000 Professional, or XP, Mac OS, and rarely Linux (NOT Windows NT Server,
Windows 2000 Server, Unix, or Novel).

"Server" - A computer that is sharing something with (serving)
another computer it is networked to, like access to a document, a program, the
Internet or a printer. To see other things that can be shared, go to the next section,
What Can Servers Do?


COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

7

HUB Device :-

A hub is a small Network Device. A hub joins multiple computers (or other
network devices) together to form a single network segment. On this network
segment, all computers can communicate directly with each other. Ethernet hubs are
by far the most common type, but hubs for other types of networks such as USB also
exist.


A hub includes a series of ports that each accept a network cable, one port is reserved
for "uplink" connections to another hub or similar device.

Types of Hub :-
Passive Hub
Active Hub
Intelligent Hub

Switch Devices :-
Network Switch is a small hardware device that joins multiple computers
together within one local area network (LAN).

Network Switches operate at layer two (Data Link Layer) of the OSI model .
Network switches appear nearly identical to network hubs, but a switch generally
contains more intelligence (and a slightly higher price tag) than a hub.
Unlike hubs, Switches are capable of inspecting data packets as they are received,
determining the source and destination device of each packet, and forwarding them
appropriately.
By delivering messages only to the connected device intended.
Switch supports different bandwidth either 10/100 Mbps Fast Ethernet or Gigabit
Ethernet (10/100/1000) standards.




COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

8

Types of Switches by Forms :-

Rack Mounted Switches.
Chassis Switches.
Catalyst Switches.
DIN Rail Switches.

Bridge Device :-

A Network Bridge reads the outermost section of data on the data
packet, to tell where the message is going.only the outermost hardware address
of the packet.

It reduces the traffic on other network segments, since it does not send all
packets.
Bridges can be programmed to reject packets from particular networks.
Bridge cannot read IP addresses.
Bridge can read the Ethernet data which gives the hardware address of the
destination address.
Bridges forward all broadcast messages.

Router Devices :-

A Network Router is a network device with interfaces in multiple
networks whose task is to copy packets from one network to another. Router
gives path to data packet to destination. Routers provide connectivity inside
enterprises, between enterprises and the Internet, and within an Internet
Service Provider (ISP).


COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

9

Types of Router :-

Wired Router
Wireless Router

Brouter Device :-

A Network brouter is a network bridge and a router combined in a single
product. A bridge is a device that connects one local area network (LAN) to another
local area network that uses the same protocol (for example, Ethernet or token ring).


Gateway Device:-
A network gateway is an internetworking system capable of joining
together two networks that use different base protocols. A network gateway can be
implemented completely in software, completely in hardware, or as a combination
of both. Depending on the types of protocols they support, network gateways can
operate at any level of the OSI model.
Because a network gateway, by definition, appears at the edge of a network, related
capabilities like firewalls tend to be integrated with it. On home networks, a
broadband router typically serves as the network gateway although ordinary
computers can also be configured to perform equivalent functions.


COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

10


Practical: - 2
Aim:- Study of error detection and implement parity checking
algorithm using c.
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int a,count=0,p;
char b[30];
clrscr();
printf("\n ENTER THE DATA:-");
scanf("%s",&b);
printf("\n CHOOES THE PARITY:-\n 0 FOR EVEN:-\n 1 FOER ODD:-\n");
scanf("%d",&p);
for(a=0;a<strlen(b);a++);
{
if(b[a]=='1')
count++;
}
if(p==0 && count%2==0)
printf("\n NO ERROR DETECTED:\n");
else if(p==1 && count%2==1)
printf("\n NO ERROR DETECTED:\n");
else
COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

11

printf("\n ERROR ARE DETECTED:\n");
getch();
}

Out Put:-












COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

12



Practical: - 3
Aim:- Implemnet CRC algorithm using c.

#include <stdio.h>
#include <conio.h>
#include <string.h>
void main()
{
int a,b,keylen,msglen;
char input[100], key[30],temp[30],quot[100],rem[30],key1[30];
clrscr();

printf("Enter Data: ");
gets(input);

printf("Enter Key: ");
gets(key);

keylen=strlen(key);
msglen=strlen(input);

strcpy(key1,key);
for(a=0;a<keylen-1;a++)
COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

13

{
input[msglen+a]='0';
}
for(a=0;a<keylen;a++)
temp[a]=input[a];
for(a=0;a<msglen;a++)
{
quot[a]=temp[0];
if(quot[a]=='0')

for(b=0;b<keylen;b++)
key[b]='0';
else

for(b=0;b<keylen;b++)
key[b]=key1[b];

for(b=keylen-1;b>0;b--)
{
if(temp[b]==key[b])
rem[b-1]='0';
else

rem[b-1]='1';
}

rem[keylen-1]=input[a+keylen];
COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

14

strcpy(temp,rem);
}
strcpy(rem,temp);
printf("\nQuotient is ");

for(a=0;a<msglen;a++)
printf("%c",quot[a]);

printf("\nRemainder is ");
for(a=0;a<keylen-1;a++)

printf("%c",rem[a]);
printf("\nFinal data is: ");

for(a=0;a<msglen;a++)
printf("%c",input[a]);
for(a=0;a<keylen-1;a++)
printf("%c",rem[a]);
getch();
}
OUTPUT:-

COMPUTER NETWORKS
(PrasadSiddharth.121100107007)
5
th
Sem Computer Engineering)

15

You might also like