File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,13 @@ help:显示网络对象支持的操作命令的帮助信息。
35
35
36
36
### 实例
37
37
38
- ** 用ip命令显示网络设备的运行状态**
38
+ ``` bash
39
+ ip route show # 显示系统路由
40
+ ip route add default via 192.168.1.254 # 设置系统默认路由
41
+ ip route delete 192.168.1.0/24 dev eth0 # 删除路由
42
+ ```
43
+
44
+ ** 用ip命令显示网络设备的运行状态**
39
45
40
46
```
41
47
[root@localhost ~]# ip link list
@@ -47,7 +53,7 @@ help:显示网络对象支持的操作命令的帮助信息。
47
53
link/ether 00:16:3e:00:1e:52 brd ff:ff:ff:ff:ff:ff
48
54
```
49
55
50
- ** 显示更加详细的设备信息**
56
+ ** 显示更加详细的设备信息**
51
57
52
58
```
53
59
[root@localhost ~]# ip -s link list
@@ -71,7 +77,7 @@ help:显示网络对象支持的操作命令的帮助信息。
71
77
3486617396 9691081 0 0 0 0
72
78
```
73
79
74
- ** 显示核心路由表**
80
+ ** 显示核心路由表**
75
81
76
82
```
77
83
[root@localhost ~]# ip route list
@@ -83,7 +89,7 @@ help:显示网络对象支持的操作命令的帮助信息。
83
89
default via 112.124.15.247 dev eth1
84
90
```
85
91
86
- ** 显示邻居表**
92
+ ** 显示邻居表**
87
93
88
94
```
89
95
[root@localhost ~]# ip neigh list
@@ -97,5 +103,4 @@ default via 112.124.15.247 dev eth1
97
103
ip link | grep ^[0-9] | awk -F: '{print $2}'
98
104
```
99
105
100
-
101
106
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
You can’t perform that action at this time.
0 commit comments