Quoting Holger Glaess <gla...@glaessixs.de>:

Am 30.01.2014 13:10, schrieb Giancarlo Razzolini:
Em 29-01-2014 18:13, Holger Glaess escreveu:
hi

i try to setup and multipath configuration with 2 line provider

1 cable with dhcp(client)
1 with pppoe

just dynamic ips.

the pppoe config create well the new default route with -math
but dhclient dont.

[snip pppoe config]

inet 0.0.0.0 255.255.255.255 NONE \
pppoedev msk0 authproto pap \
authname 'bla@blub' authkey 'blub' up
dest 0.0.0.1
!/sbin/route add -mpath default -ifp pppoe0 0.0.0.1

[/snip pppoe config]


after a couple of days i found that the dhclient not use the
dhclient-script since 5.3 anymore.


so how can i setup the -math option at the dhclient config ?


or it is possible to add some lines in dhclient that he check the
sysctl and , if net.inet.ip.multipath=1 ,
he add the default route with ( for ) multipathing.






holger

Check if your dhcp server always gives you the same router ip address.
If so, you can tweak with your dhclient.conf to reject and not ask for
routers, and then set it up manually as you do in your hostname.pppoe0.
And you can always run a script that is run after the dhcp negotiation,
looks for the gateway related entry, deletes it and then re-adds it with
the mpath modifier. There are a lot of options in this regard.

Cheers,


hi

shure , i can write a wrap around solution for the but this not the "dynamic" way like
pppoe or  dhcp  to get and set ips.

i'm not the C programmer but i think it is not mutch work to add a solution in dhclient,
or as option to reaktivate the dhclient-script part.


holger

You can get an event and trigger your acctions as before with the dhclient-script by watching changes in the routing table. Something like this might work for you:

# route -n monitor | { while read l; do [[ $l = RTM_NEWADDR* ]] && echo do your stuff here; done }

Reply via email to