Basic Router Configuration and Operation
From Proprofs
You are here: Home > Schools > Cisco > CCNA Certification > Wiki Home >CCNA Wiki
|
|
By Cbrzana |
Basic Router Configuration and Operation
IP Configuration Commands
| Command | Configuration Mode |
| ip address ip address mask [secondary] | Interface mode |
| ip host name [tcp-port-number] address1 [address2...address8] | Global |
interface} [distance] [name name] | Global |
| ip name-server server-address1 [[server- address2]…server address6] | Global |
| ip domain-lookup | Global |
| ip routing | Global |
| hostname name | Global |
| login | Line configuration mode |
| password value | Line configuration mode |
| [encryption-type] encrypted-password} | Global |
| [encryption-type] encrypted-password} | Global |
| keepalive [seconds] | Interface subcommand |
| exec-timeout minutes [seconds] | Line subcommand |
| logging synchronous | Line subcommand |
IP Exec Commands
| Command | Function |
| Show hosts | Lists all host names and corresponding IP addresses |
| show interfaces [type number] | Lists interface statistics, including IP address |
| show ip interface [type number] | Provides a detailed view of IP parameter settings per interface |
| show ip interface brief | Provides a summary of all interfaces and their IP addresses |
| [protocol [process-id]] | Shows entire routing table or a subset if other parameters are entered |
| show ip arp [ip-address] [host-name] [mac-address] [type number] | Displays IP ARP cache |
| debug ip packet | Issues log messages for each IP packet |
| decimal | hexadecimal} | Sets type of display for subnet masks in show commands |
| tag] {host-name | system-address} | Sends and receives ICMP echo messages to verify connectivity |
| trace [protocol] [destination] | Sends a series of UDP packets with increasing TTL values to verify the current route to a host |
Typical Router Configuration
- A host name for the router
- Reference to a DNS so that commands typed on the router can refer to host names
- instead of IP addresses
- Set a password on the console port
- Set a password for those Telnetting to the router
- Set the enable secret password to protect access to privileged mode
- Create a banner stating an appropriate warning, depending on the security practices at that company
exec timeout minutes seconds: sets the inactivity timeout
logging synchronous line subcommand: tells the router not to interrupt the output of a show command with debug messages
terminal ip netmaskformat decimal exec command:: If you prefer to see the subnet masks instead of the prefix
Seeding the Routing Table with Connected IP Routes
The Cisco IOS routes IP packets by default (you do not need to type any
commands to tell the router to enable IP routing). Before the router will route packets in or out of an interface, the interface must have an IP address.
IOS adds connected routes to the routing table when:
- The interface has been configured with a valid IP address.
- The interface is in an up and up status according to the various interface-oriented show commands.
Up-and-up status: First state refers to Layer 1 status; If there is no cable plugged in, the first status word would be down instead of up. Second state is Layer 2 (HDLC on one end of the serial link, but other end setup using PPP).
- > Errors can also occur if keepalive messages don't succeed. Default is every ten seconds, and if down for 3x interval (30 seconds), reports down status.
- > Disable keepalives with no keepalive subcommand or change interval with keepalive interval
- > To administratively bring down an interface, shutdown (and no shutdown to bring back up)
Bandwidth, Clock Rate, and Serial Lines in the Lab
When creating WAN without CSU/DSU, use DTE/DCE connectors. One router must supply the clocking (the end with the DCE).
1. Determine which router has DCE
a. Show controllers 0/0
2. Set clock rate
a. Clock rate clock rate in bps
3. Configure bandwidth (optional)
a. Bandwidth bandwidth in kbps
IP Troubleshooting Features
Internet Control Message Protocol (ICMP): provides a wide variety of information about the health and operational status of a network (sit inside an IP packet, with no transport layer header at all)
Message Types
| Message | Purpose |
| Destination unreachable | Tells source host there is a problem delivering the packet. |
| Time exceeded | Time it take to deliver packet has expired; and the packet has been discarded. |
| Redirect | Message tells sender to use the "better" route that is available. |
| Echo | Used by ping to verify connectivity. |
Echo Request/Echo Reply: Send a request, if receive a reply, connectivity is okay
- > Default is 5 echo requests, timeout is 2 seconds
Destination Unreachable Reasons
| Unreachable Code | When is it Used? | Sent By? |
| Network unreachable | No match in routing table for destination | Router |
| Host unreachable | Can locate router connected to subnet, host not responding. | Router |
| Can't fragment | Packet has Don't Fragment bit set, and router must fragment to send. | Router |
| Protocol unreachable | Packet delivered to host, but transport protocol not available | Endpoint Host |
| Port unreachable | Destination port not opened by application | Endpoint Host |
Ping Command Codes
| Code | Description |
| ! | ICMP Echo received |
| . | Nothing received before ping timed out |
| U | ICMP unreachable (destination) received |
| N | ICMP unreachable (network) received |
| P | ICMP unreachable (port) received |
| Q | ICMP source quench received |
| M | ICMP Can't Fragment message received |
| ? | Unknown packet received |
IP Naming Commands
Statically Configure hosts: ip host Chris 10.1.1.1
DNS Server: ip domain-name ProProfs.com
- ip name-server [address1] [address]
- ip domain-lookup
- Multiple DNS often used for redundancy
- ip domain-lookup enables IOS to ask name server
- if FQDN not given, assumes ip domain-name
Summary
| Function | Command |
| Use a DNS | ip domain-lookup |
| Configure IP address of name server | ip name-server svr1 svr2… |
| Statically assign hosts | ip host hostname ipaddress |
| Display current hostname information | show hosts |
Telnet and Suspend: telnet IOS command allows you to telnet from one device to another. Suspend connection, resume using connection number.
- - > To suspend connection: ctrl+shift+6, followed by letter x
- - > To resume, resume connection number or connection number
- - > To display session, show sessions or where commands
- - > To quit session, quit command
*Note: Pressing enter automatically connects to most recently suspended connection
Cisco Discovery Protocol (CDP): Discovers basic information about neighboring routers and switches, supports any interface that supports SNAP headers. CDP devices advertise their information and listen to other devices advertisements.
Obtains this information:
- Device Identifier: Typically the host name
- Address list: IP/MAC addresses
- Port identifier: Another name for an interface
- Capabilities list: What type of device it is (router/switch)
- Platform: Model/OS level running in device
- > CDP is enabled by default, no cdp run disables it (cdp run re-enables it).
- > To disable particular interface, no cdp enable (cdp enable re-enables it).
1. show CDP neighbor command: shows each neighbor (1 line of output/neighbor)
2. Then, to display further information, enter: show cdp entry entryname to display a specific neighbors details.
3. Or, to show all neighbors and details: show cdp neighbor detail
With show cdp features, possible to create network map (lists port/interface connections)
Top 5 Contributors to this article
|
|||||
