Dummy Interface: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Line 11: Line 11:




3. Preload the dummy network driver on the machine.
2. Preload the dummy network driver on the machine.
If this command is successful, you do not receive any messages from the server.
If this command is successful, you do not receive any messages from the server.


       # modprobe -a dummy
       # modprobe -a dummy


4. Bind the dummy established network interface to the $HOSTNAME configured IP address. Also shown is adding other network interfaces using the
3. Bind the dummy established network interface to the $HOSTNAME configured IP address. Also shown is adding other virtual network interfaces using '''[http://www.faqs.org/docs/Linux-mini/IP-Alias.html IP Address Aliasing]'''


       # ifconfig dummy0 $HOSTNAME
       # ifconfig dummy0 $HOSTNAME
Line 22: Line 22:
       # ifconfig dummy0:1 10.0.0.3
       # ifconfig dummy0:1 10.0.0.3


5. For a '''DHCP''' environment, add a route other than “default” to the established virtual network setup.
4. Add a route other than “'''default'''to the established connectivity to each virtual network interface.


       # route add $HOSTNAME dummy0
       # route add $HOSTNAME dummy0
Line 28: Line 28:
       # route add 10.0.0.3 dummy0:1
       # route add 10.0.0.3 dummy0:1


6. Check the network binding:
5. Check the network binding:
This command gives below listed output:
This command gives below listed output:


Line 51: Line 51:
                 UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
                 UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1


7. Check the route binding:
6. Check the route binding:
This command shows the routing as it is set up.
This command shows the routing as it is set up.



Revision as of 10:27, 28 April 2009

Installing The Linux Dummy-Network Interface

If your Linux system does not have an active NIC adapter installed or is off-line from the network, you can install a Dummy Network Interface Module. This can be quite useful for testing out various networking tools (e.g., Wireshark and Snort) with the Network Security Toolkit when off-line. Use the following procedure to install the Linux Dummy-Network Interface:


1. Add an IP address and host name to your "/etc/hosts" table. For example, an Internet address of 10.0.0.1 would result in:

     echo 10.0.0.1 $HOSTNAME >> /etc/hosts


2. Preload the dummy network driver on the machine. If this command is successful, you do not receive any messages from the server.

     # modprobe -a dummy

3. Bind the dummy established network interface to the $HOSTNAME configured IP address. Also shown is adding other virtual network interfaces using IP Address Aliasing

     # ifconfig dummy0 $HOSTNAME
     # ifconfig dummy0:0 10.0.0.2
     # ifconfig dummy0:1 10.0.0.3

4. Add a route other than “default” to the established connectivity to each virtual network interface.

     # route add $HOSTNAME dummy0
     # route add 10.0.0.2 dummy0:0
     # route add 10.0.0.3 dummy0:1

5. Check the network binding: This command gives below listed output:

     # ifconfig dummy0
       dummy0   Link encap:Ethernet  HWaddr 2A:7B:EA:49:69:E2
                inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
                inet6 addr: fe80::287b:eaff:fe49:69e2/64 Scope:Link
                UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0
                RX bytes:0 (0.0 b)  TX bytes:824 (824.0 b)
     #
     # ifconfig dummy0:0
       dummy0:0 Link encap:Ethernet  HWaddr 2A:7B:EA:49:69:E2
                inet addr:10.0.0.2  Bcast:10.255.255.255  Mask:255.0.0.0
                UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
     #
     # ifconfig dummy0:1
       dummy0:1 Link encap:Ethernet  HWaddr 2A:7B:EA:49:69:E2
                inet addr:10.0.0.3  Bcast:10.255.255.255  Mask:255.0.0.0
                UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1

6. Check the route binding: This command shows the routing as it is set up.

     # route -n
     Kernel IP routing table:
     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
     10.0.0.1        0.0.0.0         255.255.255.255 UH    0      0        0 dummy0
     10.0.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 dummy0
     10.0.0.3        0.0.0.0         255.255.255.255 UH    0      0        0 dummy0
     10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 dummy0
     127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

References

Reference Info 1: Linux Network Administrators Guide