Hi,
I have a multihomed FreeBSD router (Internet and IPTV). Both interfaces get a dynamic IP using DHCP. I like to set a route on one of the interfaces, e.g.:
where 10.0.53.1 is the IP of the gateway of my ISP that I learned about from the DHCP offer. This IP may change and I am a bit reluctant to hard code a dynamic IP in my config (even though in practice it may stay stable for a prolonged period of time).
I haven't found a way to do this in rc.conf using a dynamic IP address of the gateway? (only with a static IP)
The only alternative I can think of is to use /etc/dhclient-exit-hooks, as mentioned in dhclient-script().
Am I on the right track here? Or is there an option in rc.conf that I missed?
I have a multihomed FreeBSD router (Internet and IPTV). Both interfaces get a dynamic IP using DHCP. I like to set a route on one of the interfaces, e.g.:
Code:
route add 12.34.56.78/24 10.0.53.1
where 10.0.53.1 is the IP of the gateway of my ISP that I learned about from the DHCP offer. This IP may change and I am a bit reluctant to hard code a dynamic IP in my config (even though in practice it may stay stable for a prolonged period of time).
I haven't found a way to do this in rc.conf using a dynamic IP address of the gateway? (only with a static IP)
The only alternative I can think of is to use /etc/dhclient-exit-hooks, as mentioned in dhclient-script().
Am I on the right track here? Or is there an option in rc.conf that I missed?