cisco_packet_tracer class_notes
Useful CLI Commands:
Misc.:
? --command help
[command] ? --see options
show clock --show time and date
clock set <hh:mm:ss dd mmm yyyy> --set time and date (mmm = jan feb ...)[in EXEC mode]
Debugging:
show run --show running config
show start --show startup config
show ip inteface brief --show status of all ports/intefaces
show flash --show content of the flash memmory (NVRAM)
show ip route --show routing table
show ip protocols --show active IPv4 routing protocols
debug ip rip --show live RIP activity
undebug all --stop the debigging process
show ospf neighbor --show OSPF neighbors a router has formed adjacencies with.
show ospf database --show the topology information OSPF uses to compute routes
show ospf interface --show OSPF settings and status per interface
IP route codes:
| Code | Meaning | Source |
|---|---|---|
| C | Connected | Directly connected network |
| L | Local | Router’s own interface IP |
| S | Static | Manually configured route |
| R | RIP | Learned via RIP |
| O | OSPF | Learned via OSPF |
| D | EIGRP | Learned via EIGRP |
| B | BGP | Learned via BGP |
| ------ | ------------ | ------------------------------ |
| * | Default | Candidate default route |
| O IA | Inter-Area | Inter-Area route |
| O E1 | External | External type 1 |
| O E2 | External | External type 2 |
Configuration:
enter config mode:
conf t
change device host name:
hostname X1
set an encrypted secret to enter EXEC mode:
enable secret xxx
enable pass encryption:
service password-encryption
set a message of the day:
banner motd # <message> #
save the running config to startup config:
copy run start
Interface config:
console config:
line console 0 --enter console config
password xxx --set console pass
login --to enforce authentication
logging synchronous --enable logging synchronous
vty config:
line vty 0 4 --allows 5 remote users (0 to 4)
password cisco --set password for remote
login --enable password to loggin
transport input ssh --restrict remote access to SSH only
port config:
interaface fa0/x
ip address <IP address> <subnet mask>
desciption <link to x>
no shutdown
vlan config:
inteface vlan x
ip address <IP address> <subnet mask>
no shutdown
serial port config:
interaface s0/0/x
ip address <IP address> <subnet mask>
desciption <link to x>
clock rate 128000
no shutdown
Static Routing:
add static:
ip route <network ID> <subnet mask> <interface / IP address>
remove static:
no ip route <network ID> <subnet mask> <inteface / IP address>
default route static:
ip route 0.0.0.0 0.0.0.0 <inteface / IP address>
RIP Routing:
router rip
version 2
passive-interface g0/x --stops RIP from sending out of g0/0 (say not a network)
no auto-summary --Disables automatic classful summarization of routes
network <network ID(1) (classful)> --include net(1) to rip routing
network <network ID(2) (classful)> --include net(2) to rip routing
to create a a default route:
ip route 0.0.0.0 0.0.0.0 <interface / ip address> --create a static default route
router rip
default-information originate
OSPF Routing:
Definitions:
- Select paths using:
- Sum of Costs
- Lowest cost wins
- Dijkstra’s algorithm
- Cost Calculation:
- Serial = 64
- Ethernet = 10
- Fast Ethernet = 1
- Process ID: A positive integer that lets us differentiate different active OSPF routing in the same router.
- Router ID: Represented in IPv4, It uniquely identifies a router within an OSPF domain.
- Wildcard mask: the complement of the subnet mask, used to select which interface participate in OSPF.
- Area ID: Lets us divide large networks into smaller ones. (all other areas should be connected to AREA 0).
- Passive interface: Stops the router from forming neighbor relationships on that link.
Commands:
router ospf <precess ID>
router-id <router ID>
passive-interface <interface>
network <network ID> <wildcard mask> area <area nb>