CCNP实验之STP_AdvSwitching
时隔一年,我又回来写lab实验文章啦~
今天想介绍下STP和高级交换相关的实验,包含拓扑和配置。
拓扑
实验要求
1. RT8 should establish OSPF neighbors with SW1 and SW2
- Use Lo0 address as OSPF router id
- OSPF process id: 10
- area: backbone
- RT8 should be always elected as DR
- Redistribute other routes into OSPF domain if needed
SW1, SW2:
-
Only VLAN 9 and default native VLAN are permitted on Gi0/0
-
Both switches should maintain an HSRP group, using version 2, and SW1 should be always the active node if possible.
-
If the uplink goes down, HSRP active node should switchover.
-
Optimize all interfaces using spanning-tree mode PVST
SW3:
- SW3 should be just an L2 switch, and optimize all interfaces using spanning-tree mode PVST.
- Default gateway for PC9 should be 10.9.9.1.
- In the end, PC9 should be able to communicate with 8.8.8.8.
配置命令
R8
hostname RT8
(略)
!
no ip domain lookup
!
interface Loopback0
ip address 8.8.8.8 255.255.255.255
!
interface GigabitEthernet1
ip address 10.1.8.254 255.255.255.0
ip ospf priority 255
ip ospf 10 area 0
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet2
ip address 10.2.8.254 255.255.255.0
ip ospf priority 255
ip ospf 10 area 0
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router ospf 10
router-id 8.8.8.8
redistribute connected subnets
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
(略)
!
end
RT8#
SW1
hostname SW1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
no ip domain-lookup
ip cef
no ipv6 cef
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
track 1 interface GigabitEthernet0/1 line-protocol
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
switchport trunk allowed vlan 1,9
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
spanning-tree portfast network
!
interface GigabitEthernet0/1
switchport access vlan 11
switchport mode access
media-type rj45
negotiation auto
spanning-tree portfast network
!
interface Vlan9
ip address 10.9.9.2 255.255.255.0
standby version 2
standby 1 ip 10.9.9.1
standby 1 priority 200
standby 1 preempt
standby 1 track 1 decrement 55
!
interface Vlan11
ip address 10.1.8.1 255.255.255.0
!
router ospf 10
router-id 1.1.1.1
redistribute connected subnets
network 10.1.8.1 0.0.0.0 area 0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
SW2
hostname SW2
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
no ip domain-lookup
ip cef
no ipv6 cef
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0
switchport trunk allowed vlan 1,9
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
spanning-tree portfast network
!
interface GigabitEthernet0/1
switchport access vlan 12
switchport mode access
media-type rj45
negotiation auto
spanning-tree portfast network
!
interface Vlan9
ip address 10.9.9.3 255.255.255.0
standby version 2
standby 1 ip 10.9.9.1
standby 1 preempt
!
interface Vlan12
ip address 10.2.8.1 255.255.255.0
!
router ospf 10
router-id 2.2.2.2
redistribute connected subnets
network 10.2.8.1 0.0.0.0 area 0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
SW3
hostname SW3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
no ip routing
!
no ip domain-lookup
no ip cef
no ipv6 cef
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport access vlan 9
switchport mode access
media-type rj45
negotiation auto
spanning-tree portfast edge
!
PC9
interface GigabitEthernet1
ip address 10.9.9.9 255.255.255.0
negotiation auto
no mop enabled
no mop sysid
!
ip route 0.0.0.0 0.0.0.0 10.9.9.1
写这个主要为了自己看着方便,毕竟虚拟机不使用了配置也消失了嘛。。。。
禁止转载,因为我不知道能不能转。嘻嘻。