Multiple dhclients and next hops towards a single ISP, yet a single dhcp-server-identifier

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multiple dhclients and next hops towards a single ISP, yet a single dhcp-server-identifier

Teemu Rinta-aho
Hi all,

I have an OpenBSD machine as a router/firewall. It has 4 ethernet interfaces:
re0, em0, em1 and em2. All emX -interfaces are connected to the same
ADSL box, re0 connects to my home network switch.

My subscription allows me to have 5 public IP addresses, so
this way I can fetch 3 of them. 2 of the IPs are binat'ed to two different
hosts in my home network, and the third one is a regular nat for the rest
of the nodes. Once I got it up and running (with some minor patches
to dhclient-script and rc), I faced a new problem with dhclient
for which I can't find information from man pages or Google. Before
getting to source code I decided to spam you.

All interfaces em0, em1 and em2 get a different next hop. I use
mpath routing with three default routes, one to each interface. The
problem seems to be that the next hop on one of the interfaces (em1)
is also used as the dhcp-server-identifier by my ISP for all the
three leases (em0, em1, em2). Therefore, also the dhclients on em0
and em2 try to send DHCP renews to that address. But it seems to
get routed to em1:

May 12 11:25:08 fw dhclient[1864]: DHCPREQUEST on em2 to 88.192.128.1 port 67
May 12 11:25:08 fw dhclient[1864]: send_packet: No route to host
May 12 11:25:20 fw dhclient[13007]: DHCPREQUEST on em1 to 88.192.128.1 port
67
May 12 11:25:20 fw dhclient[13007]: DHCPACK from 88.192.128.1
(00:0b:45:b6:ef:c0)
May 12 11:25:20 fw dhclient[13007]: bound to 88.192.133.155 -- renewal in 5180
seconds.

I wonder why dhclient looks up the routing table instead of preferring
the interface its sitting on. Can this be somehow changed (without patching
code)? I know this DHCP server is reachable via any of the three interfaces.
Maybe I could manually (i.e. in dhclient-script) add mpath routes to this
DHCP server's address for each interface?

BR,
Teemu Rinta-aho