CC LAB Week_1 to week _5
CC LAB Week_1 to week _5
Aim: Study of different types of Network cables and Practically implement the cross -wired cable
and straight through cable using clamping tool.
Apparatus(Components):RJ-45connector,ClimpingTool,TwistedpairCable
This experiment explains the types of network cables used in computer networks in
detail.
Learn the specifications, standards, and features of the coaxial cable, twisted-pair
cable, and the fiber-optical cable.
Coaxial cable
Coaxial cable This cable contains a conductor, insulator, braiding, and sheath. The
sheath covers the braiding, braiding covers the insulation, and the insulation covers the
conductor.
Sheath
This is the outer layer of the coaxial cable. It protects the cable from physical damage.
Braided shield
This shield protects signals from external interference and noise. This shield is built from
the same metal that is used to build the core.
Insulation
Insulation protects the core. It also keeps the core separate from the braided shield. Since
both the core and the braided shield use the same metal, without this layer, they will
touch each other and create a short-circuit in the wire.
Conductor
The conductor carries electromagnetic signals. Based on conductor a coaxial cable can
be categorized into two types; single-core coaxial cable and multi-core coaxial cable.
A single-core coaxial cable uses a single central metal (usually copper) conductor, while
a multi-core coaxial cable uses multiple thin strands of metal wires. The following
image shows both types of cable.
Twisted-pair cables
The twisted-pair cable was primarily developed for computer networks. This cable is
also known as Ethernet cable. Almost all modern LAN computer networks use this
cable.
This cable consists of color-coded pairs of insulated copper wires. Every two wires are
twisted around each other to form pair. Usually, there are four pairs. Each pair has one
solid color and one stripped color wire. Solid colors are blue, brown, green, and orange.
In stripped color, the solid color is mixed with the white color.
Based on how pairs are stripped in the plastic sheath, there are two types of twisted-pair
cable; UTP and STP.
In the UTP (Unshielded twisted-pair) cable, all pairs are wrapped in a single plastic
sheath.
In the STP (Shielded twisted-pair) cable, each pair is wrapped with an additional metal
shield, then all pairs are wrapped in a single outer plastic sheath.
• Both STP and UTP can transmit data at 10Mbps, 100Mbps, 1Gbps, and 10Gbps.
• Since the STP cable contains more materials, it is more expensive than the UTP cable.
• Both cables use the same RJ-45 (registered jack) modular connectors.
• Both cables can accommodate a maximum of 1024 nodes in each segment.
• The STP provides more noise and EMI resistance than the UTP cable.
• The maximum segment length for both cables is 100 meters or 328 feet.
• Cat 1, 2, 3, 4, 5 are outdated and not used in any modern LAN network.
• Cat 7 is still a new technology and not commonly used.
• Cat 5e, 6, 6a are the commonly used twisted-pair cables.
Fiber optic cable is completely immune to EMI and RFI. This cable can transmit data
over a long distance at the highest speed. It can transmit data up to 40 kilometers at the
speed of 100Gbps.
Fiber optic uses light to send data. It reflects light from one endpoint to another. Based
on how many beams of light are transmitted at a given time, there are two types of fiber
optical cable; SMF and MMF.
UTP cable
A UTP cable contains 8 wires. These wires are grouped in four pairs. Each pair consists
of two twisted wires. The first wire has a single color-coded plastic coating while the
other wire has that color plus white color striped plastic coating. For example, for the
brown wire pair, one wire’s coating is all brown, while the other wire’s coating is brown-
and-white striped.
1. Blue Pair
2. Orange Pair
3. Green Pair
4. Brown Pair
Ethernet cables can be wired as straight through or crossover. The straight through is the
most common type and is used to connect computers to hubs or switches. They are most
likely what you will find when you go to your local computer store and buy a patch
cable. Crossover Ethernet cable is more commonly used to connect a computer to a
computer and may be a little harder to find since they aren’t used nearly as much as
straight through Ethernet cable.
T568A And T568B Wiring Standard Basis :A RJ45 connector is a modular 8 position,
8 pin connector used for terminating Cat5e patch cable or Cat6 cable. A pin out is a
specific arrangement of wires that dictate how the connector is terminated. There are
two standards recognized by ANSI, TIA and EIA for wiring Ethernet cables. The first is
the T568A wiring standard and the second is T568B. T568B has surpassed 568A and is
seen as the default wiring scheme for twisted pair structured cabling. If you are unsure
of which to use, choose 568B.
A straight through cable is a type of twisted pair cable that is used in local area networks
to connect a computer to a network hub such as a router. This type of cable is also
sometimes called a patch cable and is an alternative to wireless connections where one
or more computers access a router through wireless signal. On a straight through cable,
the wired pins match. Straight through cable use one wiring standard: both ends use
T568A wiring standard or both ends use T568B wiring standard. The following figure
shows a straight through cable of which both ends are wired as the T568B standard.
Crossover Cable:
Switch to router
Switch to PC or server
Hub to PC or server
Switch to switch
Switch to hub
Hub to hub
Router to router
PC to PC
Network cable Crimping and Testing Tools
In This part of experiment explains the most common twisted-pair network cable
testing and crimping tools in detail. Learn the tools that you can use to crimp and test
twisted-pair network cables. Cables are the backbone of a wired network. The stability,
reliability, and performance of a wired network depend on cables. Installing and
maintaining cables in a wired network is a difficult task. To make this task easier, a
variety of network cable crimping and testing tools are available. In this tutorial, we
will not only discuss some of the most common network cable crimping and testing
tools but also understand their features and functions.
1. To cut the network cable of the required length from the bundle.
Some crimping tools provide all the functionality while others provide one or two
functionalities. The most common twisted-pair network cable crimping tools are
described below.
Wire Cutter: - To cut the network cable of the required length from the bundle, you can
use any standard wire cutter tool or can use a wire cutter tool that is specially designed
for the twisted-pair cable. A twisted-pair wire cutter usually includes additional blades
for stripping the wire
Wire Stripper: - This tool is used to remove the outer and inner jackets of the network
cable. Typically, you do not need to purchase this tool separately as all standard
twisted-pair wire cutters are equipped with wire-strippers.
Crimp tool: - This tool is used to attach the connectors to the cable. Typically, this tool
also includes a wire-cutter and wire-stripper. So if you buy a crimp tool, you don't have
to buy a wire-cutter and wire-striper separately.
Network cable testing and troubleshooting toolsA network cable testing and
troubleshooting tool is used for the following purposes.To measure the length of a
segment or network cable.To detect loose connectors.To identify an un-labeled
network cable from all network cables.To find a break in the network cable.
To certify the cable installation.The following section describes the most common
network cable testing and troubleshooting tools
As show in figure wet each how the ip addresses are classified and when
they are used.
1. Open the command prompt by typing the term 'cmd' (no quote marks) in the
Windows search panel.
The following window will appear. Type "ipconfig" (without the quotes) to access
the private IP address information.
• Hub
• Switch
• Bridge
• Router
• GateWay
Go to Start! Run and in the box type “cmd”. The command window opens and a cursor is waiting at
the prompt. Type the following in the command window.
PING:
PING is a network tool that is used on TCP/IP based networks. It stands for Packet internet Groper.
The idea is to verify if a network host is reachable from the site where the PING command issued.
The ping command uses the ICMP to verify if the network connections are intact. When a PING
command is issued, a packet of 64 bytes is sent to the destination computer. The packet is composed
of 8 bytes of ICMP header and 56 bytes of data. The computer then waits for a reply from the
destination computer.
ping www.targetname.com
C:\>ping www.google.com
Ping statistics for 64.233.161.99: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate
round trip times in milli-seconds:
Tracert:
C:\>tracert: The tracert command displays a list of all the routers that a packet has to go through to
get from the computer where tracert is run to any other computer on the internet.
C:\>tracert www.google.com
1 3 ms 3 ms 3 ms 192.168.0.1
2 10 ms 14 ms 9 ms 10.116.96.1
3 11 ms 22 ms 11 ms srp0-0.brhmalhe-rtr2.bham.rr.com [66.25.96.2]
4 27 ms 25 ms 25 ms pos2-0.tampflerl.rtr3.tampabay.rr.com [65.32.8.109]
5 26 ms 26 ms 26 ms pop1-tby-P0-1.atdn.net [66.185.136.169]
6 36 ms 26 ms 25 ms bb1-tby-P0-0.atdn.net [66.185.136.160]
7 45 ms 43 ms 42 ms bb2-atm-P7-0.atdn.net [66.185.152.245]
8 45 ms 43 ms 42 ms pop2-atm-P1-0.atdn.net [66.185.147.211]
9 42 ms 41 ms 42 ms Google.atdn.net [66.185.147.218]
10 44 ms 53 ms 53 ms 216.239.46.157
11 44 ms 71 ms 55 ms 66.249.95.124
12 58 ms 58 ms 60 ms 216.239.47.149
13 60 ms 58 ms 58 ms 216.239.47.69
14 63 ms 66 ms 58 ms 216.239.47.
15 6 15 61 ms 61 ms 58 ms 64.233.161.104
Trace complete.
Netstat:
The following is displayed on the command prompt:
C:\>netstat
Active Connections:
Nslookup:
The prompt changes from ‘c:\’ to ‘>’. Type in www.hotmail.com. The following
appears on the
command prompt:
C:\>nslookup
Address: 207.69.188.185
> hotmail.com
Server: ns1.mindspring.com
Address: 207.69.188.185
Non-authoritative answer:
Name: hotmail.com
The above command uses the name server of your Internet Service Provider (ISP) to resolve the IP
address for the domain name specified. The nslookup command can be exited by pressing ‘ctrl’ and
‘c’ keys together.
Ipconfig:
Ipconfig is used to show information on TCP/IP, DNS server addresses, your network
interface cards etc. Ipconfig can be used from the command line. In order to use
Ipconfig, go to Start!
Run and in the box type “cmd”. The command window opens and a cursor is waiting at
the prompt. Type the following in the command window:
Ipconfig
Ipconfig/all
Ip config can be used to renew or release a DHCP configuration for all interface cards or adapters. In
order to see the formats in which Ipconfig can be used, type the following:
Route:
The routing tables in your computer can be viewed using the route command. In order to use the
route command, go to Start ! Run and in the box type “cmd”. The command window opens and a
cursor is waiting at the prompt. Type the following in the command window:
route Print
ARP:
The ARP command maps the IP addresses of a station to the MAC hardware addresses.
As discusses in module 5, the ARP request contains the IP address of the requestor and
IP address of the computer whose MAC address is desired. The ARP packet is
broadcasted and the destination computer accepts the packet by looking at its IP
address. The destination computer then sends an ARP reply packet that contains its IP
address and MAC address to the requestor. In order to look at the arp cache maintained
in your computer, go to Start! Run and in the box
type “cmd”. The command window opens and a cursor is waiting at the prompt. Type
the following in the command window:
Arp –a
C:\>arp -a
Windows deletes an entry that has not been used every 10 minutes. Windows also
deletes the oldest entry even if the lifetime is not expired in order to make room for
new entries in the ARP cache table. The following command can be used to list, add,
and remove an ARP cache entry.
Systeminfo:
Displays detailed configuration information about a computer and its operating system,
including operating system configuration, security information, product ID, and
hardware properties (such as RAM, disk space, and network cards).
Tasklist:
Windows programs run as one or more processes or tasks. You can use the TASKLIST
command to display a list of currently-running tasks. TASKLIST displays the process
ID number for each running task, the name of the executable program that started the
task, and, when available, the window title.
Week 4
RESOURCE: Turbo C
#include<stdio.h>
#include<string.h>
// length of the generator polynomial
#define N strlen(gen_poly)
// data to be transmitted and received
char data[28];
// CRC value
char check_value[28];
// generator polynomial
char gen_poly[10];
// variables
int data_length,i,j;
// function that performs XOR operation
void XOR(){
// if both bits are the same, the output is 0
// if the bits are different the output is 1
for(j = 1;j < N; j++)
check_value[j] = (( check_value[j] == gen_poly[j])?'0':'1');
}
// Function to check for errors on the receiver side
void receiver(){
// get the received data
printf("Enter the received data: ");
scanf("%s", data);
printf("\n-----------------------------\n");
printf("Data received: %s", data);
// Cyclic Redundancy Check
crc();
// Check if the remainder is zero to find the error
for(i=0;(i<N-1) && (check_value[i]!='1');i++);
if(i<N-1)
printf("\nError detected\n\n");
else
printf("\nNo error detected\n\n");
}
void crc(){
// initializing check_value
for(i=0;i<N;i++)
check_value[i]=data[i];
do{
// check if the first bit is 1 and calls XOR function
if(check_value[0]=='1')
XOR();
// Move the bits by 1 position for the next computation
for(j=0;j<N-1;j++)
check_value[j]=check_value[j+1];
// appending a bit from data
check_value[j]=data[i++];
}while(i<=data_length+N-1);
// loop until the data ends
}
int main()
{
// get the data to be transmitted
printf("\nEnter data to be transmitted: ");
scanf("%s",data);
printf("\n Enter the Generating polynomial: ");
// get the generator polynomial
scanf("%s",gen_poly);
// find the length of data
data_length=strlen(data);
// appending n-1 zeros to the data
for(i=data_length;i<data_length+N-1;i++)
data[i]='0';
printf("\n----------------------------------------");
// print the data with padded zeros
printf("\n Data padded with n-1 zeros : %s",data);
printf("\n----------------------------------------");
// Cyclic Redundancy Check
crc();
// print the computed check value
printf("\nCRC or Check value is : %s",check_value);
// Append data with check_value(CRC)
for(i=data_length;i<data_length+N-1;i++)
data[i]=check_value[i-data_length];
printf("\n----------------------------------------");
// printing the final data to be sent
printf("\n Final data to be sent : %s",data);
printf("\n----------------------------------------\n");
// Calling the receiver function to check errors
receiver();
return 0;
}
Output
Enter data to be transmitted: 1001101
Enter the Generating polynomial: 1011
----------------------------------------
Data padded with n-1 zeros : 1001101000
----------------------------------------
CRC or Check value is : 101
----------------------------------------
Final data to be sent : 1001101101
----------------------------------------
Enter the received data: 1001101101
-----------------------------
Data received: 1001101101
No error detected
Explanation
There is no signal error since the data being transferred and received is identical.
Enter the received data: 1001001101
-----------------------------
Data received: 1001001101
Error detected
Week 5
RESOURCE: Turbo C
PROGRAM LOGIC: The new technique allows data frames to contain an arbitrary number if
bits and allows character codes with an arbitrary no of bits per character. Each frame
begins and ends with special bit pattern, 01111110, called a flag byte. Whenever the
Sender’s data link layer encounters five consecutive one’s in the data ,it automatically
stuffs a 0 bit into the outgoing bitstream
Program :1(a)
#include<stdio.>
#include<conio.>
#include<string.>
void main()
{
int
a[20],b[30],i,j,k,count,n;
clrscr();
printf("Enter frame length:");
scanf("%d",&n);
printf("Enter input frame (0's & 1's only):");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
i=0;
count=1;
j=0;
while(i<n)
{
if(a[i]==1)
{
b[j]=a[i];
for(k=i+1;a[k]==1 && k<n &&count<5;k++)
{
j++;
b[j]=a[k];
count++;
if(count==5)
{
j++;
b[j]=0;
i=k;
}
}
else
{
b[j]=a[i];
}
i++
;
j++;
}
printf("After stuffing the frame is:");
for(i=0;i<j;i++)
printf("%d",b[i]);
getch();
}
Program 5(b): Character Stuffing.
PROCEDURE:
Go to debug -> run or press CTRL + F9 to run the program.
Source code :
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<process.h>
void main()
{
int i=0,j=0,n,pos;char a[20],b[50],ch;
clrscr();
printf("enter
string\n");
scanf("%s",&a);
n=strlen(a);
printf("enter
position\n");
scanf("%d",&pos);
if(pos>n)
{
printf("invalid position, Enter again
:"); scanf("%d",&pos);
}
printf("enter the
character\n"); ch=getche();
b[0]='d';
b[1]='l';
b[2]='e';
b[3]='s';
b[4]='t';
b[5]='x';
j=6;
while(i<n)
{
if(i==pos-1)
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]=ch;
b[j+4]='d';
b[j+5]='l';
b[j+6]='e';
j=j+7;
}
if(a[i]=='d' && a[i+1]=='l' && a[i+2]=='e')
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
j=j+3;
}
b[j]=a[i];
i++;
j++;
}
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]='e';
b[j+4]='t';
b[j+5]='x';
b[j+6]='\0';
printf("\nframe after
stuffing:\n"); printf("%s",b);
getch();
}
Output: