加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-two-VF-virtual-machines-have-same-mac-address.patch 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
From 48b21956443a03ac94f29480e213b05b86fcf525 Mon Sep 17 00:00:00 2001
From: fangxiuning <fangxiuning@huawei.com>
Date: Thu, 5 Sep 2019 07:40:41 +0800
Subject: fix two vf virtual machine has same mac address
through 82599,hns3 physical network cart vf two virtual machine,
two virtual machine have the same mac address.
MACAddressPolicy=
The policy by which the MAC address should be set. The available
policies are:
persistent
If the hardware has a persistent MAC address, as most hardware should,
and if it is used by the kernel, nothing is done. Otherwise, a new MAC
address is generated which is guaranteed to be the same on every boot
for the given machine and the given device, but which is otherwise random.
This feature depends on ID_NET_NAME_* properties to exist for the link.
On hardware where these properties are not set, the generation of a
persistent MAC address will fail.
random
If the kernel is using a random MAC address, nothing is done. Otherwise,
a new address is randomly generated each time the device appears,
typically at boot. Either way, the random address will have the "unicast"
and "locally administered" bits set.
none
Keeps the MAC address assigned by the kernel.
---
network/99-default.link | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/network/99-default.link b/network/99-default.link
index 347d4b7..54f1f58 100644
--- a/network/99-default.link
+++ b/network/99-default.link
@@ -12,4 +12,4 @@ OriginalName=*
[Link]
NamePolicy=keep kernel database onboard slot path
-MACAddressPolicy=persistent
+MACAddressPolicy=none
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化