############################################################
# Examples of commands for Cisco Packet Tracer console #
############################################################
#################################################################
Administrator mode --> enable
#
Configuration mode --> configure terminal
#
#
#
($) --> administrator mode
#
configure terminal mode
#
#
#
# // to cancel a command, put a 'no' in front of the command #
# // view configuration: ($): show running-config #
#################################################################
### Create VLAN on the switch ###
(#): vlan <id number> [Example vlan 2]
name <nombre> [Example name main]
### Assign VLAN to a port ###
(#): interface <portName> [Example interface Fa/01]
switchport access vlan <id number> [ Example switchport access vlan 2 ]
### Put port in trunk mode ###
(#): interface <portName>
switchport trunk encapsulation dot1q
switchport mode trunk
### Add/remove VLAN to the trunk ###
switchport trunk allowed vlan <id number> * To assign
Example: switchport trunk allowed vlan 2
### Assign an IP Address to a VLAN on the switch ###
(#): interface vlan <id number>
(#): ip address <IP> <mask>
### Enable routing on the switch ###
IP routing
### Configure switch to set a DHCP to assign addresses to a VLAN ###
(#): interface vlan <id number>
(#): ip helper-address <dirIP DHCP>
### Configure DHCP to assign addresses ###
in graphic mode
### Configure switch to act as DHCP for a specific VLAN ###
ip dhcp pool <dhcpname> [Example: ip dhcp pool DHCPVLAN20]
(#): default-router <dirIP router> [Example: default-router 158.42.20.1]
(#): dns-server <dirIP DNS> [Example: in our case the dns is the dhcp: dns-server
158.42.2.2
(#): network <starting dirIP> <mask> [Example: network 158.42.20.2] * Yes
start assigning from address 0, exclude the address that should not be assigned
[ip dhcp exclude...]
### Configure the switch routing table to go outside the network ###
ip route <dirIP> <mask> <direction to exit> [Example: ip route
0.0.0.0 0.0.0.0 158.42.2.1
### Create port-channel and assign it to several ports ###
(#): interface <interfaceName> [Example: interface Fa0/1]
(#): channel-group <id> mode on [Example: channel-group 1 mode on]
Now we configure the channel-group to set it to trunk mode
interface port-channel <id> [Example: interface port-channel 1]
Switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan <id number>
And now we put in the interfaces that interest us the port-channel, in the example
we put it in FastEthernet0/1 and FastEthernet 0/6
(#): interface <interfaceName> [Example: interface Fa0/6]
(#): channel-group <id> mode on [Example: channel-group 1 mode on]