标签:邻居 网卡 路由表 config .net 标签 命令 bsp text
yum install iproute iproute-doc
apt-get install iproute iproute-doc
风.fox
说明 | net-tools | iproute2 |
---|---|---|
邻居 | arp -na arp |
ip neigh |
地址和链路配置 | ifconfig | ip link ip addr |
显示全部接口信息 显示IP |
ifconfig -a | ip addr show |
帮助 | ifconfig –help | ip help |
显示摘要信息 | ifconfig -s | ip -s link |
启动指定网络设备/网卡 | ifconfig eth0 up | ip link set eth0 up |
组播 | ipmaddr | ip maddr |
ip隧道 | iptunnel | ip tunnel |
统计 | netstat | ss |
显示网络界面信息表单 | netstat -i | ip -s link |
显示多重广播功能群组组员名单 | netstat -g | ip maddr |
列出监听服务状态 | netstat -l | ss -l |
路由表 | netstat -r route |
ip route |
添加路由 | route add | ip route add |
删除路由 | route del | ip route del |
查看路由状态 | route -n | ip route show |
增删VLAN | vconfig | ip link |
ss -pltn
ip a
ip address show
ip addr show dev eth0
ip a sh eth0
ip address add 192.0.2.1/24 dev eth0
ip addr del 192.0.2.2/24 dev eth0
ip -s link ls eth0
网卡和链路配置
ip link show
ip link sh eth0
ip link set eth0 up
ip link s gre01 down
ip route
ip ro show dev gre01
ip route add 10.2.2.128/27 dev gre01
ip route add default via 192.168.1.1
ip route chg default via 192.168.1.2
ip route del default
ip tunnel add gre01 mode gre local 10.1.1.1 remote 20.2.2.1 ttl 255
ip tunnel del gre01
ip tunl a ipip01 mode ipip local 10.1.1.1 remote 20.2.2.1 ttl 255
ip tunnel show
ip -s tunl ls gre01
ip neigh show
ip neighbor add 10.2.2.2 dev eth0
ip neigh del 10.2.2.1 dev eth0
ss -l
ss -p
lsof -n -i4TCP:80 | grep LISTEN # Verified on macOS Sierra
lsof -n -iTCP:80 | grep LISTEN
lsof -n -i:80 | grep LISTEN
为了不显示端口的俗称,你可以加P参数:
lsof -nP -i4TCP:$PORT | grep LISTEN # Verified on macOS Sierra
lsof -nP -iTCP:$PORT | grep LISTEN
lsof -nP -i:$PORT | grep LISTEN
来自:
http://www.jianshu.com/p/125fbe9dc1d2
http://blog.csdn.net/kevin3101/article/details/52368860
http://linoxide.com/linux-command/use-ip-command-linux/
http://colobu.com/2017/07/11/show-connections-in-MACOS/
linux(Ubuntu/Centos) iproute 路由IP地址等命令集合,查看端口链接
标签:邻居 网卡 路由表 config .net 标签 命令 bsp text
原文地址:https://www.cnblogs.com/marklove/p/9695432.html