Why are there 3 kinds of networks in docker swarm and how are they used differently?

In docker swarm, there are three different types of networks

  1. docker_gwbridge network
  2. ingress network
  3. custom network

I find there are very few explanation of these three networks. I understand the usage of custom network, I don’t understand why do we need docker_gwbridge
and ingress network considering custom network is enough for building a virtual private network across different host machines.

Source: StackOverflow