题目要求:1.实现pc1、pc2、pc3...等全网可达。2.设pc7为运营商服务器,实现内网的pc机全部可以访问运营商服务器。3.r1-r2路由器实现两天线路,一条线路为备份线路。
解题:
示例:R1部分
<r1>
<r1>sy
Enter system view, return user view with Ctrl+Z.
[r1]sy
[r1]sysname r1
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 67.1.1.1 24
Jul 23 2022 22:44:35-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]quit
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 16.1.1.1 24
Jul 23 2022 22:45:04-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]quit
[r1]interface g0/0/2
[r1-GigabitEthernet0/0/2]ip address 12.1.1.1 24
[r1-GigabitEthernet0/0/2]
Jul 23 2022 22:45:24-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r1-GigabitEthernet0/0/2]quit
[r1]interface e4/0/1
[r1-Ethernet4/0/1]ip address 21.1.1.1 24
[r1-Ethernet4/0/1]
Jul 23 2022 22:45:55-08:00 r1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface Ethernet4/0/1 has entered the UP state.
[r1-Ethernet4/0/1]quit
[r1]ip route-static 24.1.1.0 24 12.1.1.2
[r1]ip route-static 24.1.1.0 24 21.1.1.2 preference 61
[r1]ip route-static 45.1.1.0 24 12.1.1.2
[r1]ip route-static 45.1.1.0 24 21.1.1.2 preference 61
[r1]ip route-static 192.168.1.0 24 12.1.1.2
[r1]ip route-static 192.168.1.0 24 21.1.1.2 preference 61
[r1]ip route-static 192.168.2.0 24 12.1.1.2
[r1]ip route-static 192.168.2.0 24 21.1.1.2 preference 61
[r1]ip route-static 172.16.1.0 24 16.1.1.2
服务商静态路由(使用缺省路由):
示例:
[r2]ip route-static 0.0.0.0 24 21.1.1.1
备份路由(通过调整优先级实现备份路线):
[r1]ip route-static 192.168.2.0 24 21.1.1.2 preference 61
结果: