From owner-freebsd-stable@FreeBSD.ORG Tue Nov 23 02:36:02 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CE411065674 for ; Tue, 23 Nov 2010 02:36:02 +0000 (UTC) (envelope-from r.sand@new-net.net) Received: from mx.new-net.net (195-13-59-48.oxyd.net [195.13.59.48]) by mx1.freebsd.org (Postfix) with ESMTP id 0BF948FC15 for ; Tue, 23 Nov 2010 02:36:01 +0000 (UTC) Received: (qmail 48509 invoked by uid 89); 23 Nov 2010 02:09:20 -0000 Received: from unknown (HELO m3.new-net.intra) (10.0.0.53) by 10.0.0.54 with SMTP; 23 Nov 2010 02:09:20 -0000 Received: (qmail 69280 invoked by uid 89); 23 Nov 2010 02:09:19 -0000 Received: by simscan 1.4.0 ppid: 69261, pid: 69270, t: 0.1829s scanners: attach: 1.4.0 clamav: 0.95.2/m:51/d:9560 Received: from unknown (HELO ?10.0.33.17?) (r.sand@new-net.net@82.235.179.84) by 10.0.0.53 with ESMTPA; 23 Nov 2010 02:09:18 -0000 From: Rudolph Sand Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 23 Nov 2010 03:09:17 +0100 Message-Id: To: freebsd-stable@freebsd.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) Subject: e1000 + vlan = connection lost after ifconfig + vlanid + vlandev X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2010 02:36:02 -0000 Hi, I noticed that *something has changed* regarding vlan creation since = 8.0-rel and 7.1-rel, compared to 8.1-rel / 7-stable When creating a vlan under 8.1-rel (csup'ed the sources yesterday), the = box looses all connectivity I'm using the following cards: em0@pci0:1:0:0: class=3D0x020000 card=3D0x10d315d9 chip=3D0x10d38086 = rev=3D0x00 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D 'Intel 82574L Gigabit Ethernet Controller (82574L)' I was used to create my vlan with the following (works on 8.0 and 7.1): ifconfig vlan0 create ifconfig vlan0 10.0.0.1 netmask 255.0.0.0 vlan 1234 vlandev em0 Now I don't have the proper knowledge to say *what* changed and *why*, = but I did manage to find a possible fix (with a little inspiration, = thanks Darius) At some point, I realized the kernel wasn't panic'ing, since my 'sleep = 200 && reboot &' command, issued before the ifconfig, was executed, and = the box was indeed rebooting after 200 secs ... Bottom line, is we realized a simple "ifconfig em0 down" than = "ifconfig em0 up" would fix the issue ! So i made a simple script for /usr/local/etc/rc.d/000.vlan.sh enclosed = below I'm still wondering if there isn't a cleaner way to do this via rc.conf = ... But at least, it's a working fix-of-the-poor Home this can still help someone Ps: sorry if this is the wrong place to post this info, that's my very = first humble contribution Rud. 000.vlan.sh : ----- #!/bin/sh ip=3D10.0.0.1 mask=3D255.0.0.0 vlanid=3D1234 vlandev=3Dvlan0 cloneddevice=3Dem0 case $1 in start) log=3D/var/log/vlan.log touch $log ifconfig $vlandev create >> $log ifconfig $vlandev $ip netmask $mask vlan $vlanid vlandev = $cloneddevice >> $log ifconfig $cloneddevice down >> $log = =20 ifconfig $cloneddevice up >> $log = =20 # for debug ... # mv /usr/local/etc/rc.d/000.vlan.sh /root/000.vlan.sh && sleep 800 && = reboot & =20 ;; = =20 stop) = =20 ;; = =20 esac =20