<html><body>
<p><tt>Stefan Berger/Watson/IBM wrote on 05/11/2011 12:20:49 PM:</tt><br>
<tt>> <br>
> The mac chain is there for supporting multiple MAC addresses per <br>
> interface. What is the use case for having</tt><br>
<tt>> multiple MAC address on an interface and how do I set this up in a <br>
> Linux guest for example?</tt><br>
<br>
<tt>      I don't know if Linux guests support it now, but I wanted to</tt><br>
<tt>eliminate the unnecessary requirement from nwfilter. Most real NICs</tt><br>
<tt>support multiple MAC addresses; failover mechanisms can make use of</tt><br>
<tt>it (e.g., by moving a MAC address from one device to another one that</tt><br>
<tt>already has one).</tt><br>
<tt>      But the feature in nwfilter is more generally useful since it</tt><br>
<tt>allows a host administrator to assign a set of legal MAC addresses</tt><br>
<tt>to a VM and the VM user can choose/use any one of them at run time.</tt><br>
<tt>      Of course, VM users may have other reasons for wanting multiple</tt><br>
<tt>MAC addresses on the same interface; the real point is that there's</tt><br>
<tt>no technical reason to restrict it within nwfilter.</tt><br>
<tt><br>
> I am not sure whether we should remove a chain, i.e., the 'arp' <br>
> chain here. Adding is ok. Maybe the existing chain 'arp' could be <br>
> doing one part and 'arpmac' the other ?</tt><br>
<br>
<tt>      I renamed it to make it clearer what fields specifically each is</tt><br>
<tt>checking for ARP. If you're concerned about compatibility with existing</tt><br>
<tt>filters, we could either leave "arp" as an empty stub, or put one or the</tt><br>
<tt>other of arpip or arpmac under that name. But this, as with the "drop"</tt><br>
<tt>policy change, I think comes down to my belief that administrators have</tt><br>
<tt>to revisit existing custom filters if we make any change whatsoever to</tt><br>
<tt>the set in examples. So, I made that set self-consistent, but any filters</tt><br>
<tt>that rely on changing any of them need to be reworked for any change.</tt><br>
<tt>Independent custom filters aren't affected, of course.</tt><br>
<br>
<tt>> <br>
> Can you run a VM and do a 'ebtables -t nat -L' and post the output. <br>
> I'd be curious how</tt><br>
<tt>> the chains look like now with the 'clean-traffic' filter without <br>
> having to apply the</tt><br>
<tt>> patches and test them.</tt><br>
<br>
<tt><two stages -- before DHCP ACK and after below></tt><br>
<tt>      </tt><br>
<tt>Bridge table: nat</tt><br>
<br>
<tt>Bridge chain: PREROUTING, entries: 1, policy: ACCEPT<br>
-i vnet0 -j libvirt-I-vnet0</tt><br>
<br>
<tt>Bridge chain: OUTPUT, entries: 0, policy: ACCEPT</tt><br>
<br>
<tt>Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT<br>
-o vnet0 -j libvirt-O-vnet0</tt><br>
<br>
<tt>Bridge chain: libvirt-I-vnet0, entries: 9, policy: ACCEPT<br>
-j I-vnet0-mac<br>
-p IPv4 -j I-vnet0-ipv4<br>
-p ARP -j I-vnet0-arpmac<br>
-p ARP -j I-vnet0-arpip<br>
-p 0x8035 -j I-vnet0-rarp<br>
-p 0x835 -j ACCEPT <br>
-p IPv4 -j ACCEPT <br>
-p ARP -j ACCEPT <br>
-j DROP </tt><br>
<br>
<tt>Bridge chain: libvirt-O-vnet0, entries: 5, policy: ACCEPT<br>
-p IPv4 -j O-vnet0-ipv4<br>
-p 0x8035 -j O-vnet0-rarp<br>
-p IPv4 -j ACCEPT <br>
-p ARP -j ACCEPT <br>
-j DROP </tt><br>
<br>
<tt>Bridge chain: I-vnet0-mac, entries: 1, policy: DROP<br>
-s 54:0:0:0:0:1 -j RETURN </tt><br>
<br>
<tt>Bridge chain: I-vnet0-ipv4, entries: 1, policy: DROP<br>
-p IPv4 --ip-src 0.0.0.0 --ip-proto udp --ip-sport 68 -j RETURN </tt><br>
<br>
<tt>Bridge chain: O-vnet0-ipv4, entries: 1, policy: DROP<br>
-j ACCEPT </tt><br>
<br>
<tt>Bridge chain: I-vnet0-arpmac, entries: 1, policy: DROP<br>
-p ARP --arp-mac-src 54:0:0:0:0:1 -j RETURN </tt><br>
<br>
<tt>Bridge chain: I-vnet0-arpip, entries: 1, policy: DROP<br>
-p ARP --arp-ip-src 0.0.0.0 -j RETURN </tt><br>
<br>
<tt>Bridge chain: I-vnet0-rarp, entries: 1, policy: DROP<br>
-p 0x8035 -s 54:0:0:0:0:1 -d Broadcast --arp-op Request_Reverse </tt><br>
<tt>    --arp-ip-src 0.0.0.0 --arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1</tt><br>
<tt>    --arp-mac-dst 54:0:0:0:0:1 -j ACCEPT </tt><br>
<br>
<tt>Bridge chain: O-vnet0-rarp, entries: 1, policy: DROP<br>
-p 0x8035 -d Broadcast --arp-op Request_Reverse --arp-ip-src 0.0.0.0 </tt><br>
<tt>   --arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1 </tt><br>
<tt>   --arp-mac-dst 54:0:0:0:0:1 -j ACCEPT </tt><br>
<br>
<tt>[after DHCP ACK]</tt><br>
<tt>Bridge table: nat</tt><br>
<br>
<tt>Bridge chain: PREROUTING, entries: 1, policy: ACCEPT<br>
-i vnet0 -j libvirt-I-vnet0</tt><br>
<br>
<tt>Bridge chain: OUTPUT, entries: 0, policy: ACCEPT</tt><br>
<br>
<tt>Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT<br>
-o vnet0 -j libvirt-O-vnet0</tt><br>
<br>
<tt>Bridge chain: libvirt-I-vnet0, entries: 9, policy: ACCEPT<br>
-j I-vnet0-mac<br>
-p IPv4 -j I-vnet0-ipv4<br>
-p ARP -j I-vnet0-arpmac<br>
-p ARP -j I-vnet0-arpip<br>
-p 0x8035 -j I-vnet0-rarp<br>
-p 0x835 -j ACCEPT <br>
-p IPv4 -j ACCEPT <br>
-p ARP -j ACCEPT <br>
-j DROP </tt><br>
<br>
<tt>Bridge chain: libvirt-O-vnet0, entries: 5, policy: ACCEPT<br>
-p IPv4 -j O-vnet0-ipv4<br>
-p 0x8035 -j O-vnet0-rarp<br>
-p IPv4 -j ACCEPT <br>
-p ARP -j ACCEPT <br>
-j DROP </tt><br>
<br>
<tt>Bridge chain: I-vnet0-mac, entries: 1, policy: DROP<br>
-s 54:0:0:0:0:1 -j RETURN </tt><br>
<br>
<tt>Bridge chain: I-vnet0-ipv4, entries: 2, policy: DROP<br>
-p IPv4 --ip-src 0.0.0.0 --ip-proto udp --ip-sport 68 -j RETURN <br>
-p IPv4 --ip-src 10.0.0.1 -j RETURN </tt><br>
<br>
<tt>Bridge chain: O-vnet0-ipv4, entries: 1, policy: DROP<br>
-j ACCEPT </tt><br>
<br>
<tt>Bridge chain: I-vnet0-arpmac, entries: 1, policy: DROP<br>
-p ARP --arp-mac-src 54:0:0:0:0:1 -j RETURN </tt><br>
<br>
<tt>Bridge chain: I-vnet0-arpip, entries: 2, policy: DROP<br>
-p ARP --arp-ip-src 0.0.0.0 -j RETURN <br>
-p ARP --arp-ip-src 10.0.0.1 -j RETURN </tt><br>
<br>
<tt>Bridge chain: I-vnet0-rarp, entries: 1, policy: DROP<br>
-p 0x8035 -s 54:0:0:0:0:1 -d Broadcast --arp-op Request_Reverse</tt><br>
<tt>   --arp-ip-src 0.0.0.0 --arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1</tt><br>
<tt>   --arp-mac-dst 54:0:0:0:0:1 -j ACCEPT </tt><br>
<br>
<tt>Bridge chain: O-vnet0-rarp, entries: 1, policy: DROP<br>
-p 0x8035 -d Broadcast --arp-op Request_Reverse --arp-ip-src 0.0.0.0</tt><br>
<tt>    --arp-ip-dst 0.0.0.0 --arp-mac-src 54:0:0:0:0:1</tt><br>
<tt>    --arp-mac-dst 54:0:0:0:0:1 -j ACCEPT </tt><br>
<br>
<tt>thanks,</tt><br>
<tt>      +-DLS</tt><br>
</body></html>