On 4/9/22 2:39 pm, Rand Pritelrohm wrote:
1. Bridge using routed subnet:

     ip link add dev br0 type bridge
     ip addr add 192.168.222.1/24 dev br0
     ip link set dev br0 up

     ip tuntap add tap0 mode tap
     ip link set dev tap0 up
     ip link set dev tap0 master br0

     #Then I have to enable routing
     echo '1' > /proc/sys/net/ipv4/ip_forward
     iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


2. Bridge on the same subnet as the LAN:

     ip link add dev br0 type bridge
     ip link set dev br0 up

     ip link set dev eth0 master br0
     ip link set dev eth0 up
     ip addr add 192.168.0.200/24 dev br0
     ip route add default via 192.168.0.1

     ip tuntap add tap0 mode tap
     ip link set dev tap0 up
     ip link set dev tap0 master br0


Here is my question:
     For both scenarios, what is the effectively seen MAC address by the
     GW when the VM access the Internet (host or VM MAC address)?

Intuitively (to me at least) NAT/routing (layer 3) replaces the client MAC 
address with the host MAC, while bridging (layer 2) passes the client MAC 
address.

However to be certain, put wireshark on and look at the packet contents in both 
scenarios.


--
Jeremy

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to