From owner-freebsd-net Sat Aug 5 21:53:20 2000 Delivered-To: freebsd-net@freebsd.org Received: from smtp13.bellglobal.com (smtp13.bellglobal.com [204.101.251.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CF9437BB04 for ; Sat, 5 Aug 2000 21:53:16 -0700 (PDT) (envelope-from james@ehlo.com) Received: from smtp.ehlo.com (HSE-Toronto-ppp175855.sympatico.ca [64.229.72.238]) by smtp13.bellglobal.com (8.8.5/8.8.5) with ESMTP id AAA16126; Sun, 6 Aug 2000 00:57:37 -0400 (EDT) Received: from james by smtp.ehlo.com with local (Exim 3.15 #1) id 13LIQA-00027h-00; Sun, 06 Aug 2000 00:52:22 -0400 Date: Sun, 6 Aug 2000 00:52:22 -0400 From: James FitzGibbon To: Bob Van Valzah Cc: freebsd-net@freebsd.org Subject: Re: VLAN Config Advice Message-ID: <20000806005221.A8147@ehlo.com> References: <398C491E.D7ED5E9F@WhiteBarn.Com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <398C491E.D7ED5E9F@WhiteBarn.Com>; from Bob@WhiteBarn.Com on Sat, Aug 05, 2000 at 12:04:30PM -0500 Organization: EHLO Solutions Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * Bob Van Valzah (Bob@WhiteBarn.Com) [000805 13:04]: > I'm having trouble getting VLANs to work on a 4.1-RELEASE system and > would appreciate any advice from those who have it running. (If I'm able > to get a decent understanding of the issues involved, I may even tackle > writing a section for the Handbook on VLANs.) I'll lay out one working VLAN config on 4.x for you: 172.20.32.0/20 VLAN ID 2 172.16.8.0/22 VLAN ID 3 Physical: one CAT5 cable running from fxp1 to a port on an HP Procurve 4000M. On the HP, the port is set to have both VLAN2 and VLAN3 set up as 'tagged'. On some other switch or router, you may have to set things up differently. I'm familiar with Cisco's way of configuring the other end, but won't go into it unless you say that you're using Cisco (it's a long answer). Logical: fxp1: flags=8843 mtu 1500 inet 169.254.1.1 netmask 0xffffffff broadcast 169.254.1.1 ether 00:d0:b7:65:bf:f5 media: autoselect (100baseTX ) status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP vlan0: flags=8843 mtu 1496 inet 172.16.8.101 netmask 0xfffffc00 broadcast 172.16.11.255 ether 00:d0:b7:65:bf:f5 vlan: 3 parent interface: fxp1 vlan1: flags=8843 mtu 1496 inet 172.20.32.101 netmask 0xfffff000 broadcast 172.20.47.255 ether 00:d0:b7:65:bf:f5 vlan: 2 parent interface: fxp1 I get this configuration on boot this way: 1. I have 'pseudo-device vlan 2' in my kernel 2. My rc.conf looks like this: network_interfaces="fxp1 vlan0 vlan1" ifconfig_fxp1="inet 169.254.1.1 netmask 255.255.255.255" ifconfig_vlan0="inet 172.16.8.101 netmask 255.255.252.0" ifconfig_vlan1="172.20.32.101 netmask 255.255.240.0" I do the VLAN association by way of an /etc/start_if.vlan0 script, which reads like this: ifconfig vlan0 vlan 3 vlandev fxp1 Since the start_if scripts run before the ifconfig magic from rc.conf, the tag ids are set up prior to any real addresses being assigned to the vlan interfaces. The use of 169.254.1.1 is borrowed from the range that M$ uses to default configure DHCP interfaces. I believe that there is an RFC or IETF draft that suggests that this range be used for similar applications. Upon reboot, everything works fine. -- j. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message