I'm in a major confusion here, regarding bridges. I thought that they were devices that allowed going from one network to a different one without routing (doing the work at layer 2 instead), but if that's so then I don't understand 2 things:
1) how VirtualBox uses a bridge to give a VM an IP from the same LAN as the host - where are the 2 networks (origin and destination)? We were only setting an IP...
2) how a NIC can act as a bridge to give a machine more than one IP. The sysadmin at work and I were working on connecting a vm and a host on a separate, isolated network (not on the common LAN), and when I asked how the host could have more than 1 IP if it only had 1 NIC he told me that he could think of 3 ways to do so: set the NIC in promiscuous mode (so the kernel does all the job), use sub-interfaces (so you end up with eth0:0, eth0:1 and beyond), and have the NIC act as a bridge. Same problem here, what we want is to set an IP on a machine, not link two networks together.
What's the deal here? What's the function of bridges?
P.S I think I'm a little confused about interfaces too. Are they a software representation of NICs? As in, they abstract NICs from the kernel so it thinks of them as a network card?