网卡信息:dmesg |grep-in eth
设备芯片数据:lspci | grep -I ethernet
查看内核是否加载:lsmod | grep 1000
内核模块信息:modinfo e1000
删除模块:rmmod e1000
加载模块:modprobe e1000
主机名:/etc/sysconfig/network
DNSIP:/etc/resolv.conf
IP/Netmask/DHCP/Gateway:/etc/sysconfig/network-scripts/ifcfg-eth2
协议配置文件:/etc/services
IP数据包协议相关数据:/etc/protocols
网络服务启动:/etc/init.d/network restart
启动单个网络接口:ifup/ifdown eth0
域名验证:dig www.google.com
主机名验证:hostname
Gateway验证:root -n gateway
usb设备:lsusb
查看模块与相对应的网卡代号:iwconfig
启动网卡:ifconfig ra0 up
无线网卡搜索:iwlist ra0 scan
网卡配置:ifconfig eth0 options
Options:up/down,mtu,netmask,broadcast
路由配置:route add/del [-net/-host] 192.168.100.0 netmask 255.255.255.0[gw/dev]
dev eth0
综合网络命令:
1)数据链路层
ip [-s] link show [dev]
ip link set eth0[up/down,address(mac),name,mtu]
2)网络层
ip address show
ip address add 192.168.1.100/24 broadcasst +dev eth0 label eth0:vbird
3)路由
ip route show
ip route [add/del] 192.168.10.0/24 dev eth0
DHCP客户端命令:dhclient eth0
数据包捕获:
tcpdump
wireshake:yum install wiresharkwireshark-gnome
服务或端口查看:
nc:yum install nc
nc localhost 25
打开linux路由功能:cat/proc/sys/net/ipv4/ip_forward [0/1]
vi /etc/sysctl.conf
sysctl -p 系统设置立即生效
动态路由软件:zebra www.zebra.org
quagga www.quagga.net