Page MenuHomeVyOS Platform

Support separated TCP/IP stack via "ip netns"
Open, Requires assessmentPublicFEATURE REQUEST

Description

Ability to have a separated TCP/IP stack with "ip netns".
It allows using overlapping ip addresses/binding ports for different virtual networks, etc.

https://man7.org/linux/man-pages/man8/ip-netns.8.html
https://iximiuz.com/en/posts/container-networking-is-simple/
https://medium.com/@abhishek.amjeet/container-networking-using-namespaces-part1-859d317ca1b8

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

To start the proposed CLI:
Needs to be discussed.

set netns <name>
set netns <name> protocols static route x.x.x.x/x nexthop x.x.x.x interface <vethX>
set interfaces virtual-ethernet <vethX> netns <name>
set interfaces virtual-ethernet <vethX> peer <vethY>
set interfaces virtual-ethernet <vethX> peer <vethY> address
set interfaces virtual-ethernet <vethX> address

set interfaces bridge <brX> member interface <vethX>

ip:

sudo ip netns add nsvyos
sudo ip link add veth-foo type veth peer name veth-bar
sudo ip link set veth-foo netns nsvyos
sudo ip -n nsvyos addr add 192.0.2.2 dev veth-foo
sudo ip -n nsvyos link set veth-foo up
sudo ip netns exec nsvyos ip route add default via 192.0.2.1 dev veth-foo