如何在 Ubuntu/Debian 中创建 20 多个 vxlan 接口?
在 Linux 内核 3.16 中,我发现我可以创建 20 多个 vxlan 接口,但它们无法正常工作,因为发送 arp 消息不起作用。
在 Linux Kernel 4.4 创建第 21 个接口时,我收到此错误消息“ RTNETLINK answers: No buffer space available ”
我已经通过创建一个在新的 ubuntu 14.04 和 16.04 上创建接口的小 shell 脚本对此进行了测试,也在 Debian 8 上进行了测试。
脚本 testvxlan.sh 如下所示:
#!/bin/bash
for i in {1..30}
do
echo "Setting up interface br0.$i"
ip link add br0.$i type vxlan id $i group 239.0.0.$i dev eth0 dstport 4789
ip addr add 192.168.$i.1/24 dev br0.$i
ip link set dev br0.$i up
#ip link delete br0.$i
done
在新的 Ubuntu 16.04 上运行它时,它看起来像这样:
root@ubuntu-xenial:~# ./testvxlan.sh
Setting up interface br0.1
Setting up interface br0.2
Setting up interface br0.3
Setting up interface br0.4
Setting up interface br0.5
Setting up interface br0.6
Setting up interface br0.7
Setting up interface br0.8
Setting up interface br0.9
Setting up interface br0.10
Setting up interface br0.11
Setting up interface br0.12
Setting up interface br0.13
Setting up interface br0.14
Setting up interface br0.15
Setting up interface br0.16
Setting up interface br0.17
Setting up interface br0.18
Setting up interface br0.19
Setting up interface br0.20
Setting up interface br0.21
RTNETLINK answers: No buffer space available
Setting up interface br0.22
RTNETLINK answers: No buffer space available
Setting up interface br0.23
RTNETLINK answers: No buffer space available
Setting up interface br0.24
RTNETLINK answers: No buffer space available
Setting up interface br0.25
RTNETLINK answers: No buffer space available
Setting up interface br0.26
RTNETLINK answers: No buffer space available
Setting up interface br0.27
RTNETLINK answers: No buffer space available
Setting up interface br0.28
RTNETLINK answers: No buffer space available
Setting up interface br0.29
RTNETLINK answers: No buffer space available
Setting up interface br0.30
RTNETLINK answers: No buffer space available
我怎样才能增加这个缓冲空间,甚至有可能吗?