Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I apologize for this blatantly newbie-ish question, but I'd like to do this "the right way" and not just muck about until it seems to work, and the documentation I have doesn't seem to address this case.

Currently, a Debian Linux box that I am working with has the following /etc/network/interfaces file:

auto lo
iface lo inet loopback
auto bond0
iface bond0 inet dhcp
pre-up modprobe bonding mode=active-backup miimon=100 primary=eth0
pre-up ip link set bond0 up
pre-up /sbin/ifenslave bond0 eth0
pre-up /sbin/ifenslave bond0 eth1

The above works fine, and mostly does what I want -- on boot, the box comes up and the two Ethernet jacks are used for failover/redundancy (i.e. the box uses the first jack for communications if it is working, otherwise it uses the second jack).

However, for my purposes I don't want to use IPv4 or DHCP. I'd like the box to come up with bond0 using ONLY the box's IPv6 self-assigned address (i.e. fe80::whatever:it:is) and no other IP addresses (well... loopback is okay). What's the proper way to specify this? Should I change "iface bond0 inet dhcp" to "iface bond0 inet6" ? Remove that line completely? Something else? Ideally I'd like to be able to use the exact same file on multiple boxes without modifying it for each one, btw.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

I don't have experience with your particular bonding device, but I tried out the following test in a VM on Debian Lenny with a single NIC (eth0). In /etc/network/interfaces:

auto eth0
iface eth0 inet manual
    up /sbin/ifconfig eth0 0.0.0.0

After bringing up eth0, here's what I get from /sbin/ifconfig eth0:

eth0       Link encap:Ethernet  HWaddr 08:00:27:15:8e:d7
           inet6 addr: fe80::a00:27ff:fe15:8ed7/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           ...

So I have an IPv6 Link-local address (derived from the MAC address), and no IPv4 address. I am able to ping6 another machine on my local network by its Link-local address, and vice versa, so the interface appears to work.

So, to sum up: Try setting the iface line for your bond0 interface to:

iface bond0 inet manual

and add this line to the end of its configuration stanza:

up /sbin/ifconfig bond0 0.0.0.0

I have no idea whether this is "the right way" to do it, but it works for my simplified case.

share|improve this answer
    
Thanks, this appears to have done the trick (I substituted bond0 for eth0, of course). :) It seems that the "up /sbin/ifconfig bond0 0.0.0.0" line isn't necessary (I appear to get the result I want without it). Is there some subtle reason to have it? What does it mean to up an interface to invalid address 0.0.0.0 anyway? –  Jeremy Friesner Nov 5 '10 at 23:48
    
Glad this worked for you. You probably didn't need that up ... 0.0.0.0 line because your config stanza for bond0 was already non-empty. In my test, I needed to put something after the iface line, because otherwise ifup eth0 would silently fail to bring up eth0. Setting the IPv4 address to 0.0.0.0 is basically the same as removing the address, which is the desired effect in this case. –  Steven Monday Nov 6 '10 at 0:07

You really don't want to be doing your bond configuration by hand... instead, use the bonding-specific config parameters available:

iface bond0 inet6 manual
    slaves eth0 eth1
    bond_mode active_backup
    bond_miimon 100
    bond_primary eth0

The manual on the iface line means that no explicit configuration of the IP/IPv6-level attributes of the interface will be configured.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.