I created a vxlan tunnel using the iprouter2 tool. The command was:
ip link add vxlan2 type vxlan id 2 group 233.1.1.1 dev bond0 dstport 4789
But when I restart network or "ifdown bond0", vxlan2 disappears. It's why? There will be no such problems on CentOS.
I checked the system log and found this information:
Jul 18 11:38:04 ubuntu-22 named[2184]: configuring command channel from '/etc/bind/rndc.key'
Jul 18 11:38:04 ubuntu-22 named[2184]: configuring command channel from '/etc/bind/rndc.key'
Jul 18 11:38:04 ubuntu-22 named[2184]: reloading configuration succeeded
Jul 18 11:38:04 ubuntu-22 kernel: [ 6361.308330] bonding: bond0 is being deleted...
Jul 18 11:38:04 ubuntu-22 kernel: [ 6361.308609] device vxlan2 left promiscuous mode
Jul 18 11:38:04 ubuntu-22 kernel: [ 6361.308733] bond0 (unregistering): Released all slaves
Jul 18 11:38:04 ubuntu-22 named[2184]: any newly configured zones are now loaded
It seems like it was deleted by kernel. I don't want my vxlan tunnel to disappear because of "ifdown bond0". What should I do?
My Ubuntu server information is as follows:
root@ubuntu-22:~# cat /etc/issue
Ubuntu 16.04.2 LTS \n \l
root@ubuntu-22:~# uname -a
Linux ubuntu-22 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
"bond0" information is as fallows:
root@ubuntu-22:~# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eno1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: ac:1f:6b:12:57:b4
Slave queue ID: 0
Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: ac:1f:6b:12:57:b5
Slave queue ID: 0