-
Notifications
You must be signed in to change notification settings - Fork 450
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
[BUG] The Probability of Duplicate MAC Addresses #4001
Comments
理论上冲突的概率是 1/(256256256) 实在大概什么样的规模下发现冲突的 |
500台node节点,有10台机器作为jenkins的salve起动态pod,发现好几次其他业务的pod已经申请了该mac,但是jenkins起的pod也申请了该mac,交换机处理就有问题然后就会影响其他业务正在运行的pod |
如果是这样我倾向于直接在 mac 里嵌入 IP 这样在 IPv4 的情况下至少可以保证绝对的不冲突 |
参考了下 cilium 的实现 https://github.com/cilium/cilium/blob/8c7e442ccd48b9011a10f34a128ec98751d9a80e/pkg/mac/mac.go#L106 这应该是最大随机化的做法了 |
看代码这个实现和已有的实现里把6字节改成全随机没啥大的区别吧 |
主要是第一个字节最后两位需要特殊设置,不然可能变成组播的 mac 地址。这个实现应该可以指数级下降冲突概率了,ipv6 的地址范围可能会比 mac 地址还大,也不能直接用 ip 来生成 mac 还是先只能用这种随机算法 |
Kube-OVN Version
1.11.9
Kubernetes Version
1.20.1
Operation-system/Kernel Version
"CentOS Linux 7 (Core)"
5.4.231-1.el7.elrepo.x86_64
Description
如果集群里频繁创建pod,mac地址存在重复的可能,在underlay网络下会存在问题
Steps To Reproduce
在集群中发现不同的pod的mac地址出现重复
Current Behavior
mac地址出现重复
Expected Behavior
mac地址不重复
The text was updated successfully, but these errors were encountered: