[Solved] More than one private ip subnet on LAN interface?
-
@JKnott said in More than one private ip subnet on LAN interface?:
There's nothing to stop someone from having both a pubic and RFC 1918 address on an interface, for example.
Other than just plain common sense... There would be ZERO freaking reason to do such thing... Its not actually isolating anything and no point to it..
You can put as many IPs you want on the same L2 - doesn't mean it makes any sense, or you should do it, etc.
The reason for the link-local on IPv6 is to get information on its neighbors, its sends the RS from its link-local address, etc. etc.. There is all kinds of things that happen with the link-local in IPv6 that don't really need to get into here, and you if anyone should know anyway.
This is in no way the same as putting a public IPv4 and a rfc1918 IPv4 address on an interface - what does that accomplish other than complications and nonsense? If a device needs to have a rfc1918 and a public IPv4 then they should be on different L2s
Lets not mix in how things are done with IPv6 with the IPv4 talking about here.. Derelict has given the correct solution to the OP question, which is vlans!
-
The use of VLAN's is the better way to achieve this (as answered by @Derelict), but I wanted to add this to my own question as far as it pertains to creating virtual bridges:
It seems that one cannot add a virtual device to a NIC that is already part of a bridge.
:~# ip link add link ens7f0 virt1 address 00:11:22:33:44:55 type macvlan
RTNETLINK answers: Device or resource busyHowever, if I create the Virtual NIC and then add it to a bridge, it works.
:~# ip link add link ens7f1 virt1 address 00:11:22:33:44:55 type macvlan :~# brctl addbr virtb1 :~# brctl addif virtb1 virt1 :~# brctl show bridge name bridge id STP enabled interfaces virtb1 8000.001122334455 no virt1 vmbr0 8000.ac1f6bcae3e2 no ens7f0 tap101i0 vmbr1 8000.ac1f6bc59544 no ens6f0 tap101i1
Although Proxmox's GUI doesn't "see" the new bridge, if I edit the qemu conf file for the VM, the port is added and the VM starts.
-
Sounds like you should probably move to a proxmox forum.