From owner-freebsd-questions@FreeBSD.ORG Sun Mar 10 19:31:43 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D591A781 for ; Sun, 10 Mar 2013 19:31:43 +0000 (UTC) (envelope-from doug@safeport.com) Received: from oceanpt.safeport.com (oceanpt.safeport.com [65.122.17.3]) by mx1.freebsd.org (Postfix) with ESMTP id 216A9CC3 for ; Sun, 10 Mar 2013 19:31:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by oceanpt.safeport.com (8.14.2/8.14.2) with ESMTP id r2AJVfT8037154 for ; Sun, 10 Mar 2013 15:31:41 -0400 (EDT) (envelope-from doug@safeport.com) Date: Sun, 10 Mar 2013 15:31:41 -0400 (EDT) From: doug@safeport.com To: freebsd-questions@freebsd.org Subject: Re: vlan routing In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (oceanpt.safeport.com [127.0.0.1]); Sun, 10 Mar 2013 15:31:41 -0400 (EDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2013 19:31:43 -0000 On Sun, 10 Mar 2013, ??????? ??????? wrote: > 2013/3/10 : >> I am trying set this up. First I munged the IP addresses. Not to worry if I >> hit yours. I did the following commands: >> >> ifconfig vlan0 create >> ifconfig vlan0 vlan 95 vlandev fxp0 >> ifconfig vlan0 inet 134.217.128.117 netmask 255.255.255.0 >> ifconfig fxp0 add 134.217.128.117 netmask 255.255.255.0 >> route add -inet 134.217.128.117 134.217.128.1 >> >> ifconfig shows: >> >> fxp0: flags=8843 metric 0 mtu 1500 >> options=8 >> ether 00:d0:b7:56:cf:ab >> inet 45.22.17.3 netmask 0xfffffc00 broadcast 45.22.19.255 >> inet 45.22.17.17 netmask 0xffffffff broadcast 45.22.17.17 >> inet 134.217.128.117 netmask 0xffffff00 broadcast 134.217.128.255 >> media: Ethernet autoselect (100baseTX ) >> status: active >> bge0: flags=8802 metric 0 mtu 1500 >> options=9b >> ether 00:09:5b:60:e4:1f >> media: Ethernet autoselect (none) >> status: no carrier >> vlan0: flags=8843 metric 0 mtu 1500 >> ether 00:d0:b7:56:cf:ab >> inet 134.217.128.117 netmask 0xffffff00 broadcast 134.217.128.255 >> media: Ethernet autoselect (100baseTX ) >> status: active >> vlan: 95 parent interface: fxp0 >> >> Needless to say it does not work. The switch is programmed correctly (I am >> told). My questions are (1) it seems like the option got applied to the >> wrong interface; (2) what did I miss?? >> >> I also tried booting the system with IP of 134.217.128.117 but I did not get >> the rc.conf macros correctly. I do know I can not route through the switch >> without going the vlan commands. >> >> _____ >> Douglas Denault >> http://www.safeport.com >> doug@safeport.com >> Voice: 301-217-9220 >> Fax: 301-217-9277 >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > I guess you shouldn't put the same IP address on two interfaces (vlan > and fxp0), you need to decide wherther you need tagged or untagged > vlan frames there and, depending on this decision put the IP address > on VLAN interface (tagged variant) or fxp0 (untagged one). > > If i understand your task correctly, then this line is faulty from > your configuration: >> ifconfig fxp0 add 134.217.128.117 netmask 255.255.255.0 > You don't need it. > >> route add -inet 134.217.128.117 134.217.128.1 > This is smth absoulutely wrong:) > > Basically, if you only need a vlan interface that could be used for > routing, you need these commands only: > > ifconfig vlan95 create > ifconfig vlan95 inet 134.217.128.117/24 vlan 95 vlandev fxp0 > > and in /etc/rc.conf you should put such strings: > > cloned_interfaces="vlan95" > ifconfig_vlan95="inet 134.217.128.117/24 vlan 95 vlandev fxp0" > > for the interface to be created on reboot. > Hope this helps. Thanks I will try _____ Douglas Denault http://www.safeport.com doug@safeport.com Voice: 301-217-9220 Fax: 301-217-9277