Is bond0 ready and a bonding interface? - 4G Bonding Router Problems (RPI)


 
Thread Tools Search this Thread
Special Forums IP Networking Is bond0 ready and a bonding interface? - 4G Bonding Router Problems (RPI)
# 1  
Old 10-18-2014
Is bond0 ready and a bonding interface? - 4G Bonding Router Problems (RPI)

HI all,

First post on the forum, and my first proper project on the Paspberry Pi, so sorry if this is in the wrong place.

I am trying to turn my Pi in to a 3G/4G Bonding router. I have been researching and trying this for a week or so now. The basic plan is to have up to 6 ZTE MF823 USB dongles. The Pi would then bond them together in to bond0. It would then forward traffic on eth0 (my internal network) to the bond. Having the bond on a mode to allow for maximum bandwidth & redundancy.

I started with setting up my Pi as a router. It took me some time and a lot of problems but I have managed to use iptables to forward traffic from eth0 to usb0, and this works perfectly.

I have set up isc-dhcp-server on my Pi and added the IP range for the local subnet. So I have proven that my Pi works as a router, with one internet source.

The problem I am getting starts with plugging in two of the dongles. They both go in separate ports on the PI but both get the same IP (192.168.0.194) and the same MAC address. But they are on different interfaces, usb0 + usb1. But when on the 192.168.0.1 page the information about the dongle says that it has got a public ip with in it. I have tried setting usb0 & usb1 to dhcp and static, on dhcp they both get the same 192.168.0.194 address. On static they wont actually connect to the internet.

I would like to also add the ability to access all of the USB modems control page, but they all come though on 192.168.0.1, can I change this to work in a sequensual order? 192.168.0.1, 192.168.0.2, 192.168.0.3 ....

So my question/request is for a bit of guidance on setting up the bond. I have followed some guides that talk you though setting up the bond but have had no luck, I currently am getting the error message “Failed to enslave usb0 to bond0, Is bond0 ready and a bonding interface?” when I start networking.

I have the follow setup;

Raspberry Pi B+
Latest Raspbian
LTE MF823 X 2
1 - 4 USB hub, used just to allow space for both dongle to plug in, one plugs into that and the other into the Pi.

My /etc/network/interfaces looks like

Code:
auto lo
auto bond0
auto eth0
auto usb0
suto usb1

iface lo inet loopback

iface bond0 inet static
address 192.168.1.2
gateway 192.168.0.1
netmask 255.255.255.0
bond-slave none (have tried with “usb0 usb1” aswell)
bond-mode balance-alb
bond0miimon 100

iface eth0 inet static
address 192.168.1.1

iface usb0 inet dhcp
bond-master bond0
#comes up as 192.168.0.194

iface usb1 inet static
address 192.168.0.195
bond-master bond0

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp



Iptables walk though - debian-administration.org/article/23/Setting_up_a_simple_Debian_gateway

Code:
#!/bin/sh

PATH=/usr/sbin:/sbin:/bin:/usr/bin

#
# delete all existing rules.
#
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X

# Always accept loopback traffic
iptables -A INPUT -i lo -j ACCEPT


# Allow established connections, and those not coming from the outside
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! eth1 -j ACCEPT
iptables -A FORWARD -i bond0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allow outgoing connections from the LAN side.
iptables -A FORWARD -i eth0 -o bond0 -j ACCEPT

# Masquerade.
iptables -t nat -A POSTROUTING -o bond0 -j MASQUERADE

# Don't forward from the outside to the inside.
iptables -A FORWARD -i bond0 -o bond0 -j REJECT

# Enable routing.
echo 1 > /proc/sys/net/ipv4/ip_forward

I then chmod 755 and executed it as well as saved in if-up.d. I swapped the eth1 for usb0 to test it, and then I have changed it to bond0 for it to pass that though.

Router walk though (DHCP setup ) - g7smy.co.uk/?p=505
A bonding walk though - linuxhorizon.ro/bonding.html
A bonding walk though - askubuntu.com/questions/53499/how-to-merge-multiple-internet-connections-into-one


I have tried numerous walk thoughts for bonding but all seem to come up short.

My problems;

- USB Modems not getting there own IP's and MAC address
- Bond not starting/set up correctly

If any one has any ideas or solutions i would love to hear them.

Many thanks.
Elliott
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Network bonding

Dear All , Very recently we have configured Network bonding in our Linux Server Redhat Linux 5.x. After configuring , we restarted the network services , the link was down after that , we could not login in to the Server. So after that , we logged in to console and tried to... (2 Replies)
Discussion started by: jegaraman
2 Replies

2. AIX

Is it possible to configure bonding over bonded interface in AIX?

Hi Everyone, Is it possible to configure bonding over bonded interface in AIX? For example: server has for NIC port: ent0 ent1 ent2 ent3 First I create a EtherChannel ent4 from ent0 and ent1. and then I create a EtherChannel ent5 from ent2 and ent3. Can I create a EtherChannel... (1 Reply)
Discussion started by: nnnnnnine
1 Replies

3. UNIX for Dummies Questions & Answers

Assigning ipv6 to bonding interface - getting old as well as changed ipv6 in ifconfig output

Hi, I have created a bonding bond1 interface with 6 Eth , mode=4. Recently i have changed my old ipv6 to new one and tried to restart as well as reload network service. Post which i can see old as well as changed ipv6 in ifconfig command output. Below are few files and command output for your... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies

4. Red Hat

Network Bonding Issue

I have one production system where my customized application runs.The applications require seamless network connectivity with different machines connected in LAN and WAN. As these applications are very critical, it is very much required to have a seamless network activity.The applications are... (4 Replies)
Discussion started by: Anjan Ganguly
4 Replies

5. Red Hat

Bonding a Bond with LACP

Does anyone know if it's possible to bond two bonds together? My situation is I have two older Cisco switches that cannot carry a LACP (bond level 4) aggregated between them, but separate aggregates can be setup on the switches themselves. In order to have redundancy of two switches I would... (0 Replies)
Discussion started by: christr
0 Replies

6. Linux

ethernet bonding

I need to enable Ethernet Bonding on three systems, connected together via switch. What I tried ended up with failure, slaves cannot be detected n added to bon0. Here's what I did: created file /etc/modprobe.d/bonding.d and added the following to it: alias bond0 bonding options bonding... (2 Replies)
Discussion started by: dr_mabuse
2 Replies

7. IP Networking

Bonding of IP tunnels

Hello. Our Company is spreaded over Germany. There are main offices an branch offices. These offices are mostly connecte via multiple sdsl. We build a IPSEC VPN Infrastructure using Aastaro Security Gateways appliances. It seemed that only one VPN Connetion between to offices could be... (0 Replies)
Discussion started by: mschwadorf
0 Replies

8. IP Networking

Channel bonding Issue - Bond0 interface not getting up in on RHEL6

Hello, I am trying to set up Channel Bonding on a RHEL6 Virtual Box VM. I have 2 ethernet cards on the machine which are set up in Internal Network mode. I followed all the steps exactly as mentioned in the RHEL6 deployment Guide, but for some reason i think results are not correct. Here are my... (13 Replies)
Discussion started by: Rohit Bhanot
13 Replies

9. Red Hat

IP Bonding

Hi, What is IP bonding in Linux. What are its advantages How to create a IP bonding in redhat Linux. (1 Reply)
Discussion started by: chetansingh23
1 Replies

10. IP Networking

Interface bonding / Link aggregation (Multiple)

Hello, I've been using mode 4 with four slaves, however looking at ifconfig showed that the traffic was not balanced correctly between the interfaces, the outgoing traffic has been alot higher on the last slave. Example: eth0 RX 123.2 GiB TX 22.5 GiB eth1 RX 84.8 GiB TX 8.3 GiB eth2... (3 Replies)
Discussion started by: TehOne
3 Replies
Login or Register to Ask a Question