0% found this document useful (0 votes)
3 views

switch

The document outlines a series of configuration commands for a network switch, including setting up console access, VLANs, and port security features. It specifies the creation of VLANs, interface configurations for trunking and access modes, and enables DHCP snooping for security. Additionally, it includes commands for saving the running configuration to startup configuration.

Uploaded by

Rayen Driouech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

switch

The document outlines a series of configuration commands for a network switch, including setting up console access, VLANs, and port security features. It specifies the creation of VLANs, interface configurations for trunking and access modes, and enables DHCP snooping for security. Additionally, it includes commands for saving the running configuration to startup configuration.

Uploaded by

Rayen Driouech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

en

conf t
line console 0
password cpi2b
login
exit
username cisco password cpi2b
no ip domain-lookup
hostname S1
ip domain-name cpi2.com
crypto key generate rsa
# When prompted: 1024
line vty 0 4
transport input ssh
login local
exit
service password-encryption
vlan 1
exit
interface vlan 1
ip address 172.31.0.3 255.255.255.0
exit
ip default-gateway 172.31.0.1
vlan 20
vlan 30
exit
interface range f0/1 - 5
switchport mode access
switchport access vlan 10
switchport nonegotiate
switchport port-security
switchport port-security maximum 5
switchport port-security mac-address sticky
switchport port-security aging time 440
switchport port-security violation restrict
exit
#same for vlan 20
vlan 999
name void
exit
interface range f0/16 - 23
switchport mode access
switchport access vlan 999
switchport nonegotiate
exit
interface range f0/1-6, f0/11-24
spanning-tree bpduguard enable
spanning-tree portfast
exit

interface g0/1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
switchport trunk native vlan 1
no shutdown
exit

interface range f0/7-10


switchport mode trunk
switchport trunk allowed vlan 10,20,30
switchport trunk native vlan 1
exit

interface range f0/9-10


channel-group 1 mode active
exit
interface port-channel 1
switchport mode trunk

#for dhcp security


ip dhcp snooping
ip dhcp snooping vlan 10,20,30

int f0/7
ip dhcp snooping trust
ip dhcp snooping limit-rate 5

end
copy run start

You might also like