CCNA2 Commands Summary
CCNA2 Commands Summary
To display the version and configuration data for SSH on the device:
Switch# show ip ssh
To configure port-security:
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 2
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security violation {protect | restrict | shutdown}
To delete the vlan.dat file from flash, after erasing the switch startup config:
Switch# delete flash:vlan.dat
To give an IPv6 global and link local address and description to a router interface:
Router(config)# interface gi0/0
Router(config-if)# description Connected To Branch1
Router(config-if)# ipv6 address 2001:db8:acad::1/64
Router(config-if)# ipv6 address FE80::1 link-local
Router(config-if)# no shutdown
Configuring a router on a stick with two sub-interfaces to route VLANs 10 and 20:
Router(config)# interface gi0/0
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface gi0/0.1
Router(config-subif)# encapsulation dot1q 10
Router(config-subif)# ip address 10.10.10.1 255.255.255.0
Router(config-subif)# exit
Router(config)# interface gi0/0.2
Router(config-subif)# encapsulation dot1q 20
Router(config-subif)# ip address 10.10.20.1 255.255.255.0
To make all interfaces as passive and only allow sending updates on one of them:
Router(config)# router rip
Router(config-router)# passive-interface default
Router(config-router)# no passive-interface gi0/0
To configure OSPF:
Router(config)# router ospf 1
Router(config-router)# router-id 1.1.1.1
Router(config-router)# network 172.16.10.0 0.0.0.255 area 0
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
Router(config-router)# no auto-summary
To apply an ACL to a line vty to restrict TELNET and SSH incoming access to specific IPs:
Router(config)# access-list 1 permit 10.10.10.0 0.0.0.255
Router(config)# line vty 0 15
Router(config-line)# access-class 1 in