Skip to content

Conversation

@pamidur
Copy link

@pamidur pamidur commented Oct 24, 2019

IPV6

This PR removes limitations that prevents ipv6 usage.
With this changes user can run cache with ipv6 support.

In case no macvlan is setup but docker is configured for ipv6 support

sudo docker run -d \
        -e UPSTREAM_DNS="[fd01::1]:6453" \
        lancachenet/monolithic:latest

In case macvlan (name publan) network is setup

sudo docker run -d \
        -e UPSTREAM_DNS="[fd01::1]:6453" \
        --ip6=fd01::c:1 \
        --net=publan \
        lancachenet/monolithic:latest

Note, how to setup UPSTREAM_DNS ip (+ optional port) properly.
Ipv6 : [fd01::1]:6453 [fd01::2]
Ipv4 : 8.8.8.8 1.1.1.1:53
mixed : 8.8.8.8 [fd01::1]:6453

ADDITIONAL IPS

This feature requires macvlan to be setup and the container to be granted NET_ADMIN capability.

Since when using macvlan only one external IP can be set (one ipv4 + one ipv6) , this feature makes container to use additional IPs.

Assuming macvlan is set like this:

 sudo docker network create -d macvlan \
	 --subnet=fd01::/64 \
	 --subnet=192.168.1.0/24 \
	 --ip-range=192.168.1.192/28 \
	 --ipv6 \
	 -o parent=eth0 publan  

User can run the container like this:

sudo docker run -d \
        -e ADDITIONAL_IPS="fd01::c:2/64 fd01::c:3/64 192.168.1.202/24 192.168.1.203/24" \
        --ip6=fd01::c:1 \
        --ip=192.168.1.201 \
        --net=publan \
        --cap-add=NET_ADMIN \
        lancachenet/monolithic:latest

TEST

You can get images for testing here: https://hub.docker.com/r/pamidur/lancache/tags

@pamidur
Copy link
Author

pamidur commented Oct 24, 2019

When setup in my lan together with lancache-dns-ipv6:

PS> nslookup content1.steampowered.com
Server:  router
Address:  fd01::1

Non-authoritative answer:
Name:    steam.cache.lancache.net
Addresses:  fd01::c:6
          fd01::c:7
          fd01::c:8
          fd01::c:9
          fd01::c:a
          fd01::c:1
          fd01::c:2
          fd01::c:3
          fd01::c:4
          fd01::c:5
Aliases:  content1.steampowered.com
PS> ping  fd01::c:1

Pinging fd01::c:1 with 32 bytes of data:
Reply from fd01::c:1: time=2ms
Reply from fd01::c:1: time=1ms
Reply from fd01::c:1: time=2ms
Reply from fd01::c:1: time=1ms

PS> ping  fd01::c:2

Pinging fd01::c:2 with 32 bytes of data:
Reply from fd01::c:2: time=1ms
Reply from fd01::c:2: time=3ms
Reply from fd01::c:2: time=2ms
Reply from fd01::c:2: time=1ms

Download speeds are good.

@stale
Copy link

stale bot commented Feb 24, 2025

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Feb 24, 2025
@astrolox astrolox removed the wontfix label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants