1、mstp+vrrp+ospf+策略路由实验hostname s1!route-map ruijie permit 10 match ip address 10 set ip next-hop 192.168.100.4!route-map ruijie permit 20 match ip address 20 set ip next-hop 192.168.100.5!vlan 1!vlan 10!vlan 20vlan 100!ip access-list standard 10 10 permit 192.168.10.0 0.0.0.255 !ip access-list standa
2、rd 20 10 permit 192.168.20.0 0.0.0.255 !spanning-treespanning-tree mst configuration instance 0 vlan 1-9, 11-19, 21-4094 instance 10 vlan 10 instance 20 vlan 20spanning-tree mst 10 priority 4096spanning-tree mst 20 priority 8192interface FastEthernet 0/1 switchport access vlan 100!interface FastEthe
3、rnet 0/2 switchport access vlan 100!interface FastEthernet 0/3!interface FastEthernet 0/4interface FastEthernet 0/5!interface FastEthernet 0/6!interface FastEthernet 0/7!interface FastEthernet 0/8!interface FastEthernet 0/9!interface FastEthernet 0/10 port-group 1!interface FastEthernet 0/11 port-gr
4、oup 1!interface FastEthernet 0/12!interface FastEthernet 0/13!interface FastEthernet 0/14!interface FastEthernet 0/15interface FastEthernet 0/16!interface FastEthernet 0/17!interface FastEthernet 0/18!interface FastEthernet 0/19!interface FastEthernet 0/20!interface FastEthernet 0/21!interface FastE
5、thernet 0/22!interface FastEthernet 0/23!interface FastEthernet 0/24 switchport mode trunk!interface GigabitEthernet 0/25!interface GigabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface AggregatePort 1 switchport mode trunk!interface VLAN 10 no ip proxy-arp ip
6、address 192.168.10.252 255.255.255.0 vrrp 10 priority 120 vrrp 10 ip 192.168.10.254!interface VLAN 20 no ip proxy-arp ip address 192.168.20.252 255.255.255.0 vrrp 20 ip 192.168.20.254!interface VLAN 100 ip policy route-map ruijie no ip proxy-arp ip address 192.168.100.1 255.255.255.0!router ospf 1 n
7、etwork 192.168.10.0 0.0.0.255 area 0 network 192.168.20.0 0.0.0.255 area 0 network 192.168.100.0 0.0.0.255 area 0!line con 0line vty 0 4 login!end!hostname s2!route-map ruijie permit 10 match ip address 10 set ip next-hop 192.168.101.5!route-map ruijie permit 20 match ip address 20 set ip next-hop 1
8、92.168.101.4!vlan 1!vlan 10!vlan 20vlan 100!vlan 101!no service password-encryption!ip access-list standard 10 10 permit 192.168.10.0 0.0.0.255 !ip access-list standard 20 10 permit 192.168.20.0 0.0.0.255 !spanning-treespanning-tree mst configuration instance 0 vlan 1-9, 11-19, 21-4094 instance 10 v
9、lan 10 instance 20 vlan 20spanning-tree mst 10 priority 8192spanning-tree mst 20 priority 4096interface FastEthernet 0/1 switchport access vlan 101!interface FastEthernet 0/2 switchport access vlan 101!interface FastEthernet 0/3interface FastEthernet 0/4!interface FastEthernet 0/5!interface FastEthe
10、rnet 0/6!interface FastEthernet 0/7!interface FastEthernet 0/8!interface FastEthernet 0/9!interface FastEthernet 0/10 port-group 1!interface FastEthernet 0/11 port-group 1!interface FastEthernet 0/12!interface FastEthernet 0/13!interface FastEthernet 0/14interface FastEthernet 0/15!interface FastEth
11、ernet 0/16!interface FastEthernet 0/17!interface FastEthernet 0/18!interface FastEthernet 0/19!interface FastEthernet 0/20!interface FastEthernet 0/21!interface FastEthernet 0/22!interface FastEthernet 0/23!interface FastEthernet 0/24 switchport mode trunk!interface GigabitEthernet 0/25!interface Gi
12、gabitEthernet 0/26!interface GigabitEthernet 0/27!interface GigabitEthernet 0/28!interface AggregatePort 1 switchport mode trunk!interface VLAN 10 no ip proxy-arp ip address 192.168.10.253 255.255.255.0 vrrp 10 ip 192.168.10.254!interface VLAN 20 no ip proxy-arp ip address 192.168.20.253 255.255.255
13、.0 vrrp 20 priority 120 vrrp 20 ip 192.168.20.254!interface VLAN 100 no ip proxy-arp shutdown!interface VLAN 101 ip policy route-map ruijie no ip proxy-arp ip address 192.168.101.1 255.255.255.0!router ospf 1 network 192.168.10.0 0.0.0.255 area 0 network 192.168.20.0 0.0.0.255 area 0 network 192.168
14、.101.0 0.0.0.255 area 0!line con 0line vty 0 4 login!endhostname s3!vlan 1!vlan 10!vlan 20!spanning-treespanning-tree mst configuration instance 0 vlan 1-9, 11-19, 21-4094 instance 10 vlan 10 instance 20 vlan 20interface FastEthernet 0/1 switchport access vlan 10!interface FastEthernet 0/2 switchpor
15、t access vlan 10!interface FastEthernet 0/3 switchport access vlan 10!interface FastEthernet 0/4 switchport access vlan 10!interface FastEthernet 0/5 switchport access vlan 10!interface FastEthernet 0/6 switchport access vlan 10!interface FastEthernet 0/7switchport access vlan 10!interface FastEther
16、net 0/8 switchport access vlan 10!interface FastEthernet 0/9 switchport access vlan 10!interface FastEthernet 0/10 switchport access vlan 10!interface FastEthernet 0/11 switchport access vlan 20!interface FastEthernet 0/12 switchport access vlan 20!interface FastEthernet 0/13 switchport access vlan
17、20!interface FastEthernet 0/14 switchport access vlan 20!interface FastEthernet 0/15switchport access vlan 20!interface FastEthernet 0/16 switchport access vlan 20!interface FastEthernet 0/17 switchport access vlan 20!interface FastEthernet 0/18 switchport access vlan 20!interface FastEthernet 0/19
18、switchport access vlan 20!interface FastEthernet 0/20 switchport access vlan 20!interface FastEthernet 0/21!interface FastEthernet 0/22!interface FastEthernet 0/23 switchport mode trunk!interface FastEthernet 0/24 switchport mode trunk!hostname R1!interface FastEthernet 0/0 ip address 192.168.100.2
19、255.255.255.0 vrrp 1 priority 120 vrrp 1 ip 192.168.100.4 vrrp 2 ip 192.168.100.5 duplex auto speed auto!interface FastEthernet 0/1 ip address 192.168.101.2 255.255.255.0vrrp 1 ip 192.168.101.4 vrrp 2 priority 120 vrrp 2 ip 192.168.101.5 duplex auto speed auto!interface FastEthernet 0/2 ip address 1
20、.1.1.1 255.255.255.0 duplex auto speed auto!router ospf 1 network 1.1.1.0 0.0.0.255 area 0 network 192.168.100.0 0.0.0.255 area 0 network 192.168.101.0 0.0.0.255 area 0!ref parameter 50 400!endR1#hostname R2!interface FastEthernet 0/0 ip address 192.168.101.3 255.255.255.0 vrrp 1 priority 120 vrrp 1
21、 ip 192.168.101.4 vrrp 2 ip 192.168.101.5 duplex auto speed auto!interface FastEthernet 0/1 ip address 192.168.100.3 255.255.255.0 vrrp 1 ip 192.168.100.4vrrp 2 priority 120 vrrp 2 ip 192.168.100.5 duplex auto speed auto!interface FastEthernet 0/2 ip address 1.1.1.1 255.255.255.0 duplex auto speed auto!router ospf 1 network 1.1.1.0 0.0.0.255 area 0 network 192.168.100.0 0.0.0.255 area 0 network 192.168.101.0 0.0.0.255 area 0!ref parameter 50 400line con 0 line aux 0line vty 0 4 login!endR2#
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1