一、配置路由器
1.使用AR1220路由器,在设置里面配置2SA接口卡
2.使用router路由器
二、配置静态路由拓扑图
三、如图所示给路由器端口配置IP地址
设备 | IP地址 | 子网掩码 | 网关 |
PC1 | 192.168.0.10 | 255.255.255.0 | 192.168.0.1 |
PC2 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |
设备 | 接口 | IP地址 |
R1 | GE 0/0/0 | 192.168.0.1/24 |
R1 | serial 2/0/0 | 172.16.0.1/24 |
R2 | serial 2/0/1 | 172.16.0.2/24 |
R2 | serial 2/0/0 | 172.16.1.1/24 |
R3 | serial 2/0/1 | 172.16.1.2/24 |
R3 | GE 0/0/0 | 192.168.1.1/24 |
路由器各接口配置IP地址命令,每个路由器接口都要配置
[R1]interface 接口名称 接口号(如0/0/0) //选择接口
[R1-GigabitEthernet0/0/0]ip address ip地址 子网掩码 //分配IP地址
[R1-GigabitEthernet0/0/0]quit //退出
四、配置静态路由
配置静态路由命令
[R1]ip route-static 192.168.1.0 24 172.16.0.2
[R2]ip route-static 192.168.1.0 24 172.16.1.2
[R2]ip route-static 192.168.0.0 24 172.16.0.1
[R3]ip route-static 192.168.0.0 24 172.16.1.1
[R1]display ip routing-table //显示IPV4路由表信息
五、ping通两台PC