You are on page 1of 19

CN(3150710) ER-NO:191100107026

COMPUTER ENGINEERING DEPARTMENT

CERTIFICATE

This is to certify that Ms. Henee Nareshbhai Patel, Enrollment No.


191100107026 of Second Year B.E., Semester III Branch computer, has satisfactorily
completed his/her term work in course of data structure for Computer Engineering
(3130702) for the academic year 2020 - 2021.

Date of Submission: 28/12/2020.

Signature of Faculty Signature of HOD


INDEX

Sr.No. Experiment Date Sign.

1 Study of different network devices in detail.

2 Study of different types of network cables and practically


implement the cross-wired cable and straight through
cable using clamping tool.

3 Study of basic network command and Network


configuration commands.

4 Implement different LAN topologies using Network


Simulator.
5 Implement the concept of VLAN using Network
Simulator.
6 Implement the concept of static routing.

7 Implement the concept of dynamic routing (RIP, OSPF,


BGP).
8 Packet capture and header analysis by wire-shark
(TCP,UDP,IP)

2
EXPERIMENT-1
Aim:Study of different network devices in detail.
• Switch
• Bridge
• Repeater  Router
• Gateway

Apparatus : no software or hardware needed.


Procedure : following should be done to understand this practical.
 Switch
A switch is a multiport bridge with a buffer and a design that can boost its efficiency(a
large number of ports imply less traffic) and performance. A switch is a data link layer
device. The switch can perform error checking before forwarding data, which makes it
very efficient as it does not forward packets that have errors and forward good packets
selectively to the correct port only. In other words, the switch divides the collision
domain of hosts, but broadcast domain remains the same.

 Bridge
A bridge operates at the data link layer. A bridge is a repeater, with add on the
functionality of filtering content by reading the MAC addresses of source and destination.
It is also used for interconnecting two LANs working on the same protocol. It has a single
input and single output port, thus making it a 2 port device.
Types of Bridges

• Transparent Bridges:- These are the bridge in which the stations are
completely unaware of the bridge’s existence i.e. whether or not a bridge is
added or deleted from the network, reconfiguration of the stations is
unnecessary. These bridges make use of two processes i.e. bridge forwarding
and bridge learning.
• Source Routing Bridges:- In these bridges, routing operation is performed by
the source station and the frame specifies which route to follow. The host can
discover the frame by sending a special frame called the discovery frame,
which spreads through the entire network using all possible paths to the
destination.
 Repeater
A repeater operates at the physical layer. Its job is to regenerate the signal over the
same network before the signal becomes too weak or corrupted so as to extend the
length to which the signal can be transmitted over the same network. An important
point to be noted about repeaters is that they do not amplify the signal. When the signal
becomes weak, they copy the signal bit by bit and regenerate it at the original strength.
It is a 2 port device.

 Router
A router is a device like a switch that routes data packets based on their IP addresses.
The router is mainly a Network Layer device. Routers normally connect LANs and
WANs together and have a dynamically updating routing table based on which they
make decisions on routing the data packets. Router divide broadcast domains of hosts
connected through it.

 Gateway
A gateway, as the name suggests, is a passage to connect two networks together that
may work upon different networking models. They basically work as the messenger
agents that take data from one system, interpret it, and transfer it to another system.
Gateways are also called protocol converters and can operate at any network layer.
Gateways are generally more complex than switches or routers. Gateway is also called a
protocol converter.

4
EXPERIMENT-2
AIM: Study Of Different Types Of Network Cables And Practically
Implement The Cross-Wired Cable And Straight Through Cable
Using Clamping Tool.
Apparatus : RJ-45 connector, Climping Tool, Twisted pair Cable
Procedure : To do these practical following steps should be done
1.Start by stripping off about 2 inches of the plastic jacket off the end of the cable. Be
very careful at this point, as to not nick or cut into the wires, which are inside. Doing so
could alter the characteristics of your cable, or even worse render is useless. Check the
wires, one more time for nicks or cuts. If there are any, just whack the whole end off,
and start over.
2.Spread the wires apart, but be sure to hold onto the base of the jacket with your other
hand. You do not want the wires to become untwisted down inside the jacket. Category
5 cable must only have 1/2 of an inch of 'untwisted' wire at the end; otherwise it will be
'out of spec'. At this point, you obviously have ALOT more than 1/2 of an inch of un-
twisted wire.
3.You have 2 end jacks, which must be installed on your cable. If you are using a pre-
made cable, with one of the ends whacked off, you only have one end to install - the
crossed over end. Below are two diagrams, which show how you need to arrange the
cables for each type of cable end. Decide at this point which end you are making and
examine the associated picture below.  Diagram shows you how to prepare straight
through wired connection Green-White Green Orange-White Blue Blue-White Orange
Brown-White Brown
 Diagram shows you how to prepare straight through wired connection
 Diagram shows you how to prepare Cross wired connection

 Ethernet Cable Tips :


• A straight-thru cable has identical ends.

• A crossover cable has different ends.

• A straight-thru is used as a patch cord in Ethernet connections.

6
• A crossover is used to connect two Ethernet devices without a hub or for connecting
two hubs.
• A crossover has one end with the Orange set of wires switched with the Green set.

• Odd numbered pins are always striped; even numbered pins are always solid coloured.

• Looking at the RJ-45 with the clip facing away from you, Brown is always on the
right, and pin 1 is on the left.
• No more than 1/2" of the Ethernet cable should be untwisted otherwise it will be
susceptible to crosstalk.
• Do not deform, do not bend, do not stretch, do not staple, do not run parallel with
power cables, and do not run Ethernet cables near noise inducing components.
EXPERIMENT-3
AIM- Study of basic network command and Network configuration
commands.
Apparatus : command prompt(software)
Procedure : all commands related to network configuration which includes how to
switch to privilege mode and normal mode and how to configure router interface and
how to save this configuration to flash memory pr permanent memory.
This commands includes:
• Configuring the router commands
• General commands to configure network
• Privileged processes & statistics
• IP commands
• Other IP commands e.g show ip route etc.

1. Ping
Ping is used to testing a network host capacity to interact with another host. Just
enter the command Ping, followed by the target host’s name or IP address. The ping
utilities seem to be the most common network tool. This is performed by using the
Internet Control Message Protocol, which allows the echo packet to be sent to the
destination host and a listening mechanism. If the destination host reply to the
requesting host, that means the host is reachable. This utility usually gives a basic
image of where there may be a specific networking issue,
For Example : If an Internet connection is not in the office, for instance, the ping
utility is used to determine if the problem exists in the office or the Internet
provider’s network. The following shows an image of how ping tools to obtain the
locally connected router’s connectivity status.

8
There are various options a user can use with the Ping command.
Options are as follows-
• Target : This is the destination IP address or a hostname user want to ping.
• -a : This option resolves the hostname of an IP address target.
• -t : This ping command option will ping the target until you stop it by
pressing Ctrl-C.

10
• -n count : This option is used to set the number of ICMP Echo Requests to
send, from 1 to 4294967295. If -n is not specified, the ping command will
return 4 by default.

• -l size : This option is used to set the size, in bytes, of the echo-request packet
from 32 to 65,527. If the -l option is not specified, the ping command will
send a 32-byte echo request.
• -s count : This option is used to report the time in the Internet Timestamp
format that each echo request is received and an echo reply is sent. The
maximum count value is 4, i.e. only the first four hops can be time stamped.
• -r count : This command uses the ping command option to specify the
number of hops between the source computer and the target computer. The
maximum count value is 9; the Tracert command can also be used if the user
wants to view all the hops between two devices.
• -I TTL : This ping command option sets the Time to Live (TTL) value; the
maximum value is 255.
• -f : Use this ping command option to prevent ICMP Echo Requests from
being fragmented by routers between the source and the target. The -f option
is often used to troubleshoot Path Maximum Transmission Unit (PMTU)
issues.

• -w timeout : A timeout value must be specified while executing this ping


command. It adjusts the amount of time in milliseconds. If the -w option is
not specified, then the default timeout value of 4000 is set, which is 4
seconds.
• -p : To ping a Hyper-V Network Virtualization provider address.
• -s srcaddr : This option is used to specify the source address.

12
2. Tracert
The tracert command is a Command Prompt command which is used to get the
network packet being sent and received and the number of hops required for that
packet to reach to target. This command can also be referred to as a traceroute. It
provides several details about the path that a packet takes from the source to the
specified destination. The tracert command is available for the Command Prompt in
all Windows operating systems.

There are various options the user can use with tracert command.

Options for tracert Command are as follows-

• target: This is the destination, either an IP address or hostname.


• –d: This option prevents Tracert from resolving IP addresses to hostnames to get
faster results.
• -h MaxHops: This Tracert option specifies the maximum number of hops in the
search for the target. If the MaxHops option is not specified the target has not
been found by 30 hops, then the tracert command will stop looking.
• -w timeout: A timeout value must be specified while executing this ping
command. It adjusts the amount of time in milliseconds.

3. Nslookup
The Nslookup, which stands for name server lookup command, is a network utility
command used to obtain information about internet servers. It provides name server
information for the DNS (Domain Name System), i.e. the default DNS server’s
name and IP Address.

14
4. IP config
The command IP config will display basic details about the device’s IP address
configuration. Just type IP config in the Windows prompt and the IP, subnet mask
and default gateway that the current device will be presented. If you have to see full
information, then type on command prompt config-all and then you will see full
information. There are also choices to assist you in resolving DNS and DHCP issues.
16
5. arp
arp command manipulates the System’s ARP cache. It also allows a complete dump
of the ARP cache. ARP stands for Address Resolution Protocol. The primary
function of this protocol is to resolve the IP address of a system to its mac address,
and hence it works between level 2(Data link layer) and level 3(Network layer).
EXPERIMENT-4

AIM:Implementation Of Checksum And CRC


Checksum and CRC are schemes for detecting the errors of data which occur during
transmission or storage. The data computed and appended to original data in order to
detect errors are also referred as checksum and CRC.
A checksum consists of a fixed number of bits computed as a function of the data to
be protected, and is appended to the data. To detect errors, the function is recomputed,
and the result is compared to that appended to the data. Simple implementation of
checksum is to divide the data into same length bits chunk and to make exclusive-or of
all chunks. Cyclic redundancy check mechanism exploits mathematical properties of
cyclic codes. Specifically, CRC uses polynomial devisor circuits with a given generator
polynomial so as to obtain the remainder polynomial. The remainder is similarly
appended to the original data for transmission and storage, and then utilized for error
detection. CRC can be used as a kind of checksum.

#include<stdio.h>
#include<conio.h>
#include<math.h>

int sender(int b[10],int k)


{
int checksum,sum=0,i;
printf("\n****SENDER****\n");

for(i=0;i<k;i++)
sum+=b[i];
printf("SUM IS: %d",sum);

checksum=~sum;
printf("\nSENDER's CHECKSUM IS:%d",checksum);
return checksum;
}

int receiver(int c[10],int k,int scheck)


{
int checksum,sum=0,i;
printf("\n\n****RECEIVER****\n");
for(i=0;i<k;i++)
sum+=c[i];
printf(" RECEIVER SUM IS:%d",sum);
sum=sum+scheck;
checksum=~sum;
printf("\nRECEIVER's CHECKSUM IS:%d",checksum);
return checksum;
18
}
main()
{
int a[10],i,m,scheck,rcheck;
clrscr();
printf("\nENTER SIZE OF THE STRING:");
scanf("%d",&m);
printf("\nENTER THE ELEMENTS OF THE ARRAY:");
for(i=0;i<m;i++)
scanf("%d",&a[i]);
scheck=sender(a,m);
rcheck=receiver(a,m,scheck);
if(rcheck==0)
printf("\n\nNO ERROR IN TRANSMISSION\n\n");
else
printf("\n\nERROR DETECTED");
getch();
}

You might also like