Configure a network interface to have no IP address

I have two network interfaces in my workstation and I wanted to dedicate one to a separate network to use with my real and simulated MicroVAXs. The first problem was how to bring the second interface up without giving it an IP address.
Then I needed to configure a virtual interface (as before) before bridging it to the second network interface without giving the bridge an IP address. 

Since this requires you to modify ‘/etc/network/interfaces’ you need to be a super user…

$ su
Password:
#

OR

$ sudo -i
Password:
#

Then you need to edit ‘/etc/network/interfaces’ and comment out the lines associated with the second network interface and add a new section to bring up the second interface without an address. (Leaving the original section intact makes it easy to undo any changes later if necessary).

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

# The secondary network interface
# allow-hotplug eth1
# iface eth1 inet dhcp

# Secondary network interface configured without an IP address
allow-hotplug eth1
iface eth1 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down

If all you need is to do bring an interface up without assigning it an IP address then you don’t need to do any more. However, I wanted to be able to use this interface with SIMH or QEMU so I also needed to created a virtual device and bridge it to the physical interface.

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

# The secondary network interface
# allow-hotplug eth1
# iface eth1 inet dhcp

# Secondary network interface configured without an IP address
allow-hotplug eth1
iface eth1 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down

# Virtual interface
auto tap1
iface tap1 inet manual
pre-up tunctl -t tap1 -u system
up ifconfig tap1 up
down ifconfig tap1 down

# Network Bridge configured without an IP address
auto br1
iface br1 inet manual
bridge_ports eth1 tap1
bridge_stp off
bridge_maxwait 5

You will need to reboot for these changes to take effect.

To use the new virtual network interface with a simulated MicroVAX you will need to use the following SIMH commands when starting the simulator.

;
;– Set MAC address and attach Ethernet to a network interface to tap1
;
set xq mac=AA-00-04-00-26-40
attach xq tap:tap1

I usually use the same MAC address as the one that is set when DecNET starts.

This entry was posted in Debian, Linux, Networking, Ubuntu and tagged . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s