ios
#define ios: \
I---------------------------------------------------\
I---------------------------------------------------\
I---------------------------------------------------\
I /$$$$$$ /$$$$$$ /$$$$$$ \
I |_ $$_/ /$$__ $$ /$$__ $$ \
I | $$ | $$ \ $$| $$ \__/ \
I | $$ | $$ | $$| $$$$$$ \
I | $$ | $$ | $$ \____ $$ \
I | $$ | $$ | $$ /$$ \ $$ \
I /$$$$$$| $$$$$$/| $$$$$$/ \
I |______/ \______/ \______/ \
I---------------------------------------------------\
I---------------------------------------------------\
I---------------------------------------------------I
• "Internetwork Operating System"
• operating system for CISCO routers
• its terribly executed, its insane these guys managed to stay in business
considering how much thought went into their software
• not allowing CIDR notation was a great mistake; have fun typing 255 and 0 left and right
CONFIGURATION_DIALOG:
• shown the first time the router is booted
• bad
• skip it; whatever you want, it will be faster without it
COMMENTS:
! <...>
• must be at the beginning of the line (white space is ignored)
• cannot stand after a command
MODES:
• child modes are NOT supersets of their parents
.
├── User EXEC mode ("enter")
│ │
│ (pass)
│ └── Privileged EXEC mode ("enable")
│ └── Global configuration mode ("configure terminal")
│ ├── Interface configuration mode ("interface <interface-name>")
│ ├── DHCP configuration mode ("ip dhcp <dhcp-subcommand>")
│ ├── Line configuration mode ("line <line-type> <line-number>")
│ ├── Router configuration mode ("router <routing-protocol>")
│ ├── VLAN configuration mode ("vlan <vlan-id>")
│ ├── Security mode ("security")
│ ├── NTP configuration mode ("ntp <ntp-subcommand>")
│ └── Policy-map configuration mode ("policy-map <policy-map-name>")
├── ROM monitor mode ("rommon")
└── Setup mode ("setup")
GLOBALS:
exit
end
HELP:
?
• the question mark can be used in any context to list all possible valid inputs
(sometimes regex clustered)
SHORT_CUTS:
• UNIX style
[ctrl] + [a] : beginning of the line
[ctrl] + [e] : end of the line
[ctrl] + [b] : back 1 char
[ctrl] + [f] : forward 1 char
[ctrl] + [d] : delete (as in the key)
[ctrl] + [n] : delete line
[ctrl] + [k] : delete from cursor until the end of the line
SECRET:
• the secret is a password separating Privileged EXEC mode from User EXEC mode
(config) enable secret
STATE:
• config operations are done in memory
• on each boot the "startup-config" is read
# save run start : save the current configuration (in memory) to startup-config (to disk)
DHCP_CONFIGURATION_MODE:
(config) ip dhcp pool <pool-name>
• IOS itself will select you which interface the pool belongs to by pattern matching
• unless you hack/dork better than me, you cant use 1 pool for multiple interfaces
Pool:
(dhcp-config)# network <ip-start> <subnet-mask> : specify from which address to start assigning from and
how many host are there (indirectly through the subnet mask),
thereby defining the boundaries of the pool
(dhcp-config)# default-router <ip> : specify default gateway for clients of the pool
STATIC_ROUTING:
(config) ip route <destination> <mask> <forward_to>
RIP:
(config) router rip
(config-router) network <network> : enable advertising <network> over RIP; if an interface
is not specified, it will not be routed using RIP;
(ie. please specify serial and ethernet too)
?!:
# show <noun>
interfaces
ip dhcp pool
(config-if)# no shutdown
(config-if)# ip <?!>
address <ip> <subnet-mask> : assign ip to the routers interface; it does no magic over the network
dhcp pool <pool-name>