me小怪兽

导航

Linux云主机添加网卡后没有配置文件生成

 

生成网卡信息

[root@controller network-scripts]# ls
ifcfg-ens32 ifdown-ipv6 ifdown-Team ifup-eth ifup-post ifup-tunnel
ifcfg-lo ifdown-isdn ifdown-TeamPort ifup-ippp ifup-ppp ifup-wireless
ifdown ifdown-post ifdown-tunnel ifup-ipv6 ifup-routes init.ipv6-global
ifdown-bnep ifdown-ppp ifup ifup-isdn ifup-sit network-functions
ifdown-eth ifdown-routes ifup-aliases ifup-plip ifup-Team network-functions-ipv6
ifdown-ippp ifdown-sit ifup-bnep ifup-plusb ifup-TeamPort
[root@controller network-scripts]# systemctl start NetworkManager
[root@controller network-scripts]# nmcli con add con-name ens33 type ethernet ifname ens33      #生成ifcf-ens33配置文件
连接 "ens33" (0f8d910e-5ce0-49c1-98e3-db9e0de02b6f) 已成功添加。
[root@controller network-scripts]# ls
ifcfg-ens32 ifdown-ippp ifdown-sit ifup-bnep ifup-plusb ifup-TeamPort
ifcfg-ens33 ifdown-ipv6 ifdown-Team ifup-eth ifup-post ifup-tunnel
ifcfg-lo ifdown-isdn ifdown-TeamPort ifup-ippp ifup-ppp ifup-wireless
ifdown ifdown-post ifdown-tunnel ifup-ipv6 ifup-routes init.ipv6-global
ifdown-bnep ifdown-ppp ifup ifup-isdn ifup-sit network-functions
ifdown-eth ifdown-routes ifup-aliases ifup-plip ifup-Team network-functions-ipv6
[root@controller network-scripts]# cat ifcfg-ens33    #查看
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=0f8d910e-5ce0-49c1-98e3-db9e0de02b6f
DEVICE=ens33
ONBOOT=yes
[root@controller network-scripts]# systemctl restart network    #重启网卡

 



posted on 2023-04-21 16:53  me小怪兽  阅读(616)  评论(0编辑  收藏  举报