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 address 192.168.1.1/24 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:
#!/bin/bash IF1="gembird-white" # WAN interface 1 IF2="ppp0" # WAN interface 2 GW1="18.104.22.168" GW2="22.214.171.124" W1=1 W2=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
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0 126.96.36.199 0.0.0.0 255.255.255.0 U 0 0 0 gembird-white ...
Help me please with it
And where is right place to run my balance.sh???