Hi,
I created a bridge (bridge0) on my host, to which I have added the physical interface of the host. The documentation states: "If the bridge host needs an IP address, set it on the bridge interface, not on the member interfaces". I understand why setting an IP address on a member interface is nonsense: It would be like setting an IP address on a port of a network switch.
What I don't like about assigning the host IP address to the bridge, is that it makes my host sort of merge with the bridge. I see the host as just another machine (with its own IP address) connected to a (dumb) network switch (which does not have any IP address) by a cable.
What I want to know is whether using an epair interface for the host would work as well, and if so, what the trade-offs in security and performance (in that order) are?
Here are the two configurations that I tested:
In both situations DNS look-up for and pinging of Internet hosts worked fine.
Also, I tried to find a book about FreeBSD (networking), but unfortunately most books are dated. Any book tips are welcome.
Thanks in advance for your help.
I created a bridge (bridge0) on my host, to which I have added the physical interface of the host. The documentation states: "If the bridge host needs an IP address, set it on the bridge interface, not on the member interfaces". I understand why setting an IP address on a member interface is nonsense: It would be like setting an IP address on a port of a network switch.
What I don't like about assigning the host IP address to the bridge, is that it makes my host sort of merge with the bridge. I see the host as just another machine (with its own IP address) connected to a (dumb) network switch (which does not have any IP address) by a cable.
What I want to know is whether using an epair interface for the host would work as well, and if so, what the trade-offs in security and performance (in that order) are?
Here are the two configurations that I tested:
- Assign the IP address of the host to bridge0:
Code:
...
cloned_interfaces="bridge0"
ifconfig_bridge0="addm em0 SYNCDHCP"
ifconfig_em0="up"
...
- Create an epair interface, add one end to bridge0, and assign the IP address of the host to the other end. Do not assign any IP address to the bridge:
Code:
...
cloned_interfaces="epair0 bridge0"
ifconfig_bridge0="addm em0 addm epair0a up"
ifconfig_em0="up"
ifconfig_epair0a="up"
ifconfig_epair0b="DHCP"
...
In both situations DNS look-up for and pinging of Internet hosts worked fine.
Also, I tried to find a book about FreeBSD (networking), but unfortunately most books are dated. Any book tips are welcome.
Thanks in advance for your help.