Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 2004 15:01:39 +0200 (CEST)
From:      Sten Spans <sten@blinkenlights.nl>
To:        "Adam C. Migus" <adam@migus.org>
Cc:        current@freebsd.org
Subject:   Re: VLAN support in rcNG [PATCH]
Message-ID:  <Pine.SOL.4.58-Blink.0404181443460.21876@tea.blinkenlights.nl>
In-Reply-To: <1082245838.4081c2ce9117a@webservices.migus.org>
References:  <1082233506.408192a2c476a@webservices.migus.org> <1082235338.408199caed784@webservices.migus.org> <1082245838.4081c2ce9117a@webservices.migus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 17 Apr 2004, Adam C. Migus wrote:

> Quoting Ruslan Ermilov <ru@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
@@ -34,7 +34,7 @@

 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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.58-Blink.0404181443460.21876>