Skip to content

Commit 686edb3

Browse files
authored
Update ip.md
1 parent 0a50037 commit 686edb3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

command/ip.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ help:显示网络对象支持的操作命令的帮助信息。
3535

3636
### 实例
3737

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命令显示网络设备的运行状态**
3945

4046
```
4147
[root@localhost ~]# ip link list
@@ -47,7 +53,7 @@ help:显示网络对象支持的操作命令的帮助信息。
4753
link/ether 00:16:3e:00:1e:52 brd ff:ff:ff:ff:ff:ff
4854
```
4955

50-
**显示更加详细的设备信息**
56+
**显示更加详细的设备信息**
5157

5258
```
5359
[root@localhost ~]# ip -s link list
@@ -71,7 +77,7 @@ help:显示网络对象支持的操作命令的帮助信息。
7177
3486617396 9691081 0 0 0 0
7278
```
7379

74-
**显示核心路由表**
80+
**显示核心路由表**
7581

7682
```
7783
[root@localhost ~]# ip route list
@@ -83,7 +89,7 @@ help:显示网络对象支持的操作命令的帮助信息。
8389
default via 112.124.15.247 dev eth1
8490
```
8591

86-
**显示邻居表**
92+
**显示邻居表**
8793

8894
```
8995
[root@localhost ~]# ip neigh list
@@ -97,5 +103,4 @@ default via 112.124.15.247 dev eth1
97103
ip link | grep ^[0-9] | awk -F: '{print $2}'
98104
```
99105

100-
101106
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->

0 commit comments

Comments
 (0)