zoukankan      html  css  js  c++  java
  • Ubuntu 12.04 LTS 查看网关地址方法汇总

    来源:http://blog.csdn.net/duyiwuer2009/article/details/26263855

    1. ip route show

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. $ ip route show  
    2. default via 192.168.217.2 dev eth0  metric 100   
    3. 192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1   
    4. 192.168.217.0/24 dev eth0  proto kernel  scope link  src 192.168.217.129  

    eth0 网关地址为 192.168.217.2

    2. route -n or netstat -rn

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. $ route -n  
    2. Kernel IP routing table  
    3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  
    4. 0.0.0.0         192.168.217.2   0.0.0.0         UG    100    0        0 eth0  
    5. 192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0  
    6. 192.168.217.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0  

    eth0 网关地址为 192.168.217.2

    3. traceroute www.baidu.com

    [html] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. $ traceroute www.baidu.com  
    2. traceroute to www.baidu.com (119.75.218.77), 30 hops max, 60 byte packets  
    3.  1  localhost (192.168.217.2)  0.607 ms  0.546 ms  1.379 ms  
    4.  2  * * *  
    5.  3  * * *  
    6.  4  * * *  
    7.  5  * * *  
    8.  6  * * *  
    9.  7  * * *  
    10.  8  * * *  
    11.  9  * * *  
    12. 10  * * *  

    第一跳的地址就是网关地址

  • 相关阅读:
    MVC传递数据的方式
    c#面向对象的多态
    使用扩展方法创建 HTML Helper
    了解视图、视图数据和 HTML Helper
    十种技能方法提高IT人薪酬
    ASP.net 2.0:系统优化
    第一个简单的MVC页面
    用户体验时代到来,功能不再重要
    关于SQL递归优化
    web(2)
  • 原文地址:https://www.cnblogs.com/nanzh/p/6702806.html
Copyright © 2011-2022 走看看