Centos8网卡重载
Last updated
2023-01-18 17:55:52
{"value":"<a name=\"db5Wq\"><\/a>\n### nmcli\u7f51\u5361\u91cd\u8f7d\n\n\tTips\uff1a\u4e0b\u8f7d\u547d\u4ee4\u8865\u5168\u5de5\u5177\uff0c\u53ef\u5c06\u7cfb\u7edf\u5927\u90e8\u5206\u547d\u4ee4\u8865\u5168\n\t[root@ ~]#yum -y install bash-completion\n\t[root@ ~]#bash\n\t== \u91cd\u542f\u4e00\u4e2abash\u8fdb\u7a0b\u8ba9\u5de5\u5177\u751f\u6548\n\t\n\t[root@ ~]#nmcli connection show\n\tNAME UUID TYPE DEVICE \n\tWired connection 1 46150933-409c-3e81-9d7a-47adb5b889c3 ethernet eth0 \n\tSystem ens3 21d47e65-8523-1a06-af22-6f121086f085 ethernet -- \n\tSystem eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet -- \n\t== \u663e\u793a\u6240\u6709\u7f51\u5361\u4fe1\u606f\uff0c\u6ce8\u610f\u770bNAME\u8fd9\u5217\uff0c\u6b64\u65f6\u8bbe\u5907eth0\u7684NAME\u4e3aWired connection 1\n\t\n\t\u4fee\u6539\u5b8c\u914d\u7f6e\u6587\u4ef6\u7f51\u5361\u91cd\u8f7d\uff1a\n\t[root@ ~]#nmcli connection reload \n\t[root@ ~]#nmcli connection up --tab\u8865\u5168\n\tfilename id System\\ ens3 uuid \n\thelp path System\\ eth0 Wired\\ connection\\ 1 \n\t\n\t[root@ ~]#nmcli connection up Wired\\ connection\\ 1 \n\t== \u8fd9\u91cc\u5e94\u8be5\u8f93\u5165\u7684\u662fNAME\uff08Wired\\ connection\\ 1\uff09\uff0c\u800c\u4e0d\u662feth0\n\t\n\t\u7f51\u5361\u91cd\u8f7d\u540e\u914d\u7f6e\u6587\u4ef6\u5982\u679c\u6ca1\u751f\u6548\u53ef\u4ee5\u4f7f\u7528modify\u6539\u540d\n\t\n\t\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u53ef\u4ee5\u4e3a\u7f51\u5361\u914d\u7f6e\u6587\u4ef6\u6539\u540d\uff08\u5c06Wired connection 1\u6539\u4e3aeth0\uff09\n\tnmcli connection modify Wired\\ connection\\ 1 con-name eth0\n\n\n#### \u9047\u5230\u95ee\u9898\n\nCentos8.x\u7cfb\u7edf\u914d\u7f6e\u5b8c\u7f51\u5361\u914d\u7f6e\u6587\u4ef6\uff0c\u7f51\u5361\u91cd\u8f7d\u540e\u914d\u7f6e\u6587\u4ef6\u6ca1\u751f\u6548\n\n#### \u539f\u56e0\n\n\u56e0\u4e3a\u539f\u6765\u7684\u914d\u7f6e\u6587\u4ef6\u6ca1\u6709NAME\u8fd9\u4e2a\u5b57\u6bb5\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u540d\u4e3a\uff1aifcfg-eth0-1\u3002\n\n#### \u89e3\u51b3\u65b9\u6cd5\n\n\u5728\u7f51\u5361\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u52a0\u4e2aNAME=eth0(\u7f51\u5361\u540d\u79f0)\uff0c\u7136\u540e\u5220\u9664ifcfg-eth0-1\n\n\u4e4b\u540e\u91cd\u542f\u7f51\u5361\uff0c\u64cd\u4f5c\u5982\u4e0b\uff1a\n\n\t[root@ network-scripts]# nmcli c reload \u8f7d\u5165\u914d\u7f6e\u6587\u4ef6 \n\t[root@ network-scripts]# nmcli c up eth0 \u91cd\u542f\u7f51\u5361eth0\n\tConnection successfully activated (D-Bus active path: \/org\/freedesktop\/NetworkManager\/ActiveConnection\/7)\n\n\n\n"}