2024年9月3日 10:55:24
This commit is contained in:
parent
5da01bef77
commit
ae4c5ba42a
@ -1,4 +1,4 @@
|
|||||||
# 项目实战 - 1
|
# 项目实战 - 基础交换网络设计
|
||||||
|
|
||||||
![image-20240903094302311](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240903094302311.png)
|
![image-20240903094302311](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240903094302311.png)
|
||||||
|
|
||||||
@ -72,6 +72,8 @@
|
|||||||
|
|
||||||
### 二、DHCP
|
### 二、DHCP
|
||||||
|
|
||||||
|
#### 1、配置
|
||||||
|
|
||||||
- **AR3 - DHCP**
|
- **AR3 - DHCP**
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -99,22 +101,22 @@
|
|||||||
|
|
||||||
```
|
```
|
||||||
[HX-SW5]dhcp enable
|
[HX-SW5]dhcp enable
|
||||||
[HX-SW5]int vlan 10
|
[HX-SW5]int Vlanif 10
|
||||||
[HX-SW5-Vlanif10]ip add 192.168.10.251 24
|
[HX-SW5-Vlanif10]ip add 192.168.10.251 24
|
||||||
[HX-SW5-Vlanif10]dhcp select relay
|
[HX-SW5-Vlanif10]dhcp select relay
|
||||||
[HX-SW5-Vlanif10]dhcp relay server-ip 192.168.50.1
|
[HX-SW5-Vlanif10]dhcp relay server-ip 192.168.50.1
|
||||||
[HX-SW5-Vlanif10]int vlan 20
|
[HX-SW5-Vlanif10]int Vlanif 20
|
||||||
[HX-SW5-Vlanif20]ip add 192.168.20.251 24
|
[HX-SW5-Vlanif20]ip add 192.168.20.251 24
|
||||||
[HX-SW5-Vlanif20]dhcp select relay
|
[HX-SW5-Vlanif20]dhcp select relay
|
||||||
[HX-SW5-Vlanif20]dhcp relay server-ip 192.168.50.1
|
[HX-SW5-Vlanif20]dhcp relay server-ip 192.168.50.1
|
||||||
[HX-SW5-Vlanif20]int vlan 30
|
[HX-SW5-Vlanif20]int Vlanif 30
|
||||||
[HX-SW5-Vlanif30]ip add 192.168.30.251 24
|
[HX-SW5-Vlanif30]ip add 192.168.30.251 24
|
||||||
[HX-SW5-Vlanif30]dhcp select relay
|
[HX-SW5-Vlanif30]dhcp select relay
|
||||||
[HX-SW5-Vlanif30]dhcp relay server-ip 192.168.50.1
|
[HX-SW5-Vlanif30]dhcp relay server-ip 192.168.50.1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### 三、测试
|
#### 2、测试
|
||||||
|
|
||||||
- **PC1 *[VALN10]***
|
- **PC1 *[VALN10]***
|
||||||
|
|
||||||
@ -160,3 +162,88 @@
|
|||||||
Physical address..................: 54-89-98-F9-38-81
|
Physical address..................: 54-89-98-F9-38-81
|
||||||
DNS server........................: 8.8.8.8
|
DNS server........................: 8.8.8.8
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
****
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 三、VLAN间通信
|
||||||
|
|
||||||
|
> 要实现vlan间通信需修改vlanif的IP地址,修改为DHCP分配的网关地址
|
||||||
|
|
||||||
|
#### 1、配置
|
||||||
|
|
||||||
|
- **HX - SW5**
|
||||||
|
|
||||||
|
```
|
||||||
|
[HX-SW5]int Vlanif 10
|
||||||
|
[HX-SW5-Vlanif10]ip add 192.168.10.254 24
|
||||||
|
[HX-SW5-Vlanif10]int Vlanif 20
|
||||||
|
[HX-SW5-Vlanif20]ip add 192.168.20.254 24
|
||||||
|
[HX-SW5-Vlanif20]int Vlanif 30
|
||||||
|
[HX-SW5-Vlanif30]ip add 192.168.30.254 24
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2、测试
|
||||||
|
|
||||||
|
- **PC1 PING PC2**
|
||||||
|
|
||||||
|
```
|
||||||
|
PC1>ping 192.168.20.253
|
||||||
|
|
||||||
|
Ping 192.168.20.253: 32 data bytes, Press Ctrl_C to break
|
||||||
|
From 192.168.20.253: bytes=32 seq=1 ttl=127 time=109 ms
|
||||||
|
From 192.168.20.253: bytes=32 seq=2 ttl=127 time=78 ms
|
||||||
|
From 192.168.20.253: bytes=32 seq=3 ttl=127 time=79 ms
|
||||||
|
From 192.168.20.253: bytes=32 seq=4 ttl=127 time=78 ms
|
||||||
|
From 192.168.20.253: bytes=32 seq=5 ttl=127 time=78 ms
|
||||||
|
|
||||||
|
--- 192.168.20.253 ping statistics ---
|
||||||
|
5 packet(s) transmitted
|
||||||
|
5 packet(s) received
|
||||||
|
0.00% packet loss
|
||||||
|
round-trip min/avg/max = 78/84/109 ms
|
||||||
|
```
|
||||||
|
|
||||||
|
- **PC1 PING PC3**
|
||||||
|
|
||||||
|
```
|
||||||
|
PC1>ping 192.168.30.253
|
||||||
|
|
||||||
|
Ping 192.168.30.253: 32 data bytes, Press Ctrl_C to break
|
||||||
|
From 192.168.30.253: bytes=32 seq=1 ttl=127 time=94 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=2 ttl=127 time=78 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=3 ttl=127 time=79 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=4 ttl=127 time=93 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=5 ttl=127 time=94 ms
|
||||||
|
|
||||||
|
--- 192.168.30.253 ping statistics ---
|
||||||
|
5 packet(s) transmitted
|
||||||
|
5 packet(s) received
|
||||||
|
0.00% packet loss
|
||||||
|
round-trip min/avg/max = 78/87/94 ms
|
||||||
|
```
|
||||||
|
|
||||||
|
- **PC2 PING PC3**
|
||||||
|
|
||||||
|
```
|
||||||
|
PC2>ping 192.168.30.253
|
||||||
|
|
||||||
|
Ping 192.168.30.253: 32 data bytes, Press Ctrl_C to break
|
||||||
|
From 192.168.30.253: bytes=32 seq=1 ttl=127 time=94 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=2 ttl=127 time=78 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=3 ttl=127 time=94 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=4 ttl=127 time=78 ms
|
||||||
|
From 192.168.30.253: bytes=32 seq=5 ttl=127 time=78 ms
|
||||||
|
|
||||||
|
--- 192.168.30.253 ping statistics ---
|
||||||
|
5 packet(s) transmitted
|
||||||
|
5 packet(s) received
|
||||||
|
0.00% packet loss
|
||||||
|
round-trip min/avg/max = 78/84/94 ms
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user