Commands 2.1
Commands 2.1
CONFIGURING SSH
S1(config)# ip domain-name cisco.com
S1(config)# crypto key generate rsa
How many bits in the modulus [512]: 1024
S1(config)# username admin secret ccna
S1(config)# line vty 0 15
S1(config-line)# transport input ssh // utilizar ssh, si no hago esto configuro telnet
S1(config-line)# login local
S1(config-line)# exit
S1(config)# ip ssh version 2
Configure a banner
R1(config)# banner motd #AUTHORIZED ACCESS ONLY!#
VLAN Creation
Switch# configure terminal
Switch(config)# vlan vlan-id
Switch(config-vlan)# name vlan-name
Switch(config-vlan)# end
VLANs are configured on the switch port and not on the end device.
● Use the no switchport trunk allowed vlan and the no switchport trunk
native vlan commands to remove the allowed VLANs and reset the native
VLAN of the trunk.
R1 Subinterface Configuration
R1(config)# interface G0/0/1.10
R1(config-subif)# description Default Gateway for VLAN 10
R1(config-subif)# encapsulation dot1Q 10
R1(config-subif)# ip add 192.168.10.1 255.255.255.0
R1(config-subif)# exit
R1(config)#
R1(config)# interface G0/0/1.20
R1(config-subif)# description Default Gateway for VLAN 20
R1(config-subif)# encapsulation dot1Q 20
R1(config-subif)# ip add 192.168.20.1 255.255.255.0
R1(config-subif)# exit
R1(config)#
R1(config)# interface G0/0/1.99
R1(config-subif)# description Default Gateway for VLAN 99
R1(config-subif)# encapsulation dot1Q 99
R1(config-subif)# ip add 192.168.99.1 255.255.255.0
R1(config-subif)# exit
R1(config)#
R1(config)# interface G0/0/1
R1(config-if)# description Trunk link to S1
R1(config-if)# no shut
R1(config-if)# end
R1#
ETHERCHANNEL
S1(config)# interface range FastEthernet 0/1 - 2
S1(config-if-range)# channel-group 1 mode active
Creating a port-channel interface Port-channel 1
S1(config-if-range)# exit
S1(config-if)# interface port-channel 1
S1(config-if)# switchport mode trunk
S1(config-if)# switchport trunk allowed vlan 1,2,20
DHCPv4
STEPS TO CONFIGURE A CISCO IOS DHCPv4 SERVER
VERIFICATION COMMANDS
show running-config | section dhcp: Displays the DHCPv4 commands configured
on the router.
show ip dhcp binding: Displays a list of all IPv4 address to MAC address bindings
provided by the DHCPv4 service.
show ip dhcp server statistics: Displays count information regarding the number of
DHCPv4 messages that have been sent and received.
VERIFICATION
SOHO# show ip interface g0/0/1
Step 5. Verify that the client router received other necessary DHCPv6
information.
R3# show ipv6 dhcp interface g0/0/1
Step 5. Verify that the hosts have received IPv6 addressing information.
To verify stateless DHCP on a Windows host, use the ipconfig /all command.
Step 5. Verify that the client router received other necessary DHCPv6
information.
R3# show ipv6 dhcp interface g0/0/1
TO VERIFY:
- The DHCPv6 relay agent can be verified using the show ipv6 dhcp interface
command. This will verify that the G0/0/1 interface is in relay mode.
- Use the show ipv6 dhcp binding command to verify if any hosts have been
assigned an IPv6 configuration.
- Finally, use ipconfig /all on PC1 to confirm that it has been assigned an IPv6
configuration.
Use the show port-security interface command to display the current port security
settings for FastEthernet 0/1
Configuration Example:
S1(config)# ip dhcp snooping
S1(config)# interface f0/1
S1(config-if)# ip dhcp snooping trust
S1(config-if)# exit
S1(config)# interface range f0/5 - 24
S1(config-if-range)# ip dhcp snooping limit rate 6
S1(config-if)# exit
S1(config)# ip dhcp snooping vlan 5,10,50-52
S1(config)# end
S1#
Configure PortFast
PortFast can be enabled on an interface by using the spanning-tree portfast
interface configuration command. Alternatively, Portfast can be configured globally
on all access ports by using the spanning-tree portfast default global configuration
command.
To verify whether PortFast is enabled globally you can use either the show running-
config | begin span command or the show spanning-tree summary command. To
verify if PortFast is enabled an interface, use the show running-config interface
type/number command, as shown in the following example. The show spanning-
tree interface type/number detail command can also be used for verification.
To display information about the state of spanning tree, use the show spanning-
tree summary command. In the example, PortFast default and BPDU Guard are
both enabled as the default state for ports configured as access mode.
c
tion trust
CCVCha