zoukankan      html  css  js  c++  java
  • 使用ip开头的工具,而不是只会ifconfig

    结论:

    1、使用ip 开头的工具,比ifconfig显示的信息更多,并且支持的功能更强大。

    2、常用的功能有:

         显示接口基本信息: ip link show dev eth0

         设置端口up/down: ip link set dev eth0 down/up

         

    3、ip 地址相关

          增加接口的ip地址: ip addr add 192.168.0.4/24 dev eth0

          删除接口的ip地址: ip addr del 192.168.0.4/24 dev eth0

          修改接口的ip地址: 先删除,再增加。

          查询接口的ip地址:ip addr show dev eth0

          显示所有接口的ip地址:ip addr show 

    4、路由相关命令

         策略路由

         ip rule show

         路由表

         ip route show(不如 route -n开的清晰) 

             

         ip route add 

         ip route del 

         ip route show 

           

      人为增加了对114.114.114.114的实验,如下:

        

      

        

         ARP表

         ip neigh 

           

    5、接口统计信息

         ip -s link                           -----> 显示所有端口统计信息

         ip -s link ls dev ens33       ----> 显示指定端口统计信息

         ip -s -s link ls dev ens33   --- > 显示更详细的端口统计信息

         

            注意,与ifconfig 看到的端口统计信息,对比一下,可知,数值是相同的。

      

    参考链接:

    https://linux.cn/article-3144-1.html

  • 相关阅读:
    selenium 18种元素定位方法
    python3+selenium配置可能报错记录
    adb+monkey压力测试入门
    appscan使用教程(全)
    appium---android元素定位
    QTP自动化测试
    postman Could not get any response。
    Jmeter接口测试+压力测试
    Android 偏门xml属性
    CrashHandler
  • 原文地址:https://www.cnblogs.com/zhouhaibing/p/9534660.html
Copyright © 2011-2022 走看看