\/etc\/default\/grub<\/pre>\n\u6587\u4ef6\u6765\u63a7\u5236\uff0c\u8981\u7981\u7528\u6b64\u529f\u80fd\uff0c\u5728\u6587\u4ef6\u4e2d\u52a0\u5165<\/p>\n
\"net.ifnames=0 biosdevname=0\"<\/pre>\n\u5373\u53ef<\/p>\n
\r\n[root@Jaking11 network-scripts]# vim \/etc\/default\/grub\r\n \r\nGRUB_TIMEOUT=5\r\nGRUB_DISTRIBUTOR=\"$(sed 's, release .*$,,g' \/etc\/system-release)\"\r\nGRUB_DEFAULT=saved\r\nGRUB_DISABLE_SUBMENU=true\r\nGRUB_TERMINAL_OUTPUT=\"console\"\r\nGRUB_CMDLINE_LINUX=\"crashkernel=auto rd.lvm.lv=centos\/root rd.lvm.lv=centos\/swap\r\n rhgb quiet net.ifnames=0 biosdevname=0\"\r\nGRUB_DISABLE_RECOVERY=\"true\"\r\n<\/pre>\n\u4e09\u3001\u6dfb\u52a0udev\u7f51\u5361\u89c4\u5219<\/strong><\/div>\n\u5728\/etc\/udev\/rules.d\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a\u7f51\u5361\u89c4\u521970-persistent-net.rules\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u4e2d\u5199\u5165\u4ee5\u4e0b\u53c2\u6570\uff1a<\/p>\n
SUBSYSTEM==\"net\",ACTION==\"add\",DRIVERS==\"?*\",ATTR{address}==\"\u9700\u8981\u4fee\u6539\u540d\u79f0\u7684\u7f51\u5361MAC\u5730\u5740\",ATTR\uff5btype\uff5d==\"1\" ,KERNEL==\"eth*\",NAME=\"eth0\"<\/pre>\n\u53c2\u8003\u914d\u7f6e\uff1a<\/p>\n
\r\n[root@Jaking11 rules.d]# vim 70-persistent-net.rules\r\nSUBSYSTEM==\"net\",ACTION==\"add\",DRIVERS==\"?*\",ATTR{address}==\"00:50:56:29:0e:ae\",\r\nATTR\uff5btype\uff5d==\"1\" ,KERNEL==\"eth*\",NAME=\"eth0\"\r\n<\/pre>\n\u6267\u884cgrub2-mkconfig -o \/boot\/grub2\/grub.cfg\u547d\u4ee4\u751f\u6210\u66f4\u65b0grub\u914d\u7f6e\u53c2\u6570<\/strong><\/div>\n\r\n[root@Jaking11 rules.d]# grub2-mkconfig -o \/boot\/grub2\/grub.cfg\r\nGenerating grub configuration file ...\r\nFound linux image: \/boot\/vmlinuz-3.10.0-957.el7.x86_64\r\nFound initrd image: \/boot\/initramfs-3.10.0-957.el7.x86_64.img\r\nFound linux image: \/boot\/vmlinuz-0-rescue-fe49b659ccb940fa8d260a5897c0b08a\r\nFound initrd image: \/boot\/initramfs-0-rescue-fe49b659ccb940fa8d260a5897c0b08a.img\r\ndone\r\n<\/pre>\n\u91cd\u542fLinux\u7cfb\u7edf\u540e\u9a8c\u8bc1\u7f51\u5361\u540d\u79f0\u662f\u5426\u66f4\u6539\u6210\u529f<\/strong><\/div>\n\r\n[root@Jaking11 ~]# ifconfig\r\neth0: flags=4163 mtu 1500\r\n inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255\r\n inet6 fe80::250:56ff:fe29:eae prefixlen 64 scopeid 0x20 \r\n ether 00:50:56:29:0e:ae txqueuelen 1000 (Ethernet)\r\n RX packets 86 bytes 10889 (10.6 KiB)\r\n RX errors 0 dropped 0 overruns 0 frame 0\r\n TX packets 95 bytes 10828 (10.5 KiB)\r\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\r\n\r\nlo: flags=73 mtu 65536\r\n inet 127.0.0.1 netmask 255.0.0.0\r\n inet6 ::1 prefixlen 128 scopeid 0x10\r\n loop txqueuelen 1000 (Local Loopback)\r\n RX packets 0 bytes 0 (0.0 B)\r\n RX errors 0 dropped 0 overruns 0 frame 0\r\n TX packets 0 bytes 0 (0.0 B)\r\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\r\n<\/host><\/pre>\n\u603b\u7ed3<\/strong><\/div>\n\u4ee5\u4e0a\u5c31\u662f\u66f4\u6539 RHEL7 \u6216\u8005 CentOS 7 \u7684\u7f51\u5361\u540d\u79f0\u7684\u65b9\u6cd5\uff0c\u6700\u540e\u770b\u5230 eth0 \u8bf4\u660e\u7f51\u5361\u540d\u79f0\u66f4\u6539\u6210\u529f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"
[root@Jaking11 ~]# ifconfig ens33: flags=4163 mtu 1500 […]<\/p>\n","protected":false},"author":63,"featured_media":178047,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-178046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/178046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=178046"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/178046\/revisions"}],"predecessor-version":[{"id":180802,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/178046\/revisions\/180802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/178047"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=178046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=178046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=178046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}