> computerish

Saturday, 03 February 2007

ip aliasing

IP aliases are incredibly useful for testing and troubleshooting (and virtual hosting too). The other day I needed to add some IP aliases on a FreeBSD machine. I administer FreeBSD servers at work but I am much more familiar with Linux, so I had to look up the syntax.

I found out how to add an alias:
ifconfig rl0 alias 10.0.0.5 netmask 255.255.255.0
...and remove an alias:
ifconfig rl0 -alias 10.0.0.5

This contrasts with the Linux ifconfig syntax for dealing with aliases:
ifconfig eth0:0 10.0.0.5 netmask 255.255.255.0
ifconfig eth0:0 down


Or what I'm usually using-- iproute2 on Linux: (I have really come to love iproute2)
ip addr eth0 add 10.0.0.5/24
ip addr eth0 del 10.0.0.5/24


* unrelated rant #1-- Why the hell are FreeBSD ethernet devices named according to the driver that supports the card? This annoys me, and I don't see the point. I never know what the device might be called unless I happened to have just installed the nic, which is usually not the case.

** unrelated rant #2-- Why the hell is windows so lacking when it comes to ip aliasing? AFAIK, you can configure IP aliases only if the primary address is static. If it is dynamic then you are out of luck.

Trackbacks

    No Trackbacks

Comments

Display comments as (Linear | Threaded)

    No comments


Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA 1CAPTCHA 2CAPTCHA 3CAPTCHA 4CAPTCHA 5