add support to multi-gateway switches.