俞晨曦 发表于 2017-6-20 19:32:52

Linux一些基础网络配置命令

1.ifconfig
2.ifconfig eth0 192.168.0.100
3.ifconfig eth0 netmask 255.255.255.0
4.ifconfig eth0 broadcast 192.168.0.255
5.ifconfig eth0 mtu 1500
6.ifconfig eth0 up
7.ifconfig eth0 down
8.ifconfig eth0:0 192.168.0.101
9.ifup
10.ifdown

11.route
12.route -n
13.route add -net 192.168.0.100 netmask 255.255.255.0 dev eth0
14.route del -net 192.168.0.100 netmask 255.255.255.0 dev eth0
15.route add default gw 192.168.0.1

16.ip link show
17.ip -s link show
18.ip link set eth0 up
19.ip link set eth0 down
20.ip link set eth0 netmask 255.255.255.0
21.ip link set eth0 mtu 1500
22.ip link set eth0 broadcast 192.168.0.255
23.ip link set eth0 address 9c:b7:0d:cf:1b:98

24.ip route show
25.ip -s route show

26.ip addr show
27.ip -s addr show

28.ping 192.168.0.100
29.ping 192.168.0.100 -c 5

30.host www.baidu.com

31.traceroute www.baidu.com
32.traceroute www.baidu.com -n

33.netstat -anp
34.netstat -l

35.dhclient

36.tcpdump -i eth0 -nn port 21
37.tcpdump -i eth0 -nn -X port 21

38.service network restart
39./etc/init.d/network

俞晨曦 发表于 2017-6-21 01:14:01

up up
页: [1]
查看完整版本: Linux一些基础网络配置命令