# ADSL: loosing IP, ppp0 still up, using bonding/ieee 802.3ad

## lukdk

Hello again,

I'm having trouble staying connected with my ADSL.

When I check my ppp0 connection i sometimes notice that it is up but doesn't have an IP address. If I just reconnect (pppoe-stop / pppoe-start) it MIGHT solve the problem. I might have to try this multiple times regardless of the interface I use (I've tried to connect with eth0, eth1, eth2, bond0, they all might work). The time for how long the issue will be solved is also rather random.

to be honest, I found it even strange that it does work with eth0 and eth1 since those 2 NICs are bonded.

(i've recently posted a minor issue with my startup script https://forums.gentoo.org/viewtopic-t-840261.html but I want to get this connection working stable before I look further into that startup script)

I'm using the bonding driver, that's when my problems started. But I've not tested my box extendedly without it, so i might have made a bad assumption here. I'll double check this.

However, even if I can exclude or include that the root cause of the issue has to be found with this 

bonding driver, I wouldn't know what my next step to check is.

I want to have the adsl connection working on the bond0 interface stable, unless someone explains me why this is not possible  :Smile: .

I only loose adsl connectivity, I don't have any issues on my LAN that i'm aware of.

Let me know if any further information would be required.

Current configuration:

cat /etc/modules.autoload.d/kernel-2.6

bonding miimon=100 mode=4

cat /etc/conf.d/local.start | grep bond

/sbin/ifenslave bond0 eth0 eth1

/sbin/iptables -t nat -A PREROUTING -i bond0 -p tcp --dport 80 -j REDIRECT --to-port 8888

ETH0:

02:02.0 Ethernet controller: 3Com Corporation 3c940 10/100/1000Base-T [Marvell] (rev 12)

        Subsystem: ABIT Computer Corp. Device 1015

        Kernel driver in use: skge

ETH1:

02:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

        Subsystem: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+

        Kernel driver in use: 8139too

ETH2:

02:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

        Subsystem: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+

        Kernel driver in use: 8139too

ifconfig shows all interfaces up all the time.

bond0     Link encap:Ethernet  HWaddr 00:50:8d:fb:69:da

          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1

          RX packets:4309 errors:0 dropped:0 overruns:0 frame:0

          TX packets:4532 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:578127 (564.5 KiB)  TX bytes:689118 (672.9 KiB)

eth0      Link encap:Ethernet  HWaddr 00:50:8d:fb:69:da

          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1

          RX packets:157 errors:0 dropped:0 overruns:0 frame:0

          TX packets:4119 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:17593 (17.1 KiB)  TX bytes:632650 (617.8 KiB)

          Interrupt:18

eth1      Link encap:Ethernet  HWaddr 00:50:8d:fb:69:da

          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1

          RX packets:4152 errors:0 dropped:0 overruns:0 frame:0

          TX packets:413 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:560534 (547.3 KiB)  TX bytes:56468 (55.1 KiB)

          Interrupt:20 Base address:0x8400

eth2      Link encap:Ethernet  HWaddr 00:e0:7d:7f:d7:cb

          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:246 errors:0 dropped:0 overruns:0 frame:0

          TX packets:125 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:24375 (23.8 KiB)  TX bytes:11642 (11.3 KiB)

          Interrupt:21 Base address:0x8800

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:574 errors:0 dropped:0 overruns:0 frame:0

          TX packets:574 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:67890 (66.2 KiB)  TX bytes:67890 (66.2 KiB)

ppp0      Link encap:Point-to-Point Protocol

          inet addr:123.123.123.123  P-t-P:21.21.21.21  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1

          RX packets:490 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1063 errors:0 dropped:3 overruns:0 carrier:0

          collisions:0 txqueuelen:3

          RX bytes:163168 (159.3 KiB)  TX bytes:118399 (115.6 KiB)

(I changed the ip addresses  of ppp0 in this post, but just take it from me the values were valid... when my adsl is down, the ppp0 link is still up, but according to ifconfig it doesn't have an IP addres, p-t-p, mask, this line is just not displayed)

on my switch:

switch#show lacp internal

Flags:  S - Device is requesting Slow LACPDUs

        F - Device is requesting Fast LACPDUs

        A - Device is in Active mode       P - Device is in Passive mode

Channel group 1

                            LACP port     Admin     Oper    Port     Port

Port      Flags   State     Priority      Key       Key     Number   State

Fa0/3     SA      bndl      32768         0x1       0x1     0x3      0x3D

Fa0/4     SA      bndl      32768         0x1       0x1     0x4      0x3D

switch#show lacp counter

             LACPDUs         Marker      Marker Response    LACPDUs

Port       Sent   Recv     Sent   Recv     Sent   Recv      Pkts Err

---------------------------------------------------------------------

Channel group: 1

Fa0/3       7169   6534     0      0        0      0         0

Fa0/4       7119   6527     0      0        0      0         0

----------

## richard.scott

why are you bonding your local network with your adsl link? Bonding isn't supposed to work like that.

----------

## lukdk

hey Richard,

Even when I configured it with eth2 it didn't work. This NIC is not bonded.

Another remark, if bonding isn't supposed to work that way, please explain why. I know what i'm doing is not really that good, or will really improve my performances anywhere, but this is for learning / testing purposes. The bond0 interface should work as a normal interface. The other devices / programs / protocols shouldn't notice there is a bonding module used I thought.

----------

## richard.scott

perhaps I miss understood your "I want to have the adsl connection working on the bond0 interface "

I thought you was trying to bond eth0/eth1/eth2 with your adsl link.

That sort of thing isn't what bonding is for, you need NAT'ing for that.

Rich

----------

## lukdk

Can we please stop the discussion weather or not this is a good / usefull way of using bonded nic and get to the technical aspects of this issue?

"One armed routing" is never a efficient way, but it works.

Fact is that when i use ETH2 which is not part of the bond0 i have the same issues.

So you're saying bonding doesn't work with an ADSL connection? That means it's not at all following the OSI model which sound too strange to believe.

Bonding can also be used for redundancy. Tcp/ip doesn't see if it's using a bonded or single NIC.

I know what NAT is, my NAT is working fine. But this post has nothing to do with NAT.

 *richard.scott wrote:*   

> perhaps I miss understood your "I want to have the adsl connection working on the bond0 interface "
> 
> I thought you was trying to bond eth0/eth1/eth2 with your adsl link.
> 
> That sort of thing isn't what bonding is for, you need NAT'ing for that.
> ...

 

----------

