Routing Commands The Complete Edition
Routing Commands The Complete Edition
Contents
Week 1 ................................................................................................................... 4
Part 1: Configure Basic Device Configuration on S1 ................................................. 4
Part 2: Configure SSH on R1 as a Secure Remote Access Method. ............................ 5
Step 1: Set the IP domain name and generate secure keys.................................... 5
Step 2: Create an SSH user and reconfigure the VTY lines for SSH-only access. ..... 5
Part 3: Configure IPv4 Addressing and Verify Connectivity ........................................ 6
Step 1: Assign IPv4 addresses to R1 and LAN devices. ......................................... 6
Step 2: Verify connectivity. PC1 and PC2 should be able to ping each other. .......... 7
Part 4: Configure IPv6 Addressing and Verify Connectivity ........................................ 8
Step 1: Assign IPv6 addresses to R1 and LAN devices. Referring to the Addressing
Table, configure IPv6 addressing for R1 LAN interfaces, PC-A and PC-B. ................ 8
Step 2: Verify connectivity. PC-A and PC-B should be able to ping each other. Page
2 of 2 ................................................................................................................ 8
Week 2 ................................................................................................................... 9
Part 1: Configure VLANs ........................................................................................ 9
Part 2: Assign Ports to VLANs ............................................................................... 10
Part 3: Configure Static Trunking .......................................................................... 11
Part 4: Configure End Devices with IP Addresses ................................................... 11
Part 5: Configure Router on a Stick VLAN .............................................................. 12
Week 3 ................................................................................................................. 14
Part 1: Build the Network and Configure Basic Device Settings............................... 14
Part 3: Configure and Verify a Stateless DHCPv6 server on R1 ................................ 15
Part 4: Configure a Stateful DHCPv6 server on R2 ................................................. 16
Part 5: Configure a DHCPv4 settings on R1 for both LANs ...................................... 16
week 4 .................................................................................................................. 18
Part 1: Configure Port Security ............................................................................. 18
Part 2: Verify Port Security ................................................................................... 19
week 6 .................................................................................................................. 21
Part 1: Configure IPv4 and IPv6 Addresses to Router Interfaces and Hosts .............. 21
Part 2: Configure IPv4 Static Routes on R1 and R2 ................................................. 22
Part 3: Configure IPv6 Static Routes on R1 and R2 ................................................. 22
Part 4: Configure IPv4 Default Route on R2 ........................................................... 23
Part 5: Configure IPv6 Default Route on R2 ........................................................... 23
Week 1
Part 1: Configure Basic Device Configuration on S1
a. Disable DNS lookup
Switch> en
Switch# conf t
d. Show the current configuration and note that the passwords are in plain text.
Enter the command that encrypts plain text passwords: S1(config)# service
password-encryption
Switch# conf t
Router> en
Router# conf t
Router(config)# hostname R1
c. Secure keys are needed to encrypt the data. Generate the RSA keys using a 1024
key length.
Step 2: Create an SSH user and reconfigure the VTY lines for SSH-only
access.
a. Create an administrator user with cisco as the secret password.
R1 (config-if)# no shutdown
R1 (config-if)# exit
R1 (config-if)# no shutdown
R1 (config-if)# exit
R1 (config)# do wr
S1(config-if)# no shutdown
S1(config-if)# exit
S1(config)# ip default-gateway 192.168.1.1
S1(config)# do wr
Switch> en
Switch># conf t
Switch(config)# hostname S2
S2(config-if)# no shutdown
S2(config-if)# exit
S2(config)# do wr
(Configure PC-A and PC-B through the packet tracer interface (no need to use
commands)).
Step 2: Verify connectivity. PC1 and PC2 should be able to ping each other.
PC-A
Password:
Switch> en
Password:
Switch#
Verify ssh on router:
Password:
R1>
R1> enable
Password:
R1#
Verify connectivity:
!!!!SW1!!!!!
Switch> en
Switch# conf t
SW1(config-vlan)#name Sales
SW1(config-vlan)#exit
SW1(config-vlan)#name IT
SW1(config-vlan)# do sh history
(this should show you the last commands used from hostname to do sh history. Select
all the commands starting from vlan 101 and ending at name IT-> right click -> copy ->
now go to sw2 and sw3 -> en -> conf t -> change hostname ->and paste. (Good to also
do a “do wr” to save the configuration.))
After having done this type command (SW1# show vlan brief) to verify everything went
through correctly.
Tip : go to options -> preferences and select always show port labels in logical
workspace
Part 2: Assign Ports to VLANs
a. On SW2 and SW3, assign ports to the VLANs. Refer to the Addressing Table.
SW2(config)# interface fastEthernet 0/1
SW2(config-if)# exit
SW2(config-if)# exit
SW2(config)# do sh history
SW2(config-if)# exit
SW2(config)# do sh history
Copy all notepad commands and paste in switch 3 starting from SW3(config)#
b. Disable DTP on the switch port on both ends of the trunk link.
A+B
SW2(config-if)# exit
SW3(config-if)# exit
Add all Ip’s and default gateways from addressing table to pc’s
Part 5: Configure Router on a Stick VLAN
Configure the devices to meet the following requirements.
Router# conf t
Router(config)# hostname R1
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config-subif)# exit
R1(config-subif)# exit
R1(config-subif)# exit
R1# write
***************************************************************
***************************************************************
***************************************************************
hostname R1
no shutdown
exit
no shutdown
exit
ipv6 unicast-routing
hostname R2
exit
no shutdown
exit
ipv6 unicast-routing
***************************************************************
***************************************************************
***************************************************************
R1
dns-server 2001:db8:acad::254
domain-name Stateless.com
exit
interface g0/1
ipv6 nd other-config-flag
exit
***************************************************************
***************************************************************
***************************************************************
R2
dns-server 2001:db8:abc:3::1
domain-name Stateful.com
exit
interface g0/1
ipv6 nd managed-config-flag
exit
***************************************************************
***************************************************************
***************************************************************
R1
default-router 192.168.1.1
dns-server 8.8.8.8
exit
default-router 192.168.3.1
dns-server 8.8.8.8
exit
R2
interface GigabitEthernet0/1
ip helper-address 192.168.2.1
exit
***************************************************************
***************************************************************
week 4
Objective
Background
In this activity, you will configure and verify port security on a switch. Port security
allows you to restrict a port’s ingress traffic by limiting the MAC addresses that are
allowed to send traffic into the port.
!Tip Options -> interface -> Check Always Show Port Labels in Logical Workspace.
S1# conf t
b. Set the maximum so that only one device can access the Fast Ethernet ports 0/1
and 0/2.
S1 (config-if-range)# switchport port-security maximum 1
c. Secure the ports so that the MAC address of a device is dynamically learned and
added to the running configuration.
S1 (config-if-range)# switchport port-security mac-address sticky
d. Set the violation mode so that the Fast Ethernet ports 0/1 and 0/2 are not
disabled when a violation occurs, but a notification of the security violation is
generated and packets from the unknown source are dropped.
S1 (config-if-range)# switchport port-security violation restrict
(index)
Protect: When a different mac address is used to access this port the port will drop
all packets coming through but it won’t log the security violation.
Restrict: When a different mac address is used to access this port the port the port
will drop all packets coming through and log the amount of security violations (1
ping is 1 violation).
Shutdown: When a different mac address is used to access this port the port will be
administratively shut down.
e. Disable all the remaining unused ports. Use the range keyword to apply this
configuration to all the ports simultaneously.
S1 (config)# interface range fastEthernet 0/3-24, gig0/2
S1 (config-if-range)# shutdown
S1 (config-if-range)# exit
b. Verify that port security is enabled and the MAC addresses of PC0 and PC1 were
added to the running configuration.
S1# show running config
e. Enable the port and verify that Rogue Laptop can ping PC0 and PC1. After
verification, shut down the port connected to Rogue Laptop.
S1# conf t
S1 (config)# interface fastEthernet 0/3
S1 (config-if)# no shutdown
(verify connectivity)
S1 (config-if)# shutdown
f. Disconnect PC1 and connect Rogue Laptop to F0/2, which is the port to which
PC1 was originally connected. Verify that Rogue Laptop is unable to ping PC0.
Double click on the cable near pc1 and drag to laptop
Ping 192.168.1.2
g. Display the port security violations for the port to which Rogue Laptop is
connected.
S1# show port-security interface fastEthernet 0/2
h. Disconnect Rouge Laptop and reconnect PC1. Verify PC1 can ping PC0.
Double click on the cable near the laptop and drag back to pc1
Ping 192.168.1.2
week 6
Instructions
R1(config)#exit
R2(config)#exit