dhclient + dhclient-script + "routers" DHCP option+ FIB?
Julian Elischer
julian at freebsd.org
Mon Feb 2 15:45:06 UTC 2015
On 2/2/15 9:23 PM, Lev Serebryakov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> On 02.02.2015 14:09, Julian Elischer wrote:
>
>> Is it possible to add routes, passed from DHCP server, not to
>> default FIB but to FIB specified in /etc/dhclient.conf?
>>> I don't believe so directly. There is no place to specify that
>>> information.. HOWEVER once you have done a DCHP server
>>> discovery, you could possibly make multiple requests with
>>> different identification information. It would probably mean
>>> that you should have a different alias for each FIB to request
>>> from. It might be best to make the packets appear as if they have
>>> come through a dhcp relay in some way. I think it depends on what
>>> information the dhcpd is keying on, Usually its the MAC address
>>> which is a problem.
> I'm asking as CLIENT administrator, not SERVER one. I need to acquire
> configuration information from my ISP, but apply "default route" not
> to default FIB. It is why I mention "/etc/dhclient.conf" :)
the client runs a script after getting the lease
you can put whatever you want in there.
/sbin/dhclient-script
it also looks for and runs
/etc/dhclient-enter-hooks and /etc/dhclient-exit-hooks
and you can put whatever you want in there as well.
check the man pages for some details
julian at vps1:man -k dhclient
dhclient(8) - Dynamic Host Configuration Protocol (DHCP)
client
dhclient-script(8) - DHCP client network configuration script
dhclient.conf(5) - DHCP client configuration file
dhclient.leases(5) - DHCP client lease database
>
> - --
> // Lev Serebryakov
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (MingW32)
>
> iQJ8BAEBCgBmBQJUz3o+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
> ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGOTZEMUNBMEI1RjQzMThCNjc0QjMzMEFF
> QUIwM0M1OEJGREM0NzhGAAoJEOqwPFi/3EeP+G8P/iSRdSxi6plLVtavDNxlz0Ay
> 7TAsUrzgeYON/nP7FPrvn0UgvoHq1dGvr73EWSlKXt0qQrT0zfi4z1nhPDsRMaDe
> oqepghoJPYzkN7z0PRmFV1UNUS/nwp8M+juAIIokAu6n9Xjib/BpMIznTai4NxWj
> vGr6+qS/MpjbOJaepGqu9RU+DIUBAqj+aMgs71lraUA8/2gd9+pG+GTYzOR04HN+
> Vxy7Suo6mrCSRLMCxuZ6hiyTkCxRqdD1z5rF2OKLXoLUwrloTvwZxcdXRfaieNPn
> N/TwIWRsEMUkb805oQWRmC8F/Q6gevh5t7E14ZOUhl14IM0ffEeAh6U1vqvxzaJQ
> 5I1qcI1jVB+19kyfnHQ2WNZHaHdPi/sAOTO0/+VXaaJs/LMNiefRTIBHydHwkrnz
> SAMa30kbeUocoRXC6I5EZv5xofZsLOOCqayL5REJY/0fE4K3M8HAhOlIWV2f0N5g
> SYwy2o0LH3uRvaQy3sWm9QD5awWRetJIqslqId+SaCUKcjBEjHTtk7TByge8cYgA
> Uum52yz+1sUN+NpGLh/zjkDr8v3YJiHIimElY4wWKhD0PiuhLMxDc/bBci7VLPHj
> 24zc+I8u9eMlsaFo/6kGIgAKfFEYMHrPFNGHdNHe0/MlOZXE8id2ffXX+bR7IB9o
> t5YDiQU3vKD/huC8z7uv
> =SP0G
> -----END PGP SIGNATURE-----
>
>
More information about the freebsd-net
mailing list