eNSP 静态路由
文章目錄
- 一 構(gòu)建拓?fù)鋱D
- 二 配置PCipv4地址
- pc1
- pc2
- 三 配置路由器
- 靜態(tài)路由簡(jiǎn)介
- AR1
- 配置端口IP地址
- 靜態(tài)路由
- AR2
- 配置端口IP地址
- 靜態(tài)路由
- 四 查看路由表
- ping操作
- pc1 ping pc2
- pc2 ping pc1
- 五 路由追蹤
- pc2 追蹤 pc1
- 六 總結(jié)
一 構(gòu)建拓?fù)鋱D
二 配置PCipv4地址
pc1
pc2
三 配置路由器
靜態(tài)路由簡(jiǎn)介
/系統(tǒng)視圖下,配置R1到不同網(wǎng)段的靜態(tài)路由
[R1]ip route-static 192.168.20.0 24 172.16.16.2
/目的網(wǎng)段、子網(wǎng)掩碼、下一跳地址注:結(jié)合拓?fù)鋱D思考,思路更清晰。
AR1
配置端口IP地址
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.10.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 172.16.16.1 24
靜態(tài)路由
[R1]ip route-static 192.168.20.0 24 172.16.16.2
[R1]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
AR2
配置端口IP地址
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.20.1 24
[R2-GigabitEthernet0/0/0]quit
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 172.16.16.2 24
靜態(tài)路由
[R2]ip route-static 192.168.10.0 24 172.16.16.1
[R2]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
四 查看路由表
ping操作
pc1 ping pc2
pc2 ping pc1
五 路由追蹤
pc2 追蹤 pc1
六 總結(jié)
pc網(wǎng)關(guān)一定要配置,靜態(tài)路由的三個(gè)關(guān)鍵一定不要混淆,目的網(wǎng)段、子網(wǎng)掩碼和下一跳地址。多結(jié)合拓?fù)鋱D思考,思路理清晰,效果更好。
總結(jié)
- 上一篇: 底层网络知识详解:从二层到三层-第5讲-
- 下一篇: jacob使用异常解决