Original issue https://forum.vyos.io/t/vxlan-doesnt-allow-for-setting-source-interface-on-unicast-configurations
##### Bug1
For VXLAN over ipv6 wee needs to add **source-interface** without declaring a multicast group
For example
```
[email protected]# sudo ip link add vxlan11 type vxlan id 11 dstport 8472 ttl 16 local fe80::3 remote fe80::2
Error: Local interface required for link-local local/remote addresses.
[email protected]# sudo ip link add vxlan22 type vxlan id 22 dstport 8472 ttl 16 local fe80::3 remote fe80::2 dev eth0
[edit]
[email protected]#
```
VyOS config:
```
set interface vxlan vxlan0 vni 0
set interface vxlan vxlan0 source-address fe80::3
set interface vxlan vxlan0 remote fe80::2
set interface vxlan vxlan0 source-interface eth0
[email protected]# commit
WARNING: RFC7348 recommends VXLAN tunnels preserve a 1500 byte MTU
VXLAN "vxlan0" is missing mandatory underlay multicastgroup or source interface for a multicast network.
[[interfaces vxlan vxlan0]] failed
```
But source-interface not added in options separately without multicast group (in the checks)
https://github.com/vyos/vyos-1x/blob/d108943a8e165cbb5d233f2e1edf14383a453aa8/python/vyos/ifconfig/vxlan.py#L81-L89
In the test, I change these checks to
```
if self.config['group'] or self.config['source_interface']:
if self.config['group']:
cmdline.append('group')
# my
if self.config['source_interface']:
print('Source Interface detected')
cmdline.append('source_interface')
else:
ifname = self.config['ifname']
raise ConfigError(
f'VXLAN "{ifname}" is missing mandatory underlay multicast'
'group or source interface for a multicast network.')
```
###### Bug2 Mtu
Interface created fine, but for ipv6 it is trying to set incorrect mtu parameter
```
[email protected]# commit
[ interfaces vxlan vxlan0 ]
WARNING: RFC7348 recommends VXLAN tunnels preserve a 1500 byte MTU
{'ifname': 'vxlan0',
'ip': {'arp_cache_timeout': '30'},
'mtu': '1450',
'port': '8472',
'remote': 'fe80::2',
'source_address': 'fe80::3',
'source_interface': 'eth0',
'vni': '0'}
DEBUG: Source detected
DEBUG: Remote detected
DEBUG: Source Interface detected
DEBUG: ip link add vxlan0 type vxlan id 0 dstport 8472 ttl 16 local fe80::3 remote fe80::2 dev eth0
VyOS had an issue completing a command.
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-vxlan.py", line 118, in <module>
apply(c)
File "/usr/libexec/vyos/conf_mode/interfaces-vxlan.py", line 108, in apply
v.update(vxlan)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1199, in update
self.set_mtu(config.get('mtu'))
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 359, in set_mtu
return self.set_interface('mtu', mtu)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 184, in set_interface
return self._set_command(self.config, name, value)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 109, in _set_command
return self._command_set[name].get('format', lambda _: _)(self._cmd(cmd))
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 51, in _cmd
return cmd(command, self.debug)
File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip link set dev vxlan0 mtu 1450
returned:
exit code: 2
noteworthy:
cmd 'ip link set dev vxlan0 mtu 1450'
returned (out):
returned (err):
RTNETLINK answers: Invalid argument
[[interfaces vxlan vxlan0]] failed
```
Manual addition:
```
[email protected]# sudo ip link add vxlan44 type vxlan id 44 dstport 8472 ttl 16 local fe80::3 remote fe80::2 dev eth0
[edit]
[email protected]# sudo ip link set dev vxlan0 mtu 1450
RTNETLINK answers: Invalid argument
[edit]
[email protected]#
[email protected]# sudo ip link set dev vxlan0 mtu 1430
[edit]
[email protected]#
```