Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPv6 support #61

Merged
merged 2 commits into from
Mar 23, 2017
Merged

Add IPv6 support #61

merged 2 commits into from
Mar 23, 2017

Conversation

rkday-pro
Copy link
Contributor

This adds a --ipv6 option to tcset, so you can run tcset --device eth1 --delay 5 --ipv6 --overwrite --network ::2/128.

Limitations:

  • you need to provide a network to tcset, otherwise it defaults to 0.0.0.0/0 which is unhelpful
  • tcshow recognises IPv6, but doesn't parse out the destination network:
$ tcshow --device eth1
{
    "eth1": {
        "outgoing": {
            "protocol=ipv6": {
                "delay": "5.0",
                "rate": "32000M"
            }
        },
        "incoming": {}
    }
}

This is because the output of tc filter, for quantities more than 32 bits, is much harder to parse and reconstruct:

tc filter show dev eth1
filter parent 16f1: protocol ipv6 pref 1 u32
filter parent 16f1: protocol ipv6 pref 1 u32 fh 800: ht divisor 1
filter parent 16f1: protocol ipv6 pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 16f1:2
  match 00000000/ffffffff at 24
  match 00000000/ffffffff at 28
  match 00000000/ffffffff at 32
  match 00000002/ffffffff at 36

Conflicts:
	tcconfig/shaper/_interface.py
	tcconfig/traffic_control.py
@thombashi
Copy link
Owner

Thank you for your pull request.

This is great.
I will add some test cases, documentations for IPv6 and consider how to handle limitations that you described.

@thombashi thombashi merged commit 108ac1f into thombashi:master Mar 23, 2017
@thombashi thombashi mentioned this pull request Mar 25, 2017
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