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

Specifying MAC, MTU and other link attrs like IFLA_AF_SPEC #54

Open
sar772004 opened this issue Nov 29, 2022 · 8 comments
Open

Specifying MAC, MTU and other link attrs like IFLA_AF_SPEC #54

sar772004 opened this issue Nov 29, 2022 · 8 comments

Comments

@sar772004
Copy link
Contributor

Can you please help me with an example to specify the MAC, MTU and other link Attributes of the veth link? I don;t see it currently supported, but just checking if there is some way to do this.

Based on some code browsing , This is what Koko is using internally, and may need to be extended
https://github.com/vishvananda/netlink/blob/main/link.go#L24

@networkop
Copy link
Owner

Yeah, it's not supported. The assumption is that a NOS that runs inside a pod is given enough privileges to change those settings (CAP_NET_ADMIN at least, full privileged at most). So normally, this is controlled by whatever software that runs in a pod.

@sar772004
Copy link
Contributor Author

Thanks for the reply. Though the NOS running has the capability to change, it would be good to have this driven with the YAML.
One case i see is when using VXLAN between pods, We are not able to set the MTU, so that would probably need to come at the link setup time via the yaml.

When the NOS tries to set the MTU, we get errors and the link remains down.

Dec 1 02:46:22 dut-d : debug|1396|1461|00012|E: NetDeviceSetMTU ioctl(SIOCSIFMTU, "e1-34", 7000): Invalid argument (22)
Dec 1 02:46:22 dut-d : debug|1396|1461|00013|E: UpdateAdminState error setting mtu for interface "ethernet-1/34" mtu: 7000

63: e1-34@if63: <BROADCAST,MULTICAST> mtu 1450 qdisc noqueue state DOWN group default qlen 1000
link/ether 02:a0:a7:ff:00:22 brd ff:ff:ff:ff:ff:ff link-netnsid 0

Even when manually attempted    
[root@dut-d /]# ifconfig e1-34 mtu 9000 up
SIOCSIFMTU: Invalid argument

@networkop
Copy link
Owner

Ah, right, I see. I remember reading about similar things (e.g. adjustable MTU) in the context of gRPC links (worked on by @kingshukdev). I don't think it's supported today, but it should be fairly easy to add.

@sar772004
Copy link
Contributor Author

Thanks that will be great, Can you please add MTU support, i guess extending it here ?

func makeVxlan(srcIntf string, peerIP string, idx int64) *koko.VxLan {

Do you know, how long it takes to deploy such a change normally ?

@networkop
Copy link
Owner

I don't think I'll have the bandwidth to do this in the near future but I'm happy to consider PRs, if you're willing to do it

@sar772004
Copy link
Contributor Author

I don't think I'll have the bandwidth to do this in the near future but I'm happy to consider PRs, if you're willing to do it

Sure i can try out the changes and request a PR.
Since i am new here, could you point me any documention steps to test out the local changes.
Thanks

@kingshukdev
Copy link
Contributor

@sar772004, Yes adding configurable MTU is not a big task. Just to understand your use case - what is the MAX MTU you want to see for a link ? Secondly in a topology you need all links to have same MTU or different links can have different MTU ?

@sar772004
Copy link
Contributor Author

sar772004 commented Dec 10, 2022

@kingshukdev I am trying to achieve the MTU of vxlan bind atleast 9232.

By the way it seems the MTU currently is being picked from the underlying interface and its being tied to the primary address as defined here.
https://github.com/networkop/meshnet-cni/blob/master/manifests/base/daemonset.yaml#L41

We want to use a specific NIC for carrying the vxlan binds. and i m not finding a way to define the endpoint IP to be picked up from a specific interface on the computes.

Any idea how i can point to a specific underlay interface for the VXLAN binds to use ?
Once i have the chosen interface i could have a large MTU on that and probably proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants