From owner-freebsd-net@FreeBSD.ORG Thu Dec 13 03:54:02 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83BDF16A418; Thu, 13 Dec 2007 03:54:02 +0000 (UTC) (envelope-from randy@psg.com) Received: from rip.psg.com (rip.psg.com [147.28.0.39]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACE713C448; Thu, 13 Dec 2007 03:54:02 +0000 (UTC) (envelope-from randy@psg.com) Received: from [202.214.86.183] by rip.psg.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1J2f97-0005Tk-Q1; Thu, 13 Dec 2007 03:54:01 +0000 Message-ID: <4760ACC9.70305@psg.com> Date: Thu, 13 Dec 2007 12:53:45 +0900 From: Randy Bush User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: FreeBSD Net References: <475F744F.7030003@psg.com> <475FD764.8090402@FreeBSD.org> <47602195.9050602@psg.com> In-Reply-To: <47602195.9050602@psg.com> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Bruce M. Simpson" Subject: Re: ifconfig: BRDGADD vr1: Invalid argument X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 03:54:02 -0000 ok, i have bridging working (kernel/userland version skew likely culprit, thanks max), except that ath0 does not seem to completely bridge. bms may have warned me in saying > although you won't get the 802.11 frames bridged. --- the problem: o hosts on vr1, vr2, and vr3 get dhcp addresses and can see the world o host on ath0 can not get dhcp address - soekris sees dhcp request and responds - response not seen by anyone on wireless - tcpdump says dhcpd is sending the response (see below) the plan: Soekris 5501 .-----------------------. | | | b ---ath0| | r | LAN external | i --- vr1| ------------|vr0---NAT---- d | DHCP WAN | g --- vr2| | e | Clients | 0 --- vr3| | | `-----------------------' vr0 gets address via DHCP from external link bridge0 is hard coded as 192.168.0.1/24 dhcpd runs on bridge0 for the range 192.168.0.100-199 to feed the LAN. --- from /etc/rc.conf: firewall_enable=YES # Set to YES to enable firewall functionality firewall_type="/etc/ipfw.rules" # 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 ifconfig_vr0=DHCP cloned_interfaces=bridge0 ifconfig_bridge0="192.168.0.1 addm vr1 addm vr2 addm vr3 up addm ath0" ifconfig_vr1=up ifconfig_vr2=up ifconfig_vr3=up ifconfig_ath0="channel 4 ssid rgnet-aden wep wepkey x mediaopt hostap up" gateway_enable=YES --- from /etc/sysctl.conf: # nat net.inet.ip.fw.one_pass=0 # bridging #net.link.ether.ipfw=1 -- uncomment and connectivity on vr0 is lost net.link.bridge.ipfw=1 net.link.bridge.ipfw_arp=1 # ath bridging net.inet.ip.check_interface=0 --- # ifconfig -a vr0: flags=8843 metric 0 mtu 1500 options=b ether 00:00:24:c8:b3:28 inet 666.42.86.171 netmask 0xffffffc0 broadcast 666.42.86.191 media: Ethernet autoselect (100baseTX ) status: active vr1: flags=8943 metric 0 mtu 1500 options=9 ether 00:00:24:c8:b3:29 media: Ethernet autoselect (none) status: no carrier vr2: flags=8943 metric 0 mtu 1500 options=9 ether 00:00:24:c8:b3:2a media: Ethernet autoselect (none) status: no carrier vr3: flags=8943 metric 0 mtu 1500 options=9 ether 00:00:24:c8:b3:2b media: Ethernet autoselect (none) status: no carrier ath0: flags=8943 metric 0 mtu 1500 ether 00:0b:6b:83:59:25 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: associated ssid rgnet-aden channel 4 (2427 Mhz 11g) bssid 00:0b:6b:83:59:25 authmode OPEN privacy ON deftxkey UNDEF wepkey 1:104-bit txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 roam:rate11g 5 protmode CTS burst dtimperiod 1 lo0: flags=8049 metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 bridge0: flags=8843 metric 0 mtu 1500 ether c6:75:12:20:d9:c2 inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.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: ath0 flags=143 ifmaxaddr 0 port 5 priority 128 path cost 370370 member: vr3 flags=143 ifmaxaddr 0 port 4 priority 128 path cost 200000 member: vr2 flags=143 ifmaxaddr 0 port 3 priority 128 path cost 55 member: vr1 flags=143 ifmaxaddr 0 port 2 priority 128 path cost 55 --- the tcpdump -i ath0 03:48:29.717236 00:18:de:21:76:c9 (oui Unknown) > Broadcast Null Supervisory, Receiver not Ready, rcv seq 64, Flags [Poll], length 6 03:48:29.717244 00:18:de:21:76:c9 (oui Unknown) > Broadcast Null Supervisory, Receiver not Ready, rcv seq 64, Flags [Poll], length 6 03:48:30.192604 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:18:de:21:76:c9 (oui Unknown), length 300 03:48:30.192613 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:18:de:21:76:c9 (oui Unknown), length 300 03:48:30.193467 IP 192.168.0.1.bootps > test.psg.com.bootpc: BOOTP/DHCP, Reply, length 300 03:48:33.192787 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:18:de:21:76:c9 (oui Unknown), length 300 03:48:33.192799 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:18:de:21:76:c9 (oui Unknown), length 300 03:48:33.194067 IP 192.168.0.1.bootps > test.psg.com.bootpc: BOOTP/DHCP, Reply, length 300 --- randy