Networks Manual

Embed Size (px)

Citation preview

  • 8/12/2019 Networks Manual

    1/25

    CMSCE NETWORKS LAB

    C.M.S. COLLEGE OF ENGINEERING

    C.M.S NAGAR, ERANAPURAM (PO), NAMAKKAL637 003.

    DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

    NETWORKS LAB MANUAL

  • 8/12/2019 Networks Manual

    2/25

    CMSCE NETWORKS LAB

  • 8/12/2019 Networks Manual

    3/25

    CMSCE NETWORKS LAB

    CONTENTS

    EXPERIMENT NAME PAGE NO

    1. Stop and Wait Protocol 12. Stop and wait - Time out 33. Stop and Wait - Error Control 7

    4. Selective Retransmission 9

    5. Go Back- N 11

    6. Distance Vector Algorithm 13

    7. Link State Algorithm 15

    8. Data Encryption Decryption 17

    9. CSMA-CD 19

    10.Token Bus Topology 21

    11.Token Ring Topology 2312.Wireless LAN 27

    FACULTY INCHARGE

  • 8/12/2019 Networks Manual

    4/25

    CMSCE NETWORKS LAB

    Experiment:1

    Stop and Wait Protocol

    Objective:

    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. Power up the systems.2. change to the directory cd NLS lab / layers /

    Phy_lyr

    3. Execute the file ./main (dot slash main)4. From main menu Choose Layers Data Link Layer Stop and Wait Protocol.5. After choosing the stop and waitprotocol, 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 frame10.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 buildup 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 aframe is also fixed, the padding characters will be filled into the frame, of user entered

    data is less than the frame size.

    Result:

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

  • 8/12/2019 Networks Manual

    5/25

    CMSCE NETWORKS LAB

  • 8/12/2019 Networks Manual

    6/25

    CMSCE NETWORKS LAB

  • 8/12/2019 Networks Manual

    7/25

    CMSCE NETWORKS LAB

    Experiment:2

    Stop and wait - Time out

    Objective:

    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 systemsThe 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_lyr3) 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 systems7) 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 occurIn 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

    Observation:

    The following observations can be made with the above experiment:

    With the RS-232 connection, frame can be transmitted between systems and simple buildup of protocol process is established.

    The working of the stop and waittime 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

  • 8/12/2019 Networks Manual

    8/25

    CMSCE NETWORKS LAB

    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

    Result:

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

  • 8/12/2019 Networks Manual

    9/25

    CMSCE NETWORKS LAB

  • 8/12/2019 Networks Manual

    10/25

    CMSCE NETWORKS LAB

    Experiment 3

    Stop and Wait - Error Control

    Objective: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.

    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 waiterror control protocol is understood in thisexperiment.

    Since the errors cannot occur with this kind of transmission media, the user is providewith 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 frameto 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 receiveridentifies the frame is having errors and prompts user to send a MACK.

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

  • 8/12/2019 Networks Manual

    11/25

    CMSCE NETWORKS LAB

    Experiment 4

    Selective Retransmission

    Objective:

    To conduct an experiment to demonstrate the working of Selective retransmissionProtocol.

    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_lyr3. 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.

    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 freecommunication.

    The working of sliding window- selective retransmission is understood in thisexperiment. In this error control mechanism, only the frame with error for which SREJ-N

    frame is sent will get retransmitted.

    Result:Thus the selective retransmission is studied and implemented

  • 8/12/2019 Networks Manual

    12/25

    CMSCE NETWORKS LAB

  • 8/12/2019 Networks Manual

    13/25

    CMSCE NETWORKS LAB

    Experiment 5

    Go- Back- N

    Objective:

    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 PortParameters 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

    systems7. 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

    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.

    Result:

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

  • 8/12/2019 Networks Manual

    14/25

    CMSCE NETWORKS LAB

    Experiment 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

    Result:

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

  • 8/12/2019 Networks Manual

    15/25

    CMSCE NETWORKS LAB

    Experiment 7

    Link State Algorithm

    1 2 3

    4

    Experimental procedure:

    1. Select the Link State routing algorithm from the menu or by selecting the shortcuticon

    2. After selecting on the Link State algorithm, the Link State Window will open and weneed to enter the values to configure it.

    3. Enter the own node (The node number assigned to this Pc, On Pc1 the own nodewould 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 4nodes in the network.

    5. select the neighboring nodes .For the above example Node 1 is connected toNode 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.

    Result:

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

  • 8/12/2019 Networks Manual

    16/25

    CMSCE NETWORKS LAB

    Experiment 8

    Data EncryptionDecryption

    Objective:

    To conduct an experiment to demonstrate the working of encryption and decryption oftext 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 on3. From the menu select Encryption- Decryption Algorithms (or)4. The encryptiondecryption menu appears5. Enter the IP address of the second systems6.

    Enter the Key value (for encryption purpose). Key value should be between 4-56characters

    7. Enter the plain text to encrypt8. Click the encrypt button. The encrypted data (cipher text) appears in the text area9. Click the Send Button to transmit the encrypted data to the destination IP address10.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 dataappears on the text area

    12. Enter the key value (for decryption purpose). The key value should match to thesender key.

    13.If the key value is wrong, decryption is not successful Click the Decrypt buttontoget the plain text messarge

    14.The decrypted message is shown on the text areaObservation:

    The following observations can be made with the above experiment:

    1. This experiment demonstrates the functionality of data encryption and decryptionbetween two systems. Here the Data is sent over Ethernet cable media. datacollection, transmission, reception and display concepts.

    2. The key value entered (password key) must be the same on both ends to achieve thedecryption Value

    Result:

    Thus the a data is encypted and decrypted using cryptographic method

  • 8/12/2019 Networks Manual

    17/25

    CMSCE NETWORKS LAB

    Experiment 9

    CSMA / CD

    Objective:

    To conduct an experiment to demonstrate the working of CSMA-CD using EthernetCard and Ethernet Cables among multiple systems.

    Experimental Setup & Procedure:

    1. Connect the Ethernet cable between the network cards of two or more systems using aHUB connection

    2. The systems should be configured with IP address and should be connected through ahub 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 thedestination. The destination will receive the file. Destination can save or cancel thefile.

    7. Click on the display button to see the collision graph.Result:

    Thus the a data is transmitted and and its collision graph is plotted.

  • 8/12/2019 Networks Manual

    18/25

    CMSCE NETWORKS LAB

    Experiment 10

    Token Bus Topology

    Objective:

    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 Card3. Connect RS485-LAN Bus Cable (Silver Cap) to the Converter Card4. Connect the other ends of the Bus to connector J6 on the embedded nodes5. Run the LAN trainer software

    Experimental Procedure:

    1. Chose the serial port settings by selecting a right serial communication Portparameters.

    2. Connect all the three boards (Nodes 1,3 and 4) and a PC Interface card to the respectivepower

    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 Conti5. Press 1 after you see the following message

    1> LAN Tr Node 1

    6. The following message appears on the LCDwaiting for SCF

    SCF means Status Check Frames

    7. Repeat the above steps on Node 3 and 4 also8. To transmit status check frame to Node 1 click on the icon 19. 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 successorpredecessor frame to node 1.13. Select Transmitting Message from the Menu14.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.

  • 8/12/2019 Networks Manual

    19/25

    CMSCE NETWORKS LAB

    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 startentering 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.

    Result:

    Thus the a data transmission ,broadcasting and implementation is studied and

    implemented using Token bus topology

  • 8/12/2019 Networks Manual

    20/25

    CMSCE NETWORKS LAB

    Experiment 11

    Token Ring Topology

    Objective:

    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 side2. Token ring set-up consists of two cable one to the PC another to the embedded node3. Connect the cable labeled LAN-Token Ring to the three embedded nodes4. Connect the cable labeled LAN-Token Ring PC to the PC comm. Port5. 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 thecable labeledLAN-TOKEN RING ENDNODE on the embedded node side

    Experimental Procedure:

    1. Connect all the three nodes and a PC to the respective power supplies2. Switch on the power supply to all the nodes3. 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

    Monitor5. Click on Start Token Ring on the network monitor menu6. Click the initialize ring button to transmit duplicate check frame to the nodes7. To transmit the token, click on the 0T# button in the screen8. Token will start rotating through all the nodes infinitely9. Once an embedded node receives a token a Red LED glows near to the relay switch10.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 Msg3 Display Msg

    4 Disconnect

    11.Press 2 Transmit Message option from the menuon the embedded node12.Specify the destination address of any node in the network13.Enter the message in the text box to be transmitted. The maximum number of data

    characters in this shall be upto 70

  • 8/12/2019 Networks Manual

    21/25

    CMSCE NETWORKS LAB

    14.Once the message is entered, now press Enter Key to storethe data in the buffer15.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

    Result:

    Thus the a data transmission ,broadcasting and implementation is studied andimplemented using Token Ring topology

  • 8/12/2019 Networks Manual

    22/25

    CMSCE NETWORKS LAB

    Experiment 12

    Wireless LAN

    Objective:

    To initialize the Access Point and Embedded Node for wireless mode

    Experimental Setup:

    1. Keep the relay switch to left side2. Insert EPROMs labeled WLAN Node1, Node 3,Node 4 & Node 5 to the embedded

    nodes3. 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 LAN2. Click on Serial Port Settings on Screen 1, below screen appears. Select the appropriate

    Comm-Port

    3. Click on Start Wireless4. Switch on the power supply5. 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.

    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 network10.Enter the message in the text box to be transmitted. The maximum number of datacharacters inthis shall be upto 70

    11.Once the message is entered, now press Enter Key to store the data in the buffer12.The message stored will be transmitted once the media is free

  • 8/12/2019 Networks Manual

    23/25

    CMSCE NETWORKS LAB

    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

    Result:

    Thus the a data transmission ,broadcasting and implementation is studied andimplemented using Wireless LAN

  • 8/12/2019 Networks Manual

    24/25

    CMSCE NETWORKS LAB

  • 8/12/2019 Networks Manual

    25/25