赞
踩
- vlan batch 10 20 //可以通过vlan batch 10 20 直接创建多个Vlan
-
- interface Ethernet0/0/1
- port link-type access
- port default vlan 10
- stp edged-port enable
-
-
- interface Ethernet0/0/2
- port link-type access
- port default vlan 20
- stp edged-port enable
-
- interface GigabitEthernet0/0/1
- port link-type trunk
- port trunk allow-pass vlan 10 20
-
- interface GigabitEthernet0/0/2
- port link-type trunk
- port trunk allow-pass vlan 10 20
-
-
-
- stp bpdu-protection//注意不是在接口下

- stp mode mstp
-
- stp region-configuration
- region-name NP
- revision-level 1
- instance 10 vlan 10
- instance 20 vlan 20
- active region-configuration
- vlan batch 10 15 20 25
-
- interface GigabitEthernet0/0/3
- port link-type trunk
- port trunk allow-pass vlan 10 20
-
- interface GigabitEthernet0/0/4
- port link-type trunk
- port trunk allow-pass vlan 10 20
-
- interface GigabitEthernet0/0/5
- port link-type access
- port default vlan 15
- stp disable
-
-
- interface Vlanif15
- ip address 172.16.15.100 255.255.255.0

- interface Eth-Trunk12
- port link-type trunk
- port trunk allow-pass vlan 10 20
-
-
- interface GigabitEthernet0/0/1
- eth-trunk 12
-
- interface GigabitEthernet0/0/2
- eth-trunk 12
- stp mode mstp
-
- stp region-configuration
- region-name NP
- revision-level 1
- instance 10 vlan 10
- instance 20 vlan 20
- active region-configuration
- stp instance 10 root primary
- stp instance 20 root secondary
- interface Vlanif10
- ip address 172.16.10.100 255.255.255.0
- vrrp vrid 10 virtual-ip 172.16.10.254
- vrrp vrid 10 priority 105
- vrrp vrid 10 track interface GigabitEthernet0/0/5
- dhcp select relay //DHCP relay中继
- dhcp relay server-ip 172.16.15.254
-
- interface Vlanif20
- ip address 172.16.20.101 255.255.255.0
- vrrp vrid 20 virtual-ip 172.16.20.254
- dhcp select relay //DHCP relay中继
- dhcp relay server-ip 172.16.15.254
- ospf 10 router-id 1.1.1.1
- area 0.0.0.0
- network 172.16.10.0 0.0.0.255
- network 172.16.15.0 0.0.0.255
- network 172.16.20.0 0.0.0.255
- vlan batch 15 25
-
- interface GigabitEthernet0/0/1
- port link-type access
- port default vlan 15
- stp disable //关闭stp
-
-
- interface GigabitEthernet0/0/2
- port link-type access
- port default vlan 25
- stp disable //关闭stp
-
- 创建一个环回口
- int Loopback 0
- ip address 5.5.5.5 24
-
-
-
- interface Vlanif15
- ip address 172.16.15.254 255.255.255.0
- dhcp select global //开启全局地址池
-
- interface Vlanif25
- ip address 172.16.25.254 255.255.255.0
- dhcp select global //开启全局地址池
-

- ip pool 10
- gateway-list 172.16.10.254
- network 172.16.10.0 mask 255.255.255.0
- dns-list 114.114.114.114
- #
- ip pool 20
- gateway-list 172.16.20.254
- network 172.16.20.0 mask 255.255.255.0
- dns-list 114.114.114.114
- ospf 10 router-id 5.5.5.5
- area 0.0.0.0
- network 172.16.15.0 0.0.0.255
- network 172.16.25.0 0.0.0.255
- network 172.16.51.100 0.0.0.0
- network 5.5.5.5 0.0.0.0 //宣告环回口
此时PC1数据走的是SW2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。