# Route magic with consul catalog services

**URL:** <https://community.traefik.io/t/route-magic-with-consul-catalog-services/4138>\
**Category:** Traefik v2\
**Tags:** consul-catalog\
**Created:** [January 28, 2020, 2:00pm UTC](https://community.traefik.io/t/route-magic-with-consul-catalog-services/4138 "2020-01-28T14:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingtarius](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@ingtarius](https://community.traefik.io/u/ingtarius)\
**Post date:** [January 28, 2020, 2:00pm UTC](https://community.traefik.io/t/route-magic-with-consul-catalog-services/4138/1 "2020-01-28T14:00:01Z")

</div>

We have consul-catalog with auto-registration services like {BRANCH}-{SERVICE}-{PORT}  
For example, if service have 2 ports (http and special port for api) in consul it will be like:  
my-awesome-feature-project-80  
my-awesome-feature-project-8080

I can manage traffic for single port via Service-Tag and catch Host parameter. For example  
traefik.http.routers.service-name.rule=Host( `my-awesome-dev.t.example.com` )

But how to manage two ports? I add two EntryPoints - 80 and 8080, how to route traffic

from: [my-awesome-dev.t.example.com:8080](http://my-awesome-dev.t.example.com:8080) to: my-awesome-feature-project-8080  
from: [my-awesome-dev.t.example.com](http://my-awesome-dev.t.example.com) to: my-awesome-feature-project-80

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![capnjosh](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@capnjosh](https://community.traefik.io/u/capnjosh)\
**Post date:** [February 21, 2020, 5:39pm UTC](https://community.traefik.io/t/route-magic-with-consul-catalog-services/4138/2 "2020-02-21T17:39:36Z")

</div>

In case you haven't solved this already, I think you'd have to register a second service in Consul.

On a related note, you can override the port to which Traefik will send traffic to backend servers, though it may not yet be in an official release: [Override Consul port via tags](https://community.containo.us/t/override-consul-port-via-tags/4521/3). That might support a few more options for how you route traffic - you can define the port the service is listening on in the tags, or you could define it when your register the service in consul (the former being a use case if you're running Nomad, since the "service" stanza can be a little rigid in this area).
