Configuring interfaces and routing tables and what not are extremely OS
implementation dependent and as such dhclient itself has never directly
changed any of these things. Operations like this are actually carried
out by a helper shell script which dhclient invokes at various stages of
operation and through out the life cycle of asking for, obtaining, and
releases leases. Prior to each invocation it sets numerous environment
variables with pertinent values like the old ip address, new ip address
etc. The script is expected to configure interfaces and other OS/site
specific operations, but is generally free to do whatever it wishes, so
long as it returns the appropriate exit statuses.
Refer to man 8 dhclient-script for details. You can specify a
customized script via command line, or more properly, you can supply
enter and exit "hook" scripts as described in the man-page.
On 6/7/19 7:23 AM, Mateusz Viste wrote:
> Hello all,
>
> I am trying to use the ISC dhclient with Linux VRFs, where each VRF is
> assigned a custom Linux routing table. Typically, like this:
>
> # ip link add vrf1 type vrf table 10
> # ip link set eth0 master vrf1
> # ip link set vrf1 up
> # dhclient eth0
>
> Unfortunately, dhclient populates the default Linux routing table with
> the default gateway it receives, instead of adding it to the VRF's
> routing table:
>
> # ip route show
> default via 10.0.2.2 dev eth0
>
> # ip route show table 10
> 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
> local 10.0.2.15 dev eth0 proto kernel scope host src 10.0.2.15
>
> I have read dhclient's documentation, and did not find any mention of
> either VRFs or custom routing tables... Have I missed some obvious
> trick here?
>
> Mateusz
> _______________________________________________
> dhcp-users mailing list
>
[hidden email]
>
https://lists.isc.org/mailman/listinfo/dhcp-users_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users