使用ensp设计一个千人校园网要有拓扑图和相关命令
时间: 2023-05-31 14:06:38 浏览: 279
拓扑图:
```
+-------------------+
| Core Switch |
+-------------------+
| |
| |
| |
+-----------------+ +-----------------+
| Access Switch 1 | | Access Switch 2 |
+-----------------+ +-----------------+
| | | |
| | | |
+------+ +------+ +------+ +------+
|Host 1| |Host 2| |Host 3| |Host 4|
+------+ +------+ +------+ +------+
. . . .
. . . .
. . . .
+------+ +------+ +------+ +------+
|Host 997| |Host 998| |Host 999| |Host 1000|
+------+ +------+ +------+ +------+
```
相关命令:
1. 配置 Core Switch
```
enable
configure terminal
hostname core-switch
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
interface GigabitEthernet0/1
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
ip routing
```
2. 配置 Access Switch 1
```
enable
configure terminal
hostname access-switch-1
interface GigabitEthernet0/0
switchport mode access
switchport access vlan 10
no shutdown
interface GigabitEthernet0/1
switchport mode trunk
no shutdown
exit
vlan 10
name user-vlan
exit
```
3. 配置 Access Switch 2
```
enable
configure terminal
hostname access-switch-2
interface GigabitEthernet0/0
switchport mode access
switchport access vlan 20
no shutdown
interface GigabitEthernet0/1
switchport mode trunk
no shutdown
exit
vlan 20
name user-vlan
exit
```
4. 配置 Host 1
```
ip address 192.168.1.2 255.255.255.0
default-gateway 192.168.1.1
```
5. 配置 Host 2
```
ip address 192.168.1.3 255.255.255.0
default-gateway 192.168.1.1
```
6. 配置 Host 3
```
ip address 192.168.1.4 255.255.255.0
default-gateway 192.168.1.1
```
7. 配置 Host 4
```
ip address 192.168.1.5 255.255.255.0
default-gateway 192.168.1.1
```
8. 配置 Host 997
```
ip address 192.168.2.2 255.255.255.0
default-gateway 192.168.2.1
```
9. 配置 Host 998
```
ip address 192.168.2.3 255.255.255.0
default-gateway 192.168.2.1
```
10. 配置 Host 999
```
ip address 192.168.2.4 255.255.255.0
default-gateway 192.168.2.1
```
11. 配置 Host 1000
```
ip address 192.168.2.5 255.255.255.0
default-gateway 192.168.2.1
```
阅读全文