Skip navigation.
Home

Ethernet Aliasing for Fun and Wireless Survival

I had a small Technical Epiphany the other day that I wanted to share. I got Ethernet Aliasing to work with Ubuntu Gutsy Linux and it turns out to be quite simple in retrospect. Why might you want to do such a thing? In my case, to tweak my Wireless settings while I used the Internet. My Buffalo AirStation Wireless Bridge was working poorly and I needed status to help debug it. I really wanted to access two different IP networks, without routing, on the same physical wire at the same time without buying a new Ethernet card - which in the dark past would have been the "proper" way to do this.

------------------------------------------

The Goal was to have two IP's on the same Ethernet card.

In the dark past one was supposed to have ONE IP network on ONE physical network and it used to be that every network device needed one unique IP address - now you can have multiple IP networks on a single physical network and Ethernet cards may have many IP addresses .. each IP unique to the IP networks that the computer can access.

My Linux computer has on its first Ethernet card .. eth0 .. a static IP of 192.168.1.99 .. but it really could be anything such as a DHCP IP assigned from an ISP. The goal was to add to this Ethernet card a 2nd extra IP address of 1.1.1.2 to be able to reach The Buffalo AirStation device on address 1.1.1.1

The quick way for Ubnutu Gutsy Linux .. a 2.6 Kernel:
sudo ifconfig eth0:0 1.1.1.2 up

The more permanent way is to add the following to the bottom of the file /etc/network/interfaces

auto eth0:0
iface eth0:0 inet static
address 1.1.1.2
netmask 255.255.255.0
network 1.1.1.0

It must be said that the Buffalo allows one to change its address. But over time I realized that if the Buffalo and my computer were perhaps to join a different Wireless network (say I went and visted a friend for example) with a different IP addressing scheme, then I could not connect to the Buffalo again unless I then changed the Buffalo's address to match the new network. Changing it again and again each time the DHCP IP network changed .. painful.

I would like to add that some Internet searching suggests that one must create Linux VLANS to make this work. Not so. Although one can create VLANS with Linux, it is not necessary for this project.

Other gizmos where this might be a useful trick: cable modems, dsl modems and any other "stuff" where you the user cannot change the IP address but it is sitting on your physical network.

Although it is possible to create Ethernet Aliasing using Microsoft Windows XP, it is left as an exercise left for the reader.

Ads