I have 2 Redhat-9 servers that I'd like to migrate to FreeBSD in the next 3 months. So I've set-up a test server (FreeBSD-4.9 STABLE) and I'm in the midst of loading 3rd party applications (via ports) to test their operation compared to the RH-9 servers.
I have a question about the configuration of IP aliases, so here is some background information.
Here is the real interface (192.168.1.40):
# ifconfig -a ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:80:ad:91:9a:bd lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500 ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500 sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552 faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000
Now I try to add the alias (192.168.1.41):
# ifconfig ed0 alias 192.168.1.41 netmask 255.255.255.0 broadcast 192.168.1.255
ifconfig: ioctl (SIOCAIFADDR): File exists
[using same netmask as real interface]
However, THIS WORKED:
# ifconfig ed0 alias 192.168.1.41 netmask 255.255.255.255 broadcast 192.168.1.255
[using a netmask of 255.255.255.255]
And here is the ifconfig that shows the alias in place:
# ifconfig -a ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255 inet 192.168.1.41 netmask 0xffffffff broadcast 192.168.1.255 ether 00:80:ad:91:9a:bd lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500 ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500 sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552 faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000
QUESTION: Why do I use a different netmask (255.255.255.255) for a IP alias on FreeBSD? Why isn't 255.255.255.0 used?
When I set-up IP aliases using Linux, I use the same netmask (255.255.255.0) as the real IP.
The IP aliasing of my BSD server works but WHY is it working?
I found the reference to using the 255.255.255.255 netmask via Google, however, I have Michael Lucas's book "Absolute BSD" and reference on pages 103 & 104 (on IP aliasing) clearly show using the same netmask as the real interface when creating IP aliases.
What am I missing?
Thanks, Michael
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"