1.项目背景
(1) 路由器之间通过 VPN 互联;
(2) 公司总分之间通过静态路由互联;
(3) 测试计算机和路由器的 IP 和接口信息如拓扑所示。
2.项目规划设计
(1)配置路由器接口
(2)配置静态路由
(3)配置各计算机的IP地址
3.项目实施
(1)配置路由器接口
R1的配置
[Huawei]system-view
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[RGigabitEthernet0/0/0]ip address 192.168.1.10 255.255.255.0
[R1]interface GigabitEthernet 0/0/1
[RGigabitEthernet0/0/1]ip address 20.20.20.1 255.255.255.0
[R1]interface GigabitEthernet 0/0/2
[RGigabitEthernet0/0/2]ip address 30.30.30.1 255.255.255.0
[Huawei]system-view
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 172.16.1.10 255.255.255.0
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 20.20.20.10 255.255.255.0
[R2]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip address 40.40.40.10 255.255.255.0
[Huawei]system-view
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.10.10.10 255.255.255.0
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 40.40.40.1 255.255.255.0
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 30.30.30.10 255.255.255.0
(2)配置静态路由
[R1]ip route-static 172.16.1.0 24 20.20.20.10
[R1]ip route-static 10.10.10.0 24 30.30.30.10
[R2]ip route-static 192.168.1.0 24 20.20.20.1
[R2]ip route-static 10.10.10.0 24 40.40.40.1
采取同样方式在 R3 上配置目的网段为 PC1、PC2 所在网段的静态路由
[R3]ip route-static 192.168.1.0 24 30.30.30.1
[R3]ip route-static 172.16.1.0 24 40.40.40.10
(3)配置各计算机的 IP 地址
R2的配置
R3的配置
(2)测试各计算机的互通性
172.16.1.1
Ping 172.16.1.1: 32 data bytes, Press Ctrl_C to break
From 172.16.1.1: bytes=32 seq=1 ttl=126 time=15 ms
From 172.16.1.1: bytes=32 seq=2 ttl=126 time=16 ms
From 172.16.1.1: bytes=32 seq=3 ttl=126 time=16 ms
From 172.16.1.1: bytes=32 seq=4 ttl=126 time=15 ms
From 172.16.1.1: bytes=32 seq=5 ttl=126 time=16 ms
172.16.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
packet loss
min/avg/max = 15/15/16 ms
使用 PC1 Ping PC3 的计算机:
PC>ping 10.10.10.1
Ping 10.10.10.1: 32 data bytes, Press Ctrl_C to break
From 10.10.10.1: bytes=32 seq=1 ttl=126 time=15 ms
From 10.10.10.1: bytes=32 seq=2 ttl=126 time=32 ms
From 10.10.10.1: bytes=32 seq=3 ttl=126 time=15 ms
From 10.10.10.1: bytes=32 seq=4 ttl=126 time=16 ms
From 10.10.10.1: bytes=32 seq=5 ttl=126 time=15 ms
--- 10.10.10.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/18/32 ms
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/249063.html