ocochard / BSDRP

BSD Router Project
https://bsdrp.net
Other
175 stars 38 forks source link

add support for vxlan #22

Closed bodems closed 6 years ago

bodems commented 6 years ago

When I try to create a vxlan interface with: ifconfig vxlan create vxlanid 42 vxlanlocal 5.9.226.90 vxlanremote 185.243.23.253 inet 185.243.20.193/31 I get ifconfig: SIOCIFCREATE2: Invalid argument Also a kldload vxlan results in kldload: can't load vxlan: No such file or directory, so I added the vxlan device in the kernel configs

ocochard commented 6 years ago

Thanks! In place of adding this option into the kernel, I've added the if_vxlan.ko module in the build list.

[root@router]~# ifconfig vxlan create vxlanid 42 vxlanlocal 5.9.226.90 vxlanremote 185.243.23.253 inet 185.243.20.193/31
vxlan0: Ethernet address: 1a:5a:fe:97:0c:03
vxlan0
[root@router]~# ifconfig -l
vtnet0 enc0 lo0 vxlan0
[root@router]~# kldstat
Id Refs Address            Size     Name
 1    7 0xffffffff80200000 2064418  kernel
 2    1 0xffffffff82411000 7014     tmpfs.ko
 3    1 0xffffffff82419000 1080     cpuctl.ko
 4    1 0xffffffff8241b000 4f70     if_vxlan.ko
ocochard commented 6 years ago

Commited using module