一、绘制网络拓扑图:
二、配置
pc配置
IP地址、掩码、网关一定要填好,填好后点击应用。
路由器配置:
R1
<Huawei>undo t t Info: Current terminal trapping is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sys R1 [R1]int g0/0/1 [R1-GigabitEthernet0/0/1]ip address 192.1.1.254 24 [R1-GigabitEthernet0/0/1]int g0/0/2 [R1-GigabitEthernet0/0/2]ip add 192.1.3.1 30 [R1-GigabitEthernet0/0/2]q [R1]ip router-s [R1]ip route-static 192.1.2.0 24 192.1.3.2
R2
<Huawei>undo t t Info: Current terminal trapping is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sys R2 [R2]int g0/0/1 [R2-GigabitEthernet0/0/1]ip add 192.1.2.254 24 [R2-GigabitEthernet0/0/1]int g0/0/2 [R2-GigabitEthernet0/0/2]ip add 192.1.3.2 30 [R2-GigabitEthernet0/0/2]q [R2]ip route-static 192.1.1.0 24 192.1.3.1
关键代码:ip route-static 目的IP 目的IP的掩码 下一跳IP
三、测试连通性
打开pc的命令行-去ping别的pc机能通则代表实验成功
标签:ensp,R1,R2,静态,ip,192.1,GigabitEthernet0,int,路由 From: https://www.cnblogs.com/xf-xf/p/16818793.html