Skip to content
This repository was archived by the owner on Apr 3, 2018. It is now read-only.
This repository was archived by the owner on Apr 3, 2018. It is now read-only.

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

@mcastelino

Description

@mcastelino

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions