Sunteți pe pagina 1din 8

Perform basic switch configurations

***********************************
***SW_DS1***
!
hostname SW_DS1
no ip domain-lookup
ip default-gateway 172.16.43.1
enable secret class
banner motd &Authorized access only!&
!
line console 0
exec-timeout 60
password cisco
logging synchronous
login
!
line vty 0 15
password cisco
login
exit
!
***SW_AC2***
!
hostname SW_AC2
no ip domain-lookup
enable secret class
banner motd &Authorized access only!&
!
line console 0
exec-timeout 60
password cisco
logging synchronous
login
!
line vty 0 15
password cisco
login
exit
!
***SW_AC3***
!
hostname SW_AC3
no ip domain-lookup
enable secret class
banner motd &Authorized access only!&
!
line console 0
exec-timeout 60
password cisco
logging synchronous
login
!
line vty 0 15
password cisco
login
exit
!
Set VTP mode and create VLANs
*****************************
***SW_DS1, SW_AC2, SW_AC3***
!
vlan 43
exit
!
Configure switch port interfaces on S1, S2, and S3
**************************************************
***SW_DS1, SW_AC2, SW_AC3***
!
interface range fa0/19-24
switchport mode trunk
switchport trunk native vlan 43
no shutdown
exit
!
Configure VTP and VLANs
***********************
***SW_DS1***
!
vtp mode server
vtp domain CCNA
vtp password cisco
exit
!
***SW_AC2, SW_AC3***
!
vtp mode client
vtp domain CCNA
vtp password cisco
exit
!
Configure VLANs on the SW_DS1
*****************************
***SW_DS1***
!
vlan 43
name Management
exit
!
vlan 10
name Students
exit
!
vlan 20
name Faculty
exit
!
vlan 67
name Wireless
exit
!
Configure the management interface address on all three switches
****************************************************************
***SW_DS1***
!
interface vlan 43
ip address 172.16.43.11 255.255.255.0
no shutdown
exit
!
***SW_AC2***
!
interface vlan 43
ip address 172.16.43.12 255.255.255.0
no shutdown
exit
!
***SW_AC3***
!
interface vlan 43
ip address 172.16.43.13 255.255.255.0
no shutdown
exit
!
Assign switch ports to VLANs
****************************
***SW_AC2, SW_AC3***
!
interface range fastEthernet0/1-10
switchport access vlan 10
switchport mode access
exit
!
interface range fastEthernet0/11-17
switchport access vlan 20
switchport mode access
exit
!
***SW_AC3***
!
interface fastEthernet0/18
switchport access vlan 67
switchport mode access
exit
!
Configure Spanning Tree
***********************
***SW_DS1***
!
spanning-tree vlan 1 priority 4096
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 4096
spanning-tree vlan 43 priority 4096
spanning-tree vlan 67 priority 4096
!
***SW_AC2***
!
spanning-tree vlan 1 priority 8192
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 8192
spanning-tree vlan 43 priority 8192
spanning-tree vlan 67 priority 8192
!
Configure Inter-VLAN Routing
****************************
***Router1***
!
no ip domain-lookup
!
interface FastEthernet0/0
no shutdown
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 172.16.10.1 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 172.16.20.1 255.255.255.0
!
interface FastEthernet0/0.43
encapsulation dot1Q 43 native
ip address 172.16.43.1 255.255.255.0
!
interface FastEthernet0/0.67
encapsulation dot1Q 67
ip address 172.16.67.1 255.255.255.0
!
ip route 172.16.100.0 255.255.255.0 172.16.67.10
!
banner motd &Authorized access only!&
!
Configure port security
***********************
***SW_AC3***
!
interface fa0/2
switchport port-security
switchport port-security maximum 1
switchport port-security mac-address sticky
exit
!

**********************************************************
***Router1***
!
hostname Router1
!
enable secret class
no ip domain-lookup
!
interface FastEthernet0/0
no shutdown
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 172.16.10.1 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 172.16.20.1 255.255.255.0
!
interface FastEthernet0/0.43
encapsulation dot1Q 43 native
ip address 172.16.43.1 255.255.255.0
!
interface FastEthernet0/0.67
encapsulation dot1Q 67
ip address 172.16.67.1 255.255.255.0
!
interface FastEthernet0/1
shutdown
!
interface Vlan1
shutdown
!
ip route 172.16.100.0 255.255.255.0 172.16.67.10
!
banner motd &Authorized access only!&
!
line con 0
password cisco
logging synchronous
login
!
line vty 0 4
password cisco
login
!
end
!
***********************************************************
***SW_DC1***
!
hostname SW_DS1
!
enable secret class
!
no ip domain-lookup
!
spanning-tree vlan 1 priority 4096
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 4096
spanning-tree vlan 43 priority 4096
spanning-tree vlan 67 priority 4096
!
interface range FastEthernet0/1-18
shutdown
!
interface range FastEthernet0/19-24
switchport trunk native vlan 43
switchport mode trunk
no shutdown
!
interface FastEthernet0/19
shutdown
!
interface range GigabitEthernet1/1-2
shutdown
!
interface Vlan 1
shutdown
!
interface Vlan 43
ip address 172.16.43.11 255.255.255.0
no shutdown
!
ip default-gateway 172.16.43.1
!
banner motd &Authorized access only!&
!
line con 0
password cisco
logging synchronous
login
exec-timeout 60 0
!
line vty 0 15
password cisco
login
!
!
end
!
***********************************************************
***SW_AC2***
!
hostname SW_AC2
!
enable secret class
!
no ip domain-lookup
!
spanning-tree vlan 1,10,20,43,67 priority 8192
!
interface range FastEthernet0/1-10
switchport access vlan 10
switchport mode access
shutdown
!
interface range FastEthernet0/11-17
switchport access vlan 20
switchport mode access
shutdown
!
interface FastEthernet0/18
shutdown
!
interface range FastEthernet0/19-24
switchport trunk native vlan 43
switchport mode trunk
shutdown
!
!
interface range fa0/1, fa0/11, fa0/19-20, fa0/23-24
no shutdown
!
interface range GigabitEthernet1/1-2
shutdown
!
interface Vlan 1
shutdown
!
interface Vlan 43
ip address 172.16.43.12 255.255.255.0
no shutdown
!
ip default-gateway 172.16.43.1
!
banner motd &Authorized access only!&
!
line con 0
password cisco
logging synchronous
login
exec-timeout 60 0
!
line vty 0 15
password cisco
login
!
end
!
***********************************************************
***SW_AC3***
!
hostname SW_AC3
!
enable secret class
!
no ip domain-lookup
!
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
shutdown
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security mac-address sticky
switchport port-security violation shutdown
no shutdown
!
interface range FastEthernet0/3-10
switchport access vlan 10
switchport mode access
shutdown
!
interface range FastEthernet0/11-17
switchport access vlan 20
switchport mode access
shutdown
!
interface FastEthernet0/18
switchport access vlan 67
switchport mode access
no shutdown
!
interface range FastEthernet0/19-24
switchport trunk native vlan 43
switchport mode trunk
no shutdown
!
interface range fa0/23-24
shutdown
!
interface range GigabitEthernet1/1-2
shutdown
!
interface Vlan 1
shutdown
!
interface Vlan 43
ip address 172.16.43.13 255.255.255.0
no shutdown
!
ip default-gateway 172.16.43.1
!
banner motd &Authorized Access Only!&
!
line con 0
password cisco
logging synchronous
login
exec-timeout 60 0
!
line vty 0 15
password cisco
login
!
end
!

S-ar putea să vă placă și