2024年9月2日 18:09:14
This commit is contained in:
parent
f5a39153dd
commit
94a5e754ac
113
B. 第二阶段/拓扑练习/0902_多服务练习拓扑.md
Normal file
113
B. 第二阶段/拓扑练习/0902_多服务练习拓扑.md
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
# 多服务练习拓扑
|
||||||
|
|
||||||
|
![image-20240902180316802](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240902180316802.png)
|
||||||
|
|
||||||
|
![image-20240902173915624](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240902173915624.png)
|
||||||
|
|
||||||
|
### 一、IP、VLAN、Routing
|
||||||
|
|
||||||
|
- **PC**
|
||||||
|
|
||||||
|
- **SW1**
|
||||||
|
|
||||||
|
```
|
||||||
|
[SW1]vlan batch 10 20 30
|
||||||
|
[SW1]int g0/0/1
|
||||||
|
[SW1-GigabitEthernet0/0/1]port link-type access
|
||||||
|
[SW1-GigabitEthernet0/0/1]port default vlan 10
|
||||||
|
[SW1-GigabitEthernet0/0/1]int g0/0/2
|
||||||
|
[SW1-GigabitEthernet0/0/2]port link-type trunk
|
||||||
|
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
|
||||||
|
```
|
||||||
|
|
||||||
|
- **SW2**
|
||||||
|
|
||||||
|
```
|
||||||
|
[SW2]vlan batch 10 20 30
|
||||||
|
[SW2]int g0/0/1
|
||||||
|
[SW2-GigabitEthernet0/0/1]port link-type access
|
||||||
|
[SW2-GigabitEthernet0/0/1]port default vlan 20
|
||||||
|
[SW2-GigabitEthernet0/0/1]int g0/0/2
|
||||||
|
[SW2-GigabitEthernet0/0/2]port link-type trunk
|
||||||
|
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
|
||||||
|
```
|
||||||
|
|
||||||
|
- **SW3**
|
||||||
|
|
||||||
|
```
|
||||||
|
[SW3]vlan batch 10 20 30
|
||||||
|
[SW3]int g0/0/1
|
||||||
|
[SW3-GigabitEthernet0/0/1]port link-type access
|
||||||
|
[SW3-GigabitEthernet0/0/1]port default vlan 30
|
||||||
|
[SW3-GigabitEthernet0/0/1]int g0/0/2
|
||||||
|
[SW3-GigabitEthernet0/0/2]port link-type trunk
|
||||||
|
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
|
||||||
|
```
|
||||||
|
|
||||||
|
- **HX-SW5**
|
||||||
|
|
||||||
|
```
|
||||||
|
[HX-SW5]vlan batch 10 20 30 50
|
||||||
|
[HX-SW5]port-group group-member g0/0/1 to g0/0/3
|
||||||
|
[HX-SW5-port-group]port link-type trunk
|
||||||
|
[HX-SW5-port-group]quit
|
||||||
|
[HX-SW5]int g0/0/5
|
||||||
|
[HX-SW5-GigabitEthernet0/0/5]port link-type access
|
||||||
|
[HX-SW5-GigabitEthernet0/0/5]port default vlan 50
|
||||||
|
```
|
||||||
|
|
||||||
|
- **AR3 - DHCP**
|
||||||
|
|
||||||
|
```
|
||||||
|
[AR3-DHCP]int g0/0/1
|
||||||
|
[AR3-DHCP-GigabitEthernet0/0/1]ip add 192.168.50.1 24
|
||||||
|
[AR3-DHCP-GigabitEthernet0/0/1]quit
|
||||||
|
[AR3-DHCP]ip route-static 0.0.0.0 0 192.168.50.251
|
||||||
|
```
|
||||||
|
|
||||||
|
### 二、DHCP
|
||||||
|
|
||||||
|
- **AR3 - DHCP**
|
||||||
|
|
||||||
|
```
|
||||||
|
[AR3-DHCP]dhcp enable
|
||||||
|
[AR3-DHCP]ip pool vlan10
|
||||||
|
[AR3-DHCP-ip-pool-vlan10]network 192.168.10.0 mask 24
|
||||||
|
[AR3-DHCP-ip-pool-vlan10]gateway-list 192.168.10.254
|
||||||
|
[AR3-DHCP-ip-pool-vlan10]dns-list 8.8.8.8
|
||||||
|
[AR3-DHCP-ip-pool-vlan10]quit
|
||||||
|
[AR3-DHCP]ip pool vlan20
|
||||||
|
[AR3-DHCP-ip-pool-vlan20]network 192.168.20.0 mask 24
|
||||||
|
[AR3-DHCP-ip-pool-vlan20]gateway-list 192.168.20.254
|
||||||
|
[AR3-DHCP-ip-pool-vlan20]dns-list 8.8.8.8
|
||||||
|
[AR3-DHCP-ip-pool-vlan20]quit
|
||||||
|
[AR3-DHCP]ip pool vlan30
|
||||||
|
[AR3-DHCP-ip-pool-vlan30]network 192.168.30.0 mask 24
|
||||||
|
[AR3-DHCP-ip-pool-vlan30]gateway-list 192.168.30.254
|
||||||
|
[AR3-DHCP-ip-pool-vlan30]dns-list 8.8.8.8
|
||||||
|
[AR3-DHCP-ip-pool-vlan30]quit
|
||||||
|
[AR3-DHCP]int g0/0/1
|
||||||
|
[AR3-DHCP-GigabitEthernet0/0/1]dhcp select global
|
||||||
|
```
|
||||||
|
|
||||||
|
- **HX - SW5**
|
||||||
|
|
||||||
|
```
|
||||||
|
[HX-SW5]dhcp enable
|
||||||
|
[HX-SW5]int vlan 10
|
||||||
|
[HX-SW5-Vlanif10]ip add 192.168.10.251 24
|
||||||
|
[HX-SW5-Vlanif10]dhcp select relay
|
||||||
|
[HX-SW5-Vlanif10]dhcp relay server-ip 192.168.50.1
|
||||||
|
[HX-SW5-Vlanif10]int vlan 20
|
||||||
|
[HX-SW5-Vlanif20]ip add 192.168.20.251 24
|
||||||
|
[HX-SW5-Vlanif20]dhcp select relay
|
||||||
|
[HX-SW5-Vlanif20]dhcp relay server-ip 192.168.50.1
|
||||||
|
[HX-SW5-Vlanif20]int vlan 30
|
||||||
|
[HX-SW5-Vlanif30]ip add 192.168.30.251 24
|
||||||
|
[HX-SW5-Vlanif30]dhcp select relay
|
||||||
|
[HX-SW5-Vlanif30]dhcp relay server-ip 192.168.50.1
|
||||||
|
[HX-SW5-Vlanif30]int vlan 50
|
||||||
|
[HX-SW5-Vlanif50]ip add 192.168.50.251 24
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user