# 0819拓扑练习 ![image-20240820093733366](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240820093733366.png) ### 一、配PC的IP、子网掩码、DNS ### 二、配路由的IP - **AR1** > \u t m > > \sy > > [Huawei]sy AR1 > > [AR1]int g 0/0/0 > > [AR1-GigabitEthernet0/0/0]ip a 192.168.10.254 24 > > [AR1-GigabitEthernet0/0/0]int g 0/0/1 > > [AR1-GigabitEthernet0/0/1]ip a 192.168.20.1 24 > > [AR1-GigabitEthernet0/0/1]int g 0/0/2 > > [AR1-GigabitEthernet0/0/2]ip a 192.168.60.2 24 - **AR2** > \u t m > > \sy > > [Huawei]sy AR2 > > [AR2]int g 0/0/0 > > [AR2-GigabitEthernet0/0/0]ip a 192.168.20.2 24 > > [AR2-GigabitEthernet0/0/0]int g 0/0/1 > > [AR2-GigabitEthernet0/0/1]ip a 192.168.30.1 24 - **AR3** > \u t m > > \sy > > [Huawei]sy AR3 > > [AR3]int g 0/0/0 > > [AR3-GigabitEthernet0/0/0]ip a 192.168.40.254 24 > > [AR3-GigabitEthernet0/0/0]int g 0/0/1 > > [AR3-GigabitEthernet0/0/1]ip a 192.168.30.2 24 > > [AR3-GigabitEthernet0/0/1]int g 0/0/2 > > [AR3-GigabitEthernet0/0/2]ip a 192.168.50.1 24 - **AR4** > \u t m > > \sy > > [Huawei]sy AR4 > > [AR4]int g 0/0/0 > > [AR4-GigabitEthernet0/0/0]ip a 192.168.60.1 24 > > [AR4-GigabitEthernet0/0/0]int g 0/0/1 > > [AR4-GigabitEthernet0/0/1]ip a 192.168.50.2 24 ### 三、配置静态路由 - **AR1** > [AR1]ip route-static 192.168.30.0 24 192.168.20.2 > > [AR1]ip route-static 192.168.40.0 24 192.168.20.2 preference 30 > > [AR1]ip route-static 192.168.40.0 24 192.168.60.1 > > [AR1]ip route-static 192.168.50.0 24 192.168.60.1 - **AR2** > [AR2]ip route-static 192.168.10.0 24 192.168.20.1 > > [AR2]ip route-static 192.168.40.0 24 192.168.30.2 - **AR3** > [AR3]ip route-static 192.168.10.0 24 192.168.30.1 > > [AR3]ip route-static 192.168.10.0 24 192.168.50.2 preference 30 > > [AR3]ip route-static 192.168.20.0 24 192.168.30.1 > > [AR3]ip route-static 192.168.60.0 24 192.168.50.2 - **AR4** > [AR4]ip route-static 192.168.10.0 24 192.168.60.2 > > [AR4]ip route-static 192.168.40.0 24 192.168.50.1 ### 四、连通性测试 1. **全局测试** - **PC1 → PC3** > `PC1>ping 192.168.40.1` > > Ping 192.168.40.1: 32 data bytes, Press Ctrl_C to break > > From 192.168.40.1: bytes=32 seq=1 ttl=125 time=62 ms > > From 192.168.40.1: bytes=32 seq=2 ttl=125 time=63 ms > > From 192.168.40.1: bytes=32 seq=3 ttl=125 time=78 ms > > From 192.168.40.1: bytes=32 seq=4 ttl=125 time=94 ms > > From 192.168.40.1: bytes=32 seq=5 ttl=125 time=78 ms > > --- 192.168.40.1 ping statistics --- > > 5 packet(s) transmitted > > 5 packet(s) received > > 0.00% packet loss > > round-trip min/avg/max = 62/75/94 ms > `PC1>tracert 192.168.40.1` > > traceroute to 192.168.40.1, 8 hops max(ICMP), press Ctrl+C to stop > > 1 192.168.10.254 62 ms 47 ms 47 ms > > 2 192.168.20.2 63 ms 47 ms 46 ms > > 3 192.168.30.2 63 ms 47 ms 31 ms > > 4 192.168.40.1 94 ms 78 ms 78 ms - **PC4 → PC2** > `PC4>ping 192.168.10.2` > > Ping 192.168.10.2: 32 data bytes, Press Ctrl_C to break > > Request timeout! > > From 192.168.10.2: bytes=32 seq=2 ttl=125 time=78 ms > > From 192.168.10.2: bytes=32 seq=3 ttl=125 time=78 ms > > From 192.168.10.2: bytes=32 seq=4 ttl=125 time=78 ms > > From 192.168.10.2: bytes=32 seq=5 ttl=125 time=78 ms > > --- 192.168.10.2 ping statistics --- > > 5 packet(s) transmitted > > 4 packet(s) received > > 20.00% packet loss > > round-trip min/avg/max = 0/78/78 ms > `PC>tracert 192.168.10.2` > > traceroute to 192.168.10.2, 8 hops max(ICMP), press Ctrl+C to stop > > 1 192.168.40.254 32 ms 46 ms 47 ms > > 2 192.168.50.2 47 ms 47 ms 16 ms > > 3 192.168.60.2 47 ms 46 ms 47 ms > > 4 192.168.10.2 94 ms 78 ms 94 ms 2. **冗余测试** - **PC1 → PC3** ![image-20240820103018606](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240820103018606.png) > `PC1>tracert 192.168.40.1` > > traceroute to 192.168.40.1, 8 hops max(ICMP), press Ctrl+C to stop > > 1 192.168.10.254 47 ms 46 ms 32 ms > > 2 192.168.60.1 47 ms 46 ms 47 ms > > 3 192.168.50.1 63 ms 62 ms 47 ms > > 4 192.168.40.1 78 ms 94 ms 78 ms - **PC4 → PC2** ![image-20240820103358780](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240820103358780.png) > `PC4>tracert 192.168.10.2` > > traceroute to 192.168.10.2, 8 hops max(ICMP), press Ctrl+C to stop > > 1 192.168.40.254 47 ms 47 ms 47 ms > > 2 192.168.30.1 47 ms 31 ms 47 ms > > 3 192.168.20.1 63 ms 46 ms 63 ms > > 4 192.168.10.2 94 ms 93 ms 79 ms