Service discovery using docker, consul and traefik

I am very new to Consul and trying to implement Docker + Consul + Traefik solution together. I have started with just one Consul server and will expand upon it once it works as expected. It seems I am almost there but I am not able to call my service with Traefik. There seems to be either a problem with my service discovery OR problem with Treafik OR something in a way I am running my docker container. Here is my setup:

My docker host IP address is:

I created a bridge network called consulwhich has a subnet of

Here is my docker compose for consul (for simplicity, I am running just one consul server so that I can debug an issue)

    container_name: consul-server-bootstrap
    image: consul:latest    
      - consul    
      - 8400:8400
      - 8500:8500
      - 53:8600
      - 53:8600/udp    
    command: agent -server -bootstrap -ui -node=consul-server -client= -advertise= -recursor=
    restart: unless-stopped  

I am using registrator to register service to the consul. Here is docker compose for that service:

    image: gliderlabs/registrator:latest
      - /var/run/docker.sock:/tmp/docker.sock
    container_name: consul-registrator
    restart: unless-stopped
    command: consul://consul-server-bootstrap:8500
      - consul

Here is my traefik docker compose section

    container_name: traefik    
    image: traefik:v2.9
      - consul    
    command: --api.insecure=true --providers.consulcatalog=true --providers.consulcatalog.prefix=traefik --providers.consulcatalog.endpoint.address=
      - "80:80"      
      - "8080:8080"    

Here is whoami container that I am registering with consul

    # A container that exposes an API to show its IP address
    image: traefik/whoami
      - consul
    restart: unless-stopped
      - SERVICE_TAGS=whoami
      - SERVICE_NAME=whoami
      - SERVICE_80_ID=whoami
     - "80"
      - traefik.enable=true
      - traefik.backend=whoami      
      - traefik.port=80
      - traefik.default.protocol=http
      - traefik.http.routers.whoami.rule=Host(`whoami`)

When I visit, I see that whoami is registered with consul as seen below:

I see whoami on traefik dashboard as well when I visit

I also run dig command dig @ whoami.service.consul on my docker host and that also can discover the service just fine as seen below:

I made a host entry on my other computer as seen below whoami

When I try to visit http://whoami in browser, I get “Bad Gateway” error.

I want to register new containers to consul using registrator and than add it to the traefik load balancer using service tags and then consume those service from outside of my docker host.
Can someone please point me where I am making mistake. I have spent several days on it to make it work.