>Synopsis: ripd doesn't play well accross rdomains
>Category: amd64 system
>Environment:
System : OpenBSD 6.0
Details : OpenBSD 6.0-current (GENERIC.MP) #2518: Sun Oct 2
21:41:07 MDT 2016
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
In a test environment I'm building, I use 6 rdomains, with 2-3
interfaces each, and each
their own instance of ripd. If I don't use rdomain 0, no ripd instance
is seeing the others.
If I do use rdomain 0, ripd instances connected to it (mostly using
pair interfaces, but
also tested with vlan interfaces) don't see the correct routes, those
of rdomain 0 are mixed
with their own, with gateway 0.0.0.0
>How-To-Repeat:
# cat /etc/sysctl.conf
net.inet.ip.forwarding=1
# ln -s /etc/rc.d/ripd /etc/rc.d/ripd1
# cat /etc/rc.conf.local
pkg_scripts=ripd1 ripd2 ripd3 ripd4 ripd5 ripd6
ripd1_flags=-s /var/run/ripd.1.sock -f /etc/ripd.1.conf
ripd1_rtable=1
......
# cat /etc/ripd.1.conf
fib-update yes
rdomain 1
redistribute connected
split-horizon poisoned
triggered-updates yes
interface pair101 {
}
interface vlan14 {
}
# cat /etc/hostname.pair101
rdomain 1
inet 10.0.101.2 255.255.255.252
up
# cat /etc/hostname.pair102
rdomain 6
inet 10.0.101.1 255.255.255.252
patch pair101
up
# cat /etc/hostname.vlan14
vlan 14 vlandev em1
rdomain 1
inet 192.168.14.1 255.255.255.0
up
# cat /etc/hostname.lo1
rdomain 1
inet 127.0.0.1
"route -nvT1 show -inet" shows local routes for 127.0.0.1, 192.168.14
and 10.0.101.0 (ok)
"route -nv show -inet" shows only 127.0.0.1 and 224/4 (ok)
"route -T1 exec ripctl -s /var/run/ripd.1.sock show fib" show 127 and
224, probably wrong
"route -T1 exec ripctl -s /var/run/ripd.1.sock show fib int" shows all
interfaces, not
only those attached to rdomain 1 (don't know if it is expected)
"route -T1 exec ripctl -s /var/run/ripd.1.sock show rib" is empty
"route -T1 exec ripctl -s /var/run/ripd.1.sock show nei" is empty
"route -T1 exec ping 10.0.101.1" is ok and expected
equivalent commands for rdomain 6 give the same results
"ps aux -o rtable | grep rip" shows all ripd instances in the good
rdomain
>Fix:
If I configure rdomains 0-5 instead of 1-6, multicast communications
between ripd instances
work correctly, but routing tables are partially those of rdomain 0,
but with the gateway
set to 0.0.0.0. Connected routes are shared between peers correctly.
In my setup,
rdomains 1, 2 and 0 are peers, and 3, 4 and 5 are peers. But routes
10.0.101.0/30 and
10.0.201.0/30 were seen in rdomains 3, 4, and 5 (rdomain 0 was
replacing rdomain 6).
Sidenote : the -s option was recently added to ripd, but the man page
was not updated...
dmesg:
OpenBSD 6.0-current (GENERIC.MP) #2518: Sun Oct 2 21:41:07 MDT 2016
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4168749056 (3975MB)
avail mem = 4037857280 (3850MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe9fb0 (78 entries)
bios0: vendor Hewlett-Packard version "786G2 v01.15" date 06/14/2010
bios0: Hewlett-Packard HP Compaq 6000 Pro SFF PC
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC ASF! MCFG TCPA SLIC HPET
acpi0: wakeup devices COM1(S4) PCI0(S4) PEG1(S4) PEG2(S4) IGBE(S4) PCX1(S4)
PCX2(S4) PCX5(S4) PCX6(S4) HUB_(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3)
USB5(S3) USB6(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz, 3159.14 MHz
cpu0:
FPU,VME,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,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 332MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz, 3158.74 MHz
cpu1:
FPU,VME,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,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 6MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf4000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG1)
acpiprt2 at acpi0: bus -1 (PEG2)
acpiprt3 at acpi0: bus 32 (PCX1)
acpiprt4 at acpi0: bus 48 (PCX2)
acpiprt5 at acpi0: bus -1 (PCX5)
acpiprt6 at acpi0: bus -1 (PCX6)
acpiprt7 at acpi0: bus 16 (HUB_)
acpicpu0 at acpi0: !C3(100@50 mwait.1@0x30), !C2(500@17 mwait.1@0x10),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(100@50 mwait.1@0x30), !C2(500@17 mwait.1@0x10),
C1(1000@1 mwait.1), PSS
"PNP0F13" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0401" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0003" at acpi0 not configured
tpm0 at acpi0: TPM_ addr 0xfed40000/0x5000: Infineon SLB9635 1.2 rev 0x10
acpibtn0 at acpi0: PBTN
"PNP0C14" at acpi0 not configured
cpu0: Enhanced SpeedStep 3159 MHz: speeds: 3166, 1998 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Q45 Host" rev 0x03
inteldrm0 at pci0 dev 2 function 0 "Intel Q45 Video" rev 0x03
drm0 at inteldrm0
inteldrm0: no ifp
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xe0000000, size 0x10000000
inteldrm0: msi
inteldrm0: 1280x1024
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel Q45 Video" rev 0x03 at pci0 dev 2 function 1 not configured
"Intel Q45 HECI" rev 0x03 at pci0 dev 3 function 0 not configured
puc0 at pci0 dev 3 function 3 "Intel Q45 KT" rev 0x03: ports: 1 com
com4 at puc0 port 0 apic 1 int 17: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel ICH10 D BM LM" rev 0x02: msi, address
78:ac:c0:9e:32:1c
uhci0 at pci0 dev 26 function 0 "Intel 82801JD USB" rev 0x02: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801JD USB" rev 0x02: apic 1 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801JD USB" rev 0x02: apic 1 int 22
ehci0 at pci0 dev 26 function 7 "Intel 82801JD USB" rev 0x02: apic 1 int 22
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801JD HD Audio" rev 0x02: msi
azalia0: codecs: Realtek ALC662
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801JD PCIE" rev 0x02: msi
pci1 at ppb0 bus 32
em1 at pci1 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address
00:1b:21:c1:ba:ea
ppb1 at pci0 dev 28 function 1 "Intel 82801JD PCIE" rev 0x02: msi
pci2 at ppb1 bus 48
uhci3 at pci0 dev 29 function 0 "Intel 82801JD USB" rev 0x02: apic 1 int 20
uhci4 at pci0 dev 29 function 1 "Intel 82801JD USB" rev 0x02: apic 1 int 21
uhci5 at pci0 dev 29 function 2 "Intel 82801JD USB" rev 0x02: apic 1 int 22
ehci1 at pci0 dev 29 function 7 "Intel 82801JD USB" rev 0x02: apic 1 int 20
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa2
pci3 at ppb2 bus 16
pcib0 at pci0 dev 31 function 0 "Intel 82801JD LPC" rev 0x02
ahci0 at pci0 dev 31 function 2 "Intel 82801JD AHCI" rev 0x02: msi, AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
ahci0: PHY offline on port 2
ahci0: PHY offline on port 3
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HDS72102, JP1O> SCSI3 0/direct
fixed naa.5000cca370ed8630
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
cd0 at scsibus1 targ 1 lun 0: <hp, DVD RW AD-7251H5, 1H8D> ATAPI 5/cdrom
removable
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
vmm at mainbus0 not configured
uhidev0 at uhub6 port 1 configuration 1 interface 0 "CHICONY HP Basic USB
Keyboard" rev 1.10/3.00 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (344c0b5cb397e9f6.a) swap on sd0b dump on sd0b