On Mon, Jan 13, 2003 at 07:53:08AM -0500, Bill Moran wrote:

> >I have a FreeBSD 4.7 system, with 3 ethernet cards. The first two
> >are recognised as fxp0 and fxp1 and the second as em0 (intel gigabit
> >card). I configured the em0 with address I then wanted
> >to configure fxp0 with the address, and also connect it
> >to the switch so that I can connect to the server via both addresses.
> >However, FreeBSD's ifconfig command fails, and won't let me add the second
> >address to the fxp0 interface. I read the manual page about ifconfig,
> >and read about aliases, where it said that for aliases, I must use the
> >netmask /32. When I do try to add the second address with a netmask of
> >/32, it works, but it doesn't make sense to me. How is that interface
> >going to to know that it is part of a /24 network if I use a /32 netmask?
> >
> >Would anyone be kind enough to explain why:
> >
> >1. For aliases, I need the /32 mask
> I didn't know that you did.  I've certainly had aliases that weren't /32

I have been using linux for about 2 years now. Let me explain why I
don't understand.

I have addresses and I want to run different
services on the 2 different IP addresses. In a linux system, I do:

ifconfig eth0 netmask
ifconfig eth0:0 netmask

So that I have 2 different addresses bound to the same interface.

On FreeBSD, if I do:

ifconfig fxp0 netmask
ifconfig fxp0 netmask alias

That fails.

The ifconfig manpage states that a nonconflicting netmaks must be used
for the alias, and suggests to use 0xffffffff. I don't understand why,
because I don't see why one network interface cannot have more than one
address bound to it within the same network. If I use a /32 netmask for
the alias address, how will the kernel respond to arp requests for that
alias address?

> >2. Adding a second IP to a *different* network card in the same server
> >does not work if the second IP is within the network of the first one.
> Because it breaks routing and the basic concept of IP addys and netmasks.
> If you have two NICs on the same network, how is the kernel supposed to
> route packets?

I still don't understand. In a linux system I can do:

route add -net netmask gw dev eth0
route add -net netmask gw dev eth1

This adds 2 default routes in the linux kernel, telling it to route
packets to the outside world using either network interface, where eth0
has address and eth1 has address What's
wrong with that?

> If you want this setup as a failover solution, there are other ways.
> There's a program in the ports (I can't remember the name, you'll have to
> do some research) that will monitor an interface, and if it becomes non-
> responsive, run a script of your choosing.  Thus, you can have it start
> up the other network card if the first fails.

Ok, I understand that, and it may be a very useful program, *if* you
want to bring up the other interface with perhaps the same IP address.

All I want to do is to have 2 different IP addresses on each of the
different interfaces in the server, where the addresses are in the
same network. I can do it in linux. Why can't I do it in FreeBSD?

> If failover isn't what you're looking for, then I'd reconsider your
> network topology.  It doesn't really make sense to have 2 NICs with the
> same network number in one machine.

Why not? I haven't seen any such warning in my IP networking books
or courses.

Anand Buddhdev

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to