CN Exp 4,5,6,7

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

EXPERIMENT 4

OBJECTIVE: Implementation of Basic Networking Commands such as IPConfig,


IPConfig/All, NS Lookup, Ping, tracert.
THEORY:

Ipconfig: 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.
Ipconfig/all: To show all information about your network adapter.
Ping: Ping is used to testing a network host capacity to interact with another host.
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
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.

Implementation: Nslookup:

Ipconfig:
Ping:
Ipconfig/all:
Tracert:

EXPERIMENT 5:
OBJECTIVE: Implementation of CRC For Error Detection
Theory: The Cyclic Redundancy Checks (CRC) is the most powerful method for Error-
Detection and Correction. It is given as a kbit message and the transmitter creates an (n – k) bit
sequence called frame check sequence. The out coming frame, including n bits, is precisely
divisible by some fixed number. Modulo 2 Arithmetic is used in this binary addition with no
carries, just like the XOR operation.
Redundancy means duplicity. The redundancy bits used by CRC are changed by splitting the
data unit by a fixed divisor. The remainder is CRC
Program:
#include
char text[100]; char key[100]; char rem[100];
void crc()
{
int i,j;
int keylen,textlen;
char temp[100];
strcpy(temp,text);
keylen=strlen(key);
for(i=0;i<keylen-1;i++)
strcat(temp,"0");
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++)
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);
}
}
} </strlen(key)-1;i++) </keylen;j++) </keylen-1;i++)
Output:
1.find crc 2.check crc 3.exit crc
your choice 1
Enter the input string
110111
Enter the key
111
the transmitted message is 11011111
EXPERIMENT 6
OBJECTIVE: Study of Network IP addresses (Class A,B,C,D,E).
THEORY:

An IP address is a unique address that identifies a device on the internet or a local network. IP
stands for "Internet Protocol," which is the set of rules governing the format of data sent via the
internet or local network.
Procedure:
Following is required to be study under this practical.
• Classification of IP address
As show in figure we teach how the ip addresses are classified and when they are used.

• Sub netting Why we Develop sub netting and How to calculate subnet mask and how to
identify subnet address
• Super netting Why we develop super netting and How to calculate supernet mask and how to
identify supernet address.

EXPERIMENT 7
OBJECTIVE: Configure a series of computers to Connect them in Local Area Network.
Procedure:
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 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 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.

____________________________

You might also like