Miscellaneous Applications

(Back to Main)

Contents


Broadcast Test Program

The bcast.exe program can be used in order to test whether or not directed broadcast is working between subnets. A subnet broadcast is done by sending a datagram to the IP Address of 255.255.255.255 (All bits set to 1). Any SOCK_DGRAM socket that has the SO_BROADCAST option set and that is listening on the port sent to will receive the broadcast. A directed broadcast is a broadcast that is intended for a subnet other than the originating subnet. This is done by setting the correct address of the subnet for all of the bits corresponding to the subnet mask, and leaving the rest as 1. For example, sending a directed broadcast to the subnet containing the node 128.253.69.64 (with subnet mask 255.255.255.0), a datagram would be sent to the address 128.253.69.255 using the appropriate port. Directed broadcast is used in the pbcast layer in order to find active members of the pbcast group. It can be disabled at the router level, so bcast.exe can be used to detect if it works as follows:

This will send periodic directed broadcasts to the given subnet. In the example above, bcast would be invoked:
In order to test if directed broadcast is working, two instances of bcast should be run on different subnets. Each should specify the other subnet as the argument to bcast. If directed broadcast is working, then they should receive each other's broadcasts, and this will be displayed in the console.

The bcast program uses the protocol stack with only the network layer. It uses the network layer's default port number. The code is located under the bcast directory.

Multicast Test Program

The mcast.exe program can be used in order to test the performance of IP multicast within a subnet. The multicasts use a TTL of 1, so they do not travel beyond the originating subnet. The mcast.exe program is invoked as follows:

The first parameter specifies whether this instance of the application is a sender or receiver. There can be only one sender at a time. The second parameter is only necessary for the sender. This is the rate at which mcasts are placed on the network, in multicasts per second. Setting this number beyond 1000 will cause the mcast program to multicast as fast as the network allows. To send 500 multicasts per second, start up the sender on one node: And one or more receivers on other nodes: The order in which the sender or receivers are started does not matter. If the mcast program is working properly, then for the sender the actual send rate will be posted to the screen at regular intervals. The receivers will post their actual receive rate at regular intervals as well. The mcast program also detects packet losses. If one or more packets is lost, then the receiver(s) that did not receive the packet will post the sequence number seen and the expected sequence number. The difference between the two will correspond roughly to the number of packets that have been lost.

The mcast program does not use the protocol stack. It uses sockets directly in order to provide a comparison with the network layer of the protocol stack. The code is located under the mcast directory.

Website created by: Ted Bonkenburg (
tjb13@cornell.edu )