Вы находитесь на странице: 1из 48

NETWORKS LABORATORY

CMS COLLEGE OF ENGINEERING


NAMAKKAL-637 003
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING

LAB MANUAL
ODD SEMESTER (2013-2014)
NETWORKS LABARATORY

Prepared By,
P.VELMURUGAN, AP/ECE,
S.RAJESH, AP/ECE

Approved By,
Mr.D.ANTO SAHAYA DHASS,
ASSOC.PROF/HEAD, ECE

NETWORKS LABORATORY

CONTENTS

S.No

Date

Name of Experiment

Stop and Wait Protocol

Stop and wait - Time out

Stop and Wait - Error Control

Selective Retransmission

Go Back- N

Distance Vector Algorithm

Link State Algorithm

Data Encryption Decryption

CSMA-CD

10

Token Bus Topology

11

Token Ring Topology

12

Wireless LAN

Page
No

Marks
Awarde
d

1. Stop and Wait Protocol

Signature

Remarks

NETWORKS LABORATORY

Aim:
To conduct an experiment to demonstrate the working of simple Stop and Wait Protocol.

Experimental Setup:
Connect the accompanying RS-232 cable between the ports of two systems The Port
Parameters should be same on both systems (/dev/tty0, 9600, 1, even)

Experimental Procedure:
1.
2.
3.
4.
5.

Power up the systems.


change to the directory cd NLS lab / layers / Phy_lyr
Execute the file ./main (dot slash main)
From main menu Choose Layers Data Link Layer Stop and Wait Protocol.
After choosing the stop and wait protocol, Click on Lets Begin button on both
systems.
6. Choose the number of frames to transmit in first node.
7. Choose the Start char, End char and Pad char of frames in both the systems, by
default other than data and these three characters should be same in both the systems.
8. Send maximum of 8 bytes of data and click on send.
9. The receiving section will receive the frame
10. Click on Send ACK on the second node.
11. The sending section (first node) will receive the acknowledgement

Observation:
The following observations can be made with the above experiment:
With the RS-232 connection, frame can be transmitted between systems and simple build
up of protocol process is established.
The working of the stop and wait protocol is understood in this experiment.
Start, end, pad characters must be same on both ends to achieve error free
communication.
The data in data link layer is in the form of frames and hence the start and end characters
are required to mark the start and end of a frame. Since the min no of data bytes in a
frame is also fixed, the padding characters will be filled into the frame, of user entered
data is less than the frame size.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the performance of stop and wait protocol is studied and implemented

NETWORKS LABORATORY
2. Stop and wait - Time out

Aim:
To conduct an experiment to demonstrate the working of time out functionality to the
basic Stop and Wait protocol.

Experimental Setup:
Connect the accompanying RS-232 cable between the ports of two systems
The Port Parameters should be same on both systems (/dev/tty0, 9600, 1, even)

Experimental Procedure:
1) Power up the systems.
2) change to the directory cd NLSBackup /layers /Phy_lyr
3) Execute the file ./main (dot slash main)
4) Choose Layers Data Link Layer Stop and Wait Protocol.
5) Choose Programs Time out from the Menu.
6) After choosing time out protocol, Click on Lets Begin button on both systems
7) Choose the number of frames to transmit in first node.
8) Enter time in seconds for each frame and press the "Enter" key.
9) Choose the Start char, End char and Pad char of frames in both the systems.
10) Enter a maximum of 8 bytes of data on the first system and click on send button.
11) The receiving node the data will be received and the frame is displayed.
12) Click on Send ACK button in the second node, so that sending section will receive the
Acknowledgement.
13) To simulate a time out, do not send any response to sending section; warning will occur
In sending section the frame will be retransmitted in second node.
14) Acknowledge for the retransmitted frame.
15) The sending section will receive the acknowledgement and prompts the user to send the
Frame

NETWORKS LABORATORY

Observation:
The following observations can be made with the above experiment:
With the RS-232 connection, frame can be transmitted between systems and simple build
up of protocol process is established.
The working of the stop and wait time out protocol is understood in this experiment.
Start, end, pad characters must be same on both ends to achieve error free
communication.
This experiment will help to understand the real time scenario where the data or
Acknowledgement frame gets lost in the media of transmission. The time specified for
retransmission will be based on the calculation for
Time taken for transmitting data frame from node-1 to node-2
Time taken for processing the received frame in node-2
Time taken for transmitting the ack frame from node-2 to node-1
Time taken for processing the received ack frame in node

NETWORKS LABORATORY

NETWORKS LABORATORY

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the performance of stop and wait protocol with timer is studied and implemented

NETWORKS LABORATORY

3. Stop and Wait - Error Control


Aim:
To conduct an experiment to demonstrate the working of error control functionality to the
basic Stop and Wait protocol.

Experimental Setup:
Connect the accompanying RS-232 cable between the ports of two systems The Port
Parameters should be same on both systems (/dev/tty0, 9600, 1, even)

Experimental Procedure:
1) Power up the systems.
2) Change to the directory cd NLSBackup / layers /Phy_lyr
3) Execute the file ./main (dot slash main)
4) Choose Layers Data Link Layer Stop and Wait Protocol.
5) Choose "Programs" from the Menu and choose Error Control.
6) After choosing the Error Control protocol, Click on Lets Begin button on both systems
7) Choose the number of frames to transmit in both sections.
8) Choose the same start, end and pad characters of frames in both sections.
9) Enter the first frame and then click on Form Frame (FF) in first node.
10) If you want to include the error click on ERROR button, include the error in frame then click
on SEND The second node will receive the frame.
12) If there is an error in frame, warring will occur in reception mode and receiver must click on
NACK (negative acknowledgement)
a. The frame will be retransmitted.
b. Click on ACK button, so that Acknowledgement is received for the retransmitted
frame.
13) If frame is not erroneous, click on ACK (acknowledgement) button, first node will receive
the acknowledgement.

NETWORKS LABORATORY

Observation:
The following observations can be made with the above experiment:
With the RS-232 connection, frame can be transmitted between systems and simple build
up of protocol process is established.
Start, end, pad characters must be same on both ends to achieve error free
communication.
The working of the stop and wait error control protocol is understood in this
experiment.
Since the errors cannot occur with this kind of transmission media, the user is provide
with a option to re edit the data in order to introduce the error.
The checksum byte (a XOR result of all the data bytes), will be sent as a part of a frame
to the receiver. The checksum is recalculated in the receiver for received data bytes and is
compared with the received checksum byte. In case if they dont match the receiver
identifies the frame is having errors and prompts user to send a MACK.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the performance of stop and wait protocol with timer is studied and implemented

NETWORKS LABORATORY

4. Selective Retransmission
Aim:
To conduct an experiment to demonstrate the working of Selective retransmission
Protocol.

Experimental Setup:
Connect the accompanying RS-232 cable between the ports of two systems The Port
Parameters should be same on both systems (/dev/tty0, 9600, 1, even)

Experimental Procedure:
1. Power up the systems.
2. Change to the directory cd NLSBackup /layers /Phy_lyr
3. Execute the file ./main (dot slash main)
4. Choose Layers Data Link Layer Sliding Window Protocol.
5. Choose Programs Selective Re-transmission from the Menu.
6. After choosing Selective Re-transmission protocol, Click on Lets Begin button on
both systems
7. Enter the start, end and pad characters of frame in both sections.
8. Enter the first frame and then click on Form Frame (FF).
9. If you want to include the error click on ERROR button, include the error in frame then
click on SEND button
10. The receiving area will receive all 7 frames with error frames as shown in Screen3.
11. The receiver enters sequence number and click on the SREJ button.The frames will be
retransmitted the particular frame.

NETWORKS LABORATORY

Observation:
The following observations can be made with the above experiment:
The port parameters are enhanced to handle more complicated, detailed associated with
the port.
Start, end, pad characters must be same on both ends to achieve error free
communication.
The working of sliding window- selective retransmission is understood in this
experiment. In this error control mechanism, only the frame with error for which SREJ-N
frame is sent will get retransmitted.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:

NETWORKS LABORATORY
Thus the selective retransmission is studied and implemented

5. Go- Back- N
Aim:
To conduct an experiment to demonstrate the working of GO BACK - N Protocol.

Experimental Setup:
Connect the accompanying RS-232 cable between the ports of two systems The Port
Parameters should be same on both systems (/dev/tty0, 9600, 1, even)

Experimental procedure:
1. Power up the systems.
2. Change to the directory cd NLSBackup / layers /Phy_lyr)
3. Execute the file ./main (dot slash main)
4. Choose Layers Data link layer Sliding window.
5. Choose Program go-back-n form the menu.
6. After choosing the go-back-n protocol, Click on Lets Begin button on both
systems
7. Choose number of frames to transmit. Choose start, end and pad characters, by
default other the data.
8. Enter a maximum of 8 bytes of data on the first system, click on the SEND button.
9. If user wants to include error click on ERROR button, include the error in the frame
then click on the SEND button.
10. The receiving section (second node) receives 7 frames.
11. Then receiver enters sequence number and click on the REJ button, the sending end
will receive the warning The frames will be retransmitted from specified sequence
number to all frames

NETWORKS LABORATORY

Observation
The following observations can be made with the above experiment:
With the RS-232 connection, data can be transmitted between systems.
The port parameters are enhanced to handle more complicated, detailed associated with
the port.
Start, end, pad characters must be same on both ends to achieve error free
communication. The working of sliding window- Go- Back- N protocol is understood in
this experiment. data will retransmitted from the frame for which the REJ-N frame is
received.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the performance of stop Go Back N is studied and implemented

NETWORKS LABORATORY

6. Distance Vector Algorithm

Experimental procedure:
1. Select the Distance vector routing algorithm from the menu or click on the on the shortcut for
distance vector.
2. After selecting the Distance Vector algorithm, the Distance Vector Window will open and we
need to enter the values to configure it.
Enter the own node (The node number assigned to this Pc, On Pc1 the own node
would be 1 and on 2 it would be 2 and so on).
Enter the no of nodes in the network. In the example that we have taken, there are 4
nodes in the network.
3. After configuring and clicking on the O.K button the messenger window will open. Click on
the Show table you can see the path to all other nodes is unknown initially. Once the other
nodes come up the path will be obtained automatically by sending hello packets and neighbor
info to other neighbors

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the a data is transmitted and implemented using Distance vector algorithm

NETWORKS LABORATORY

7. Link State Algorithm


1

Experimental procedure:
1. Select the Link State routing algorithm from the menu or by selecting the shortcut
icon
2. After selecting on the Link State algorithm, the Link State Window will open and we
need to enter the values to configure it.
3. Enter the own node (The node number assigned to this Pc, On Pc1 the own node
would be 1 and on 2 it would be 2 and so on).
4. Enter the no of nodes in the network. In the example that we have taken, there are 4
nodes in the network.
5. select the neighboring nodes .For the above example Node 1 is connected to
Node 2 so we tick on that particular Node.
6. After configuring and clicking on the O.K button the messenger window will open.
Click on the Show table you can see the path to all other nodes is unknown initially.
Once the other nodes come up the path will be obtained automatically by sending
hello packets and neighbor info to all other nodes.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the a data is transmitted and implemented using Link state algorithm

NETWORKS LABORATORY

8. Data Encryption Decryption


Aim:
To conduct an experiment to demonstrate the working of encryption and
decryption of text between 2 systems using Ethernet cable.

Experimental Setup & Procedure:


1. Connect the Ethernet cable between the network card of two systems.
2. Check the systems is connected with network cables and the hub is switched on
3.

From the menu select Encryption- Decryption Algorithms (or)

4. The encryption decryption menu appears


5. Enter the IP address of the second systems
6. Enter the Key value (for encryption purpose). Key value should be between 4-56
characters
7. Enter the plain text to encrypt
8. Click the encrypt button. The encrypted data (cipher text) appears in the text area
9. Click the Send Button to transmit the encrypted data to the destination IP address
10. If the encrypted data is transmitted to the destination, a message appears on the
message box area of the destination node
11. Click the Receive button to receive the encrypted data and the encrypted data
appears on the text area
12. Enter the key value (for decryption purpose). The key value should match to the
sender key.
13. If the key value is wrong, decryption is not successful Click the Decrypt button to
get the plain text message
14. The decrypted message is shown on the text area

NETWORKS LABORATORY

Observation:
The following observations can be made with the above experiment:
1. This experiment demonstrates the functionality of data encryption and decryption
between two systems. Here the Data is sent over Ethernet cable media. Data
collection, transmission, reception and display concepts.
2. The key value entered (password key) must be the same on both ends to achieve the
decryption Value

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the a data is encrypted and decrypted using cryptographic method

NETWORKS LABORATORY

9. CSMA / CD
Aim:
To conduct an experiment to demonstrate the working of CSMA-CD using
Ethernet Card and Ethernet Cables among multiple systems.

Experimental Setup & Procedure:


1. Connect the Ethernet cable between the network cards of two or more systems using a
HUB connection
2. The systems should be configured with IP address and should be connected through a
hub only.
3.

Execute the file by using the command ./csmacd (dot slash csmacd)

4.

The main menu appears displaying the details of IP address and MAC address of all
the systems connected in the network

5. Select the data rate to transmit the data. Select the node address (destination address)
and click on the send file button.
6. Choose the file (/usr/share/wallpapers/ select a jpg file) and transmit to the
destination. The destination will receive the file. Destination can save or cancel the
file.
7. Click on the display button to see the collision graph.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the data is transmitted and its collision graph is plotted.

NETWORKS LABORATORY

10.

Token Bus Topology

Aim:
To initialize and establish the logical ring and transmit a data from one node to other.

Experimental Setup:
1. Do the Physical connections and Check the jumper JP6 for RS 485 mode
2. Connect RS232-LAN S Cable from PC to the Converter Card
3.

Connect RS485-LAN Bus Cable (Silver Cap) to the Converter Card

4.

Connect the other ends of the Bus to connector J6 on the embedded nodes

5.

Run the LAN trainer software

Experimental Procedure:
1. Chose the serial port settings by selecting a right serial communication Port
Parameters.
2. Connect all the three boards (Nodes 1,3 and 4) and a PC Interface card to the respective

power Supplies.
3. Switch On the Power supply to all the nodes and Network Interface card.
4. After the embedded node completes the Self Test on its peripherals, press Enter key,

only you when the following message is displayed on the node.


Node address 1
Press Enter to Conti
5.

Press 1 after you see the following message


1> LAN Tr Node 1

6. The following message appears on the LCD


Waiting for SCF
SCF means Status Check Frames
7. Repeat the above steps on Node 3 and 4 also
8. To transmit status check frame to Node 1 click on the icon 1

NETWORKS LABORATORY
9. Wait for the response to appear on XON Frames text box.
10. Once you get the response from Node 1 then transmit status check frame to Node 3 &
Node 4 respectively.
11. Click on Next to enter into Successor Predecessor screen.
12. Click on button 1 to transmit a successor predecessor frame to node 1.
13. Select Transmitting Message from the Menu
14. Specify the Destination address of any node in the Network i.e.1or 3 or 4.
15. Enter the Message to be transmitted in the text box. The max no of data characters in this
shall be up 70.
16. Click on Send button to Transmit

To transmit the message from an Embedded Node.

17. Press Key 2 in the keyboard from Main menu of the Embedded System.
18. Specify the Node address for which the data frame needs to be transmitted.
19. After entering the target address, the LCD will be cleared and the user should start
entering the
message. The message shall have max up to 70 bytes of data.
20. Press Enter key to store the message in the buffer.
21. The message stored will be transmitted only when the token is with this node.

Observation:
With this experiment we observe and analyze

The communication between two nodes in any network.

The error free communication over RS-485 media.

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the a data transmission, broadcasting and implementation is studied and
implemented using Token bus topology

NETWORKS LABORATORY

11.

Token Ring Topology

Aim:
To initialize and establish the logical ring and transmit a data from one node to other.

Experimental Setup:
1.

Keep the relay switch to left side

2. Token ring set-up consists of two cable one to the PC another to the embedded node
3.

Connect the cable labeled LAN-Token Ring to the three embedded nodes

4. Connect the cable labeled LAN-Token Ring PC to the PC comm. Port


5. Connect the other end of PC cable labeled LAN-TOKEN RING START NODE to the
cable labeled LAN-TOKEN RING START NODE on the embedded node side
6.

Connect the other end of PC cable labeled LAN-TOKEN RING END NODE to the
cable labeledLAN-TOKEN RING END NODE on the embedded node side

Experimental Procedure:
1. Connect all the three nodes and a PC to the respective power supplies
2. Switch on the power supply to all the nodes
3. After the embedded node completes the self test on its peripheral, press Enter key, only
when the following is displayed on the node
Enter Node Address,
Press Enter to Conti
4. Enter any node address expect address 2, because this address is allocated to Network
Monitor
5. Click on Start Token Ring on the network monitor menu
6. Click the initialize ring button to transmit duplicate check frame to the nodes
7. To transmit the token, click on the 0T# button in the screen
8. Token will start rotating through all the nodes infinitely
9. Once an embedded node receives a token a Red LED glows near to the relay switch

NETWORKS LABORATORY
10. On one complete rotation of the cycle or when the network monitor receives the token,
the 0T#
token frame is displayed
1 Status IDLE
2 Transmit Msg
3 Display Msg
4 Disconnect
11. Press 2 Transmit Message option from the menu on the embedded node
12. Specify the destination address of any node in the network
13. Enter the message in the text box to be transmitted. The maximum number of data
characters in this shall be upto 70
14. Once the message is entered, now press Enter Key to store the data in the buffer
15. The message stored will be transmitted after the node receives the token

Observation:

If the data is received by the receiver a 0 will be indicated on the LCD

Press 3 on the receiver to read the data

The transmitted data frame can be visualized on the network monitor

Data broadcasting

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the a data transmission, broadcasting and implementation is studied and
implemented using Token Ring topology

NETWORKS LABORATORY

12.Wireless LAN
Aim:
To initialize the Access Point and Embedded Node for wireless mode

Experimental Setup:
1.

Keep the relay switch to left side

2. Insert EPROMs labeled WLAN Node1, Node 3,Node 4 & Node 5 to the embedded
nodes
3. Connect the Embedded Nodes to the wireless modules with RS-232 Cables labeled
WLAN-Node
4.

Connect the PC serial port to Wireless Module with RS-232 Cable labeled WLAN-PC

Experimental Procedure
1. Select Wireless LAN
2. Click on Serial Port Settings on Screen 1, below screen appears. Select the appropriate
Comm-Port
3. Click on Start Wireless
4. Switch on the power supply
5. After the embedded node completes the self test, following message will be displayed
Device Address..
Enter to Conti
6. Press 1 on the embedded node displaying the above screen, else on other nodes press
the particular number displayed on the LCD.

NETWORKS LABORATORY
7. Select Transmit Message option from the menu

1 Status

2 Transmit Msg

3 Display Msg

4 Disconnect

8. Press 2 Transmit Message option from the menu on the embedded node
9. Specify the destination address of any node in the network
10. Enter the message in the text box to be transmitted. The maximum number of data
characters in
this shall be upto 70
11. Once the message is entered, now press Enter Key to store the data in the buffer
12. The message stored will be transmitted once the media is free

Observation:

If the data is received by the receiver a 0 will be indicated on the LCD

Press 3 on the receiver to read the data

The transmitted data frame can be visualized on the network monitor

Data broadcasting

NETWORKS LABORATORY

NETWORKS LABORATORY

Result:
Thus the data transmission, broadcasting and implementation is studied and
implemented using Wireless LAN.

Вам также может понравиться