Hi,
Does any one use switch(4) to merge two or more Ethernet ports?
Can you share a working example?

I have the following config:

em0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:15:17:bc:a9:65
        index 1 priority 0 llprio 3
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
em1: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:15:17:bc:a9:64
        index 2 priority 0 llprio 3
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
vether0: flags=141<UP,RUNNING,PROMISC> mtu 1500
        lladdr fe:e1:ba:d6:0d:cc
        index 27 priority 0 llprio 3
        groups: vether
        media: Ethernet autoselect
        status: active
        inet 172.16.2.1 netmask 0xffffff00
switch0: flags=41<UP,RUNNING>
        index 28 llprio 3
        groups: switch
        datapath 0x60d948957e032d5f maxflow 10000 maxgroup 1000
        em0 flags=0<>
                port 1 ifpriority 0 ifcost 0
        em1 flags=0<>
                port 2 ifpriority 0 ifcost 0
        vether0 flags=0<>
                port 27 ifpriority 0 ifcost 0

There are two directly attached devices to em0 and em1 with IP 172.16.2.31 and 172.16.2.32 In pf.conf I have skip on {em0, em1, vether, switch}. But when I try to ping:

[hodor]~$ ping 172.16.2.32
PING 172.16.2.32 (172.16.2.32): 56 data bytes
ping: sendmsg: No route to host
ping: wrote 172.16.2.32 64 chars, ret=-1
ping: sendmsg: No route to host
ping: wrote 172.16.2.32 64 chars, ret=-1
^C
--- 172.16.2.32 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
[hodor]~$ ping 172.16.2.31
PING 172.16.2.31 (172.16.2.31): 56 data bytes
ping: sendmsg: No route to host
ping: wrote 172.16.2.31 64 chars, ret=-1
ping: sendmsg: No route to host
ping: wrote 172.16.2.31 64 chars, ret=-1
^C
--- 172.16.2.31 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss

[hodor]~$ arp -an
Host Ethernet Address Netif Expire Flags 172.16.2.1 fe:e1:ba:d6:0d:cc vether0 permanent l
172.16.2.31                          (incomplete)      vether0 expired
172.16.2.32                          (incomplete)      vether0 expired

Thanks for your time,
Atanas

OpenBSD 6.1-beta (GENERIC.MP) #20: Wed Mar 15 01:49:05 MDT 2017
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34313936896 (32724MB)
avail mem = 33269313536 (31728MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb5a0 (56 entries)
bios0: vendor American Megatrends Inc. version "2.2" date 02/20/2015
bios0: Supermicro X9SCL/X9SCM
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SPMI SSDT SSDT DMAR EINJ ERST HEST BERT acpi0: wakeup devices UAR1(S4) UAR2(S4) P0P1(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4) USB6(S4) USB7(S4) PXSX(S4) RP01
(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) [...]
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) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.50 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 3300502120 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.02 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.02 MHz
cpu2: 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.02 MHz
cpu3: 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 8 (P0P1)
acpiprt2 at acpi0: bus 6 (RP01)
acpiprt3 at acpi0: bus -1 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus 7 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus 1 (PEG0)
acpiprt11 at acpi0: bus 2 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C3(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 106 degC
acpitz1 at acpi0: critical temperature is 106 degC
"INT3F0D" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0501" at acpi0 not configured
"PNP0501" at acpi0 not configured
"IPI0001" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD01
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 3300 MHz: speeds: 3301, 3300, 3200, 3100, 2900, 2800, 2700, 2600, 2400, 2300, 2200, 2100, 2000, 1800
, 1700, 1600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Xeon E3-1200 v2 Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 3G PCIE" rev 0x09: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 1 function 1 "Intel Core 3G PCIE" rev 0x09: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 "IDT 89HPES12N3A" rev 0x0e
pci3 at ppb2 bus 3
ppb3 at pci3 dev 2 function 0 "IDT 89HPES12N3A" rev 0x0e
pci4 at ppb3 bus 4
em0 at pci4 dev 0 function 0 "Intel 82571EB" rev 0x06: apic 2 int 16, address 00:15:17:bc:a9:65 em1 at pci4 dev 0 function 1 "Intel 82571EB" rev 0x06: apic 2 int 19, address 00:15:17:bc:a9:64
ppb4 at pci3 dev 4 function 0 "IDT 89HPES12N3A" rev 0x0e
pci5 at ppb4 bus 5
em2 at pci5 dev 0 function 0 "Intel 82571EB" rev 0x06: apic 2 int 18, address 00:15:17:bc:a9:67 em3 at pci5 dev 0 function 1 "Intel 82571EB" rev 0x06: apic 2 int 17, address 00:15:17:bc:a9:66 em4 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x05: msi, address 00:25:90:ac:97:cf ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x05: apic 2 int 16
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
ppb5 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb5: msi
pci6 at ppb5 bus 6
ppb6 at pci0 dev 28 function 4 "Intel 6 Series PCIE" rev 0xb5: msi
pci7 at ppb6 bus 7
em5 at pci7 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address 00:25:90:ac:97:ce ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x05: apic 2 int 23
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
ppb7 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa5
pci8 at ppb7 bus 8
vga1 at pci8 dev 3 function 0 "Matrox MGA G200eW" rev 0x0a
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 31 function 0 "Intel C204 LPC" rev 0x05
ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x05: msi, AHCI 1.3
ahci0: port 0: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD6401AALS-0, 05.0> SCSI3 0/direct fixed naa.50014ee002288208
sd0: 610480MB, 512 bytes/sector, 1250263728 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x05: apic 2 int 18
iic0 at ichiic0
sdtemp0 at iic0 addr 0x18: mcp98243
sdtemp1 at iic0 addr 0x19: cat34ts02c
sdtemp2 at iic0 addr 0x1a: mcp98243
sdtemp3 at iic0 addr 0x1b: stts2002
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM ECC PC3-12800 with thermal sensor spdmem1 at iic0 addr 0x51: 8GB DDR3 SDRAM ECC PC3-10600 with thermal sensor spdmem2 at iic0 addr 0x52: 8GB DDR3 SDRAM ECC PC3-12800 with thermal sensor spdmem3 at iic0 addr 0x53: 8GB DDR3 SDRAM ECC PC3-10600 with thermal sensor
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com2 at isa0 port 0x3e8/8 irq 5: 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
wbsio0 at isa0 port 0x2e/2: NCT6776F rev 0x33
lm1 at wbsio0 port 0xa30/8: NCT6776F
vmm0 at mainbus0: VMX/EPT
uhub2 at uhub0 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uhidev0 at uhub2 port 2 configuration 1 interface 0 "Winbond Electronics Corp Hermon USB hidmouse Device" rev 1.10/0.01 addr
3
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev1 at uhub2 port 2 configuration 1 interface 1 "Winbond Electronics Corp Hermon USB hidmouse Device" rev 1.10/0.01 addr
3
uhidev1: iclass 3/1
ukbd0 at uhidev1: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhub3 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uhidev2 at uhub3 port 2 configuration 1 interface 0 "Dell Dell USB Keyboard" rev 1.10/3.01 addr 3
uhidev2: iclass 3/1
ukbd1 at uhidev2: 8 variable keys, 6 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (27ad2cd818600342.a) swap on sd0b dump on sd0b

Reply via email to