0% found this document useful (0 votes)
33 views3 pages

The Commands

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

The Commands

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

VLAN Creation

• EN: Enter privileged EXEC mode to perform high-level commands.


• CONFIG T: Enter global configuration mode to start making changes.
• VLAN 10 / 20 / 30: Create VLANs with IDs 10, 20, and 30, segregating the network into different
broadcast domains.
• NAME MG / ACC / SALES: Assign names to the VLANs: MG for Management, ACC for Accounting,
and SALES for Sales.
• SHOW VLAN BRIEF: Displays a summary of all VLANs to verify their creation.

Trunk Mode Configuration


• interface range f0/1-5: Select the interfaces from FastEthernet 0/1 to 0/5.
• switchport mode trunk: Set these interfaces to trunk mode, allowing them to carry traffic for all
VLANs.
• SHOW INTERFACE TRUNK: Verify which interfaces are operating in trunk mode.

Access Mode Configuration


• interface f0/5: Select FastEthernet 0/5 interface.
• switchport mode access: Set the interface to access mode, meaning it will carry traffic for a single
VLAN.
• switchport access vlan 10: Assign VLAN 10 to this interface in access mode, ensuring it only carries
traffic for VLAN 10.

Default Route Configuration


• route 0.0.0.0 0.0.0.0 192.168.1.1: Set the default gateway for traffic going outside the local network to
the IP address 192.168.1.1.

Inter-VLAN Subinterfaces (Router-on-a-stick)


• interface g0/0/0.1: Create a subinterface for inter-VLAN routing on the GigabitEthernet 0/0/0 interface.
The ".1" indicates the subinterface number.
• encapsulation dot1Q 10: Enable 802.1Q encapsulation for VLAN 10.
• ip address 10.1.101.1 255.255.255.0: Assign an IP address to the subinterface for VLAN 10.
• no shutdown: Enable the GigabitEthernet interface to allow it to forward traffic.

DHCP Excluded Addresses


• ip dhcp excluded-address [range]: Exclude the given IP addresses from being assigned by the DHCP
server, ensuring specific addresses are reserved and not allocated to clients.

DHCP Pool Creation


• IP DHCP POOL vLAN1 / vLAN2: Create separate DHCP pools for VLAN 1 and VLAN 2.
• NETWORK 192.168.10.0 255.255.255.0: Define the subnet for VLAN 1 (or 2).
• default-router 192.168.10.1: Set the default gateway for VLAN 1 (or 2).
• dns-server 8.8.8.8: Set Google DNS as the DNS server for the clients.

Static and Default Routing


• ip route 10.1.50.0 255.255.255.0 s0/1/0: Define a static route to network 10.1.50.0 through interface
Serial0/1/0.
• ip route 0.0.0.0 0.0.0.0 s0/1/0: Set a default route (used when no other route matches) via Serial0/1/0.

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.

Loopback Interface Creation


• interface loopback 0: Create a virtual loopback interface.
• ip address 192.168.4.1 255.255.255.0: Assign an IP address to the loopback interface.

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.

Call Manager Express (CME) for IP Phone Configuration


• interface rang f0/1-3: Configure multiple interfaces for IP phone access and voice VLAN.
• telephony-service: Enable Call Manager Express (CME) to manage IP phones.
• max-ephones 10: Set the maximum number of IP phones to 10.
• ephone-dn 1 / 2 / 3: Assign directory numbers 300, 200, and 150 to the IP phones.
• button 1:1 / 1:2 / 1:3: Assign directory numbers to buttons on the phones.

You might also like