This is one of those problems that I cannot figure out why it will not work even though I've tried several different approaches.
For background, I have two network interfaces that are bonded together as a lagg interface. The lagg interface's configuration is specified in /etc/rc.conf and gets it's IP address and other information via DHCP. The lagg interface works. On top of the lagg interface I have one tagged vlan interface. I also have it's configuration specified in /etc/rc.conf. However, FreeBSD refuses to obtain an IP address on boot via DHCP for the vlan interface.
For example, this configuration in /etc/rc.conf will create the lagg interface (lagg0), assign it an ip address via DHCP, and create the vlan interface (vlan10). However, vlan10 does not get assigned an ip address via DHCP.
Similarly, this configuration for my /etc/rc.conf file (stolen from the FreeBSD) handbook has the same result - lagg0 gets an IP address via DHCP, but the vlan interface does not get an IP address via DHCP.
However, I can statically assign addresses (less than optimal for my network) with the following /etc/rc.conf file.
Any chance anyone can help me figure out why I can't assign IP addresses to VLAN interfaces in /etc/rc.conf via DHCP? I'm getting tired of manually typing "dhclient lagg0.10" or "dhclient vlan10" after startup, and I would prefer to have IP address configuration handled by DHCP instead of statically.
Thanks!
For background, I have two network interfaces that are bonded together as a lagg interface. The lagg interface's configuration is specified in /etc/rc.conf and gets it's IP address and other information via DHCP. The lagg interface works. On top of the lagg interface I have one tagged vlan interface. I also have it's configuration specified in /etc/rc.conf. However, FreeBSD refuses to obtain an IP address on boot via DHCP for the vlan interface.
For example, this configuration in /etc/rc.conf will create the lagg interface (lagg0), assign it an ip address via DHCP, and create the vlan interface (vlan10). However, vlan10 does not get assigned an ip address via DHCP.
Code:
#LACP Config
ifconfig_re0="up"
ifconfig_re1="up"
cloned_interfaces="lagg0 lo1 vlan10"
ifconfig_lagg0="laggproto lacp laggport re0 laggport re1 DHCP"
ifconfig_lagg0_ipv6="inet6 accept_rtadv"
ifconfig_vlan10="vlan 10 vlandev lagg0 DHCP"
Code:
#LACP Config
ifconfig_re0="up"
ifconfig_re1="up"
cloned_interfaces="lagg0 lo1"
ifconfig_lagg0="laggproto lacp laggport re0 laggport re1 DHCP"
ifconfig_lagg0_ipv6="inet6 accept_rtadv"
vlans_lagg0="10"
ifconfig_lagg0_10="DHCP"
Code:
#LACP Config
ifconfig_re0="up"
ifconfig_re1="up"
cloned_interfaces="lagg0 lo1"
ifconfig_lagg0="laggproto lacp laggport re0 laggport re1 DHCP"
ifconfig_lagg0_ipv6="inet6 accept_rtadv"
vlans_lagg0="10"
ifconfig_lagg0_10="inet 192.168.10.10/24"
Thanks!
Last edited: