在我的板子上ping路由上的IP的时候可以ping通,但是ping外网的IP的时候提示“ping: sendto: Network is unreachable”

后来使用route命令看了一下

# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     *               255.255.255.0           U          0      0        0      rausb0

发现网关(Gateway),是空着的没有设置,于是执行一下命令设置了网关:

# route add default gw 192.168.1.1

# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     *               255.255.255.0   U     0      0        0 rausb0

default         192.168.1.1     0.0.0.0         UG    0      0        0 rausb0

最后终于可以ping通外网了

# ping 119.75.217.56

PING 119.75.217.56 (119.75.217.56): 56 data bytes

64 bytes from 119.75.217.56: seq=0 ttl=52 time=38.349 ms

64 bytes from 119.75.217.56: seq=1 ttl=52 time=30.369 ms

64 bytes from 119.75.217.56: seq=2 ttl=52 time=30.541 ms

64 bytes from 119.75.217.56: seq=3 ttl=52 time=29.659 ms

64 bytes from 119.75.217.56: seq=4 ttl=52 time=29.786 ms

另外如果网络的其他信息没有设置好,也会出现这样的情况,可以参考如下设置(http://www.lslnet.com/linux/f/docs1/i57/big5378732.htm)

ifconfig lo 127.0.0.1

route add -net 127.0.0.0 netmask 255.255.255.0 lo

ifconfig eth0 192.168.10.0

route add -net 192.168.10.0 netmask 255.255.255.0

转自:http://blog.csdn.net/qingtingchen1987/article/details/7045068

ping: sendto: Network is unreachable的更多相关文章

  1. ping: sendto: Network is unreachable【转】

    本文转载自:http://blog.sina.com.cn/s/blog_640531380102wmzb.html 在我的板子上ping路由上的IP的时候可以ping通,但是ping外网的IP的时候 ...

  2. linux下ping命令出现ping: sendto: Network is unreachable

    问题:ping外网出现: sendto: Network is unreachable 查看: #route Route命令 : 在数据包没有有效传递的情况下,可以利用route命令查看路由表 [ro ...

  3. Kali linux network is unreachable

    使用树莓派4 安装完kali linux后,配置好ip,能ping通上级路由. 但ping公网地址显示网络不可达. Ping: connect: network is unreachable 解决方法 ...

  4. NAT 模式下虚拟机安装的centos7 ping主机显示connect: Network is unreachable

    在虚拟机下安装的centos7使用的网络是NAT模式,安装成功后ping主机地址显示 Network is unreachable 解决方案: 1)使用ifconfig命令查看网卡信息 2)进入/et ...

  5. linux 出现ping,错误提示:connect :network is unreachable

    今天克隆Centos7后  修改IP地址 修改前: IP:172.16.0.198   默认网关:172.16.0.254 修改后: IP:172.16.1.100  默认网关:172.16.0.25 ...

  6. ping: Network is unreachable

    问题 [root@web-1 yum.repos.d]# ping baidu.com ping: unknown host baidu.com [root@web-1 yum.repos.d]# p ...

  7. linux上如何设置网络,出现connect: network is unreachable 的问题。

    发现有网友问有关ping命令出现connect: network is unreachable 的问题. 这通常是因为没正确设置ip地址. 解决方法: 在确保完善网卡驱动,以及确保将网卡驱动编译进内核 ...

  8. centos下问题:connect:network is unreachable

    问题描述 弄了三台机器准备搭建一个集群,按照centos7系统,一台主节点安装桌面环境,两台计算节点.配置计算节点的时候,发现ping不通,出现connect:network is unreachab ...

  9. ssh: connect to host gitlab.alpha.com port 22: Network is unreachable

    在这里只说明我遇到的问题和解决方法,可能并不能解决你遇到的问题: git clone git@gitlab.alpha.com:ipcam/ambarella.gitCloning into 'amb ...

随机推荐

  1. [BTS] BizTalk host BizTalkServerApplication throttled because DatabaseSize exceeded the configured throttling limit.

    Log Name: ApplicationSource: BizTalk ServerDate: 7/22/2013 6:10:38 PMEvent ID: 7001Task Category: Bi ...

  2. java web开发 图片上传功能

    基本思路在于,配置路径,然后用java I/O的api将图片上传到该目录下. String photoPath =    ServletActionContext.getServletContext( ...

  3. Atitit.现实生活中最好使用的排序方法-----ati排序法总结

    Atitit.现实生活中最好使用的排序方法-----ati排序法总结 1. 现在的问题 1 2. 排序的类别::插入排序//交换排序//选择排序(每次最小/大排在相应的位置  )//归并排序//基数排 ...

  4. Windows Server 2016 桌面环境的自动配置脚本

    除非学习要求,还是建议使用Windows 10 LTSB 2016或其他桌面系统. github:https://github.com/m2nlight/WindowsServerToWindowsD ...

  5. 15系统函数&数据类型转换(必学)-大话数据库视频教程

    大纲:系统函数的用法,case...when的用法,cast关键字的用法,convert的用法 优酷超清地址: 腾讯超清地址: 百度网盘下载地址:http://pan.baidu.com/s/1dDe ...

  6. C++Builder及VC的库相互调用

    coff2omf  vc.lib  bc.lib implib -f xxx.lib xxx.dll dll文件为VC编译的动态库lib文件为你需要转换的c++ builder 使用的静态库. 这也是 ...

  7. Radio Basics for RFID

    Radio Basics for RFID The following is excerpted from Chapter 3: Radio Basics for UHF RFID from the ...

  8. depth and distance

    1down votefavorite   I'm implementing ominidirectional shadow mapping for point lights. I want to us ...

  9. 用于主题检测的临时日志(b2d5c7b3-e3f6-4b0f-bfa4-a08e923eda9b - 3bfe001a-32de-4114-a6b4-4005b770f6d7)

    这是一个未删除的临时日志.请手动删除它.(1c773d57-4f35-40cf-ad62-bd757d5fcfae - 3bfe001a-32de-4114-a6b4-4005b770f6d7)

  10. apache的hadoop升级到CDH hadoop2.0时遇到的问题及解决

    1:引入的jar包 1.X版本有hadoop-core包:而2.x没有 如果你需要hdfs就引入\share\hadoop\common\lib + hadoop-common-2.0.0-cdh4. ...