bridge

stobbi stobbi at netmont.sk
Wed Aug 26 11:20:29 CEST 2009


Zdravim,

snazim sa spojazdnit bridge dvoch sietoviek (em0,bge0) vo FreeBSD 7.2Rp0 po 
cistej instalacii:

cloned_interfaces="bridge0"
ifconfig_em0="up"
ifconfig_bge0="up"
ifconfig_bridge0="addm em0 addm bge0 up"
ifconfig_bridge0="stp em0 stp bge0"
ifconfig_bridge0="inet 10.0.255.90 netmask 255.255.255.0"

Sietovky su v HP DL120 G5, em0 integrovana, bge0 pridana (PCI-E).

Skusal som aj rozne kombinacie poradia ale vysledok je stale rovnaky, a to 
ze bridge nema priradenych ziadnych member-ov.

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
 ether 00:23:7d:fd:15:cc
 media: Ethernet autoselect
 status: no carrier
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 ether 00:24:81:b2:56:89
 media: Ethernet autoselect (none)
 status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
 inet6 ::1 prefixlen 128
 inet 127.0.0.1 netmask 0xff000000
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 
1500
 ether aa:3c:b1:50:53:b3
 inet 10.0.255.90 netmask 0xffffff00 broadcast 10.0.255.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

Ked som konfigurujem cez vlastny skriptik:
/sbin/ifconfig em0 up
/sbin/ifconfig bge0 up
/sbin/ifconfig bridge0 create
/sbin/ifconfig bridge0 addm em0
/sbin/ifconfig bridge0 stp em0
/sbin/ifconfig bridge0 addm bge0
/sbin/ifconfig bridge0 stp bge0
/sbin/ifconfig bridge0 up

bridge0 sa korektne nakonfiguruje:

em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 
1500
 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 ether 00:23:7d:fd:15:cc
 media: Ethernet autoselect
 status: no carrier
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 
mtu 1500
 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 ether 00:24:81:b2:56:89
 media: Ethernet autoselect (none)
 status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
 inet6 ::1 prefixlen 128
 inet 127.0.0.1 netmask 0xff000000
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 
1500
 ether 12:5f:a4:f4:14:f9
 inet 10.0.255.90 netmask 0xffffff00 broadcast 10.0.255.255
 id 00:23:7d:fd:15:cc priority 32768 hellotime 2 fwddelay 15
 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
 root id 00:23:7d:fd:15:cc priority 32768 ifcost 0 port 0
 member: bge0 flags=147<LEARNING,DISCOVER,STP,AUTOEDGE,AUTOPTP>
         ifmaxaddr 0 port 2 priority 128 path cost 55 proto rstp
         role disabled state discarding
 member: em0 flags=147<LEARNING,DISCOVER,STP,AUTOEDGE,AUTOPTP>
         ifmaxaddr 0 port 1 priority 128 path cost 2000000 proto rstp
         role disabled state discarding

Cez google som nasiel thread s podobnym problemom, ale v nom zistil zmeny v 
spravani ak pouzil pauzu medzi prikazmi vo vlastnom skripte co ja 
nepozorujem.
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2006-03/msg00012.html

Zatial jedine riesenie co mam, je vlozit prikazy z toho skriptu do 
/etc/rc.conf.local, ale ten skript sa pocas boot-ovania vola niekolko krat a 
po druhom a dalsom volani sa na konzole vypisuju chybove hlasky, ze bridge0 
je uz nakonfigurovany a nevyzera to pekne :-) ale je to funcne. Rad by som 
to vsak vyriesil nejakym standardnym sposobom ak je to mozne.

Vie mi s tym niekto pomoct?

Dik. Pali 




More information about the Users-l mailing list