Santiago Garcia Mantinan schreef op 04-09-2016 1:15:
If you only have one network card I don't see why you should use a
bridge at
all, having two addresses on a network card either using card aliases
(eth0:X) or several IPs on the same card using ip commands on a up
statement
is ok, but that doesn't have to do anything with bridges.
I realize that that is probably completely true, my mistake.
Without sufficient "schooling" I have to go by what the tutorials say.
A bridge seems to be a kind of ready-to-go thing a kind of easy-to-use
thing, an easy way to create a virtual named interface to which you can
ascribe some other interface's address or port.
After all, whether a bridge only has one interface or none at all (one
port bound to it, or none at all) doesn't really make a rat's ass
difference ;-).
You can even create a bridge with no ports and assign it an IP.
In the latter case, is there another way to create a virtual interface?
I assume there is; the tutorials just only talk about bridges.
So my mistake has been to use a port whose real interface already had an
IP (not the alias) and I assumed the alias cq. virtual interface would
act as a separate thing, when it didn't.
The issue I had with the alias was that I cannot rename them, but I can
give the bridge any name I want. Also, it already worked save for the
rp_filter thing ;-). So my alternative would be to use eth0:0 and
eth0:1.
Everything I can find about general "virtual interfaces" base them on
actual existing non-virtual interfaces. So, for example, how do I create
an interface with no attached device that merely acts as a connection
point for an internal network? I used a bridge for that. The only
purpose this bridge had was to hold an IP address.
It appears I cannot just create a random interface, but doing brctl
addbr <name> works without flaw.
And if I add that to /etc/network/interfaces, I have a random interface
without ports or devices and it works to attach an IP to it. So for me
the bridge means "create a virtual interfaces without attached devices,
and do with it what you want". Please elucidate if that is not so.
Regards.