<p>As host-gw use IP routes to subnets via remote machine IPs, it looks like pure L3 network solution.</p>

<p>Therefore, why need direct L2 connectivity between hosts?</p>

<p><code>host-gw</code> adds route table entries on hosts, so that host know how to traffic container network packets.</p>

<p>This works on L2, because it only concerns <code>hosts</code>, <code>switches</code> and <code>containers</code>. <code>switches</code> does not care IP and route, <code>hosts</code> know <code>containers</code> exists, and how to route to them, <code>containers</code> just send and receive data.</p>

<p>If <code>hosts</code> are at different networks, L3 is introduced, and <code>routers</code> are involved. <code>routers</code> have no idea that <code>containers</code> exists, and any containers packet will be dropped, making communication impossible.</p>

<p>Of course, you can add route table entries on <code>routers</code>, but that is out of control <code>flannel</code>.</p>
