2、交换机的配置<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
BJ-SR-ZHL-1
基本配置 |
VTP配置 |
en
config t
hostname BJ-SR-ZHL-1
enable secret 520
no ip domain-lookup
line vty 0 4
login
password 520
logg syn
exit
no ip http server
int range f0/2 -5
switchport trunk encapsulation dot1q
Switchport mode trunk
no sh
exit
int range f0/11 -17
switchport trunk encapsulation dot1q
Switchport mode trunk
no sh
exit |
vlan database
vtp domain zhl
vtp server
vtp v2-mode
vtp password 520
vtp pruning
exit
vlan database
vtp domain zhl
vtp server
vtp v2-mode
vtp password 520
vtp pruning
exit |
Ethernet Channel配置 |
启用路由功能 |
int range f0/2 -3
channel-group 1 mode on
no sh
exit |
ip routing
interface f0/1
no switchport
ip address 10.4.129.2 255.255.255.252
no sh |
IP配置 |
热备配置 |
interface vlan 1
ip address 10.4.131.1 255.255.255.0
ip helper-address 10.4.136.10
no sh
exit
interface vlan 2
ip address 10.4.132.2 255.255.255.0
ip helper-address 10.4.136.10
no sh
exit
interface vlan 3
ip address 10.4.133.1 255.255.255.0
ip helper-address 10.4.136.10
no sh
exit
interface vlan 4
ip address 10.4.134.2 255.255.255.0
ip helper-address 10.4.136.10
no sh
exit
interface vlan 5
ip address 10.4.135.1 255.255.255.0
no sh
exit
interface vlan 10
ip address 10.4.136.2 255.255.255.0
no sh
exit |
interface vlan 2
standby 20 ip 10.4.132.254
standby 20 priority 150
standby 20 preempt
exit
interface vlan 3
standby 30 ip 10.4.133.254
standby 30 priority 200
standby 30 preempt
standby 30 track f0/1 100
exit
interface vlan 4
standby 40 ip 10.4.134.254
standby 40 priority 150
standby 40 preempt
exit
interface vlan 5
standby 50 ip 10.4.135.254
standby 50 priority 200
standby 50 preempt
standby 50 track f0/1 100
exit
interface vlan 10
standby 60 ip 10.4.136.254
standby 60 priority 150
standby 60 preempt
exit |
STP配置 |
配置OSPF路由 |
spanning-tree vlan 1 priority 4096
spanning-tree vlan 3 priority 4096
spanning-tree vlan 5 priority 4096
spanning-tree vlan 2 root secondary
spanning-tree vlan 4 root secondary
spanning-tree vlan 10 root secondary
exit |
router ospf 40
network 10.4.129.0 0.0.0.3 area 0
network 10.4.132.0 0.0.0.255 area 0
network 10.4.133.0 0.0.0.255 area 0
network 10.4.134.0 0.0.0.255 area 0
network 10.4.135.0 0.0.0.255 area 0
network 10.4.136.0 0.0.0.255 area 0 |
转载于:https://blog.51cto.com/444513/163045