Bridge
AndygreenNet at netscape.net
AndygreenNet at netscape.net
Mon Nov 1 18:23:03 PST 2004
Hi everybody!
I'm try configure bridge on FreeBSD box.
Box configuration:
%uname -srp
FreeBSD 5.3-RC1 i386
%ifconfig
xl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=9<RXCSUM,VLAN_MTU>
ether 00:04:79:68:02:e6
media: Ethernet autoselect (none)
status: no carrier
fxp0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=48<VLAN_MTU,POLLING>
inet 213.59.235.126 netmask 0xfffffff8 broadcast 213.59.235.127
ether 00:0e:0c:00:58:60
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
fxp1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=48<VLAN_MTU,POLLING>
ether 00:07:e9:14:01:99
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
fxp2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=48<VLAN_MTU,POLLING>
inet 213.59.128.190 netmask 0xfffffffc broadcast 213.59.128.191
ether 00:07:e9:14:05:be
media: Ethernet autoselect (none)
status: no carrier
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
pflog0: flags=0<> mtu 33208
pfsync0: flags=0<> mtu 2020
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
vlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:07:e9:14:05:be
media: Ethernet autoselect (none)
status: no carrier
vlan: 218 parent interface: fxp2
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
inet 62.33.196.254 netmask 0xffffff80 broadcast 62.33.196.255
ether 00:07:e9:14:01:99
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 155 parent interface: fxp1
vlan2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:07:e9:14:01:99
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 156 parent interface: fxp1
vlan3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:07:e9:14:01:99
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 90 parent interface: fxp1
vlan4: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:0e:0c:00:58:60
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 156 parent interface: fxp0
vlan5: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:04:79:68:02:e6
media: Ethernet autoselect (none)
status: no carrier
vlan: 90 parent interface: xl0
%vi /usr/local/etc/rc.d/bridge.sh
#!/bin/sh
#
#
if [ -z "${source_rc_confs_defined}"]; then
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
fi
case "$1" in
start)
case "${bridge_enable}" in
[Yy][Ee][Ss])
echo -n 'Starting bridge'
sysctl -w net.link.ether.bridge.enable=1
sysctl -w net.link.ether.bridge.ipfw=1
sysctl -w net.link.ether.bridge.config=vlan0:218,vlan1:155,vlan2:156,vlan3:90,vlan4:156,vlan5:90,xl0:218,fxp0:155
;;
esac
;;
stop)
sysctl -w net.link.ether.bridge.enable=0
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit
%vi /etc/rc.conf
firewall_enable="YES" # Set to YES to enable firewall functionality
firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall
firewall_type="OPEN" # Firewall type (see /etc/rc.firewall)
firewall_quiet="YES" # Set to YES to suppress rule display
firewall_logging="YES" # Set to YES to enable events logging
firewall_flags="" # Flags passed to ipfw when type is a file
ip_portrange_first="49190" # Set first dynamically allocated port
ip_portrange_last="65535" # Set last dynamically allocated port
Bridge do not work!
What do I do incorrectly?
__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
More information about the freebsd-net
mailing list