CentOS 8中无法上网问题解决-无法正常显示ens33中ip地址

  • ifconfig 查询 无法显示ens33的中 网卡ip地址

    ing: www.baidu.com: Name or service not known
    [hadoop100@localhost ~]$ ifconfig
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 48  bytes 2400 (2.3 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 48  bytes 2400 (2.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
            ether 52:54:00:ef:a6:7d  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
  • 解决办法:

    # 查看托管状态
    nmcli n
    # 出现disabled则代表是遇到的问题,否则代表不是
    # 开启托管
    nmcli n on
    # 重启托管
    systemctl restart NetworkManager
    # 再次查看,即可正常显示出ens33
    ifconfig
    

猜你喜欢

转载自blog.csdn.net/weixin_45717907/article/details/119493649