Configuring & Installing

The project installation involves the configuring of network drivers and gateway which are explained in detail in the forthcoming sections.Each section is also provided with the configuration as per our network configuration involving four systems.

Configuring the Network Driver

The ifconfig command is used for manipulating network interfaces. Here is what the command displays on our machine :

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric: RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

This machine does not have any real networking hardware installed - but we do have a puresoftware interface - a so called "loopback interface". The interface is assigned an IP addressof 127.0.0.1.

It is possible to bring the interface down by running ifconfig lo down. Once the interface is down, ifconfig will not display it in it's output But it is possible to obtain information about inactive interfaces by running ifconfig -a. It is possible make the interface active once again by running ifconfig lo upit is also possible to assign a different IP address - ifconfig lo 127.0.0.2.

Before an interface can be manipulated with ifconfig, it is necessary that the driver code for the interface is loaded into the kernel. In the case of the loopback interface, the code is compiled into the kernel. Usually, it would be stored as a module and inserted into the kernel whenever required by running commands like modprobe.

Implementation

In this project we have written a network driver for creating two modules named serial1 and serial2. This modules are inserted into the running kernel by running the command insmod -f serial1.o and insmod -f serial2.o. The insertion of two modules into the kernel results in the creation of two interfaces to which IP address can be assigned.

Once the IP address are properly assigned by running the command ifconfig serial1 IP-address and ifconfig serial2 IP-address respectively for serial1 and serial2, both the interfaces can be made active running the command ifconfig serial1 up and ifconfig serial2 up.After doing all the steps mentioned above we can use the interfaces serial1 and serial2 for communication.