Cyber_Security_Notes/1. 基础部分/练习/0819练习.md

187 lines
4.7 KiB
Markdown
Raw Normal View History

2024-08-20 10:38:32 +08:00
# 0819拓扑练习
![image-20240820093733366](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240820093733366.png)
2024-08-20 11:30:00 +08:00
### 一、配PC的IP、子网掩码、网关
2024-08-20 10:38:32 +08:00
### 二、配路由的IP
- **AR1**
2024-08-20 10:50:49 +08:00
```
<Huawei>u t m
<Huawei>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
```
2024-08-20 10:38:32 +08:00
- **AR2**
2024-08-20 10:50:49 +08:00
```
<Huawei>u t m
<Huawei>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
```
2024-08-20 10:38:32 +08:00
- **AR3**
2024-08-20 10:50:49 +08:00
```
<Huawei>u t m
<Huawei>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
```
2024-08-20 10:38:32 +08:00
- **AR4**
2024-08-20 10:50:49 +08:00
```
<Huawei>u t m
<Huawei>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
```
2024-08-20 10:38:32 +08:00
### 三、配置静态路由
- **AR1**
2024-08-20 10:50:49 +08:00
```
[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
```
2024-08-20 10:38:32 +08:00
- **AR2**
2024-08-20 10:50:49 +08:00
```
[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
```
2024-08-20 10:38:32 +08:00
- **AR3**
2024-08-20 10:50:49 +08:00
```
[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
```
2024-08-20 10:38:32 +08:00
- **AR4**
2024-08-20 10:50:49 +08:00
```
[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
```
2024-08-20 10:38:32 +08:00
### 四、连通性测试
1. **全局测试**
- **PC1 → PC3**
2024-08-20 10:50:49 +08:00
```
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
```
```
2024-08-20 11:19:02 +08:00
PC1>tracert 192.168.40.1
2024-08-20 10:50:49 +08:00
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
```
2024-08-20 10:38:32 +08:00
- **PC4 → PC2**
2024-08-20 10:50:49 +08:00
```
PC4>ping 192.168.10.2
2024-08-20 10:43:36 +08:00
2024-08-20 10:50:49 +08:00
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
```
```
2024-08-20 10:54:51 +08:00
PC4>tracert 192.168.10.2
2024-08-20 10:50:49 +08:00
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
```
2024-08-20 10:38:32 +08:00
2. **冗余测试**
- **PC1 → PC3**
![image-20240820103018606](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240820103018606.png)
2024-08-20 10:50:49 +08:00
```
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
```
2024-08-20 10:43:36 +08:00
2024-08-20 10:38:32 +08:00
- **PC4 → PC2**
2024-08-20 10:43:36 +08:00
2024-08-20 10:38:32 +08:00
![image-20240820103358780](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240820103358780.png)
2024-08-20 10:43:36 +08:00
2024-08-20 10:50:49 +08:00
```
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
```