Re: VLAN support in rcNG [PATCH]

From: Sten Spans <sten_at_blinkenlights.nl>
Date: Sun, 18 Apr 2004 15:01:39 +0200 (CEST)
On Sat, 17 Apr 2004, Adam C. Migus wrote:

> Quoting Ruslan Ermilov <ru_at_freebsd.org>:
>
> > Hmm, I have this in my /etc/rc.conf:
> >
> > cloned_interfaces="vlan0"
> > ifconfig_vlan0="x.x.x.x/28 vlan 65 vlandev rl0 mtu 1500"
> >
> > and I'm pretty sure it works.  ;)
> >
>
> Yes, it does.  Now try DHCP...
>

I experienced a problem here as well. My take on it was that the
DHCP thing is an wart really, there is a dhcp_interfaces variable on 4.x,
which the nicer approach imho. On 4.x rc.network line 194 empties
dhcp_interfaces on 4.x, I made a pr about it, but the answer was
to use the start_if mechanism
( http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/46454 ).

On 5.x I use a small patch, which is not entirely correct but
it works for me:

--- /usr/src/etc/rc.d/dhclient  Tue Sep 16 04:56:13 2003
+++ /etc/rc.d/dhclient  Mon Jan 26 01:28:57 2004
_at__at_ -34,7 +34,7 _at__at_

 dhclient_common()
 {
-       dhcp_list="`list_net_interfaces dhcp`"
+       dhcp_list="`list_net_interfaces dhcp` $dhcp_interfaces";
        if [ -z "$dhcp_list" ]; then
                return 1
        fi

<sten_at_ford:rc.d> cat /etc/rc.conf

gateway_enable="YES"
hostname="ford.blinkenlights.nl"
defaultrouter="XXXXXXX"
ipv6_enable="YES"
ipv6_gateway_enable="YES"
ipv6_defaultrouter="XXXX:XXX:XXXX::1"
cloned_interfaces="vlan2 vlan3 vlan4"
network_interfaces="lo0 em0 vlan2 wi0 vlan3 vlan4"
ipv6_network_interfaces="vlan2 vlan3 wi0 gif0"
gif_interfaces="gif0"
dhcp_interfaces="vlan4"

ifconfig_em0="media autoselect mtu 1500 up"
ifconfig_vlan2="192.168.1.1 netmask 255.255.255.0 vlan 2 vlandev em0"
ifconfig_vlan3="xx.xx.xxx.xxx netmask 255.255.255.248 vlan 3 vlandev em0"
ifconfig_vlan4="vlan 4 vlandev em0"
ifconfig_wi0="10.0.0.1 netmask 255.255.255.0 ssid blink mediaopt hostap"

HTH HAND
-- 
Sten Spans

"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem
Received on Sun Apr 18 2004 - 04:01:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:51 UTC