Date: Tue, 23 Nov 2010 03:09:17 +0100 From: Rudolph Sand <r.sand@new-net.net> To: freebsd-stable@freebsd.org Subject: e1000 + vlan = connection lost after ifconfig + vlanid + vlandev Message-ID: <BA4A7C07-C935-4D93-B49C-567DE229E3BF@new-net.net>
next in thread | raw e-mail | index | archive | help
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 <connectivity lost> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA4A7C07-C935-4D93-B49C-567DE229E3BF>