Cấu hình Core Switch Layer 3 Cisco

Tác giả CCNACCNP, T.Tư 01, 2019, 04:31:23 CHIỀU

« Chủ đề trước - Chủ đề tiếp »

0 Thành viên và 1 Khách đang xem chủ đề.

Cấu hình Core Switch Layer 3 Cisco



hostname CoreSW

Mã nguồn [Chọn]
interface Port-channel1
 description Team port for Firewall
 no switchport
 ip address 10.20.10.254 255.255.255.0
!
Mã nguồn [Chọn]
interface Port-channel2
 description Team port Hyper-V 01
 switchport mode trunk
!
Mã nguồn [Chọn]
interface Port-channel3
 description Team port for Database
 switchport access vlan 2
!
Mã nguồn [Chọn]
interface Port-channel4
 description Team port for Backup Server
 switchport access vlan 2
!
Mã nguồn [Chọn]
interface Port-channel5
 description Team port for POS Server
 switchport access vlan 2
!
Mã nguồn [Chọn]
interface Port-channel6
 description Team port for Application
 switchport access vlan 2
!
Mã nguồn [Chọn]
interface Port-channel7
 description Team port for Tesr/Dev Server
 switchport access vlan 2
!
Mã nguồn [Chọn]
interface Port-channel8
 description Team port for Hyper-v 02
 switchport mode trunk
!
Mã nguồn [Chọn]
interface GigabitEthernet0/0
 vrf forwarding Mgmt-vrf
 no ip address
 negotiation auto
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/1
 no switchport
 no ip address
 channel-protocol lacp
 channel-group 1 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/2
 description port ILO for Database
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/3
 description Port For ILO port Hyper-V 01
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/4
 switchport access vlan 2
 channel-protocol lacp
 channel-group 3 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/5
 switchport mode trunk
 channel-protocol lacp
 channel-group 2 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/6
 description port ILO for Backup Server
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/7
 switchport mode trunk
 channel-protocol lacp
 channel-group 2 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/8
 switchport access vlan 2
 channel-protocol lacp
 channel-group 4 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/9
 description Team port for Hyper-V 02
 switchport mode trunk
 channel-protocol lacp
 channel-group 8 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/10
 description port ILO for POS Server
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/11
 description Team port for Hyper-V 02
 switchport mode trunk
 channel-protocol lacp
 channel-group 8 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/12
 switchport access vlan 2
 channel-protocol lacp
 channel-group 5 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/13
 description port ILO for Test/Dev Server
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/14
 description port ILO for Application Server
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/15
 switchport access vlan 2
 channel-protocol lacp
 channel-group 7 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/16
 switchport access vlan 2
 channel-protocol lacp
 channel-group 6 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/17
 description Port for Swtich USER
 switchport access vlan 3
 spanning-tree portfast
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/18
 description port ILO for SAN
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/19
 description Port Cho Phan Mem Ban Hang cu
 switchport access vlan 2
 switchport mode access
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/20
 description port Management for TAPE
 switchport access vlan 4
 switchport mode access
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/21
 description Port cho POS cu
 switchport access vlan 3
 switchport mode access
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/22
 switchport access vlan 5
 switchport mode access
!
Mã nguồn [Chọn]
interface GigabitEthernet1/0/23
 switchport access vlan 3
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/1
 no switchport
 no ip address
 channel-protocol lacp
 channel-group 1 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/2
 switchport access vlan 2
 channel-protocol lacp
 channel-group 3 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/3
 description Port For ILO port Hyper-V 02
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/4
 switchport access vlan 2
 channel-protocol lacp
 channel-group 3 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/5
 switchport mode trunk
 channel-protocol lacp
 channel-group 2 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/6
 switchport access vlan 2
 channel-protocol lacp
 channel-group 4 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/7
 switchport mode trunk
 channel-protocol lacp
 channel-group 2 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/8
 switchport access vlan 2
 channel-protocol lacp
 channel-group 4 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/9
 description Team port for Hyper-V 02
 switchport mode trunk
 channel-protocol lacp
 channel-group 8 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/10
 switchport access vlan 2
 channel-protocol lacp
 channel-group 5 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/11
 description Team port for Hyper-V 02
 switchport mode trunk
 channel-protocol lacp
 channel-group 8 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/12
 switchport access vlan 2
 channel-protocol lacp
 channel-group 5 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/13
 switchport access vlan 2
 channel-protocol lacp
 channel-group 7 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/14
 switchport access vlan 2
 channel-protocol lacp
 channel-group 6 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/15
 switchport access vlan 2
 channel-protocol lacp
 channel-group 7 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/16
 switchport access vlan 2
 channel-protocol lacp
 channel-group 6 mode active
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/18
 description Port ILO for SAN
 switchport access vlan 4
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/19
 switchport access vlan 2
 switchport mode access
!
Mã nguồn [Chọn]
interface GigabitEthernet2/0/22
 switchport access vlan 2
 switchport mode access
!
Mã nguồn [Chọn]
interface Vlan1
 ip address 172.16.1.254 255.255.255.0
!
Mã nguồn [Chọn]
interface Vlan2
 ip address 172.16.2.254 255.255.255.0
!
Mã nguồn [Chọn]
interface Vlan3
 ip address 172.16.3.254 255.255.255.0
 ip helper-address 172.16.1.1
 ip helper-address 172.16.1.2
 ip helper-address 192.168.1.1
!
Mã nguồn [Chọn]
interface Vlan4
 ip address 172.16.4.254 255.255.255.0
!
Mã nguồn [Chọn]
interface Vlan5
 ip address 172.16.5.254 255.255.255.0
!
Mã nguồn [Chọn]
no ip https server
ip https secure-server
ip route 0.0.0.0 0.0.0.0 10.20.10.1
ip route 10.0.0.0 255.0.0.0 10.20.10.1
ip route 192.168.1.0 255.255.255.0 10.20.10.1
!
Mã nguồn [Chọn]
ip access-list extended Vlan_user
 permit ip 172.16.3.0 0.0.0.255 172.16.3.0 0.0.0.255
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.1
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.2
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.14
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.15
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.16
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.11
 permit ip 172.16.3.0 0.0.0.255 host 172.16.1.12
 permit ip 172.16.3.0 0.0.0.255 host 172.16.2.11
 permit ip 172.16.3.0 0.0.0.255 host 172.16.2.12
 permit ip 172.16.3.0 0.0.0.255 host 172.16.2.13
 permit ip 172.16.3.0 0.0.0.255 host 172.16.2.14
 permit ip 172.16.3.0 0.0.0.255 host 172.16.2.15
 permit ip 172.16.3.0 0.0.0.255 172.16.4.0 0.0.0.255
 permit ip 172.16.3.0 0.0.0.255 10.0.0.0 0.255.255.255
 permit ip 172.16.3.0 0.0.0.255 192.168.1.0 0.0.0.255
 deny   ip 172.16.3.0 0.0.0.255 172.16.1.0 0.0.0.255
 deny   ip 172.16.3.0 0.0.0.255 172.16.2.0 0.0.0.255
 permit ip any any
!
Mã nguồn [Chọn]
!
snmp-server community public RO
snmp-server host 172.16.1.5 version 2c public
!
!
line con 0
 exec-timeout 0 0
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
 password 7 01232617481C561D256D62
 login
line vty 5 15
 login
!
Mã nguồn [Chọn]
wsma agent exec
 profile httpslistener
 profile httpsslistener
wsma agent config
 profile httpslistener
 profile httpsslistener
wsma agent filesys
 profile httpslistener
 profile httpsslistener
wsma agent notify
 profile httpslistener
 profile httpsslistener
!
Mã nguồn [Chọn]
wsma profile listener httpslistener
 transport https
!
Mã nguồn [Chọn]
wsma profile listener httpsslistener
 transport httpss
ap dot11 24ghz rrm channel dca 1
ap dot11 24ghz rrm channel dca 6
ap dot11 24ghz rrm channel dca 11
ap dot11 5ghz rrm channel dca 36
ap dot11 5ghz rrm channel dca 40
ap dot11 5ghz rrm channel dca 44
ap dot11 5ghz rrm channel dca 48
ap dot11 5ghz rrm channel dca 52
ap dot11 5ghz rrm channel dca 56
ap dot11 5ghz rrm channel dca 60
ap dot11 5ghz rrm channel dca 64
ap dot11 5ghz rrm channel dca 149
ap dot11 5ghz rrm channel dca 153
ap dot11 5ghz rrm channel dca 157
ap dot11 5ghz rrm channel dca 161
ap group default-group

access-list 101  permit ip host 192.168.5.1 host 192.168.6.1

access-list 101  deny ip host 192.168.5.1 192.168.6.0 0.0.0.255

access-list 101 permit ip any any for all the other hosts on the 192.168.5.x network

int vlan 10 this is the vlan for the 192.168.5.0/24 network

ip access-group 101 in