Packet Tracer For Beginners
Packet Tracer For Beginners
Packet Tracer For Beginners
Before we move on to all the cool stuff you need to understand different modes of Cisco Command Line Interface
(CLI). Generally, there are 5 modes. But for the sake of this syllabus, which is WIA1005 we’ll use only 4. The modes
are User EXEC mode, Privileged EXEC mode, Global Configuration mode and Interface Configuration. Before doing
something, you must understand whether your action falls on which mode.
COMMANDS ON USER EXEC MODE (SHORTCUTS THAT CAN BE COMBO’D BY TAB KEY)
COMMANDS ON PRIVILEGED EXEC MODE (SHORTCUTS THAT CAN BE COMBO’D BY TAB KEY)
end – exit from config mode se – modify use of network based services
You might ask why I never went through routers, switches, devices bla… That’s in fact a valid question. If you attend
enough labs you definitely will recognize them in a blink. However, lecturers won’t tell you on the details of all the
cables, especially what can this cable be connected to. So here are some cables that I feel essential in this syllabus.
They are ALL PURPOSE CABLE, CONSOLE CABLE, COPPER STRAIGHT THROUGH CABLE, COPPER CROSS OVER CABLE,
FIBER AND SERIAL DCE.
This cable’s indicator has a shape of a lightning and can be used to connect all devices
CONSOLE CABLE
This cable’s indicator is an aqua blue line. It is used to connect to the device’s CLI for config purposes
SERIAL DCE
and it’ll become S1(config)# which will be the mode for almost all configs
S1(config-line)# exit
*NOTE : THIS ENCRYPTED PASSWORD WILL OVERRIDE PASSWORD SET BEFORE ON ACCESSING PRIVILEGED MODE
*NOTE : THIS IS NEEDED TO ENCRYPT PASSWORDS EVEN ON CONSOLE, AS SECRET ENCRYPTS ONLY PRIVILEGED
MODE
ENCRYPT PASSWORD CONFIG
*NOTE : THIS IS NEEDED TO ENCRYPT PASSWORDS IN ORDER TO PREVENT PEOPLE LOOKING AT YOUR PASSWORD
WHEN YOU’RE CONFIGURING IT
COMMAND : S1(config)# banner motd “Hello there” (put any message you want)
COMMAND : S1(config)# interface vlan 1 (basically any interface you have on that device)
S1(config-if)# ip address 192.168.1.253 255.255.255.0 (the switch’s ipv4 address and subnet mask)
COMMAND : R1(config)# interface gigabitethernet 0/0 (or any gigabitethernet interface you see)
R1(config-if)# ip address 192.168.10.1 255.255.255.0 (put ip address and subnet mask required)
PROCEDURE : PING EVERY DEVICE, SWITCHES AND ROUTER AND TABULATE THE RESULTS. THERE ARE 4
SCENARIOS IF PING IS UNSUCCESSFUL.
SOLUTION : IF THIS HAPPENS, CHECK THE IP CONFIG FROM THE ADDRESS TABLE AND THE DEFAULT GATEWAY
OF THE ROUTER. CORRECT THE CONFIG THEN TRY TO PING AGAIN.
SOLUTION : IF THIS HAPPENS, CHECK THE IP ADDRESS TABLE AND SEE WHETHER THE IP ADDRESS AND SUBNET
MASK ARE THE SAME. IF NOT, PROCEED TO CONFIG THE INTERFACE.
SCENARIO 3 : PC OR OTHER DECVICES CANNOT PING PC (REMOTELY)
SOLUTION : CHECK THE DEFAULT GATEWAY OF THE PC WHICH CAN’T BE PINGED VIA IP CONFIG. CHANGE THE
DEFAULT GATEWAY BASED ON THE ROUTER.
SOLUTION : CHECK THE DEFAULT GATEWAY OF THE SWITCH THAT CAN’T BE PINGED. CHANGE THE DEFAULT
GATEWAY ON THE GLOBAL CONFIG MODE WITH COMMAND (ip default-gateway 192.168.10.1) OR
ANY DISPLAYED BY THE ROUTER.
COMMAND : R1(config)# ipv6 unicast-routing (to enable the router to forward IPv6 packets)
R1(config)# interface GigabitEthernet 0/0 (or any interface you wish to configure)
R1(config-if)# ipv6 address 2001:db8:1:1::1/64 (or any address you wish to add)
R1(config-if)# ipv6 address fe80::1 link-local (add link-local to make fe80::1 the link-local address)
R1(config-if)# no shutdown (get this interface to run with the previous config)
COMMAND : R1(config-if)# no ipv6 address 2001:db8:1:1::1/64 (this is very important because if the address is
not removed in this way, both the correct and incorrect address will remain in config)
COMMAND : R1(config)# security password min-length 10 (can be any length you want, in this case I put 10)
COMMAND : R1(config)# no ip domain-lookup (tells the router to stop interacting with any DNS servers entirely)
COMMAND : R1(config)# ip domain-name CCNA.com (or any domain name you want)
COMMAND : R1(config)# username user1 secret password1 (put any username and password you want)
(IT WILL THEN PROMPT YOU TO INPUT A NUMBER FROM 360 TO 2048)
BLOCK ANYONE FOR N-TIME WHO FAILS TO LOGIN AFTER M-ATTEMPTS WITHIN O-PERIOD
COMMAND : R1(config)# login block-for 180 attempts 4 within 120 (N=180s, M=4 times, O=120s)
CONFIG ALL VTY LINES FOR SSH ACCESS AND USE LOCAL USER PROFILES FOR AUTHENTICATION
COMMAND : S1(config)# interface range F0/2 – 24, G0/2 (in this case, port f0/2 till port f0/24 and g0/2 is
selected. You can put any ports you want any range as long as port exists)
COMMAND : S1(config)# interface range f0/1-2 (can be for one port, just drop range and it’ll focus on one port)
SECURE PORTS SO IT CAN DYNAMICALLY LEARN MAC ADDRESS OF DEVICE AND ADD TO RUNNING CONFIG
SETS VIOLATION MODE TO PORTS SO THAT THEY WON’T BE DISABLED BUT ONLY GENERATES NOTIFICATIONS
S1(config-if)# ms qos trust cos (config the switch to trust all ingress traffic)
R1(config-subif)# encapsulation dot1Q 10 (sets encapsulation type to 802.1Q and assigns vlan 10)
R1(config-if)# no shutdown
COMMAND : R1(config)# interface g0/0 (or any interface you want to enable)
COMMAND : R1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10 (in this case 10 addresses)
R1(config-if)# ip helper-address 10.1.1.2 (depends on the connection link, in this case s0/0/0
happens to be connected to R2 with an address of 10.1.1.2)