The Commands
The Commands
OSPF Configuration
• Router ospf 1: Enable OSPF process 1 for dynamic routing.
• network 192.168.1.0 0.0.0.255 area 0: Add the network 192.168.1.0 to OSPF area 0.
• show ip protocol: Display the current IP routing protocols in use.
• show ip ospf database: Show the OSPF link-state database.
• router-id 1.1.1.1: Set a static router ID for OSPF.
TFTP Backup
• wr / copy running-config startup-config: Save the current running configuration to the startup
configuration.
• copy startup-config tftp: Copy the startup configuration to a TFTP server for backup.
DHCP Relay
• ip helper-address 10.10.20.1: Set the IP helper address to forward DHCP requests to the DHCP server
at 10.10.20.1.
IP Phone Configuration
• switchport voice vlan 20: Configure VLAN 20 to be used for voice traffic on the interface.
• switchport mode access: Ensure the port is in access mode to handle a single VLAN (for PCs).
• switchport access vlan 10: Assign VLAN 10 for PCs on this port.
Port Security
• switchport port-security: Enable port security on the interface to control which devices can connect.
• switchport port-security maximum 1: Allow only one device (MAC address) to connect to the port.
• switchport port-security mac-address [sticky]: Use sticky MAC address learning, dynamically
learning the MAC address of connected devices and making it persistent.
• switchport port-security violation [shutdown/protect/restrict]: Specify the action to take if a
violation occurs (e.g., shutdown the port if an unauthorized MAC address is detected).
• Show port-security f0/2: Display the port security status for interface FastEthernet0/2.