Dual Scenario Ipv4/Ipv6 with Consul

697 views
Skip to first unread message

Alberto Sagredo

unread,
Jul 24, 2016, 4:52:25 AM7/24/16
to Consul
Good morning, i have Consul working fine with IPv4 but i want to move to an dual stack scenario where ipv4/ipv6 would be used. 

I have seen you could bind consul server in ipv6, and ipv4 i have not it working simultaneously

If i run docker container as this:

docker run -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h node1 progrium/consul -server -bootstrap -bind IPV6FREFIX:0:242:a00:a0b -ui-dir /ui


im not able to get AAAA registers.


root@asterisk-docker-1:~# dig @10.0.100.26 -p 8600 node1.node.dc1.consul AAAA


; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> @10.0.100.26 -p 8600 node1.node.dc1.consul AAAA

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60351

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0


;; QUESTION SECTION:

;node1.node.dc1.consul. IN AAAA


;; Query time: 4 msec

;; SERVER: 10.0.100.26#8600(10.0.100.26)

;; WHEN: Sun Jul 24 10:47:31 CEST 2016

;; MSG SIZE  rcvd: 39



But if i run in an ipv4 environment it seems working

docker run -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h node1 progrium/consul -server -bootstrap -ui-dir /ui


oot@asterisk-docker-1:~# dig @10.0.100.26 -p 8600 node1.node.dc1.consul


; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> @10.0.100.26 -p 8600 node1.node.dc1.consul

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20056

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0


;; QUESTION SECTION:

;node1.node.dc1.consul. IN A


;; ANSWER SECTION:

node1.node.dc1.consul. 0 IN A 10.0.10.11


;; Query time: 5 msec

;; SERVER: 10.0.100.26#8600(10.0.100.26)

;; WHEN: Sun Jul 24 10:50:01 CEST 2016

;; MSG SIZE  rcvd: 76


root@asterisk-docker-1:~# 



Any idea . Am i doing something wrong?





James Phillips

unread,
Jul 25, 2016, 9:17:27 PM7/25/16
to consu...@googlegroups.com
Hi Alberto,

When Consul starts up does the "Clulster Addr" shown in the first few lines of the log look reasonable?

-- James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/4fa96ab5-9ff0-4fd7-aa2a-107e6f59d8ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alberto Sagredo

unread,
Jul 29, 2016, 4:36:37 AM7/29/16
to Consul
HI James

I do not see nothing related to ipv6

root@asterisk-docker-1:~# docker run -it consul

==> Starting Consul agent...

==> Starting Consul agent RPC...

==> Consul agent running!

         Node name: '738f6b219f0a'

        Datacenter: 'dc1'

            Server: true (bootstrap: false)

       Client Addr: 127.0.0.1 (HTTP: 8500, HTTPS: -1, DNS: 8600, RPC: 8400)

      Cluster Addr: 10.0.10.6 (LAN: 8301, WAN: 8302)

    Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false

             Atlas: <disabled>


==> Log data will now stream in as it occurs:


    2016/07/29 08:34:22 [INFO] serf: EventMemberJoin: 738f6b219f0a 10.0.10.6

    2016/07/29 08:34:22 [INFO] serf: EventMemberJoin: 738f6b219f0a.dc1 10.0.10.6

    2016/07/29 08:34:22 [INFO] raft: Node at 10.0.10.6:8300 [Follower] entering Follower state

    2016/07/29 08:34:22 [INFO] consul: adding LAN server 738f6b219f0a (Addr: 10.0.10.6:8300) (DC: dc1)

    2016/07/29 08:34:22 [INFO] consul: adding WAN server 738f6b219f0a.dc1 (Addr: 10.0.10.6:8300) (DC: dc1)

    2016/07/29 08:34:22 [ERR] agent: failed to sync remote state: No cluster leader

    2016/07/29 08:34:23 [WARN] raft: Heartbeat timeout reached, starting election

    2016/07/29 08:34:23 [INFO] raft: Node at 10.0.10.6:8300 [Candidate] entering Candidate state

    2016/07/29 08:34:23 [DEBUG] raft: Votes needed: 1

    2016/07/29 08:34:23 [DEBUG] raft: Vote granted from 10.0.10.6:8300. Tally: 1

    2016/07/29 08:34:23 [INFO] raft: Election won. Tally: 1

    2016/07/29 08:34:23 [INFO] raft: Node at 10.0.10.6:8300 [Leader] entering Leader state

    2016/07/29 08:34:23 [INFO] raft: Disabling EnableSingleNode (bootstrap)

    2016/07/29 08:34:23 [DEBUG] raft: Node 10.0.10.6:8300 updated peer set (2): [10.0.10.6:8300]

    2016/07/29 08:34:23 [INFO] consul: cluster leadership acquired

    2016/07/29 08:34:23 [DEBUG] consul: reset tombstone GC to index 2

    2016/07/29 08:34:23 [INFO] consul: member '738f6b219f0a' joined, marking health alive

    2016/07/29 08:34:23 [INFO] consul: New leader elected: 738f6b219f0a

    2016/07/29 08:34:24 [INFO] agent: Synced service 'consul'


But docker has ipv6 working


with docker inspect consul i can see it?


Any other thing i should check?


BR

Alberto Sagredo

unread,
Jul 29, 2016, 5:13:42 AM7/29/16
to Consul
i tried also running as this..

docker run -it -p 8300:8300 -p 8301:8301/tcp -p 8301:8301/udp -p 8302:8302/tcp -p 8302:8302/udp -p 8400:8400 -p 8500:8500 -p 53:8600/udp -p 53:8600/tcp --volume=/var/run/docker.sock:/tmp/docker.sock --name consul2-ipv6 -h nodo2  docker.io/consul agent -ui —bind [::] advertise [::] -client 0.0.0.0 -join [IPV6_ADDRESS]


Any idea¿

James Phillips

unread,
Aug 17, 2016, 8:16:44 PM8/17/16
to consu...@googlegroups.com
Hi Alberto,

I'm not super well versed with IPv6 and Docker but it looks like you might need some special setup to enable it - https://docs.docker.com/engine/userguide/networking/default_network/ipv6/.

-- James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/977f29b3-d021-4a37-8cb3-3da2859688c5%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages