[asterisk-users] [Asterisk-users] asterisk +heartbeat (Wilton Helm)

Kristian Kielhofner kkielhofner at star2star.com
Fri Oct 17 10:51:20 CDT 2008


On Fri, Oct 17, 2008 at 9:29 AM, Steve Totaro
<stotaro at totarotechnologies.com> wrote:
>
> I have mutihomed boxen on many different networks as well, this has
> never been an issue.
>
> Let's put aside why would you or there is no reason, and then think
> about it again.  Let's just say you wanted two NICs on the same subnet
> with different IPS,  Is it a bug or by design?

  This whole discussion seems to have forgotten about ARP...  The
kernel will dynamically learn MAC address to IP address associations
as well as which interface the association was learned over using ARP
broadcasts.

  This config is broken.

> I am fully aware of aggregated (bonding) of links too.
>
> I didn't bother to click the link because I assume it is just plain
> old network bonding (aggregating) like in the Cisco world, you can
> bond several NICs and get higher bandwidth on a switch, I have three
> NICS bonded for a three gigabit uplink and that material is too dry
> for this morning, and if it is what I think it is, I have been doing
> it for years, let's see I got my CCNA in 97 and renewed sometime or
> another....

  Most Cisco devices (especially back in the day - 1997?) were using
Cisco's EtherChannel:

http://en.wikipedia.org/wiki/EtherChannel

  Which is not quite the same as IEEE 802.3ad (referred to as LACP on
some switches).  I was working with Cisco devices at the time but I
don't remember if I ever had the opportunity to configure bonding on
my Cat 2950s...  I can tell you that even though 802.3ad is a
multi-vendor standard, many Cisco admins still configure EtherChannel
between Cisco devices.

  Whether you are using EtherChannel or 802.3ad the catch is your
switch needs to support one or the other and you have to specifically
configure switch ports to be a member of that aggregation group.  It
limits bonded functionality to at least "smart" switches if not full
blown managed switches like those from Cisco, HP, Foundry, etc.

  With most Linux users being as cheap as they are ;), the Link kernel
bonding module provides an ability to bond NICS *without* requiring
any special support or configuration on the switch.  You are even
provided various configuration options at module load time to tweak
this.  I've never used it (I use 802.3ad) so I can't be exactly sure
how it works but I can bet there is some ARP "magic" in there
somewhere...

> Cisco calls this Multiliink in the router space..  I had three bonded
> T1s, I could unplug up to two of the T1s and and the internet stayed
> up up, just at 33% capacity.

  Depending on how you were doing it (Multilink PPP?) that is VERY
different technology.  Not to be confused with what we have been
calling "bonding" (sometimes referred to as "teaming") which use a
variety of Ethernet specific technologies.  Although Token Ring, etc
might have some equivalent (overlapping?) standards, ummmm - who cares
;)?

> I am talking about NICs with different IPs on the same subnet.  Is
> Asterisk or Linux deciding to reply to a packet sent to 10.0.0.1
> (eht0) by sending that packet through 10.0.0.254?
>

  Understood.  When you up an interface with an IP address and netmask
the kernel automatically inserts a route for that network in the route
table (using that interface):

ip route show:
10.16.5.0/24 dev eth0  proto kernel  scope link  src 10.16.5.233  metric 1
default via 10.16.5.1 dev eth0  proto static

  As you can see I've also added a default route here.  Now, if I ping
my default route the kernel's ARP cache learns which MAC address that
IP has and over which interface:

arp -an:
? (10.16.5.1) at 00:13:72:26:36:b7 [ether] on eth0

  My guess is that if you had two NICs on the same subnet with
different IPs the kernel route table and ARP cache would get pretty
confused.  This seems so incredibly broken to me I've never tried....

  Something else that seems strange about this arrangement, why would
you want to bother to configure other hosts on the LAN differently?
You're not really adding bandwidth/reliability (if you could call it
that) unless you configure other machines on the LAN to use the
different addresses...  Weird.

  In short: If you want to have two NICs on the same network, run them
through bonding.ko - PLEASE! ;)  If you need other IPs, add an alias
to your bonded interface!

-- 
Kristian Kielhofner
http://blog.krisk.org
http://www.submityoursip.com
http://www.astlinux.org
http://www.star2star.com



More information about the asterisk-users mailing list