Ubuntu 12.04 LTS 查看网关地址方法汇总

前端之家收集整理的这篇文章主要介绍了Ubuntu 12.04 LTS 查看网关地址方法汇总前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.ip route show

  1. $iprouteshow
  2. defaultvia192.168.217.2deveth0metric100
  3. 192.168.122.0/24devvirbr0protokernelscopelinksrc192.168.122.1
  4. 192.168.217.0/24deveth0protokernelscopelinksrc192.168.217.129
eth0 网关地址为192.168.217.2


2.route -n ornetstat -rn

  1. $route-n
  2. KernelIProutingtable
  3. DestinationGatewayGenmaskFlagsMetricRefUseIface
  4. 0.0.0.0192.168.217.20.0.0.0UG10000eth0
  5. 192.168.122.00.0.0.0255.255.255.0U000virbr0
  6. 192.168.217.00.0.0.0255.255.255.0U000eth0
eth0网关地址为192.168.217.2


3.traceroute www.baidu.com

  1. $traceroutewww.baidu.com
  2. traceroutetowww.baidu.com(119.75.218.77),30hopsmax,60bytepackets
  3. 1localhost(192.168.217.2)0.607ms0.546ms1.379ms
  4. 2***
  5. 3***
  6. 4***
  7. 5***
  8. 6***
  9. 7***
  10. 8***
  11. 9***
  12. 10***
第一跳的地址就是网关地址



参考资料

Centos/Linux下如何查看网关地址/Gateway地址?

原文链接:https://www.f2er.com/ubuntu/351881.html

猜你在找的Ubuntu相关文章