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

pod MAC address calculation #2673

Closed
youwalther65 opened this issue Nov 20, 2023 · 3 comments
Closed

pod MAC address calculation #2673

youwalther65 opened this issue Nov 20, 2023 · 3 comments
Labels

Comments

@youwalther65
Copy link

What happened:

I 'd like to know the following:

  • How is the pod MAC address calculated?
  • It is persistet within IPAMD?
  • If persisted , how can I determine the the IP/MAC pair , any curl command to run against IPAMD?

Environment:

  • Kubernetes version (use kubectl version): 1.27
  • CNI Version: EKS managed add-on v1.13.2-eksbuild.1
  • OS (e.g: cat /etc/os-release):
    MAME="Amazon Linux"
    VERSION="2"
    ID="amzn"
    ID_LIKE="centos rhel fedora"
    VERSION_ID="2"
    PRETTY_NAME="Amazon Linux 2"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
    HOME_URL="https://amazonlinux.com/"
    SUPPORT_END="2025-06-30"
  • Kernel (e.g. uname -a):
    Linux ip-10-0-21-238.eu-west-1.compute.internal 5.10.198-187.748.amzn2.aarch64 Initial commit of amazon-vpc-cni-k8s #1 SMP Tue Oct 24 19:49:48 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
@jdn5126
Copy link
Contributor

jdn5126 commented Nov 20, 2023

@youwalther65 I assume you are referring to the MAC address bound to the pod IP, which would be the MAC address assigned to the eth0 interface in the pod network namespace. That MAC is assigned by the kernel (https://github.com/aws/amazon-vpc-cni-k8s/blob/master/cmd/routed-eni-cni-plugin/driver/driver.go#L114), and the address is not predictable. For the lifetime of the pod on this node, though, the MAC is the same.

Why are you looking for this information? To get it, you can always ARP for the pod IP using arping.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Jan 20, 2024
Copy link

github-actions bot commented Feb 4, 2024

Issue closed due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants