用ensp帮我设计一个拓扑图并写出配置命令,要求2台路由器2台三层交换机6台终端分别对应一个网段,这6台终端能够互通
时间: 2023-04-12 11:00:43 浏览: 209
一个路由器和三个交换机拓扑图.doc
好的,以下是拓扑图和配置命令:
拓扑图:
```
+-----------+
| Router1 |
+-----------+
|
|
+-----------+
| Switch1 |
+-----------+
| |
| |
+-----+-----+ +-----+-----+
| | | |
| Host1 | | Host2 |
| | | |
+-----+-----+ +-----+-----+
| |
| |
+-----------+
| Switch2 |
+-----------+
| |
| |
+-----+-----+ +-----+-----+
| | | |
| Host3 | | Host4 |
| | | |
+-----+-----+ +-----+-----+
|
|
+-----------+
| Router2 |
+-----------+
```
配置命令:
```
Router1(config)# interface GigabitEthernet0/0
Router1(config-if)# ip address 192.168.1.1 255.255.255.0
Router1(config-if)# no shutdown
Router1(config)# interface GigabitEthernet0/1
Router1(config-if)# ip address 10.0.0.1 255.255.255.0
Router1(config-if)# no shutdown
Router1(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2
Router2(config)# interface GigabitEthernet0/0
Router2(config-if)# ip address 192.168.2.1 255.255.255.0
Router2(config-if)# no shutdown
Router2(config)# interface GigabitEthernet0/1
Router2(config-if)# ip address 10.0.0.2 255.255.255.0
Router2(config-if)# no shutdown
Router2(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.1
Switch1(config)# vlan 10
Switch1(config-vlan)# name VLAN10
Switch1(config-vlan)# exit
Switch1(config)# vlan 20
Switch1(config-vlan)# name VLAN20
Switch1(config-vlan)# exit
Switch1(config)# interface GigabitEthernet0/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# exit
Switch1(config)# interface GigabitEthernet0/2
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# exit
Switch1(config)# interface GigabitEthernet0/3
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 20
Switch1(config-if)# exit
Switch1(config)# interface GigabitEthernet0/4
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 20
Switch1(config-if)# exit
Switch1(config)# interface GigabitEthernet0/5
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 20
Switch1(config-if)# exit
Switch2(config)# vlan 30
Switch2(config-vlan)# name VLAN30
Switch2(config-vlan)# exit
Switch2(config)# vlan 40
Switch2(config-vlan)# name VLAN40
Switch2(config-vlan)# exit
Switch2(config)# interface GigabitEthernet0/1
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 30
Switch2(config-if)# exit
Switch2(config)# interface GigabitEthernet0/2
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 30
Switch2(config-if)# exit
Switch2(config)# interface GigabitEthernet0/3
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 40
Switch2(config-if)# exit
Switch2(config)# interface GigabitEthernet0/4
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 40
Switch2(config-if)# exit
Switch2(config)# interface GigabitEthernet0/5
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 40
Switch2(config-if)# exit
Host1(config)# interface GigabitEthernet0/0
Host1(config-if)# ip address 192.168.1.2 255.255.255.0
Host1(config-if)# no shutdown
Host2(config)# interface GigabitEthernet0/0
Host2(config-if)# ip address 192.168.1.3 255.255.255.0
Host2(config-if)# no shutdown
Host3(config)# interface GigabitEthernet0/0
Host3(config-if)# ip address 192.168.2.2 255.255.255.0
Host3(config-if)# no shutdown
Host4(config)# interface GigabitEthernet0/0
Host4(config-if)# ip address 192.168.2.3 255.255.255.0
Host4(config-if)# no shutdown
```
阅读全文