I have 2 ISP connetions, first ISP use mac binding, second use PPPoE


auto lo
auto lan
allow-hotplug gembird-white
allow-hotplug gembird-black

iface lo inet loopback

iface lan inet static

iface gembird-white inet dhcp
  hwaddress ether 64:70:02:XX:XX:XX

iface gembird-black inet dhcp

auto dsl-provider
iface dsl-provider inet ppp
pre-up /bin/ip link set gembird-black up
provider dsl-provider

Afet boot I am manualy runs my balance.sh:


IF1="gembird-white"   # WAN interface 1
IF2="ppp0"            # WAN interface 2


route del default
ip route add default scope global nexthop via $GW1 dev $IF1 weight $W1 nexthop dev $IF2 weight $W2

The problem is that first provider give me dynamic IP and dynamic GW, that can change.

I don't know how to get gateway from my first ISP, because after boot ppp is already up and

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         U     0      0        0 ppp0   U     0      0        0 gembird-white

Help me please with it

And where is right place to run my balance.sh???

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.