---
title: "Discussion on \"Assigning IPv6 directly from the primary router to Docker Containers using Macvlan\" | Hashnode"
description: "Discussion on \"Assigning IPv6 directly from the primary router to Docker Containers using Macvlan\". Each container having its own public IPv6 will have tons of benefits. For example, if you are running a torrent client application on a docker container and using it for downloading torrents, with ipv6 assigned to it, it will able to communicate with..."
url: "https://hashnode.com/posts/assigning-ipv6-directly-from-the-primary-router-to-docker-containers-using-macvlan/6517c4b7667e67019cf35396"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Assigning IPv6 directly from the primary router to Docker Containers using Macvlan](https://blog.bimal1412.com.np/assigning-ipv6-directly-from-the-primary-router-to-docker-containers-using-macvlan?utm_source=hashnode&utm_medium=feed)

Each container having its own public IPv6 will have tons of benefits. For example, if you are running a torrent client application on a docker container and using it for downloading torrents, with ipv6 assigned to it, it will able to communicate with...

Sep 30, 2023 · 4 min read · blog.bimal1412.com.np  
Updated Sep 28, 2025  
Read the article

-   [#ipv6](https://hashnode.com/tag/ipv6)
-   [#docker](https://hashnode.com/tag/docker)
-   [#networking](https://hashnode.com/tag/networking)
-   [#homelab](https://hashnode.com/tag/homelab)
-   [#macvlan](https://hashnode.com/tag/macvlan)

## Written by

[Bimal Dhital](https://hashnode.com/@bemole1412)

@bemole1412 · Chitwan , NP

  
[View profile](https://hashnode.com/@bemole1412)

A guy with a keen interest in computer networks, software development, web technologies, embedded systems, and programming. When I am bored you can find me bingeing anime series, reading novels, and tinkering with hardware and software.

## Responses 1

Markdown supported · ⌘↵ to post

[Rabindra Man Bajracharya](https://hashnode.com/@rabindramb)

[Oct 8, 2023](https://hashnode.com/posts/assigning-ipv6-directly-from-the-primary-router-to-docker-containers-using-macvlan/6517c4b7667e67019cf35396/comment/652253f5a5b624c6153e5884)

What is your configuration on the router? And won't manually adding ip be tedious as the ipv6 could be dynamic?

[Bimal Dhital](https://hashnode.com/@bemole1412)

[Oct 8, 2023](https://hashnode.com/posts/assigning-ipv6-directly-from-the-primary-router-to-docker-containers-using-macvlan/6517c4b7667e67019cf35396/comment/652253f5a5b624c6153e5884#reply-6522939bf786edcd65a68d7c)

Nothing special on the router side. The server machine is connected normally, the same as other devices in my house. I have written a blog about how to enable relay mode for ipv6 for the secondary router, you can check it out here [blog.bimal1412.com.np/enable-ipv6-on-a-secondary-…](https://blog.bimal1412.com.np/enable-ipv6-on-a-secondary-router-running-openwrt)

As, for the other question, yes I am sure it will get tedious if you plan on using it to host something with ipv6 directly from the docker container without tunneling. But I am sure that can be solved by writing a bash script to automate the config to get the new ipv6 gateway if the IPv6 prefix changes.
