使用ENSP完成需求1: SW1-SW2-SW3 接口采用access/trunk方式配置 SW4-SW5-SW6 接口采用hybrid方式配置 需求2: SW1作为PC1/打印机1的网关 配置接口地址模式 SW4作为PC3/打印机2的网关 配置全局地址模式 vlanif 10 192.168.1.254/24 vlanif 20 192.168.2.254/24 vlanif 100 10.1.11.1/24 vlanif 30 192.168.3.254/24 vlanif 40 192.168.4.254/24 vlanif 101 10.1.24.1/24 需求3: SW1/SW4写默认路由指向AR1/AR2 AR1汇总192.168.1.0/2.0 路由 精确汇总指向SW1 AR2汇总192.168.3.0/4.0 路由 精确汇总指向SW4 需求4: AR1/AR2之间跑OSPF 区域0 引入静态路由 参考命令: ospf 1 import static
时间: 2024-01-05 07:02:55 浏览: 136
好的,以下是使用ENSP完成上述需求的详细步骤:
1. 配置SW1-SW2-SW3的接口采用access/trunk方式,SW4-SW5-SW6的接口采用hybrid方式:
- SW1:
```
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 30 40 100
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
```
- SW2:
```
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
```
- SW3:
```
interface GigabitEthernet0/0/1
port link-type access
port default vlan 40
interface GigabitEthernet0/0/2
port link-type access
port default vlan 100
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
```
- SW4:
```
interface GigabitEthernet0/0/1
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 10 untagged
interface GigabitEthernet0/0/2
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 20 untagged
interface GigabitEthernet0/0/3
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 30 untagged
```
- SW5:
```
interface GigabitEthernet0/0/1
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 10 untagged
interface GigabitEthernet0/0/2
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 20 untagged
interface GigabitEthernet0/0/3
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 30 untagged
```
- SW6:
```
interface GigabitEthernet0/0/1
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 40 untagged
interface GigabitEthernet0/0/2
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 100 untagged
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
```
2. 配置VLAN接口地址模式:
- SW1:
```
vlan batch 10 20 30 40 100
interface Vlanif10
ip address 192.168.1.254 255.255.255.0
interface Vlanif20
ip address 192.168.2.254 255.255.255.0
interface Vlanif100
ip address 10.1.11.1 255.255.255.0
```
- SW4:
```
vlan batch 10 20 30 40 101
interface Vlanif30
ip address 192.168.3.254 255.255.255.0
interface Vlanif40
ip address 192.168.4.254 255.255.255.0
interface Vlanif101
ip address 10.1.24.1 255.255.255.0
```
3. 配置默认路由:
- SW1:
```
ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
```
- SW4:
```
ip route-static 0.0.0.0 0.0.0.0 192.168.3.1
```
4. 配置AR1/AR2之间跑OSPF区域0引入静态路由:
- AR1:
```
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
ospf 1 area 0
interface GigabitEthernet0/0/2
ip address 192.168.2.1 255.255.255.0
ospf 1 area 0
ospf 1
import-route static
network 192.168.1.0 0.0.1.255 area 0
```
- AR2:
```
interface GigabitEthernet0/0/1
ip address 192.168.3.1 255.255.255.0
ospf 1 area 0
interface GigabitEthernet0/0/2
ip address 192.168.4.1 255.255.255.0
ospf 1 area 0
ospf 1
import-route static
network 192.168.3.0 0.0.1.255 area 0
```
以上是使用ENSP完成上述需求的详细步骤,希望能对你有所帮助。如果你有其他问题,可以随时问我。
阅读全文