Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Adding and Removing interfaces dynamically (Shweta Jogi)
   2. dhclient and custom Linux routing tables (VRF) (Mateusz Viste)
   3. Re: dhclient and custom Linux routing tables (VRF)
      (Thomas Markwalder)
   4. Re: dhclient and custom Linux routing tables (VRF) (Tony Finch)


----------------------------------------------------------------------

Message: 1
Date: Thu, 6 Jun 2019 12:40:35 +0000
From: Shweta Jogi <shweta.j...@sophos.com>
To: "dhcp-users@lists.isc.org" <dhcp-users@lists.isc.org>
Subject: Adding and Removing interfaces dynamically
Message-ID: <72203d49-61a1-41bf-afe7-2aed9ea7c...@sophos.com>
Content-Type: text/plain; charset="utf-8"

Hi All,

I am dynamically adding and removing interfaces in DHCPv4 using same logic 
written in discover_interfaces.
Everything works fine, but as soon as I move my logic of adding and removing 
interfaces into a thread, those interfaces are not listening for broadcast 
packets, but they are able to process unicast packets.

Anyone have any idea what can be the reason ? And clue will be really 
appreciated.

Regards,
Shweta Jogi

________________________________

Sophos Technologies Private Limited Regd. Office: Sophos House, Saigulshan 
Complex, Beside White House, Panchvati Cross Road, Ahmedabad - 380006, Gujarat, 
India CIN: U72200GJ2006PTC047857

Sophos Ltd, a company registered in England and Wales number 2096520, The 
Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20190606/f924d36e/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 7 Jun 2019 13:23:29 +0200
From: Mateusz Viste <mate...@viste.fr>
To: dhcp-users@lists.isc.org
Subject: dhclient and custom Linux routing tables (VRF)
Message-ID: <e0339f19-b426-d25c-824e-bf4bd12ec...@viste.fr>
Content-Type: text/plain; charset=utf-8; format=flowed

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


------------------------------

Message: 3
Date: Fri, 7 Jun 2019 07:41:30 -0400
From: Thomas Markwalder <tm...@isc.org>
To: dhcp-users@lists.isc.org
Subject: Re: dhclient and custom Linux routing tables (VRF)
Message-ID: <a3819f1a-58e6-80bc-7832-6fbda77d6...@isc.org>
Content-Type: text/plain; charset=utf-8; format=flowed

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
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



------------------------------

Message: 4
Date: Fri, 7 Jun 2019 12:48:42 +0100
From: Tony Finch <d...@dotat.at>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhclient and custom Linux routing tables (VRF)
Message-ID: <alpine.deb.2.20.1906071238030.16...@grey.csi.cam.ac.uk>
Content-Type: text/plain; charset=US-ASCII

Mateusz Viste <mate...@viste.fr> wrote:
>
> 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?

Network configuration changes from DHCP are handled by the
dhclient-script, which is probably supplied by your Linux distribution.

You might find you have to re-do most of the dhclient-script logic to
support VRFs, so you might be better off providing a complete replacement
script rather than using the hooks.

[ One awkward thing I have noticed is that Debian's dhclient-script always
continues after running the enter hooks, whereas the ISC versions exit
early if the enter hooks exit with a non-zero ststus, so the enter hooks
might or might not allow you to completely override parts of the
dhclient-script. ]

Tony.
-- 
f.anthony.n.finch  <d...@dotat.at>  http://dotat.at/
Whitby to Gibraltar Point: East or southeast 4 or 5, increasing 6 or 7 for a
time, veering southwest later. Slight becoming moderate. Rain for a time then
showers. Good, occasionally poor later.


------------------------------

Subject: Digest Footer

_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 128, Issue 1
******************************************

Reply via email to