Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

Add support for tc redirect based VM to Container connection #144

@egernst

Description

@egernst

From @mcastelino on October 27, 2017 1:34

Add support for tc redirect based VM to Container connection

Implement a new interconnection capability to support tc based traffic redirection.
This can be based on the existing bridge connection logic, using tc instead of the linux bridge

Connecting a veth device to tap

  • veth device from CNI/CNM plugin: eth0
  • tap device that connects to the VM: tap0

Redirecting traffic between the two devices

To quickly prototype, select the virtcontainers bridge networking implementation.
Then for each container

nsenter --net=<container_ns>
ip link del br0
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev tap0
tc qdisc add dev tap0 ingress
tc filter add dev tap0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev eth0

https://github.com/vishvananda/netlink/blob/0e3b74dbe28f37fd911f9bca3565fdca33c03f29/qdisc_linux.go#L130

Copied from original issue: containers/virtcontainers#448

Metadata

Metadata

Assignees

Labels

featureNew functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions