Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

IPv6 Support #387

Open
terrancewong opened this issue Sep 15, 2021 · 9 comments
Open

IPv6 Support #387

terrancewong opened this issue Sep 15, 2021 · 9 comments

Comments

@terrancewong
Copy link

Is there any way to let the node/miner listen to IPv6?

Currently a connect to IPv6 peer

<prog> peer connect /ip6/240e:xxxx:xxxx::xxx/tcp/44158

returns

Failed to connect to "/ip6/240e:xxxx:xxxx::xxx/tcp/44158"
@evanmcc
Copy link
Contributor

evanmcc commented Sep 15, 2021

@PaulVMo does the listen address thing allow ipv4 addresses to be specified?

@PaulVMo
Copy link
Contributor

PaulVMo commented Sep 15, 2021

Yes, the listen_addresses parameter in sys.config allows ip4 and ip6 address. I did test to confirm it will listen on ip6 address. I never did try peer connect however.

@madninja
Copy link
Member

Yes, the listen_addresses parameter in sys.config allows ip4 and ip6 address. I did test to confirm it will listen on ip6 address. I never did try peer connect however.

ipv6 will not work today. It'll need quite a bit more than being able to just specify listen addresses

@PaulVMo
Copy link
Contributor

PaulVMo commented Sep 16, 2021

@madninja if one want to working on ip6 support, thoughts on where to start?

@terrancewong
Copy link
Author

@PaulVMo does the listen address thing allow ipv4 addresses to be specified?

lsof -i tcp shows an IPv6 LISTEN on 44158

@PaulVMo
Copy link
Contributor

PaulVMo commented Sep 16, 2021

@PaulVMo does the listen address thing allow ipv4 addresses to be specified?

lsof -i tcp shows an IPv6 LISTEN on 44158

Did you set the listen_addresses parameter or are you running this on docker? I have noticed that docker's bridge network will publish listening ports on both ip4 and ip6. However, the miner is actually only listening on ip4 by default inside the container.

Anyway, like madninja said, while it may listen on am ipv6 address, there are other issues preventing the node for working with an ipv6 address.

@terrancewong
Copy link
Author

it's a docker, alias bcem='balena -D container exec $MINER''

# bcem ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
9: eth0@if10: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether <MAC> brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.3/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever
DEBU[2021-09-17T00:57:37.818834576Z] [hijack] End of stdout 

@PaulVMo
Copy link
Contributor

PaulVMo commented Sep 17, 2021

Unless you have enabled ipv6 support in docker and updated the listen_addresses in the sys.config file in the miner (inside the container) is not actually listening on ipv6. What you are seeing in lsof is the docker network bridge listening on ipv6 not the miner itself.

@PaulVMo
Copy link
Contributor

PaulVMo commented Sep 23, 2021

I opened a PR for some fixes for ipv6 support that resolve the miner peer connect /ip6/.... errors. However, ipv6 probably still needs more work before . For example, NAT status is not set when only listening on ip6. Also, selection of gossip peers does not consider available protocols.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants