Dear Alexey,
09 Jan 22 09:21, you wrote to me:
TK>>>>> I have a wireguard server running in my VPS (Ubuntu 20.04.3
TK>>>>> LTS). It is using a /112 of /64 for it's clients.
VS>>>> Do you mean to say you can have a /64 network on your VPS' main
VS>>>> interface and at the same time a /112 from the *same* *network*
VS>>>> on a wg0 interface? Is this even permitted by the OS?
AV>>> Yes - at least properly configured Linux allows this.
VS>> What do you mean by "properly configured"? You mean the
VS>> out-of-the-box configuration still does not allow this?
AV> Obviously.
What do you need to configure to enable this behaviour on Linux?
VS>> A Cisco router would not allow the same L2 network on two
VS>> different L3 interfaces IMHO, even if one of the prefixes is more
VS>> specific.
AV> That's a limitation of BSD-style IP stack.
Interestingly enough, FreeBSD 12.3 has just let me do exactly that (sorry, an IPv4 example), without any additional configuration. The world is full of wonders:
root@vas:~ # apply ifconfig lo{2,3}
lo2: flags=8049 metric 0 mtu 16384
options=680003
inet 192.168.13.1/24
groups: lo
nd6 options=29
lo3: flags=8049 metric 0 mtu 16384
options=680003
inet 192.168.13.129/25
groups: lo
nd6 options=29
root@vas:~ #
root@vas:~ # apply 'route get ' 192.168.13.2 192.168.13.200
route to: 192.168.13.2
destination: 192.168.13.0
mask: 255.255.255.0
fib: 0
interface: lo2
flags:
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 16384 1 0
route to: 192.168.13.200
destination: 192.168.13.128
mask: 255.255.255.128
fib: 0
interface: lo3
flags:
recvpipe sendpipe ssthresh rtt,msec mtu weight expire
0 0 0 0 16384 1 0
root@vas:~ #
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
--- GoldED+/BSD 1.1.5-b20170303-b20170303
* Origin: Ulthar (2:5005/49)
|