Date: Mon, 21 Apr 2008 12:24:44 GMT From: Mykola Zubach <zuborg@advancedhosters.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/122963: tcpdump does not show packets redirected by 'ipfw fwd' on proper interface Message-ID: <200804211224.m3LCOio3012915@www.freebsd.org> Resent-Message-ID: <200804211230.m3LCU1f1005353@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 122963 >Category: kern >Synopsis: tcpdump does not show packets redirected by 'ipfw fwd' on proper interface >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 21 12:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Mykola Zubach >Release: 7.0 >Organization: AdvancedHosters.com >Environment: FreeBSD TRAF01 7.0-RELEASE FreeBSD 7.0-RELEASE #3: Fri Apr 18 12:50:16 UTC 2008 root@TRAF01:/usr/obj/usr/src/sys/Z i386 >Description: I'm using 'ipfw fwd' feature to split outgoing traffic between two interfaces, attached to same switch which have 2G uplink: 00100 0 0 prob 0.500000 fwd 192.168.1.1 tcp from any 80 to any out via em0 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=db<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,POLLING,VLAN_HWCSUM> ether 00:30:48:91:59:0c inet 1.2.3.4 netmask 0xfffffc00 broadcast 1.2.3.4 media: Ethernet autoselect (1000baseTX <full-duplex>) status: active em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=db<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,POLLING,VLAN_HWCSUM> ether 00:30:48:91:59:0d inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (1000baseTX <full-duplex>) status: active I'm using 192.168.1.2/24 ip on em1 because I set up static arp: ? (192.168.1.1) at 00:1d:46:bf:17:43 on em1 permanent [ethernet] ? (192.168.1.2) at 00:30:48:91:59:0d on em1 permanent [ethernet] ? (1.2.3.5) at 00:1d:46:bf:17:43 on em0 [ethernet] where 1.2.3.5 is default gateway, so 'ipfw fwd' will forward traffic to same MAC-address as of default gateway, but using em1 instead of em0. This setup works as expected, but the problem is that 'tcpdump' utility doesn't show forwared packets on em1. Even on em0 packets are shown only if I setup for 192.168.1.1 another MAC-address, not equal to MAC of 1.2.3.5. In such case, source MAC is 00:30:48:91:59:0d (MAC of em1) and dst MAC is that MAC I setuped for 192.168.1.1 (as 'tcpdump -e' shows). For setup as above, with equal MACs, tcpdump doesn't show forwarded packets on both NICs, only per-NIC counters are updated properly, as 'netstat -ni' shows. >How-To-Repeat: Setup any ipfw config where 'ipfw fwd' rule will forward packets to another interface as default. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804211224.m3LCOio3012915>