开发者社区 问答 正文

centos 网络出错怎么办

本来想搭个ivp6隧道,没有成功,反而导致主机无法ping通任何ip,无法连接外网,但是ssh能用

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.16.36  netmask 255.255.240.0  broadcast 172.17.31.255
        inet6 fe80::216:3eff:fe0c:88ea  prefixlen 64  scopeid 0x20<link>
        ether 00:16:3e:0c:88:ea  txqueuelen 1000  (Ethernet)
        RX packets 486790  bytes 54829704 (52.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 405912  bytes 46244483 (44.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


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 1  (Local Loopback)
        RX packets 127  bytes 11452 (11.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 127  bytes 11452 (11.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.17.31.253   0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
172.17.16.0     0.0.0.0         255.255.240.0   U     0      0        0 eth0
192.168.1.2     0.0.0.0         255.255.255.255 UH    0      0        0 eth0

ping 60.205.224.56
ping: 60.205.224.56: Name or service not known

展开
收起
ctios 2018-05-03 11:43:45 2664 分享 版权
2 条回答
写回答
取消 提交回答
  • Recentos 网络出错怎么办
    能不能私聊一下
    本来是弄ipv6隧道
    结果失败
    这是我的 history



      



    2018-05-04 13:35:59
    赞同 展开评论
  • 旺旺:nectar2。
    楼主您好,

    sshd还能使用,可能说明当前网络还没有完全断开。

    您可以回想或用history命令,看看之前执行了哪些命令,看能否“还原”回去。

    -------------------------

    回 2楼(ctios) 的帖子
    您好,

    route add default gw 192.168.0.1 <<-- 您是将默认的网关给删除,重新添加了192.168.0.1为默认网关吗?

    如果您当前的ECS实例没有重要的数据,或许重装系统会省事些。
    2018-05-03 12:04:18
    赞同 展开评论
问答分类:
问答标签:
问答地址: