You are not logged in.

#1 2013-02-20 12:54:17

qoole
New member
Registered: 2013-02-20
Posts: 1

Interface bonding.

Hi there,

I want to create a bonded interface (bond0) consisting of eth0 and eth1 with IP address 192.168.0.2
After following the setup here: http://www.funtoo.org/wiki/Funtoo_Linux_Networking

I ended up with a /etc/conf.d/netif.bond0 of:

template="bond"
ipaddr="192.168.0.2/16"
gateway="192.168.0.30"
multicast="yes"
nameservers="192.168.0.30"
domain="example.org"
slaves="netif.eth0 netif.eth1"
mtu=9000

This fails with errors with regards to adding the route.
When looking through the appropriate templates: /etc/netif.d/bond (https://github.com/funtoo/corenetwork/b … tif.d/bond)
I noticed the following:

	ip addr add 0.0.0.0 dev $interface

No where does it set the IP address of the interface. This means that I end up with an interface with no address and no gateway (because the "ip add route" code (in netif.tmpl) fails on an interface with no name).

I altered my bond template to the following:

#!/bin/sh

netif_pre_up() {
        require slaves
        for ipnm in $ipaddr $ipaddrs; do
                ip addr add $ipnm dev $interface || die "Couldn't add $ipnm to $interface"
        done
}
netif_post_up() {
        ifenslave $interface ${slaves//netif./}
}
netif_pre_down() {
        ifenslave -d $interface ${slaves//netif./}
}

This solves the issue.

Thanks,

Alex

Offline

#2 2013-02-21 08:33:33

angry_vincent
Staff
From: Ukraine
Registered: 2010-10-07
Posts: 687

Re: Interface bonding.

please, open bug report on bugs.funtoo.org

Offline

Board footer

Powered by FluxBB