Setting the router commands
Show version – shows router version
Enable – enter privilege EXEC configuration mode.
Configure terminal – enter global configuration mode
Config t – enter config mode
Hostname – name the device
Enable secret – set password
Router – tells the router which protocol to use (e.g. router RIP – router configuration command )
Network – tells the router which directly networks he connected to.
Line Vty 0 4 – configure/enable telnet session
Password – set password for telnet session
Login console 0 – configure/enable console session
Password –set password for console login
Copy run start – save router configuration
Setting router IP address
Interface Ethernet 0 – setting the Ethernet 0 port setting (if more them one port use 0/0, or 0/1)
IP address 192.168.0.1 255.255.255.0 – setting ip address
No shutdown – enable the connection / port
****available ports Interface Ethernet 0, Interface Ethernet 1, Interface serial 0
ip host NAME 192.168.100.1 – map host mane to ip address
Verify and save configuration
Show run – verify router configuration
Copy run start -Save router configuration
Copy running –config startup-config – save config
copy running-config tftp – save config file to TFTP server.
Change settings
No- To change information, go to the proper command mode and retype the command with the newinformation. To remove an old command, go to the proper command mode and retype thecommand exactly as it was entered with the word no in front of it. For
example:
Gadsden(config-if)#description Connection to the host
Gadsden(config-if)#no description Connection to the host
Configure ACL
Show access-list – show list
Access list number permit network subnet – create basic access control list (access list 1 permit 192.168.100.0 255.255.255.0)
No access-list <number> – remove access list
Access list deny any – deny access
Interface serial 1 – assign to connection
Ip access-group 5 in – ACL direction
End – end ACL process
Show Commands
show running-config command. This command will display the current configuration
Show ? – Show all Show commands
Showedit ip route table
Show ip route – show ip table route
No network 192.168.0.1 – remove network from route list
CDP
show cdp neighbors – Show surround devices in the LAN.
# cdp run
# cdp enable
# clear cdp counters
# show cdp
# show cdp entry {*|device-name[*][protocol | version]}
# show cdp interface [type number]
# show cdp neighbors [type number] [detail]
Other command
service password-encryption – This command is used to encrypt passwords in configuration output:
Erase startup-config – Erasing and reloading the router
reload – restart roter
Router rip – router configuration mode
Sh run – show router configuration
Sh start – show NVRAM config
End – move one level up in the menu
Description – add description to interface
banner motd # message here #– display message of the day
ip host NAME 192.168.100.1 – map host mane to ip address
Set Password example:
Router(config)#line console 0
Router(config-line)#password <password>
Router(config-line)#login
Router(config)#line vty 0 4
Router(config-line)#password <password>
Router(config-line)#login
Configure interface
Router(config)#interface serial 0/0
Router(config-if)#clock rate 56000
Router(config-if)#no shutdown
Show Commands
Router#show interfaces serial 0/1
show controllers serial – Displays information-specific to the interface hardware
show clock – Shows the time set in the router
show hosts – Displays a cached list of host names and addresses
show users – Displays all users who are connected to the router
show history – Displays a history of commands that have been entered
show flash – Displays information about flash memory and what IOS files are stored there
show version – Displays information about the router and the IOS that is running in RAM
show ARP – Displays the ARP table of the router
show protocol – Displays the global and interface specific status of any configured Layer 3 protocols
show startup-configuration – Displays the saved configuration located in NVRAM
show running-configuration – Displays the configuration currently running in RAM
Telnet Commands:
telnet host name – connect to others routers using telnet (E.g. telnet paris)
Denver>connect paris
Denver>paris
Denver>131.108.100.152
Denver>telnet paris
Static routes:
ip route 172.16.3.0 255.255.255.0 172.16.4.1 130 – set static route to other routers.
Ip route 192.168.20.10 255.255.255.255 192.168.20.1 – ip route to one host.
* ip route destination network sub mask gateway
Use the following steps to configure static routes:
Determine all desired destination networks, their subnet masks, and their gateways. A gateway can be either a local interface or a next hop address that leads to the desired destination.
Enter global configuration mode.
Type the ip route command with a destination address and subnet mask followed by their corresponding gateway from Step one. Including an administrative distance is optional.
Repeat Step three for as many destination networks as were defined in Step one.
Exit global configuration mode.
Save the active configuration to NVRAM by using the copy running-config startup-config command.
Use the following steps to configure default routes:
Enter global configuration mode.
Type the ip route command with 0.0.0.0 for the destination network address and 0.0.0.0 for the subnet mask. The gateway for the default route can be either the local router interface that connects to the outside networks or the IP address of the next-hop router. In most cases, it is preferred that the IP address of the next hop router is specified.
Exit global configuration mode.
Save the active configuration to NVRAM by using the copy running-config startup-config command.
To remove route type:
no ip route 192.168.0.10 255.255.255.0 192.168.0.11