[solved] Re: 7-STABLE: bridge and em
Boris Samorodov
bsam at ipt.ru
Thu Jun 5 17:49:33 UTC 2008
Hi List!
Well, it took me a while to discover the case...
Provider attached my ethernet line to a switch and set up port
security to restrict to three MAC addresses which were already
used by two computers and a network printer.
As soon as provider deletted those restrictions all went well.
Thanks for all who helped me.
On Wed, 28 May 2008 02:15:18 +0400 Boris Samorodov wrote:
> When em0 has an inet address while bridge0 doesn't, it seems to be OK:
> -----
> bs1% uname -a
> FreeBSD bs1.sp34.ru 7.0-STABLE FreeBSD 7.0-STABLE #0: Sun May 25 20:15:26 MSD 2008 root at bs1.sp34.ru:/usr/obj/usr/src/sys/BSM i386
> bs1% ifconfig em0; ifconfig tap0; ifconfig bridge0
> em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> options=98<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
> ether 00:0c:f1:6c:37:4c
> inet 192.168.16.30 netmask 0xffffff00 broadcast 192.168.16.255
> media: Ethernet autoselect (100baseTX <full-duplex>)
> status: active
> tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> ether 00:bd:3e:24:00:00
> bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> ether ea:8b:1f:65:2a:5c
> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
> maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
> root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
> member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 7 priority 128 path cost 2000000
> member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 1 priority 128 path cost 2000000
> bs1% netstat -rn
> Routing tables
> Internet:
> Destination Gateway Flags Refs Use Netif Expire
> default 192.168.16.254 UGS 0 357 em0
> 127.0.0.1 127.0.0.1 UH 0 3934 lo0
> 192.168.16.0/24 link#1 UC 0 0 em0
> 192.168.16.1 00:07:e9:80:33:bc UHLW 1 16 em0 951
> 192.168.16.254 00:07:e9:80:33:bc UHLW 2 0 em0 1002
> Internet6:
> Destination Gateway Flags Netif Expire
> ::1 ::1 UHL lo0
> fe80::%lo0/64 fe80::1%lo0 U lo0
> fe80::1%lo0 link#5 UHL lo0
> ff01:5::/32 fe80::1%lo0 UC lo0
> ff02::%lo0/32 fe80::1%lo0 UC lo0
> bs1% ping -c 3 192.168.16.254
> PING 192.168.16.254 (192.168.16.254): 56 data bytes
> 64 bytes from 192.168.16.254: icmp_seq=0 ttl=64 time=0.316 ms
> 64 bytes from 192.168.16.254: icmp_seq=1 ttl=64 time=0.263 ms
> 64 bytes from 192.168.16.254: icmp_seq=2 ttl=64 time=0.266 ms
> --- 192.168.16.254 ping statistics ---
> 3 packets transmitted, 3 packets received, 0.0% packet loss
> round-trip min/avg/max/stddev = 0.263/0.282/0.316/0.024 ms
> -----
> But if I move ip address from em0 to bridge0:
> -----
> bs1% sudo ifconfig em0 inet 192.168.16.30 netmask 0xffffff00 delete
> bs1% sudo ifconfig bridge0 inet 192.168.16.30 netmask 0xffffff00
> bs1% sudo route add default 192.168.16.254
> add net default: gateway 192.168.16.254
> bs1% ifconfig em0; ifconfig tap0; ifconfig bridge0
> em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> options=98<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
> ether 00:0c:f1:6c:37:4c
> media: Ethernet autoselect (100baseTX <full-duplex>)
> status: active
> tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
> ether 00:bd:3e:24:00:00
> bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> ether ea:8b:1f:65:2a:5c
> inet 192.168.16.30 netmask 0xffffff00 broadcast 192.168.16.255
> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
> maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
> root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
> member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 7 priority 128 path cost 2000000
> member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 1 priority 128 path cost 2000000
> bs1% netstat -rn
> Routing tables
> Internet:
> Destination Gateway Flags Refs Use Netif Expire
> default 192.168.16.254 UGS 0 0 bridge
> 127.0.0.1 127.0.0.1 UH 0 3934 lo0
> 192.168.16.0/24 link#6 UC 0 0 bridge
> 192.168.16.254 link#6 UHLW 2 0 bridge
> Internet6:
> Destination Gateway Flags Netif Expire
> ::1 ::1 UHL lo0
> fe80::%lo0/64 fe80::1%lo0 U lo0
> fe80::1%lo0 link#5 UHL lo0
> ff01:5::/32 fe80::1%lo0 UC lo0
> ff02::%lo0/32 fe80::1%lo0 UC lo0
> bs1% ping -c 3 192.168.16.254
> PING 192.168.16.254 (192.168.16.254): 56 data bytes
> --- 192.168.16.254 ping statistics ---
> 3 packets transmitted, 0 packets received, 100.0% packet loss
> -----
> Did I miss something? Thanks!
WBR
--
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve
More information about the freebsd-stable
mailing list