Cấu hình Cơ bản
Cấu hình Cơ bản
--SWCORE-MAIN
en
conf t
hostname SW1
banner motd #This is SW1#
line con 0
pass cisco
logging sync
enable secret cisco
service pass
line vty 0 4
pass cisco
login
transport input ssh
login local
exit
ip domain-name group1.local
crypto key generate rsa
2048
ip ssh version 2
username cisco secret cisco
end
wr
--SWA
en
conf t
hostname SWA-7
banner motd #This is SWA-7#
line con 0
pass cisco
logging sync
enable secret cisco
service pass
line vty 0 4
pass cisco
login
transport input ssh
login local
exit
ip domain-name group1.local
crypto key generate rsa
2048
ip ssh version 2
username cisco secret cisco
end
wr
---Tat no ip cef
conf t
no ip cef
no ip routing
end
wr
-- SW MAIN
conf t
int range gi1/0-1
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 1 mode active
exit
int po1
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
int range gi1/2-3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 2 mode active
exit
int po2
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
int range gi2/0-1
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 3 mode active
exit
int po3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
int range gi2/2-3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 4 mode active
exit
int po4
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
end
wr
-- PortChannel SW ACCESS
conf t
int range gi0/0-1
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 1 mode active
exit
int po1
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
int range gi0/2-3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 2 mode active
exit
int po2
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
end
wr
int range e1/2-3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
channel-group 3 mode active
exit
int po3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk allowed vlan all
exit
end
wr
conf t
vtp version 2
vtp domain group1.local
vtp pass cisco
vtp mode server
end
wr
vlan 10
name MGMT
vlan 20
name ACCOUNTANT
vlan 30
name SALES
vlan 40
name HR
vlan 50
name MARKETING
vlan 60
name IT
vlan 70
name DIRECTOR
vlan 100
name FW
conf t
int vlan 70
ip add 10.1.7.1 255.255.255.0
no shut
standby 70 ip 10.1.7.254
standby 70 priority 110
standby 70 preempt
exit
int vlan 10
ip add 10.1.1.1 255.255.255.0
no shut
standby 10 ip 10.1.1.254
standby 10 priority 110
standby 10 preempt
exit
int vlan 20
ip add 10.1.2.1 255.255.255.0
no shut
standby 20 ip 10.1.2.254
standby 20 priority 110
standby 20 preempt
exit
int vlan 30
ip add 10.1.3.1 255.255.255.0
no shut
standby 30 ip 10.1.3.254
standby 30 priority 110
standby 30 preempt
exit
int vlan 40
ip add 10.1.4.1 255.255.255.0
no shut
standby 40 ip 10.1.4.254
standby 40 priority 110
standby 40 preempt
exit
int vlan 50
ip add 10.1.5.1 255.255.255.0
no shut
standby 50 ip 10.1.5.254
standby 50 priority 110
standby 50 preempt
exit
int vlan 60
ip add 10.1.6.1 255.255.255.0
no shut
standby 60 ip 10.1.6.254
standby 60 priority 110
standby 60 preempt
exit
int vlan 100
ip add 10.1.100.2 255.255.255.0
no shut
standby 100 ip 10.1.100.254
standby 100 priority 110
standby 100 preempt
exit
end
wr
conf t
int range gi0/0-1
switchport trunk encap dot1q
switchport mode trunk
switchport trunk native vlan 100
channel-group 5 mode on
no shut
int po5
switchport trunk encap dot1q
switchport mode trunk
switchport trunk native vlan 100
exit
int range gi0/2-3
switchport trunk encap dot1q
switchport mode trunk
switchport trunk native vlan 100
channel-group 6 mode on
no shut
int po6
switchport trunk encap dot1q
switchport mode trunk
switchport trunk native vlan 100
exit
end
wr
dot1x system-auth-control
radius server DC-SRV
address ipv4 10.1.7.200
key group1jetking