首页 > 代码库 > vrrp+stp+静态

vrrp+stp+静态

技术分享技术分享

#

sysname jieru

#

vlan batch 2 to 3

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password simple admin

 local-user admin service-type http

#

interface Vlanif1

#

interface MEth0/0/1

#

interface Ethernet0/0/1                    思科:switchportmode access 端口模式设置为access

 portlink-type access

 portdefault vlan 2                                      switchportaccess vlan   端口加入VLAN

#

interface Ethernet0/0/2

 portlink-type access

 portdefault vlan 3

#

interface Ethernet0/0/3

#

interface Ethernet0/0/4

#

interface Ethernet0/0/5

#

interface Ethernet0/0/6

#

interface Ethernet0/0/7

#

interface Ethernet0/0/8

#

interface Ethernet0/0/9

#

interface Ethernet0/0/10

#

interface Ethernet0/0/11

#

interface Ethernet0/0/12

#

interface Ethernet0/0/13

#

interface Ethernet0/0/14

#

interface Ethernet0/0/15

#

interface Ethernet0/0/16

#

interface Ethernet0/0/17

#

interface Ethernet0/0/18

#

interface Ethernet0/0/19

#

interface Ethernet0/0/20

#

interface Ethernet0/0/21

 portlink-type trunk                                    思科:switchportmode trunk端口模式设置为trunk

 porttrunk allow-pass vlan 2 to 4094  switchporttrunk allowed vlan all  vlan修剪

#

interface Ethernet0/0/22

 portlink-type trunk

 porttrunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

user-interface con 0

user-interface vty 0 4

#

Return

 

#

sysname huiju1

#

vlan batch 2 to 3 5

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password simple admin

 local-user admin service-type http

#

interface Vlanif1

#

interface Vlanif2

 ipaddress 192.168.2.254 255.255.255.0     

 vrrpvrid 1 virtual-ip 192.168.2.252     vrrp1 ip 地址 vrrp虚拟网关

#

interface Vlanif3

 ipaddress 192.168.3.254 255.255.255.0

 vrrpvrid 2 virtual-ip 192.168.3.252

#

interface Vlanif5

 ipaddress 192.168.1.1 255.255.255.252

#

interface MEth0/0/1

#

interface Eth-Trunk1

 portlink-type trunk

 porttrunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/1

 portlink-type access

 portdefault vlan 5

#

interface GigabitEthernet0/0/2

#

interface GigabitEthernet0/0/3

#

interface GigabitEthernet0/0/4

#

interface GigabitEthernet0/0/5

#

interface GigabitEthernet0/0/6

#

interface GigabitEthernet0/0/7

#

interface GigabitEthernet0/0/8

#

interface GigabitEthernet0/0/9

#

interface GigabitEthernet0/0/10

#

interface GigabitEthernet0/0/11

#

interface GigabitEthernet0/0/12

#

interface GigabitEthernet0/0/13

#

interface GigabitEthernet0/0/14

#

interface GigabitEthernet0/0/15

#

interface GigabitEthernet0/0/16

#

interface GigabitEthernet0/0/17

#

interface GigabitEthernet0/0/18

#

interface GigabitEthernet0/0/19

#

interface GigabitEthernet0/0/20

#

interface GigabitEthernet0/0/21

#

interface GigabitEthernet0/0/22

 portlink-type trunk

 porttrunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/23

 eth-trunk 1

#

interface GigabitEthernet0/0/24

 eth-trunk 1

#

interface NULL0

#

ip route-static 192.168.4.0 255.255.255.0192.168.1.2

#

user-interface con 0

user-interface vty 0 4

#

Return

 

#

sysname huiju2

#

vlan batch 2 to 3 5

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

aaa

 authentication-scheme default

 authorization-schemedefault

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password simple admin

 local-user admin service-type http

#

interface Vlanif1

#

interface Vlanif2

 ipaddress 192.168.2.253 255.255.255.0

 vrrpvrid 1 virtual-ip 192.168.2.252

#

interface Vlanif3

 ipaddress 192.168.3.253 255.255.255.0

 vrrpvrid 2 virtual-ip 192.168.3.252

#

interface Vlanif5

 ipaddress 192.168.1.5 255.255.255.252

#

interface MEth0/0/1

#

interface Eth-Trunk1

 portlink-type trunk

 porttrunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/1

 portlink-type access

 portdefault vlan 5

#

interface GigabitEthernet0/0/2

#

interface GigabitEthernet0/0/3

#

interface GigabitEthernet0/0/4

#

interface GigabitEthernet0/0/5

#

interface GigabitEthernet0/0/6

#

interface GigabitEthernet0/0/7

#

interface GigabitEthernet0/0/8

#

interface GigabitEthernet0/0/9

#

interface GigabitEthernet0/0/10

#

interface GigabitEthernet0/0/11

#

interface GigabitEthernet0/0/12

#

interface GigabitEthernet0/0/13

#

interface GigabitEthernet0/0/14

#

interface GigabitEthernet0/0/15

#

interface GigabitEthernet0/0/16

#

interface GigabitEthernet0/0/17

#

interface GigabitEthernet0/0/18

#

interface GigabitEthernet0/0/19

#

interface GigabitEthernet0/0/20

#

interface GigabitEthernet0/0/21

#

interface GigabitEthernet0/0/22

 portlink-type trunk

 porttrunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/23

 eth-trunk 1

#

interface GigabitEthernet0/0/24

 eth-trunk 1

#

interface NULL0

#

ip route-static 192.168.4.0 255.255.255.0192.168.1.6

#

user-interface con 0

user-interface vty 0 4

#

Return

 

[V200R003C00]

#

 sysname route

#

 snmp-agent local-engineid800007DB03000000000000

 snmp-agent

#

 clock timezone China-Standard-Time minus08:00:00

#

portal local-server load portalpage.zip

#

 dropillegal-mac alarm

#

vlan batch 2

#

 setcpu-usage threshold 80 restore 75

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password cipher%$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

 local-user admin service-type http

#

firewall zone Local

 priority 15

#

interface Vlanif2

 ipaddress 192.168.4.254 255.255.255.0

#

interface Ethernet0/0/0

 portlink-type access

 portdefault vlan 2

#

interface Ethernet0/0/1

#

interface Ethernet0/0/2

#

interface Ethernet0/0/3

#

interface Ethernet0/0/4

#

interface Ethernet0/0/5

#

interface Ethernet0/0/6

#

interface Ethernet0/0/7

#

interface GigabitEthernet0/0/0

 ipaddress 192.168.1.2 255.255.255.252

#

interface GigabitEthernet0/0/1

 ipaddress 192.168.1.6 255.255.255.252

#

interface NULL0

#

ip route-static 192.168.2.0 255.255.255.0192.168.1.1

ip route-static 192.168.2.0 255.255.255.0192.168.1.5

ip route-static 192.168.3.0 255.255.255.0192.168.1.1

ip route-static 192.168.3.0 255.255.255.0192.168.1.5

#

user-interface con 0

 authentication-mode password

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return


本文出自 “一步” 博客,请务必保留此出处http://onestep.blog.51cto.com/10836851/1899212

vrrp+stp+静态