D-Type-9 pin no.

D-Type25 Pin no. 2 3 4 5 6 7 8 20 22

Pin outs

Function

3 2 7 8 6 5 1 4 9

RD TD RTS CTS DSR SG DCD DTR RI

Receive Data (Serial data input) Transmit Data (Serial data output) Request to send (acknowledge to modem that UART is ready to exchange data Clear to send (i.e.; modem is ready to exchange data) Data ready state (UART establishes a link) Signal ground Data Carrier detect (This line is active when modem detects a carrier Data Terminal Ready. Ring Indicator (Becomes active when modem detects ringing signal from PSTN

Expt. No.: Date:

STUDY AND IMPLEMENTATION OF SERIAL AND PARALLEL PORTS

Aim:

Theory: Serial Port: RS232 is the most known serial port used in transmitting the data in communication and interface. Even though serial port is harder to program than the parallel port, this is the most effective method in which the data transmission requires less wires that yields to the less cost. The RS232 is the communication line which enables the data transmission by only using three wire links. The three links provides „transmit‟, „receive‟ and common ground. The „transmit‟ and „receive‟ line on this connecter send and receive data between the computers. As the name indicates, the data is transmitted serially. The two pins are TXD & RXD. There are other lines on this port as RTS, CTS, DSR, DTR, and RTS, RI. The „1‟ and „0‟ are the data which defines a voltage level of 3V to 25V and -3V to -25V respectively. The RS-232D has existed in two types. i.e., D-TYPE 25 pin connector and DTYPE 9 pin connector, which are male connectors on the back of the PC. You need a female connector on your communication from Host to Guest computer. The pin outs of both D-9 & D-25 are show in the table. Null Modems

A Null Modem is used to connect two DTE's together. This is commonly used as a cheap way to network games or to transfer files between computers using Zmodem Protocol, Xmodem Protocol etc. This can also be used with many Microprocessor Development Systems.

NULL MODEM

Click “SET_SERIAL_PORT” button. Any data transmitted from the first computer must be received by the second thus TD is connected to RD. The status of DSR pin will read “notok” in both receiver and transmitter. Connect RTS pin of system2 to CTS pin of system1. 16. 18. Connect RXD pin of system2 to TXD pin of system1. 5. The status of DSR pin will read “ok” in both receiver and transmitter. 2. 17. 19. The aim is to make to computer think it is talking to a modem rather than another computer. 14. 15. 22. 7. 11. 12. Connect DTR pin of system1 to DSR pin of system2. 21. 4. 20.exe in both PC‟s. 3.It only requires 3 wires (TD. 6. The status of CTS pin will read “notok” in both receiver and transmitter. Connect other end to the 9 pin D-type female connector of the PC to PC communication trainer kit. The second computer must have the same setup thus RD is connected to TD. Signal Ground (SG) must also be connected so both grounds are common to each computer. “successfully changed” message appears. Procedure: 1. Type the message to be transmitted in the text box. Repeat step 1 and 2 with the other PC(system2). Connect RTS pin of system1 to CTS pin of system2. Click “CLR SCREEN” button to clear the text box. Connect RXD pin of system1 to TXD pin of system2. 10. 8. Click “RTS” button in the transmitting PC and receiver PC. NOTE: baud rate selected should be same for both the PC‟s. RD & SG) to be wired straight through thus is more cost effective to use with long cable runs. Select the comm terminal and baud rate. . Click “TRANSMIT” button to transmit the typed content. The status of CTS pin will read “ok” in both receiver and transmitter. Common the ground terminals. Run serial. The theory of operation is reasonably easy. Connect one end of the 9 pin D-type female to female connector to the serial port of your PC(system1). 13. Click “DTR” button in the transmitting PC and receiver PC. 9. Connect DTR pin of system2 to DSR pin of system1.

Theusedpinsforthisexperimentasfollows: Pin 1 2 3 4 5 6 7 8 9 10 18 Signals -Strobe +databit0 +databit1 +databit2 +databit3 +databit4 +databit5 +databit6 +databit7 AC K GROUND Purpose D0 D1 D2 D3 D4 D5 D6 D7 .IBM-PC PARALLEL PRINTERPORT FEMALEDB-25SOCKETEXTERNAL PINLAYOUT: Theusedpinsforthisexperimentareasfollows.

The output of the buffer is connected to the data lines of the parallel port. Connect RTS of system2 to CTS of system2 Parallel Port: DESCRIPTION: The main aim of the experiment is to transfer a file from a PC to another PC using parallel port. Connect RTS of system1 to CTS of system1 4. 26. The digital data pins are connected directly to the 74LS244 bi-directional buffer. . Type the message in the text box. 27. Click “STOP” button to exit. The interface between the PC‟s is done through the parallel port(LPT) in the PC. Click “READ_FILE_TO_SCREEN” button to read the contents of the file. Connection for null modem method: To connect the systems using null modem method 1. Connect DTR of system1 to DSR of system1 2. The control line STROBE and status line ACK make the handshaking signal.a male to male 25 pin D-type connector is used to connect together. 28. The parallel port is configured to run in bi-directional mode. NOTE: the transmitted file content will be stored in the path given in the receiving PC. Click “CLR SCREEN” button to clear the text box. Connect DTR of system2 to DSR of system2 3. 29. 24. Click “TRANSMIT_FILE” button to transmit the file content. Click “CLR SCREEN” to repeat the process. The data lines D0-D8 (pins 2 to 9) are used to read/write a byte of data. Click “WRITE_SCREEN_TO_FILE” button to write the contents. Type the file path with file name to which the contents to be written.To transmit a file: 23. 30. 25.

.

OPERATION: 1. Select the path for the file to be stored. 5.exe in both the PC‟s. This handshaking sequence is repeated for every byte until end of file. 5. Connect other end to the 25 pin D-type female connector of the PC to PC communication trainer kit. The receiver PC waits for status pin ACK(which is cross connected with the STROBE pin of transmitter PC) to go high. 6. 8.The width of the acknowledge pulse can be set by the user. The data byte to be transmitted is placed on the data register (0x378). 11. 4. Set the transmission rate. The receiver PC then acknowledges by giving a pulse in its STROBE pin . For receiving system: 10. Connect the STROBE pin of system2 to the ACK pin of system 1 in the trainer kit. 7. Repeat step 1 and 2 with the other PC(system2). Run parallel. Once the ACK pin goes high the data in the data register is read. 3. Select the file to be sent in the PC from which you want to transfer file (say system1). 6. Common the ground terminals. The user can choose the preset rate if “choose delay” option is selected or can assign any rate from 1 to 100 ms if “user delay” option is selected. . 2. Connect data pins D0 to D7 of system1 to pins D0 to D7 of system2. 3. The control pin STROBE is made low to indicate a valid data on the data bus. 4. Connect the STROBE pin of system1 to the ACK pin of system 2 in the trainer kit. 2. Connect one end of the 25 pin D-type male to male connector to the parallel port of your PC(LPT)(system1). For transmitting system: 9. PROCEDURE: 1.

.

13. Click “receive file” button in the receiver PC.NOTE: The “receive file” button is disabled until the file path for the receiving file is selected. 16. “file transfer completed” message appears both in the transmitter and receiver PC once the transfer is complete. Repeat all the above steps to send a new file. 15. The file contents will be displayed on the text box in the receiver PC. Result: . Click “clear” button to clear the contents in the text box. Click “send file” button in the transmitting PC. 14. 12. 17.

.

repeater based Ethernet networks still use half-duplex and CSMA/CD. . and ARCNET. in dealing with packet collisions. is the most widespread wired LAN technology. with only minimal activity by the repeater. Every packet is sent to every port on the repeater. The combination of the twisted pair versions of Ethernet for connecting end systems to the network.3. along with the fiber optic versions for site backbones. FDDI.: Date: IMPLEMENTATION AND STUDY OF ETHERNET LAN PROTOCOL Aim: Theory: Ethernet is a family of frame-based computer networking technologies for local area networks (LAN). Despite the physical star topology. primarily the Collision Enforcement signal. The total throughput of the repeater is limited to that of a single link. No. and all links must operate at the same speed.Expt. largely replacing competing LAN standards such as token ring. It defines a number of wiring and signaling standards for the Physical Layer of the OSI networking model as well as a common addressing format and Media Access Control at the Data Link Layer. It has been used from around 1980[1] to the present. Ethernet is standardized as IEEE 802. The name was inspired by the physical concept of the ether. so bandwidth and security problems are not addressed.

3757 32.0.0.4 9109 0 0 0 253.03 1 9109 32.0.777 2.81 5465.2 36.0. Frame: Time Vs Frame Transferred 40 35 30 25 20 15 10 5 0 00:00 00:02 00:03 00:05 Frame 00:07 00:09 00:10 Output: Source node IP address Destination node IP address Payload delivered (Kbytes) Overheads (Kbytes) Queuing Time (ms) Medium Access Time (ms) Dropped frames Frame errors Checksum errors Mean Delay (ms) Average attempts Simulation time (ms) Throughput (Kbps) Goodput (Kbps) Data frames generated Frame Transmission Probability (%) Collision count Defer count 0.Time vs.2995 36 100 0 0 .1 0.

3. Frame graph can be found and in the Destination node directory the sent file can be found. Click Send button to start file transfer. Select the input parameters as follows: i. 8. Maximum Back off : 8 4. Performance statistics and Time vs.00000001 iv. 2.Procedure: 1. file to transfer and destination IP address. Frame Size : 1500Bytes v. Select LAN Topologies and click Ethernet icon. Result: . In the Ethernet Directory  Sender node directory. Then Assign IP address for each node. Click Store button to store the results in <DIR>:\Simulator Directory 9. Connect two PC‟s using RJ-45 cable and run Simulator software in both the computers. Error Generation : 0. Click Apply. 6. 5. Number of Nodes :3 ii. Click Result button to show the various Result Criterion. Select the source node. Frame Interval : 250ms iii. 7.

.

In order to guarantee the packet delay and transmission in Token bus protocol.4.: Date: STUDY AND IMPLEMENTATION OF TOKEN BUS PROTOCOL Aim: Theory: Token bus is a network implementing the token ring protocol over a "virtual ring" on a coaxial cable. the ring. Token bus was used by GM (General Motors) for their Manufacturing Automation Protocol (MAP) standardization effort. No. The main difference is that the endpoints of the bus do not meet to form a physical ring. The IEEE 802.4 Working Group is disbanded. Token bus was standardized by IEEE standard 802. a modified Token bus was proposed in Manufacturing Automation Systems and flexible manufacturing system (FMS). Each node must know the address of its neighbour in the ring. A token is passed around the network nodes and only the node possessing the token may transmit. It is mainly used for industrial applications. and disconnections from. so a special protocol is needed to notify the other nodes of connections to. If a node doesn't have anything to send. . This is an application of the concepts used in token ring networks.Expt. the token is passed on to the next node on the virtual ring.

0.1 0.5417 5.2 36.777 2.4714 36 33.1 0 0 1493.69 53773 5.0. Frame: Time Vs Frame Transferred 40 35 30 25 20 15 10 5 0 00:00 00:09 00:17 00:26 00:35 Frame 00:43 00:52 01:00 Output: Source node IP address Destination node IP address Payload delivered (Kbytes) Overheads (Kbytes) Queuing Time (ms) Frame errors Checksum errors Mean Delay (ms) Simulation time (ms) Throughput (Kbps) Goodput (Kbps) Data frames generated Frame Transmission Probability (%) Token count 0.96 106 .Time vs.0.0.59 37641.

10. Frame Size : 2048Bytes 4. Click Result button to show the various Result Criterion. Performance statistics and Time vs. 9. Frame graph can be found and in the Destination node directory the sent file can be found. Error Generation : 0. 8.00000001 iii. Select LAN Topologies and click Token Bus icon. In the Token_Bus Directory  Sender node directory. 2. 11. Click Submit for File Transfer. Click C button after each node in Preset Values column to connect it in the bus. Connect two PC‟s using RJ-45 cable and run Simulator software in both the computers. Select the source node. Select the input parameters as follows: i. file to transfer and destination IP address. 3. Click G button to store the results in <DIR>:\Simulator Directory. Then Assign IP address for each node. Click Send button to start file transfer.Procedure: 1. 6. 7. Click Apply. Result: . Number of Nodes :3 ii. 5.

.

except Asynchronous Transfer Mode (ATM). As a network technology. Token Ring does come with a higher price tag because token ring hardware is more complex and more expensive to manufacture.5v). Token Ring uses a ring based topology and passes a token around the network to control access to the network wiring. . Many mainframes (and until recently. to share the network with other data. This feature is not available in any other LAN protocol. which is key to a mainframe's operation. Token Ring comes in standard 4 and 16 Mbsp and high-speed Token Ring at 100Mbps(IEEE 802. The Token Ring protocol also provides features for allowing delaysensitive traffic. Cisco still produces FEP cards for their routers (as of 2004).: Date: STUDY AND IMPLEMENTATION OF TOKEN RING PROTOCOL Aim: Theory: Token ringlocal area network (LAN) technology is a local area network protocol which resides at the data link layer (DLL) of the OSI model. ALL IBM mainframes) used a Front End Processor (FEP) with either a Line Interface Coupler (LIC) at 56kbps. No. This token passing scheme makes conflicts in accessing the wire unlikely and therefore total throughput is as high as typical Ethernet and Fast Ethernet networks.5t) and 1Gbps (IEEE 802.Expt. token ring is passing out of use because it has a maximum speed of 16 Mbps which is slow by today's gigabit Ethernet standards. Token ring frames travel completely around the loop. It uses a special threebyte frame called a token that travels around the ring. Token-possession grants the possessor permission to transmit on the medium. or a Token-ring Interface Coupler (TIC) at 16 Mbps.

0.37 76 .0.0681 14.2 36.Time vs.777 2.0. Frame: Time Vs Frame Transferred 40 35 30 25 20 15 10 5 0 00:00 00:04 00:09 Frame 00:13 00:17 00:22 Output: Source node IP address Destination node IP address Payload delivered (Kbytes) Overheads (Kbytes) Frame errors Checksum errors Simulation time (ms) Throughput (Kbps) Goodput (Kbps) Data frames generated Frame Transmission Probability (%) Token count 0.808 2 0 19625 15.9919 36 47.0.1 0.

Frame graph can be found and in the Destination node directory the sent file can be found. Click Send button to start file transfer. Frame Size : 2048Bytes 4. Click C button after each node in Preset Values column to connect it in the bus. Click G button to store the results in <DIR>:\Simulator Directory. 11. file to transfer and destination IP address. 6. Error Generation : 0. 9. 3. 2. Result: . Click Result button to show the various Result Criterion.Procedure: 1. Select the source node. Number of Nodes :3 ii. Connect two PC‟s using RJ-45 cable and run Simulator software in both the computers.00000001 iii. Performance statistics and Time vs. Select the input parameters as follows: i. Select LAN Topologies and click Token Ring icon. 10. 5. In the Token_Ring Directory  Sender node directory. Click Submit for File Transfer. Click Apply. 8. Then Assign IP address for each node. 7.

Access Point .

Expt. No.: Date:

IMPLEMENTATION AND STUDY OF WIRELESS LAN PROTOCOL

Aim:

Theory: A wireless local area network (WLAN) links two or more devices using some wireless distribution method (typically spread-spectrum or OFDM radio), and usually providing a connection through an access point to the wider internet. This gives users the mobility to move around within a local coverage area and still be connected to the network. Wireless LANs have become popular in the home due to ease of installation, and the increasing popularity of laptop computers. Public businesses such as coffee shops and malls have begun to offer wireless access to their customers; often for free. Large wireless network projects are being put up in many major cities: New York City, for instance, has begun a pilot program to provide city workers in all five boroughs of the city with wireless Internet access. Architecture

Stations
All components that can connect into a wireless medium in a network are referred to as stations.All stations are equipped with wireless network interface cards (WNICs).Wireless stations fall into one of two categories: access points, and clients. Access points (APs), normally routers, are base stations for the wireless network. They transmit and receive radio frequencies for wireless enabled devices to communicate with. Wireless clients can be mobile devices such as laptops, personal digital assistants, IP phones and other smartphones, or fixed devices such as desktops and workstations that are equipped with a wireless network interface.

Basic service set
The basic service set (BSS) is a set of all stations that can communicate with each other.There are two types of BSS: Independent BSS (also referred to as IBSS), and infrastructure BSS.Every BSS has an identification (ID) called the BSSID, which is the MAC address of the access point servicing the BSS.An independent BSS (IBSS) is an ad-hoc network that contains no access points, which means they cannot connect to any other basic service set.An infrastructure can communicate with other stations not in the same basic service set by communicating through access points.

Time vs. Frame:

Time Vs Frame Transferred
40 35 30 25 20 15 10 5 0 00:00

00:04

00:09

00:13

00:17

00:22 Frame

00:26

00:30

00:35

00:39

00:43

Output: Source node IP address Destination node IP address Payload delivered (Kbytes) Overheads (Kbytes) Dropped frames Frame errors Checksum errors Simulation time (ms) Throughput (Kbps) Goodput (Kbps) Data frames generated Frame Transmission Probability (%) Collision count Defer count 0.0.0.1 0.0.0.2 36.777 2.736 0 1 0 52074 5.7242 5.65 36 57.14285714 27 125

Extended service set

An extended service set (ESS) is a set of connected BSSes. Access points in an ESS are connected by a distribution system. Each ESS has an ID called the SSID which is a 32-byte (maximum) character string.

Distribution system
A distribution system (DS) connects access points in an extended service set. The concept of a DS can be used to increase network coverage through roaming between cells.DS can be wired or wireless. Current wireless distribution systems are mostly based on WDS or MESH protocols, though other systems are in use.

Procedure: 1. Connect two PC‟s using Wireless Router and run Simulator software in both the computers. 2. Select LAN Topologies and click Wireless icon. 3. Select the input parameters as follows: i. Number of Nodes :3 ii. Frame Interval : 250ms iii. Frame Size : 1500Bytes iv. Maximum Back off : 8 v. Error Generation : 0.00000001 4. Click Apply. Then Assign IP address for each node. 5. Click Submit for File Transfer. 6. Select the source node, file to transfer and destination IP address. 7. Click Send button to start file transfer. 8. Click Result button to show the various Result Criterion. 9. Click G button to store the results in <DIR>:\Simulator Directory. 10. In the Wireless Directory  Sender node directory, Performance statistics and Time vs. Frame graph can be found and in the Destination node directory the sent file can be found.

Result:

.

Expt. After sending each frame.: IMPLEMENTATION AND STUDY OF STOP & WAIT PROTOCOL Date: Aim: Theory: Stop-and-wait ARQ is a method used in telecommunications to send information between two connected devices. The above behavior is the simplest Stop-and-Wait implementation. which may cause problems if it assumes that the second ACK is for the next frame in the sequence. it sends an ACK. If the receiver sees that the frame is good.pretending that the frame was completely lost. known as the timeout. After receiving a good frame. the sender doesn't send any further frames until it receives an acknowledgement (ACK) signal. A stop-and-wait ARQ sender sends one frame at a time. It ensures that information is not lost due to dropped packets and that packets are received in the correct order. It is the simplest kind of automatic repeat-request (ARQ) method. Another problem is when the transmission medium has such a long latency that the sender's timeout runs out before the frame reaches the receiver. Eventually the receiver gets two copies of the same frame. . waiting for a single ACK. No. it is a special case of the general sliding window protocol with both transmit and receive window sizes equal to 1. the receiver sends an ACK. times out. and doesn't know if the second one is a duplicate frame or the next frame of the sequence carrying identical data. Typically the transmitter adds a redundancy check number to the end of each frame. receives two ACKs. One problem is where the ACK sent by the receiver is damaged or lost. In this case. The sender. not merely damaged. and sends the frame again. Now the receiver has two copies of the same frame. the receiver discards it and does not send an ACK -. the sender sends the same frame again. in a real life implementation there are problems to be addressed. In this case the sender resends the same packet. and sends an ACK for each one. If the ACK does not reach the sender before a certain time. However. If the receiver sees that the frame is damaged. The receiver uses the redundancy check number to check for possible damage. the sender doesn't receive the ACK.

2258 2 .4 147.777 1998. Frame: Time Vs Frame Transferred at 2048 Kbytes 20 18 16 14 12 10 8 6 4 2 0 00:00 00:04 00:09 Frame 00:13 00:17 00:22 Output: Payload delivered (Kbytes) Transfer time (ms) Throughput (Kbps) Losses 36.Time vs.

Similarly. To solve this problem. RTT d. This sequence number alternates (from 0 to 1) in subsequent frames. is twice the transit time (assuming the turnaround time can be zero). Stop-and-wait ARQ is inefficient compared to other ARQs. This way. because the time between packets. The throughput on the channel is a fraction of what it could be. Loss Rate c. 4. and the second frame is discarded. Result: .To avoid these problems. Select the Source file and click Start button to start Data Transfer. Select the input parameters as follows: a. When the receiver sends an ACK. If two subsequent frames have the same sequence number. if two subsequent ACKs reference the same sequence number. 2. it includes the sequence number of the next packet it expects. they are acknowledging the same frame. one can send more than one packet at a time with a larger sequence number and use one ACK for a set. Stats can be viewed under Results column in Simulator window itself or you can find them in <Drive>:\Simulator\Stop_And_Wait Directory. Select Data Transfer Protocols from the Simulator window and Click on Stop and Wait icon. Click Store button under both Receiver and Sender to store the Output statistics data. the receiver can detect duplicated frames by checking if the frame sequence numbers alternate. This is what is done in Go-Back-N ARQ and the Selective Repeat ARQ. Click Submit button to apply the data. they are duplicates. 5. if the ACK and the data are received successfully. 6. Packet Size b. Procedure: 1. Retransmit Timeout : 2048 Bytes : 10% : 50ms : 100 ms 3. the most common solution is to define a 1 bit sequence number in the header of the frame.

.

The receiver process keeps track of the sequence number of the next frame it expects to receive. since unlike waiting for an acknowledgement for each packet. then that frame and all following frames in the window (even if they were received without error) will be re-sent. and sends that number with every ACK it sends. However. or the ACK acknowledging them was lost or damaged. In other words. The receiver will ignore any frame that does not have the exact sequence number it expects – whether that frame is a "past" duplicate of a frame it has already ACK'ed[1] or whether that frame is a "future" frame past the last packet it is waiting for. during the time that would otherwise be spent waiting. Once the sender has sent all of the frames in its window. To avoid this. it will detect that all of the frames since the first lost frame are outstanding. the connection is still being utilized as packets are being sent. in which the sending process continues to send a number of frames specified by a window size even without receiving an acknowledgement (ACK) packet from the receiver. It is a special case of the general sliding window protocol with the transmit window size of N and receive window size of 1.Expt. Selective Repeat ARQ can be used. this method also results in sending frames multiple times – if any frame was lost or damaged. more packets are being sent. . No. Go-Back-N ARQ is a more efficient use of a connection than Stop-and-wait ARQ. and will go back to sequence number of the last ACK it received from the receiver process and fill its window starting with that frame and continue the process over again.: Date: IMPLEMENTATION AND STUDY OF GO BACK N PROTOCOL Aim: Theory: Go-Back-N ARQ is a specific instance of the automatic repeat request (ARQ) protocol.

Frame: Time Vs Frame Transferred 20 18 16 14 12 10 8 6 4 2 0 00:00 00:04 00:09 Frame 00:13 00:17 00:22 Output: Payload delivered (Kbytes) Transfer time (ms) Throughput (Kbps) Losses 36.3 155.4806 66 .777 1892.Time vs.

Select the input parameters in Menu bar as follows: a. 4. Packet Size b. 5. Retransmit Timeout : 2048 Bytes : 1000kbps : 50ms : 10% : 5 Packets : 100 ms 3. 2. Stats can be viewed under Results column in Simulator window itself or you can find them in <Drive>:\Simulator\Go_Back_n Directory. Result: . Packet Loss Rate e. Click Store button under both Receiver and Sender to store the Output statistics data. Bandwidth c.Procedure: 1. Select the Source file and click Start button to start Data Transfer. Window Size f. RTT d. Select Data Transfer Protocols from the Simulator window and Click on GoBack-N icon.

.

When used as the protocol for the delivery of messages. of the packages that are resent after timeouts are duplicates that are not recognized as such. If the receiving window is larger than half the maximum sequence number. Alternately selective retransmission may be employed in conjunction with the basic ARQ mechanism where the message is first subdivided into sub-blocks (typically of fixed length) in a process called packet segmentation. If a frame from the sender does not reach the receiver.Expt. some. . No. The receiver process keeps track of the sequence number of the earliest frame it has not received. Unlike Go-Back-N ARQ. In non-continuous channels where messages may be variable in length. it resends the frame number given by the ACKs. standard ARQ or Hybrid ARQ protocols may treat the message as a single unit.: Date: IMPLEMENTATION AND STUDY OF SELECTIVE REPEATPROTOCOL Aim: Theory: Selective Repeat ARQ / Selective Reject ARQis a specific instance of the Automatic Repeat-reQuest (ARQ) Protocol. possibly even all. Once the sender has sent all the frames in its window. The size of the sending and receiving windows must be equal. and then continues where it left off. this is the general case of the sliding window protocol with both transmit and receive window sizes greater than 1.[1] When used as the protocol for the delivery of subdivided messages it works somewhat differently. the receiving process will continue to accept and acknowledge frames sent after an initial error. The original variable length message is thus represented as a concatenation of a variable number of sub-blocks. the sending process continues to send a number of frames specified by a window size even after a frame loss. replying each time with an ACK containing the sequence number of the earliest missing frame. and half the maximum sequence number (assuming that sequence numbers are numbered from 0 to n−1) to avoid miscommunication in all cases of packets being dropped. The sender moves its window for every packet that is acknowledged. or it may be used as a protocol for the delivery of subdivided message sub-units. consider the case when all ACKs are destroyed. The receiver continues to fill its receiving window with the subsequent frames. and sends that number with every acknowledgement (ACK) it sends. the sender continues to send subsequent frames until it has emptied its window. It may be used as a protocol for the delivery and acknowledgement of message units. To understand this.

2931 62 . Frame: Time Vs Frame Transferred 20 18 16 14 12 10 8 6 4 2 0 00:00 00:04 00:09 Frame 00:13 00:17 Output: Payload delivered (Kbytes) Transfer time (ms) Throughput (Kbps) Losses 36.Time vs.777 1790.8 164.

Select Data Transfer Protocols from the Simulator window and Click on Selective Repeat icon. Click Store button under both Receiver and Sender to store the Output statistics data. Window Size : 5 Packets f. needing to only contain the sub-blocks that were NAKed. 2. Packet Size : 2048 Bytes b. Bandwidth : 1000kbps c. 4. in ARQ with selective transmission the NAKed response would additionally carry a bit flag indicating the identity of each sub-block successfully received. In other words it's easier to receive a short message than a longer message.While in standard ARQ the message as a whole is either acknowledged (ACKed) or negatively acknowledged (NAKed). Result: . Selective retransmission applied to variable length messages completely eliminates the difficulty in delivering longer messages. and the number of outstanding subblocks in following transmissions diminishes. Packet Loss Rate : 10% e. as each repeat is the full length. RTT : 50ms d. Select the input parameters in Menu bar as follows: a. Stats can be viewed under Results column in Simulator window itself or you can find them in <Drive>:\Simulator\Selective_Repeat Directory. In most channel models with variable length messages. as successfully delivered sub-blocks are retained after each transmission. the probability of error-free reception diminishes in inverse proportion with increasing message length. Procedure: 1. In ARQ with selective retransmission of sub-divided messages each retransmission diminishes in length. Therefore standard ARQ techniques involving variable length messages have increased difficulty delivering longer messages. 5. Select the Source file and click Start button to start Data Transfer. Retransmit Timeout : 100 ms 3.

.

interoperable versions of a program. Choose an integer e such that 1 <e<φ(n) and gcd(e. encryption and decryption. Prime integers can be efficiently found using a primarily test. The keys for the RSA algorithm are generated the following way: 1. Compute n = pq. at which point it can be used to implement multiple. . where φ is Euler's totient function. Key generation RSA involves a public key and a private key.: Date: STYDY OF DATA ENCRYPTION AND DECRYPTION Aim: Theory: A security protocol (cryptographic protocol or encryption protocol) is an abstract or concrete protocol that performs a security-related function and applies cryptographic methods. the integersp and q should be chosen at random. i. A protocol describes how the algorithms should be used.φ(n)) = 1. The public key can be known to everyone and is used for encrypting messages. Compute φ(n) = (p – 1)(q – 1). A sufficiently detailed protocol includes details about data structures and representations. No. 4. e and φ(n) are co-prime. Cryptographic protocols are widely used for secure application-level data transport. Messages encrypted with the public key can only be decrypted using the private key. A cryptographic protocol usually incorporates at least some of these aspects:      Key agreement or establishment Entity authentication Symmetric encryption and message authentication material construction Secured application-level data transport Non-repudiation methods The RSA algorithm involves three steps: key generation. 2. o For security purposes. o n is used as the modulus for both the public and private keys 3.Expt.e. and should be of similar bit-length. Choose two distinct prime numbersp and q.

Output (RSA Algorithm): p = 97 q=7 n = pq = 679 s = (p-1)*(q-1) = 576 d=5 e = 461 AsciiValues : m = 97 m = 98 m = 99 Encrypted Text : m^d mod n = 97^5 mod 679 = 97 m^d mod n = 98^5 mod 679 = 98 m^d mod n = 99^5 mod 679 = 323 .

Notes:  o o  An alternative. o d is kept as the private key exponent.q − 1). there are more efficient methods of calculating cd using the pre computed values below. λ can also be defined using the Carmichael function. IEEE 1363 describes. i. e having a short bit-length and small Hamming weight results in more efficient encryption . This can be done quickly using the method of exponentiation by squaring. (In practice. that p and q match additional requirements: be strong primes. and be different enough that Fermat factorization fails. Encryption Alice transmits her public key (n.31 standard prescribes. where lcm is the least common multiple. The ANSI X9. o This is often computed using the extended Euclidean algorithm. He then computes the ciphertextc corresponding to c = me(mod n).most commonly 0x10001 = 65537.e.e is released as the public key exponent.[4] 5.) . Determine d = e–1 mod φ(n). Bob then transmits c to Alice. d is the multiplicative inverse of e mod φ(n). and PKCS#1 allows. Using λ instead of φ(n) allows more choices for d. is to choose d matching de ≡ 1 mod λ with λ = lcm(p − 1. small values of e (such as 3) have been shown to be less secure in some settings.e) to Bob and keeps the private key secret. Bob then wishes to send message M to Alice. However. He first turns M into an integer 0 <m<n by using an agreed-upon reversible protocol known as a padding scheme. Given m. used by PKCS#1. The private key consists of the private (or decryption) exponent d which must be kept secret. λ(n). The public key consists of the modulus n and the public (or encryption) exponent e. Decryption Alice can recover m from c by using her private key exponent d via computing m = cd(mod n). she can recover the original message M by reversing the padding scheme.

.

The parameters used here are artificially small. Choose any number 1 <e< 3120 that is co-prime to 3120. but one can also use Open SSL to generate and examine a real key pair. For a padded plaintext message m. in order to encrypt m = 65. we calculate m = 27902753(mod 3233) = 65. The private key is (n = 3233. the decryption function is c2753(mod 3233). 4. d = 2753). For an encrypted texts. e = 17). such as p = 61 and q = 53. Let e = 17. Choose two distinct prime numbers. Given e. To decrypt c = 2790. . we could then compute d and so acquire the private key. Both of these calculations can be computed efficiently using the square-andmultiply algorithm for modular exponentiation. 3. we calculate c = 6517(mod 3233) = 2790. Compute n = pq giving n = 61 · 53 = 3233. Compute d. 5. Compute the totient of the product as φ(n) = (p − 1)(q − 1) giving φ(3233) = (61 − 1)(53 − 1) = 3120. For instance. obtained from the freely available public key back to the primes p and q. In real life situations the primes selected would be much larger. also from the public key. in our example it would be relatively trivial to factor n. 1. The public key is (n = 3233. 3233. the modular multiplicative inverse of e(mod φ(n)) yielding d = 2753. Choosing a prime number for e leaves us only to check that e is not a divisor of 3120. 2. the encryption function is m17(mod 3233).A worked example Here is an example of RSA encryption and decryption.

.

Click Next button to Generate RSA algorithm based encryption. Open simulator window and select Encryption and Decryption. RSA Algorithm For shifting algorithm: 3. Give the input text. For RSA algorithm: 6. Shifting Algorithm b. 5. Input text. Press Re-shift to see Decrypted original text. 8. a. Press Shift button to see Encrypted text. select Shifting index (1 to 5). Finally the text will be Encrypted and stored in Desktop. Select Decrypt menu and click Decrypt to get back the input text.Procedure: 1. Select either one of the Encryption techniques. 4. Result: . 9. 7. 2.

.

When a data packet comes in on one of the lines. the other major class is the distance-vector routing protocol. Routers perform the data "traffic direction" functions on the Internet. which works by having each node share its routing table with its neighbors. The collection of best paths will then form the node's routing table. nodes that are prepared to forward packets. LINK-STATE ROUTING A link-state routing protocol is one of the two main classes of routing protocols used in packet switching networks for computer communications. in the Internet. in the form of a graph. it directs the packet to the next network on its journey. these are called routers). The link-state protocol is performed by every switching node in the network (i. A router is a microprocessor-controlled device that is connected to two or more data lines from different networks. No. Examples of link-state routing protocols include OSPF and IS-IS.Expt. showing which nodes are connected to which other nodes. the router reads the address information in the packet to determine its ultimate destination. A data packet is typically passed from router to router through the networks of the Internet until it gets to its destination computer. The basic concept of link-state routing is that every node constructs a map of the connectivity to the network.: Date: IMPLEMENTATION OF LINK STATE ROUTING ALGORITHM Aim: Theory: A router is a device that forwards data packets across computer networks. This contrasts with distance-vector routing protocols. using information in its routing table. Routers also perform other tasks such as translating the data transmission protocol of the packet to the appropriate protocol of the next network. In a link-state protocol the only information passed between nodes is connectivity related. . Then.e. Each node then independently calculates the next best logical path from it to every possible destination in the network.

Output: For 3 Routers with the distance as follows: AB: 2 BC: 3 CA: 4 Selected Source Node: A Iteration : 1 Nodes in Group P Node: A Distance : 0 Predecessor : A Nodes in Group T Node: B Distance : 2 Predecessor : A Node: C Distance : 4 Predecessor : A All nodes have been considered Iteration : 2 Nodes in Group P Node: A Distance : 0 Predecessor : A Node: B Distance : 2 Predecessor : A Nodes in Group T Node: C Distance : 4 Predecessor : A All nodes have been considered Iteration : 3 Nodes in Group P Node: A Distance : 0 Predecessor : A Node: B Distance : 2 Predecessor : A Node: C Distance : 4 Predecessor : A Nodes in Group T All nodes have been considered .

to the desired node in the tree. The candidate node which is closest to any of the nodes already in the tree is itself moved into the tree and attached to the appropriate neighbor node. This is based around a link cost across each path which includes available bandwidth among other things.  The above two steps are repeated as long as there aren't any nodes left in the candidate list. The algorithm starts with both structures empty. 2. Select Routing Protocols and click Link State Algorithm icon.) This procedure ends with the tree containing all the nodes in the network. generally some variant of Dijkstra's algorithm is used. 4. and a list of candidates. all the nodes in the network will have been added to the tree. When a node is moved from the candidate list into the tree. 3. it is removed from the candidate list and is not considered in subsequent iterations of the algorithm. Run the Network Simulator software. We can view the results in the Side window space or in <Drive>:\Simulator\Link_State\Results. Procedure: 1. Each node in the candidate list is compared to each of the nodes already in the tree. The algorithm then repetitively does the following:  All nodes which are connected to the node just added to the tree (excepting any nodes which are already in either the tree or the candidate list) are added to the second (candidate) list. Basically. it then adds to the first one the node itself. (When there are none. with the node on which the algorithm is running as the root of the tree.Calculating the shortest paths: Each node independently runs an algorithm over the map to determine the shortest path from itself to every other node in the network. The shortest path from that node to any other node is indicated by the list of nodes one traverses to get from the root of the tree. Select any source node (Router) and then click Next button until the Simulator iteration completes computing the least cost paths. Select the number of Routers and specify the distance between them. a node maintains two data structures: a tree containing nodes which are "done".txt Result: . 5. Click Submit button.

.

distance-vector routing protocols have less computational complexity and message overhead. . a distancevector routing protocol is one of the two major classes of routing protocols. Compared to link-state protocols. Distance Vector means that Routers are advertised as vector of distance and Direction. Routers using distance vector protocol do not have knowledge of the entire path to a destination. Instead DV uses two methods: 1. Direction in which or interface to which a packet should be forwarded.: Date: IMPLEMENTATION OF DISTANCE VECTOR ROUTINGALGORITHM Aim: Theory: In computer communication theory relating to packet-switched networks. EGP and BGP are not pure distancevector routing protocols because a distance-vector protocol calculates routes based only on link costs whereas in BGP. 2.Expt. the local route preference value takes priority over the link cost. when a change is detected in the topology of a network. A distance-vector routing protocol requires that a router informs its neighbors of topology changes periodically and. Distance from its destination. which require a router to inform all the nodes in a network of topology changes. for example. The methods used to calculate the best path for a network are different between different routing protocols but the fundamental features of distance-vector algorithms are the same across all DV based protocols. the other major class being the link-state protocol. whereas 'Distance' uses metrics such as hop count. 'Direction' is represented by next hop address and exit interface. Examples of distance-vector routing protocols include Routing Information Protocol Version 1 & 2.[citation needed] Distance Vector means that Routers are advertised as vector of distance and direction. Direction is simply next hop address and exit interface and Distance means such as hop count. in some cases. No. RIPv1 and RIPv2 and IGRP. A distance-vector routing protocol uses the Bellman-Ford algorithm to calculate paths.

Output: For 3 Routers with the distance as follows: AB: 2 BC: 3 CA: 4 Routing Information for selected node: A Iteration : 1 --------------------------------------From Neighbor B To A: 2 To B: 0 To C: 3 --------------------------------------From Neighbor C To A: 4 To B: 3 To C: 0 --------------------------------------Routing Table To B : 2 Next Hop : B To C : 4 Next Hop : C Iteration : 2 --------------------------------------From Neighbor B To A: 2 To B: 0 To C: 3 --------------------------------------From Neighbor C To A: 4 To B: 3 To C: 0 --------------------------------------Routing Table To B : 2 Next Hop : B To C : 4 Next Hop : C .

Click Submit button.txt Result: . Select any source node (Router) and then click Next button until the Simulator iteration completes computing the least cost paths. Direction in which or interface to which a packet should be forwarded.Routers using distance vector protocol do not have knowledge of the entire path to a destination. The cost of reaching a destination is calculated using various route metrics. Distance from its destination. Instead DV uses two methods: 1. 2. 3. Procedure: 1. As the name suggests the DV protocol is based on calculating the direction and distance to any link in a network. Select the number of Routers and specify the distance between them. Select Routing Protocols and click Link State Algorithm icon. 5. 4. We can view the results in the Side window space or in <Drive>:\Simulator\Distance_Vector\Results. 2. RIP supports cross-platform distance vector routing whereas IGRP is a Cisco Systems proprietary distance vector routing protocol. RIP uses the hop count of the destination whereas IGRP takes into account other information such as node delay and available bandwidth. This process has been described as „routing by rumor‟ because routers are relying on the information they receive from other routers and cannot determine if the information is actually valid and true. There are a number of features which can be used to help with instability and inaccurate routing information. Once a router has this information it is able to amend its own routing table to reflect the changes and then inform its neighbors of the changes. Run the Network Simulator software. Updates are performed periodically in a distance-vector protocol where all or part of a router's routing table is sent to all its neighbors that are configured to use the same distance-vector routing protocol.

HTTP .SOCKET PROCESSING .

: Date: Aim: Theory: .Expt. No.

.

Set the Target Server IP address as same as the above Server IP address and click “Connect”. so that the Client and Server interact using HTTP protocol and displays the predefined Web page located in C:\Simulator\Index. Click Activate the Server button. Set Client IP address and Server as desired. 2. Then the Server will be listening at port 80. 4. 6.html Result: . Run the Network Simulator software. 3. Click Go button. Select Network Sockets and click Web: HTTP icon. 5.Procedure: 1.

SOCKET PROCESSING .FTP .

: Date: Aim: Theory: .Expt. No.

.

txt Result: . Run the Network Simulator software. 2.Procedure: 1. Set Client IP address and Server as desired. Then the Server will be listening at port 21. so that the Client and Server interact using FTP protocol and displays the contents of File stored in C:\Simulator\Index. Select Network Sockets and click FTP icon. 6. 3. 5. 4. Set the Target Server IP address as same as the above Server IP address and click “Connect”. Click Activate the Server button. Click Go button.

SOCKET PROCESSING .SMTP .

No.: Date: Aim: Theory: .Expt.

Output: .

Type the desired text in the field provided and click Go button to send the mail. Set the Target Server IP address as same as the above Server IP address and click “Connect”. Click Ok to proceed. 5. Simulator will show Mail sent Notification. 7. 6. Select Network Sockets and click E-mail: SMTP icon. 9. 110 respectively. Then the sent mail can be seen in Receiver window side. 2. Then the SMTP. 3. The mail will be sent to the Mail Server and then redirected to the receiver. Click “Check mail” on remote receiver section in Simulator window. POP Server will be listening at port 25. 4.Procedure: 1. 8. Click Activate the Server button. Result: . Set Client IP address and Server as desired. 10. Run the Network Simulator software.

Sign up to vote on this title
UsefulNot useful