The short version:
--
When an interface is put into promiscuous mode, inbound multicast
traffic is forwarded according to the host's routing table regardless
of net.inet.ip.mforwarding.
Details:
--
gw1 has vr0 (external) and vr1 (internal)
gw2 has em0 (external) and em1 (internal)
vr0 and em0 plug into a switch, which plugs into my provider
vr1 and em1 plug into my internal switch.
vr0 has carp1 running on top of it. em0 does not. The other interfaces
do not have carp (yet).
gw2 is new, and has a default route to my ISP. It does not have routes
for all my internal networks. Some of those networks have a lot of
multicast traffic. I placed em1 into promiscuous mode via tcpdump and
crashed gw1. After testing for a while, I found that the machine was
getting overwhelmed by cascading multicasts. Basically, it would fire
a multicast out of vr1. em1 would catch it, but did not have a route
to the destination IP. The multicast was forwarded out em0. vr0
catches it, and because it's in promiscuous mode, forwards it out vr1,
feeding the loop. To give you an idea of scale, gw2 forwarded 107k
multicast packets out em0 in the space of 15 seconds.
Both machines have net.inet.ip.mforwarding set to 0 and
net.inet.ip.forwarding set to 1. If I set net.inet.ip.forwarding to 0,
the problem disappears. Likewise, if I blackhole all multicast traffic
in question on gw2, things are fine.
Is this expected behavior? Should promiscuous mode affect the
forwarding of multicast packets?
Thanks for the help.
-HKS
gw1 is a Soekris 5501 running 4.3
gw2 is a Dell Poweredge 2850 running 4.4
dmesg for gw2 follows. Let me know if you want dmesg for gw1.
OpenBSD 4.4-stable (GENERIC) #0: Thu Jan 22 08:04:26 EST 2009
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.00GHz ("GenuineIntel" 686-class) 3 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,CNXT-ID,CX16,xTPR
real mem = 2146795520 (2047MB)
avail mem = 2067439616 (1971MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/22/05, BIOS32 rev. 0 @
0xffe90, SMBIOS rev. 2.3 @ 0xf9920 (87 entries)
bios0: vendor Dell Computer Corporation version "A04" date 09/22/2005
bios0: Dell Computer Corporation PowerEdge 2850
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC SPCR HPET MCFG
acpi0: wakeup devices PCI0(S5) PALO(S5) PBLO(S5) VPR0(S5) PBHI(S5)
VPR1(S5) PICH(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PALO)
acpiprt2 at acpi0: bus 2 (DOBA)
acpiprt3 at acpi0: bus 3 (DOBB)
acpiprt4 at acpi0: bus 4 (PBLO)
acpiprt5 at acpi0: bus 5 (PBHI)
acpiprt6 at acpi0: bus 6 (PXB1)
acpiprt7 at acpi0: bus 7 (PXB2)
acpiprt8 at acpi0: bus 8 (VPR1)
acpiprt9 at acpi0: bus 9 (PXC1)
acpiprt10 at acpi0: bus 10 (PXC2)
acpiprt11 at acpi0: bus 11 (PICH)
acpicpu0 at acpi0
bios0: ROM list: 0xc0000/0xb000! 0xcb000/0x1000 0xcc000/0x1000
0xcd000/0x3c00 0xd1000/0x2200 0xd3800/0x600 0xec000/0x4000!
ipmi at mainbus0 not configured
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel E7520 Host" rev 0x09
ppb0 at pci0 dev 2 function 0 "Intel E7520 PCIE" rev 0x09
pci1 at ppb0 bus 1
ppb1 at pci1 dev 0 function 0 "Intel IOP332 PCIE-PCIX" rev 0x06
pci2 at ppb1 bus 2
ami0 at pci2 dev 14 function 0 "Dell PERC 4e/Di" rev 0x06: irq 7
ami0: Dell 16d, 32b, FW 521S, BIOS vH430, 256MB RAM
ami0: 2 channels, 0 FC loops, 1 logical drives
scsibus0 at ami0: 40 targets, initiator 40
sd0 at scsibus0 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct fixed
sd0: 139900MB, 17834 cyl, 255 head, 63 sec, 512 bytes/sec, 286515200 sec total
scsibus1 at ami0: 16 targets, initiator 16
safte0 at scsibus1 targ 6 lun 0: <PE/PV, 1x6 SCSI BP, 1.0> SCSI2
3/processor fixed
scsibus2 at ami0: 16 targets, initiator 16
ppb2 at pci1 dev 0 function 2 "Intel IOP332 PCIE-PCIX" rev 0x06
pci3 at ppb2 bus 3
ppb3 at pci0 dev 4 function 0 "Intel E7520 PCIE" rev 0x09
pci4 at ppb3 bus 4
ppb4 at pci0 dev 5 function 0 "Intel E7520 PCIE" rev 0x09
pci5 at ppb4 bus 5
ppb5 at pci5 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci6 at ppb5 bus 6
em0 at pci6 dev 7 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05:
irq 11, address 00:14:22:17:d9:85
ppb6 at pci5 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci7 at ppb6 bus 7
em1 at pci7 dev 8 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05:
irq 3, address 00:14:22:17:d9:86
ppb7 at pci0 dev 6 function 0 "Intel E7520 PCIE" rev 0x09
pci8 at ppb7 bus 8
ppb8 at pci8 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci9 at ppb8 bus 9
re0 at pci9 dev 4 function 0 "Realtek 8169" rev 0x10: RTL8169S
(0x0400), irq 7, address 00:0f:b5:85:29:cc
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 0
ppb9 at pci8 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci10 at ppb9 bus 10
uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: irq 11
uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: irq 10
uhci2 at pci0 dev 29 function 2 "Intel 82801EB/ER USB" rev 0x02: irq 7
ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: irq 5
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb10 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xc2
pci11 at ppb10 bus 11
"Dell DRAC 4" rev 0x00 at pci11 dev 5 function 0 not configured
puc0 at pci11 dev 5 function 1 "Dell DRAC 4 Virtual UART" rev 0x00: ports: 1 com
com3 at puc0 port 0 irq 10: ns16550a, 16 byte fifo
com3: probed fifo depth: 0 bytes
"Dell DRAC 4 SMIC" rev 0x00 at pci11 dev 5 function 2 not configured
pciide0 at pci11 dev 6 function 0 "CMD Technology PCI0680" rev 0x02
pciide0: bus-master DMA support present
pciide0: channel 0 wired to native-PCI mode
pciide0: using irq 5 for native-PCI interrupt
atapiscsi0 at pciide0 channel 0 drive 0
scsibus3 at atapiscsi0: 2 targets, initiator 7
sd1 at scsibus3 targ 0 lun 0: <DELL, VSF, 0123> ATAPI 0/direct removable
sd1: drive offline
atapiscsi1 at pciide0 channel 0 drive 1
scsibus4 at atapiscsi1: 2 targets, initiator 7
cd0 at scsibus4 targ 0 lun 0: <DELL, VCD, 0133> ATAPI 5/cdrom removable
sd1(pciide0:0:0): using PIO mode 3
cd0(pciide0:0:1): using PIO mode 3
pciide0: channel 1 wired to native-PCI mode
vga1 at pci11 dev 13 function 0 "ATI Radeon VE QY" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
drm at vga1 unsupported
ichpcib0 at pci0 dev 31 function 0 "Intel 82801EB/ER LPC" rev 0x02
pciide1 at pci0 dev 31 function 1 "Intel 82801EB/ER IDE" rev 0x02:
DMA, channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi2 at pciide1 channel 0 drive 0
scsibus5 at atapiscsi2: 2 targets, initiator 7
cd1 at scsibus5 targ 0 lun 0: <TEAC, DVD-ROM DV-28E-C, D.4E> ATAPI
5/cdrom removable
cd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide1: channel 1 disabled (no drives)
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
biomask fde5 netmask fded ttymask ffff
mtrr: Pentium Pro MTRR support
uhub4 at uhub0 port 3 "Dell product 0xa001" rev 2.00/0.00 addr 2
uhidev0 at uhub1 port 1 configuration 1 interface 0 "Dell DRAC4" rev
1.10/0.00 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub1 port 1 configuration 1 interface 1 "Dell DRAC4" rev
1.10/0.00 addr 2
uhidev1: iclass 3/1
ums0 at uhidev1
ums0: X report 0x0002 not supported
softraid0 at root
root on sd0a swap on sd0b dump on sd0b