linux network commands
- watch ss -tp network connections 用来获取socket统计信息
- netstat -ant TCP connections -ant=udp
- netstat -tulpn connections with pids
- ifconfig eth ip /adir 设置ip和子网掩码
- ifconfig eth:1 ip / adir 设置虚拟网卡
- route add default gw gwip 设置网关
- export MAC=*** 设置mac地址
- ifconfig eth mtu [size] 改变数据包大小
- ifconfig eth0 hw ether mac 修改网卡mac地址
- echo “1” > /proc/sys/net/ipv4/ip_forward 开启ip转发
- /etc/resolv.conf DNS信息