`
v5browser
  • 浏览: 1136935 次
社区版块
存档分类
最新评论

HP-Unix Route命令常见的Network is unreachable错误解决方法

 
阅读更多

首先,抄袭一段从网上来的文章:

root@hp233# route add net 200.200.17.0 netmask 255.255.255.0 192.251.2.14
add net 200.200.17.0: gateway 192.251.2.14: Network is unreachable

当你再次看到这个帖子的时候,请不要告诉我ip和网关的不在同一个网段里面。 我的机器有两个网卡,使用不同的网段。

另外问题已经解决了,现在将解决问题的方法公布一下,希望可以给碰到类似问题的朋友一点帮助:

命令格式:route add net 路由地址 netmask 子网掩码 本地网关 1

举个例子就一目了然了:route add net 200.200.17.0 netmask 255.255.255.0 192.251.2.14 1
后面的那个1一定不要忘记了,不然就永远也添加不成功。

netstat -rn 查看路由结果



大家一般到了这个时候就可以解决问题了。但是还有一种情况就是,你只有一个网卡,比如你的网卡地址是192.168.83.194,掩码是255.255.0.0.然后你敲入下面的代码


route add net  192.168.83.195 192.168.85.1 1

然后你就会发现Network is unreachable, 然后你郁闷了。其实这个道理就是:


熟悉TCP/IP知识就非常明白了,作为网关必须是本网段的IP的地址,不能用另一个网段的IP地址作为另外一个网段的网关,也许其他的操作系统可以这么做,但是HP,windows等操作系统是不允许这么做的。


只要把网关改成和自己是一个网段的地址就搞定了。


BTW:

linux下增加路由的方法route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.83.212



分享到:
评论

相关推荐

    单机搭建Android(解决Network is unreachable)

    单机搭建Android(解决 fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle fatal: error [Errno 101] Network is unreachable ),具体操作请阅readme.txt

    Linux之网络无法访问(network is unreachable)

    【问题】刚安装好CentOs 7后无网络...【解决方法】 在root下输入: cd /etc/sysconfig/network-scripts/ 进入network-scripts目录 vi编辑模式 vi ifcfg-ens32 按下回车,进入vi编辑模式。 按下a,进入编辑模式,

    hadoop-core-1.2.0(解决0700异常)

    eclipse连接远程hadoop集群开发时0700问题解决方案。修改源码,重新编译后hadoop-core-1.2.0

    snap7-full-1.4.2.7z

    snap7源码包,需要的可以下载,已经在openwrt编译成功运行(需要用此源码自己编译),可以和S7-1500正常通讯,其他Linux平台类似

    usb-over-network USB共享

    注册版本 usb-over-network USB 共享 加密狗

    C++出错提示英汉对照表

    Error directive :xxx ------------------------错误的编译预处理命令 Error writing output file ---------------------写输出文件错误 Expression syntax error -----------------------表达式语法错误 Extra ...

    ping ip主机提示Destination host unreachable问题解决方法小结

    主要为大家介绍了上网各类应用基本正常,但是在命令行下使用ping命令,无论任何地址,均反馈Destination host unreachable,需要的朋友可以参考下

    repo1.22-20160724

    fatal: error [Errno 101] Network is unreachable 2016/07/24更新 由于清华大学TUNA镜像源关闭了git://协议,仅支持HTTPS,所以需将REPO_URL修改为 https://aosp.tuna.tsinghua.edu.cn/android/git-repo才可以...

    开源系统路由

    1,什么是路由 2,路由原理 情况1:同一个网络的主机A和主机B是如何通信的 3,如何查看当前由内核维护的路由表 ...connect: Network is unreachable d)在你的系统中执行如下命令,观察结果,并解释它们的作用,

    repo V1.21

    repo V1.21,用于解决repo init时出现如下的错误: fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle fatal: error [Errno 101] Network is unreachable

    repo V1.22

    repo V1.22,用于解决repo init时出现如下的错误: fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle fatal: error [Errno 101] Network is unreachable

    rust-unreachable

    unreachable = " 0.1 " 作者 ( 是《无法到达》的主要作者和维护者。 执照 根据以下任一许可 Apache许可证2.0版( 或 ) MIT许可证( 或 ) 由您选择。 贡献 除非您明确声明,否则有意提交给您的包含在工作中的...

    xkcd-unreachable-rs:受https启发的Rust宏xkcd_unreachable!()

    xkcd_unreachable 受启发的Rust宏xkcd_unreachable!() 例子 use xkcd_unreachable :: xkcd_unreachable; fn foo (x: Option ) { match x { Some (n) if n >= 0 => println! ( "Some(Non-negative)" ), Some (n) ...

    北大天网搜索引擎TSE源码

    * Created: YAN Hongfei, Network lab of Peking University. * Created: July 15 2003. version 0.1.1 * # Can crawl web pages with a process * Updated: Aug 20 2003. version 1.0.0 !!!! * # Can crawl ...

    xampp Apache启动后无法访问站点解决方法汇总

    本文给大家总结了3种xampp Apache启动后无法访问站点解决方法,均能够解决此问题,有需要的小伙伴可以参考下

    Netron Light v2.5 pre-release

    and quiting my job to work full-time on Netron is an unreachable dream. Thanks to all of you who have donated to Netron and support this project by Email, chat or via the forum. I hope this pre-...

    rust-debug-unreachable:在调试,std中无法访问!()

    debug_unreachable 在调试中无法访问!(),在发行版中为std :: intrinsics :: unreachable()。用法使用crates.io存储库; 将其与其余依赖Cargo.toml一起添加到您的Cargo.toml : [ dependencies ]debug_...

    Struts2 中的一个小问题

    最近在学struts2,遇到了个小...The file cannot be validated as the host "struts.apache.org" is currently unreachable 在网上找了很久,没有找到解决方法,后来自己解决了。 拿出来,希望对有同样问题的有点帮助。

    go系统编程(英文版)

    you can use the go tool to detect unreachable code and how to avoid some common Go mistakes. Chapter 4, Go Packages, Algorithms, and Data Structures, talks about algorithms and sorting in Go and about...

    maven deploy时报错的解决方法

    主要介绍了maven deploy时报错的解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

Global site tag (gtag.js) - Google Analytics