博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux中的ip命令
阅读量:3932 次
发布时间:2019-05-23

本文共 686 字,大约阅读时间需要 2 分钟。

ip [选项] 操作对象{link|addr|route…}

ip link show # 显示网络接口信息

ip link set eth0 upi # 开启网卡

ip link set eth0 down # 关闭网卡

ip link set eth0 promisc on # 开启网卡的混合模式

ip link set eth0 promisc offi # 关闭网卡的混个模式

ip link set eth0 txqueuelen 1200 # 设置网卡队列长度

ip link set eth0 mtu 1400 # 设置网卡最大传输单元

ip addr show # 显示网卡IP信息

ip addr add 192.168.0.1/24 dev eth0 # 设置eth0网卡IP地址192.168.0.1

ip addr del 192.168.0.1/24 dev eth0 # 删除eth0网卡IP地址

ip route list # 查看路由信息

ip route add 192.168.4.0/24 via 192.168.0.254 dev eth0 # 设置192.168.4.0网段的网关为192.168.0.254,数据走eth0接口

ip route add default via 192.168.0.254 dev eth0 # 设置默认网关为192.168.0.254

ip route del 192.168.4.0/24 # 删除192.168.4.0网段的网关

ip route del default # 删除默认路由

转载地址:http://ywqgn.baihongyu.com/

你可能感兴趣的文章
make though multi core
查看>>
install opencv on mac and use it in xcode
查看>>
xcode里面找不到头文件
查看>>
sudo chown -R $(whoami) /usr/local/lib/pkgconfig
查看>>
compile pcl 1.8.1 from source code on ubuntu 16.04
查看>>
install openni2 on ubuntu
查看>>
Installation of Ubuntu source-insight
查看>>
using lldb to print array data
查看>>
optimization on macOS
查看>>
Template-Based 3D Model Fitting Using Dual-Domain Relaxation
查看>>
install libfreenect2 on ubuntu 16.04
查看>>
how to use automake to build files
查看>>
using matlab drawing line graph for latex
查看>>
How package finding works
查看>>
build opencv3.3.0 with VTK8.0, CUDA9.0 on ubuntu9.0
查看>>
how to compile kinfu_remake with cuda 9.0 opencv2.4.13.4
查看>>
qtcreator4.4.1中cmake 与cmake3.5.1本身generate出来的setting是有区别的解决方法
查看>>
CMake Useful Variables/Logging Useful Variables
查看>>
使用cmake建立工程链接OPENNI2
查看>>
U盘安装Ubuntu
查看>>