Username/Email:  Password: 
TwitterFacebookFlickrRSS

Virtual Interfaces: When One IP Isn't Enough

FAIL (the browser should render some flash content, not this).

Download in .ogv format

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

this isn't virtual interfaces

newton10471's picture

This isn't virtual interfaces. This is aliasing a network interface. To set up a virtual interface you use the vconfig command and/or use notation like eth0.5 instead of eth0:5. With virtual interfaces, packets are tagged differently for each network whereas with aliasing of an interface, the interface itself is just advertising two different IP addresses.

Possible uses

WISPGuy's picture

The first possible use that comes to mind is the need to bring up a temporary server while rebuilding or moving a dedicated server. For example, you want/need to move a web server, or any server really, to a new facility. To minimize downtime, you could copy your website to a temporary box with a virtual interface using the original IP address, until the original server is relocated. Then you would remove the virtual interface and bring up the IP address on the original server. There are many other uses: NAT/Firewall, Proxy, Web Filter, running multiple FTP/Web servers off the same box.

Yeah, this stoped working two months later. Can you clarify?

Anonymous's picture

Seems that ifupdown no longer supports virtual interfaces. ifconfig does, but ip can't operate on them, though it shows them. The interfaces content you show in your example generates "duplicate interface" error from ifup/down. What's the deal? I can't believe this was overlooked.

Useful uses

uzair's picture

Great stuff, thanks. Can someone suggest possible uses?

awesome!

Anonymous's picture

I didn't even know you could do this. Thanks for the tip!