Professional Documents
Culture Documents
Lab Manual
Prepared by,
TE COMPTER
Semester I
CNS Lab Manual TE COMPUTER, Sem-I,
Preface
Computer networking refers to the practice of connecting computers and other digital
devices together to share resources and exchange information. It involves the use of hardware and
software technologies that enable communication between computers and other devices, whether
they are located in the same physical location or are geographically dispersed. Computer
networking has become an essential component of modern society, and plays a critical role in the
functioning of businesses, governments, and individuals alike. As technology continues to advance,
computer networking will continue to evolve and play an increasingly important role in our daily
lives.
Computer networking has also played a crucial role in the development of new technologies
like cloud computing, big data analytics, and the Internet of Things have all benefited greatly from
computer networking (IoT). Businesses are now able to gather and analyze enormous volumes of
data, automate their procedures, and make better choices faster thanks to these technologies.
In general, we can see “Communication” and “Sharing”, that is all networking is about in
simple terms. It enables everything that we do today. In the current scenario, the business would
not work without computer networking and our personal and social life will also feel like it has
been stopped.
Vision:
To contribute to welfare of society by empowering students with latest skills, tools and
technologies in the field of Computer Engineering through excellence in education and research
Mission:
1. To provide excellent academic environment for continuous improvement in the
domain knowledge of Computer Engineering to solve real world problems.
2. To impart value-based education to students, with innovative and research skills to
make them responsible engineering professionals for societal upliftment.
3. To strengthen links with industries through partnerships and collaborative
developmental works.
2. Problem analysis: Identify, formulate, research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools, including prediction and modeling to complex engineering activities, with
an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
1. Analyze the problems and design solutions in the areas of Artificial Intelligence & High
Performance Computing.
2. Develop advanced digital solutions using standard software engineering practices
A. Course Outcome
Statement BL
Course
Outcome At the end of the course ,a student will be able to
(write/install/solve/apply)
Illustrate the requirements of network types, topology and 3
310247.1
transmission media
Demonstrate error control, flow control techniques and protocols 3
310247.2
and analyze them
Demonstrate the subnet formation with IP allocation mechanism 3
310247.3
and apply various routing algorithms
Develop Client-Server architectures and prototypes 3
310247.4
Implement web applications and services using application layer 3
310247.5
protocols
B. CO-PO mapping
Program outcomes
Course
Outcome
1 2 3 4 5 6 7 8 9 10 11 12
310247.1 1 - 1 2 2 1 - - - - 1 1
310247.2 1 1 1 1 1 - 1 - - 1 - -
310247.3 1 1 2 1 2 - - - - - - 1
310247.4 3 2 1 2 2 - - - 1 - 1 1
310247.5 1 3 - - 1 - 1 1 - - - -
310247.6 1 - 2 2 1 - - - - - 1
1: Low, 2:Medium, 3:High, -: No correlation
C. CO-PSO mapping
CO PSO
1 2
310247.1 1 -
310247.2 2 1
310247.3 2
310247.4 2
310247.5 1 2
310247.6 1 1
Software’s required
INDEX
Sr. Date of Date of Signature
Experiment Page conduction CAS
No. completion of Faculty
Setup a wired LAN using Layer 2
Switch. It includes preparation of
cable, testing of cable using line
tester, configuration machine
1 using IP addresses, testing using
PING utility and demonstrating
the PING packets captured traces
using Wireshark Packet Analyzer
Tool.
Content beyond
16 Syllabus:Demonstration of DOS
attack by using ping command
CERTIFICATE
Certified that Mr./Ms._______________________________________ of Class TE Computer
Engineering Roll No.__________ has completed the Tutorial work in the subject Computer
Networks and Security Lab (310247) during the academic year 2023-24 Sem I.
Group A
Assignment No. 1
AIM : Setup a wired LAN using Layer 2 Switch and wireless LAN using Access point.
PREREQUISITES: Knowledge of Wired and wireless media, networking devices and protocols.
COURSE OBJECTIVES:
COURSE OUTCOMES:
CO1: Analyze the requirements of network types, topology and transmission media
THEORY:
To implement the cross-wired cable and straight through cable using crimping tool.
Components:
Procedure:
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 wire 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 wire in the 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, we
obviously have more than 1/2 of an inch of un-twisted wire.
3. We have 2 end jacks, which must be installed on our cable. If we are using a premade cable, with
one of the ends whacked off, we only have one end to install - the crossed over end. Below are two
diagrams, which show how we need to arrange the cables for each type of cable end. Decide at this
point which end we are making and examine the associated picture below.
Switch:
A switch or switching hub is a computer networking device that connects multiple nodes together.
Switches that additionally process data at the network layer (layer 3 and above) are often referred
to as Layer 3 switches or multilayer switches. The basic function that any switch is supposed to
perform is to receive information from any source connected to it and dispatch that information to
the appropriate destination only.
Access point
Wireless access points (APs or WAPs) are special-purpose communication devices on Wireless
Access LAN (WLAN). Access points act as a central transmitter and receiver of wireless radio
signals.
disable this function. Then, a wireless client must already know the network’s SSID in
order to join the network.
● Channel: Lets we select one of 11 channels on which to broadcast. All the access points and
computers in the wireless network should use the same channel. We may be experiencing
interference from a cordless phone or other wireless device operating on the same channel.
● WEP — Mandatory or Disable: Lets you use a security protocol called wired equivalent
privacy.
● Take a wireless device for connecting multiple nodes (Access point or wifi router).
● Access the AP from any remote machine.
● Configure access point by giving suitable password and network name.
● Add multiple node’s MAC address (48 bit) in Wireless MAC Filter provided in Wireless
Field.
● Save the settings.
Required Equipment for LAN
a. First, determine which cables are necessary for the available hardware
b. Insert one end of the cable into the Switch and the other end of the cable into the host computer.
c. Connect all host computers to the Switch and configure the IP address to every host.
192.168.1.1 192.168.1.2 192.168.1.3
# ping 192.168.1.2
CONCLUSION:
FAQs:
Group: A
Assignment No.2
AIM : Demonstrate the different types of topologies and types of transmission media by using a
packet
tracer tool.
COURSE OUTCOMES :
CO1 : Analyze the requirements of network types, topology and transmission media
THEORY :
What is Topology?
The arrangement of a network that comprises nodes and connecting lines via sender and receiver is
referred to as network topology. The various network topologies are:
1. Bus Topology
2. Tree Topology
3. Star Topology
4. Mesh Topology
5. Ring topology
Bus Topology:
Bus topology is a network type in which every computer and network device is connected to a
single cable. It transmits the data from one end to another in a single direction. No bi-directional
feature is in bus topology
Advantages of this topology:
● The number of cables required to connect them is 1, which is known as backbone cable, and N
drop lines are required.
● The cost of the cable is less compared to other topologies
Disadvantages
● If the common cable fails, then the whole system will crash down.
Ring Topology:
In this topology, it forms a ring connecting devices with exactly two neighboring devices.
Advantages of this topology:
● The possibility of collision is minimum in this type of topology.
● Cheap to install and expand.
Disadvantages this topology:
● Troubleshooting is difficult in this topology.
● The addition of stations in between or removal of stations can disturb the whole topology.
● Less secure.
Star Topology:
In star topology, all the devices are connected to a single centralized device through a cable.
Advantages of this topology:
● If N devices are connected to each other in a star topology, then the number of cables required
to connect them is N. So, it is easy to set up.
● Each device requires only 1 port i.e. to connect to the hub, therefore the total number of ports
required is N.
● It is Robust. If one link fails, other links still operational.
● Easy to fault identification and fault isolation.
Disadvantages this topology:
● If the central device on which the whole topology relies fails, the whole system will crash
down.
● The cost of installation is high.
● Performance is based on the single concentrator i.e. hub.
Packet Tracer (PT) is a powerful and dynamic tool that displays the various protocols used in
networking, in either Real Time or Simulation mode. This includes layer 2 protocols such as
Ethernet and PPP, layer 3 protocols such as IP, ICMP, and ARP, and layer 4 protocols such as TCP
and UDP. Routing protocols can also be traced.
Now, as we can see, interfaces are up but the communication is not enabled because we have not
applied the protocol yet.
FAQ’s
1. What is packet tracer. What is its role.
Group: A
Assignment No.3
AIM : Write a program to implement Hamming Code and CRC.
PROBLEM STATEMENT: Write a program for error detection and correction for 7/8 bits
ASCII codes using Hamming Codes or CRC.
COURSE OUTCOMES:
CO2: Demonstrate error control, flow control techniques and protocols and analyze them
THEORY:
Hamming Code:
The most common types of error-correcting codes used in RAM are based on the codes devised by
R. W. Hamming. In the Hamming code, k parity bits are added to an n-bit data word, forming a
new word of n ϩ k bits. The bit positions are numbered in sequence from 1 to n ϩ k. Those
positions numbered with powers of two are reserved for the parity bits. The remaining bits are the
data bits. The code can be used with words of any length.
Before giving the general characteristics of the Hamming code, we will illustrate its operation with
a data word of eight bits. Consider, for example, the 8-bit data word 11000100. We include four
parity bits with this word and arrange the 12 bits as follows:
Bit position
1 2 3 4 5 6 7 8 9 10 11 12
P1 P2 1 P4 1 0 0 P8 0 1 0 0
The 4 parity bits P 1 through P 8 are in positions 1, 2, 4, and 8, respectively. The 8 bits of the data
word are in the remaining positions. Each parity bit is calculated as follows:
Thus, each parity bit is set so that the total number of 1’s in the checked positions, including the
parity bit, is always even.
The 8-bit data word is written into the memory together with the 4 parity bits as a 12-bit composite
word. Substituting the 4 parity bits in their proper positions, we obtain the 12-bit composite word
written into memory:
Bit position
1 2 3 4 5 6 7 8 9 10 11 12
0 0 1 1 1 0 0 1 0 1 0 0
When the 12 bits are read from memory, they are checked again for errors. The parity of the word
is checked over the same groups of bits, including their parity bits. The four check bits are
evaluated as follows:
A 0 check bit designates an even parity over the checked bits, and a 1 designates an odd parity.
Since the bits were written with even parity, the result, C = C8 C4 C2 C1 = 0000, indicates that no
error has occurred. However, if C ≠ 0 , the 4-bit binary number formed by the check bits gives the
position of the erroneous bit if only a single bit is in error.
Thus, for no error, we have C = 0000; with an error in bit 1, we obtain C = 0001;and with an error
in bit 5, we get C = 0101. Hence, when C is not equal to 0, the decimal value of C gives the
position of the bit in error. The error can then be corrected by complementing the corresponding
bit. Note that an error can occur in the data or in one of the parity bits.
Algorithm
The following general algorithm generates a single-error correcting (SEC) code for any
number of bits.
The form of the parity is irrelevant. Even parity is simpler from the perspective of theoretical
mathematics, but there is no difference in practice.
A cyclic redundancy check (CRC) is an error detecting codes commonly used in digital networks
and storage devices to detect accidental changes to raw data. Blocks of data entering these systems
get a short check value attached, based on the remainder of a polynomial division of their contents.
On retrieval, the calculation is repeated and, in the event the check values do not match, corrective
action can be taken against data corruption.
Application
A CRC-enabled device calculates a short, fixed-length binary sequence, known as the check value
or CRC, for each block of data to be sent or stored and appends it to the data, forming a codeword.
When a codeword is received or read, the device either compares its check value with one freshly
calculated from the data block, or equivalently, performs a CRC on the whole codeword and
compares the resulting check value with an expected residue constant.
If the CRC check values do not match, then the block contains a data error.The device may take
corrective action, such as rereading the block or requesting that it be sent again. Otherwise, the data
is assumed to be error-free (though, with some small probability, it may contain undetected errors;
this is the fundamental nature of error-checking). Compute an n-bit binary CRC, line the bits
representing the input in a row, and position the (n + 1)-bit pattern representing the CRC's divisor
In this example, we shall encode 14 bits of message with a 3-bit CRC, with a polynomial x3 + x +
1. The polynomial is written in binary as the coefficients; a 3rd-order polynomial has 4 coefficients
(1x3 + 0x2 + 1x + 1). In this case, the coefficients are 1, 0, 1 and 1. The result of the calculation is 3
bits long.
CONCLUSION:
FAQs:
1. What is an error?
2. What is even and odd parity?
3. Give examples for error detection and correction techniques.
4. What is hamming distance?
5. What is error control?
Group:A
Assignment No: 4
TITLE: Write a program to simulate Go back N and Selective Repeat Modes of Sliding Window
Protocol
COURSE OUTCOMES
CO2: Demonstrate error control, flow control techniques and protocols and analyze them
THEORY
The most important functions of Data Link layer to satisfy the above requirements are error control
and flow control.
Flow Control is a technique so that transmitter and receiver with different speed characteristics can
communicate with each other. Flow control ensures that a transmitting station, such as a server
with higher processing capability, does not overwhelm a receiving station, such as a desktop
system, with lesser processing capability. This is where there is an orderly flow of transmitted data
between the source and the destination.
Error Control involves both error detection and error correction. It is necessary because errors are
inevitable in data communication, in spite of the use of better equipment and reliable transmission
media based on the current technology
There are two methods developed for flow control namely Stop-and-wait and Sliding-window.
Go-back-N ARQ: The most popular ARQ protocol is the go-back-N ARQ, where the sender sends
the frames continuously without waiting for acknowledgement. That is why it is also called as
continuous ARQ. As the receiver receives the frames, it keeps on sending ACKs or a NACK, in
case a frame is incorrectly received. When the sender receives a NACK, it retransmits the frame in
error plus all the succeeding frames. Hence, the name of the protocol is go-back-N ARQ. If a frame
is lost, the receiver sends NAK after receiving the next frame.
In case there is long delay before sending the NAK, the sender will resend the lost frame after its
timer times out. If the ACK frame sent by the receiver is lost, the sender resends the frames after its
timer times out. Assuming full-duplex transmission, the receiving end sends piggybacked
acknowledgement by using some number in the ACK field of its data frame.
Let us assume that a 3-bit sequence number is used and suppose that a station sends frame 0 and
gets back an RR1, and then sends frames 1, 2, 3, 4, 5, 6, 7, 0 and gets another RR1.This might
either mean that RR1 is a cumulative ACK or all 8 frames were damaged. This ambiguity can be
overcome if the maximum window size is limited to 7, i.e. for a k-bit sequence number field it is
limited to 2k-1. The number N (=2k-1) specifies how many frames can be sent without receiving
acknowledgement.
If no acknowledgement is received after sending N frames, the sender takes the help of a timer.
After the time-out, it resumes retransmission.
Selective-Repeat ARQ
The selective-repetitive ARQ scheme retransmits only those for which NAKs are received or for
which timer has expired, this is shown in the Fig.3.3.12. This is the most efficient among the ARQ
schemes, but the sender must be more complex so that it can send out-of-order frames. The receiver
also must have storage space to store the postNAK frames and processing power to reinsert frames
in proper sequence.
CONCLUSION:
The outcome of the assignment is the ability to implement go back N and selective repeat
FAQs:
5. What are the advantages and disadvantages of Stop and Wait Protocol?
CONCLUSION: Thus we have learnt and implemented Go back n and Selective repeat protocol
Group B
Assignment 1
AIM: Write a program to demonstrate subnetting and find the subnet masks.
COURSE OUTCOMES:.
CO3 : Demonstrate the subnet formation with IP allocation mechanism and apply various
routing algorithms
THEORY
IP Address
Subnetting
● To determine the number of subnets & hosts per subnet available for any of the
available subnet masks, 2 simple formulas to calculate these numbers:
● Number of Subnets=(2n)
● Number of Host per Subnets=(2h-2)
Example: Consider the network id 192.168.8.0 or such relevant IP and create five subnets namely
A, B, C, D. Assign the subnet mask. Determine number of bits used for Subnet and host.
To create four subnets namely A, B, C, D we consider Host ID bits. For four subnets we require 2
bits out of of 8 host id bits.
0 0 0 0 0 0 0 0
CONCLUSION:
Outcome of the experiment is students are able to divide the network using implement subnetting.
FAQs:
Group: B
Assignment No.2
Department of Computer Engineering, MMCOE
CNS Lab Manual TE COMPUTER, Sem-I,
AIM: Write a program to implement link state /Distance vector routing protocol to find suitable
path for transmission.
THEORY:
A distance-vector routing (DVR) protocol requires that a router inform its neighbors of topology
changes periodically. Also known as Bellman-Ford algorithm.
Steps:
⮚ A router transmits its distance vector to each of its neighbors in a routing packet.
⮚ Each router receives and saves the most recently received distance vector from each of its
neighbors.
⮚ A router recalculates its distance vector when:
● It receives a distance vector from a neighbor containing different information than before.
● It discovers that a link to a neighbor has gone down.
The basic idea: look at costs that your neighbors are advertising to get a packet to a destination;
select the neighbour whose advertised cost, added with the cost to get to that neighbour, is lowest
You also need to advertise your costs to your neighbours too. The cost is usually delay time
• Formally, each router maintains two vectors called delay and successor node, so router i has
D i = [d i1 · · · d iN ] T and S i = [s i1 · · · s iN ] T
• Periodically, each router exchanges its delay vector with all its neighbours, and on the basis of all
incoming delay vectors, router k updates both its vectors:
where A denotes set of neighbour routers for k , and l ki is current estimate of delay from k to i
• The distance vector routing has some problems: responds slowly to congestion and delay
increases,and has been replaced by link state routing
At each node x,
Initialization
for all destinations y in N:
Dx(y) = c(x,y) // If y is not a neighbor then c(x,y) = ∞
for each neighbor w
Dw(y) = ? for all destination y in N.
for each neighbor w
send distance vector Dx = [ Dx(y) : y in N ] to w
loop
wait(until I receive any distance vector from some neighbor w)
for each y in N:
Dx(y) = minv{c(x,v)+Dv(y)}
If Dx(y) is changed for any destination y
Send distance vector Dx = [ Dx(y) : y in N ] to all neighbors
Output:
FAQ's
1. What is Dynamic Routing? Give Example
2. What id static routing. Give Example
3. What are the dis advantaged of DV ROUTING?
4. How the drawbacks of DV overcome in Link state
Group:B
Assignment:3
AIM :
Configure RIP/OSPF/BGP using packet Tracer: Simulation of WAN (RIP) using packet tracer.
COURSE OUTCOMES :
CO2 : Analyze data flow between peer to peer in an IP network using Application, Transport and
Network Layer Protocols
CO4: Develop Client-Server architectures and prototypes by the means of correct standards and
technology.
THEORY :
Routing Information Protocol (RIP) is a distance-vector routing protocol. Routers running the
distance-vector protocol send all or a portion of their routing tables in routing-update messages to
their neighbors.
You can use RIP to configure the hosts as part of a RIP network. This type of routing requires little
maintenance and also automatically reconfigures routing tables when your network changes or
network communication stops.
Features of RIP
1. Updates of the network are exchanged periodically.
2. Updates (routing information) are always broadcast.
3. Full routing tables are sent in updates.
4. Routers always trust routing information received from neighbor routers. This is also known
as Routing on rumors.
If a router receives an update on a route, and the new path is shorter, it will update its table entry
with the length and next-hop address of the shorter path. If the new path is longer, it will wait
through a "hold-down" period to see if later updates reflect the higher value as well. It will only
update the table entry if the new, longer path has been determined to be stable.
If a router crashes or a network connection is severed, the network discovers this because that
router stops sending updates to its neighbors, or stops sending and receiving updates along the
severed connection. If a given route in the routing table isn't updated across six successive update
cycles (that is, for 180 seconds) a RIP router will drop that route and let the rest of the network
know about the problem through its own periodic updates.
PACKET TRACER:
Packet Tracer (PT) is a powerful and dynamic tool that displays the various protocols used in
networking, in either Real Time or Simulation mode. This includes layer 2 protocols such as
Ethernet and PPP, layer 3 protocols such as IP, ICMP, and ARP, and layer 4 protocols such as TCP
and UDP. Routing protocols can also be traced.
Now, as we can see, interfaces are up but the communication is not enabled because we have not
applied the protocol yet.
FAQ’s
7. What is packet tracer. What is its role.
8. what are the functionalities of a router
9. Briefly explain a. Switch b. Hub
10. what is the role of bridge in networking.
11. what are the types of media. briefly explain.
12. compare cat5,cat6,cat7
Group B
Assignment 4
PREREQUISITES:
COURSE OBJECTIVES:
CO2 : Analyze data flow between peer to peer in an IP network using Application, Transport and
Network Layer Protocols
COURSE OUTCOMES:
THEORY:
Introduction to Sockets:
A socket is the mechanism that most popular operating systems provide to give programs access to
the network. It allows messages to be sent and received between applications (unrelated processes)
on different networked machines.
CONCLUSION:
Outcome of the experiment is students are able to implement chatting application using TCP socket
programming
FAQS:
Group B
Assignment: 5
COURSE OBJECTIVES: To understand and implement file transfer using UDP protocol
COURSE OUTCOMES:
CO2 : Analyze data flow between peer to peer in an IP network using Application, Transport and
Network Layer Protocols
CO4: Develop Client-Server architectures and prototypes by the means of correct standards and
technology.
THEORY
In UDP, the client does not form a connection with the server like in TCP and instead just sends a
datagram
UDP Server :
1. Create a UDP socket.
2. Bind the socket to the server address.
3. Wait until the datagram packet arrives from the client.
4. Process the datagram packet and send a reply to the client.
5. Go back to Step 3.
UDP Client :
1. Create a UDP socket.
2. Send a message to the server.
3. Wait until response from the server is received.
4. Process reply and go back to step 2, if necessary.
5. Close socket descriptor and exit.
ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,
const struct sockaddr *dest_addr, socklen_t addrlen)
Send a message on the socket
Arguments :
sockfd –File descriptor of the socket
buf –Application buffer containing the data to be sent
len –Size of bu application buffer
flags Bitwise OR of flags to modify socket behavior
dest_addr –Structure containing the address of the destination
addrlen –Size of dest_addr structure
CONCLUSION:
FAQ’s
Group: C
Assignment No.1
AIM: Write a program for DNS lookup. Given an IP address input, it should return URL and vice-
versa.
CO4: Develop Client-Server architectures and prototypes by the means of correct standards and
technology.
THEORY:
DNS: Domain name system
A domain name is a meaningful name that identifies an internet address. DNS is a system where
these domain names are located.
DNS services
● hostname to IP address translation v host aliasing
● canonical, alias names v mail server aliasing v load distribution
● replicated Web servers: many IP addresses correspond to one name
query is sent to its local DNS server § has local cache of recent name-to-address translation pairs
(but may be out of date!) § acts as proxy, forwards query into hierarchy
● iterated query: v contacted server replies with name of server to contact v “I don’t know this
name, but ask this server
● recursive query: v puts burden of name resolution on contacted name server v heavy load at
upper levels of hierarchy?
DNS records
DNS: distributed db storing resource records (RR)
type=NS
§ name is domain (e.g., foo.com)
§ value is hostname of authoritative name server for this domain
type=A
§ name is hostname
§ value is IP address
type=CNAME
§ name is alias name for some “canonical” (the real) name
§ www.ibm.com is really servereast.backup2.ibm.com
§ value is canonical name type=MX
§ value is name of mail server associated with name
Conclusion;
The outcome of the assignment is the students will be able to understand and implement DNS
lookup
FAQ’s
Group: C
Assignment No.2
COURSE OBJECTIVES: To configure the DHCP server and remotely install software
COURSE OUTCOMES:
CO1 : Demonstrate LAN and WAN protocol behavior using Modern Tools
CO4: Develop Client-Server architectures and prototypes by the means of correct standards and
technology.
THEORY:
Dynamic Host Configuration Protocol (DHCP) The Dynamic Host Configuration Protocol (DHCP)
is a network service that enables host computers to be automatically assigned settings from a server
as opposed to manually configuring each network host. Computers configured to be DHCP clients
have no control over the settings they receive from the DHCP server, and the configuration is
transparent to the computer's user.
The most common settings provided by a DHCP server to DHCP clients include:
The advantage of using DHCP is that changes to the network, for example a change in the address
of the DNS server, need only be changed at the DHCP server, and all network hosts will be
reconfigured the next time their DHCP clients poll the DHCP server. As an added advantage, it is
also easier to integrate new computers into the network, as there is no need to check for the
availability of an IP address. Conflicts in IP address allocation are also reduced.
A DHCP server can provide configuration settings using the following methods:
This method entails using DHCP to identify the unique hardware address of each network card
connected to the network and then continually supplying a constant configuration each time the
DHCP client makes a request to the DHCP server using that network device. This ensures that a
particular address is assigned automatically to that network card, based on it's MAC address.
In this method, the DHCP server will assign an IP address from a pool of addresses (sometimes
also called a range or scope) for a period of time or lease, that is configured on the server or until
the client informs the server that it doesn't need the address anymore. This way, the clients will be
receiving their configuration properties dynamically and on a "first come, first served" basis.
Automatic allocation
Using this method, the DHCP automatically assigns an IP address permanently to a device,
selecting it from a pool of available addresses. Usually DHCP is used to assign a temporary address
to a client, but a DHCP server can allow an infinite lease time.
Department of Computer Engineering, MMCOE
CNS Lab Manual TE COMPUTER, Sem-I,
You will probably need to change the default configuration by editing /etc/dhcp/dhcpd.conf
to suit your needs and particular configuration.You also may need to edit /etc/default/isc-
dhcp-server to specify the interfaces dhcpd should listen to.
Configuration
If you have two network cards in your ubuntu server you need to select which interface you
want to use for DHCP server listening.By default it listens to eth0.
sudo vi /etc/default/dhcp3-server
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.150 192.168.1.200;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example"; }
This will result in the DHCP server giving clients an IP address from the range
192.168.1.150- 192.168.1.200.
It will lease an IP address for 600 seconds if the client doesn't ask for a specific time frame.
Otherwise the maximum (allowed) lease will be 7200 seconds.
The server will also "advise" the client to use 192.168.1.254 as the default-gateway and
192.168.1.1 and 192.168.1.2 as its DNS servers.
After changing the config file you have to restart the dhcpd:
pico /var/lib/dhcp/dhcpd.leases
CONCLUSION:
FAQ’s
1.What is Bootp? What are its drawbacks.
2. What messages are exchanged between a DHCP client and a DHCP server before the client
receives an IP address
3. What is dhcp scope?
Group C
Assignment No. : 3
AIM : Capture packets using Wireshark, write the exact packet capture filter expressions
to accomplish the following and save the output in file:
COURSE OBJECTIVES: Configure the computing node with understanding of protocols and
technologies
COURSE OUTCOMES:
CO2 : Analyze data flow between peer to peer in an IP network using Application, Transport and
Network Layer Protocols
CO4: Develop Client-Server architectures and prototypes by the means of correct standards and
technology.
Department of Computer Engineering, MMCOE
CNS Lab Manual TE COMPUTER, Sem-I,
THEORY
1. TCP:
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet protocol
suite (IP), and is so common that the entire suite is often called TCP/IP. TCP provides reliable,
ordered and error-checked delivery (or notification of failure to deliver) of a stream of octets
between programs running on computers connected to a local area network, intranet or the
public Internet. It resides at the transport
2. UDP:
The User Datagram Protocol (UDP) is one of the core members of the Internet protocol Suite.
UDP uses a simple connectionless transmission model with a minimum of protocol mechanism.
It has no handshaking dialogues, and thus exposes any unreliability of the underlying network
protocol to the user's program. There is no guarantee of delivery, ordering, or duplicate
protection
3.ICMP:
The Internet Control Message Protocol (ICMP) is one of the main protocols of the Internet
Protocol Suite. It is used by network devices, like routers, to send error messages indicating, for
example, that a requested service is not available or that a host or router could not be reached.
4.IGMP:
The Internet Group Management Protocol (IGMP) is a communications protocol used by hosts
and adjacent routers on IP networks to establish multicast group memberships. IGMP is an
integral part of IP multicast. IGMP can be used for one-to-many networking applications such
as online streaming video and gaming, and allows more efficient use of resources when
supporting these types of applications. IGMP messages are carried in bare IP packets with IP
protocol.
CONCLUSION:
Outcome of the experiment is students are able to
analyze formats captured through Wireshark for wired network. 1. Ethernet 2. IP 3.TCP 4. UDP
FAQs:
1. List advantages and Disadvantages of Wireshark tool
2. Compare TCP with UDP
3. What are the characteristics of IP protocols
Assignment 4
PROBLEM STATEMENT: Study and Analyze the performance of HTTP, HTTPS and FTP
protocol using Packet tracer tool.
CO5: Implement web applications and services using application layer protocols
THEORY:
HTTP:HTTP stands for HyperText Transfer Protocol. HTTP is a TCP/IP based communication
protocol:
● It is the protocol that allows web servers and browsers to exchange data over the web.
● It is stateless means each request is considered as the new request. In other words,
server doesn't recognize the user by default.
HTTP Working
Through the HTTP protocol, resources are exchanged between client devices and servers over the
internet. Client devices send requests to servers for the resources needed to load a web page; the
servers send responses back to the client to fulfill the requests
HTTPS (Hypertext Transfer Protocol Secure): It is a secure extension or version of HTTP. This
protocol is mainly used for providing security to the data sent between a website and the web
browser. It is widely used on the internet and used for secure communications.
This protocol is also called HTTP over SSL because the HTTPS communication protocols are
encrypted using the SSL (Secure Socket Layer).
http https
Lacks security and so is vulnerable to Offer the SSL or TLS Digital Certificate to protect the
attacks and intrusion communication between the server and client
Data exchanged is in plain text, and it Data exchange happens in cipher or encrypted text and
is not scrambled before sending data is scrambled before sending
FTP:File Transfer Protocol(FTP) is an application layer protocol that moves files between local
and remote file systems. It runs on the top of TCP. To transfer a file, 2 TCP connections are used
by FTP in parallel: control connection and data connection.
Conclusion:Outcome of the experiment is students are able to understand HTTP,HTTPS and FTP
protocols.
FAQs
1. What are the two types of connections supported by HTTP
2. What are cookies. What is its significance
3. List SSL protocols
4. Difference between Data Connection and Control Connection
5. HTTP is said to be OUT -of -Band Protocol, give reasons
Assignment 5
PROBLEM STATEMENT: To study the SSL protocol by capturing the packets using Wireshark
tool while visiting any SSL secured website (banking, e commerce etc.).
CO5: Implement web applications and services using application layer protocols
THEORY:
Security Socket Layer(SSL) provides security to the data that is transferred between web browser
and server. SSL encrypts the link between a web server and a browser which ensures that all data
passed between them remain private and free from attack.
Secure Socket Layer Protocols:
● Handshake protocol
● Alert protocol
Fig : SSL
● Confidentiality
● Message Integrity
Handshake Protocol:
Handshake Protocol is used to establish sessions. This protocol allows the client and server to
authenticate each other by sending a series of messages to each other.
Change-cipher Protocol:
Change-cipher protocol consists of a single message which is 1 byte in length and can have only
one value. This protocol’s purpose is to cause the pending state to be copied into the current state.
Alert Protocol:
This protocol is used to convey SSL-related alerts to the peer entity
SSL encrypts data communicated across the web to guarantee a high level of privacy. Anyone
attempting to intercept this data will meet a jumbled mess of characters nearly hard to decrypt.
SSL begins an authentication process known as a handshake between two communicating devices
to confirm that both devices are who they say they are.
SSL also digitally certifies data to ensure data integrity, ensuring that it has not been tampered
with before reaching its intended receiver.
FAQS:
1. List Features of SSL protocol
2. What is Ipsec?
3. Compare SSL with TLS
Department of Computer Engineering, MMCOE
CNS Lab Manual TE COMPUTER, Sem-I,
PROBLEM STATEMENT: To learn the wireless communication between the sensor nodes.
CO4: Develop Client-Server architectures and prototypes by the means of correct standards and
technology.
THEORY:
Virtual Labs is a project initiated by the Ministry of Human Resource Development, Government
of India, under the National Mission on Education through Information and Communication
Technology.[1] The project aims to provide remote-access to Laboratories in various disciplines of
science and engineering for students at all levels from under-graduate to research
Motes)
7) Click the "Connect to WSN" button. (This is for connecting the WSN. This will initiate the
9) Watch the video for seeing the working of motes according to the given parameters.
The steps included in running the regular Send and Receive experiment in remote panel
CONCLUSION: