1. A network system comprising: a first set of host machines for hosting end machines of a logical network that comprises at least two subnets, wherein managed forwarding elements for forwarding data messages between the first set of host machines execute on the first set of host machines; and a second set of host machines for hosting gateways for forwarding data messages between (i) the end machines of the at least two subnets of the logical network and (ii) a set of networks external to the logical network, wherein the gateways include: a first gateway to peer with a physical router in a first external network to advertise a first subnet of the logical network, and a second gateway to peer with the physical router in the first external network to advertise a second subnet of the logical network.