Router Configuration and Networking Fundamentals
Router
Router: A device in computer networks designed to interconnect networks. Its main function is to determine the best route to send packets, using its routing table, and then send those packets to their destination.
Memory Types
- RAM: Executes instructions stored in CPU time (volatile). It saves:
- The IOS, unzipped from flash memory at startup.
- The configuration file in execution (running-config).
- The routing table.
- The ARP cache.
- Packet buffers.
- ROM: Permanently stores firmware, including:
- Bootstrap software.
- Basic diagnostic instructions.
- A minimal version of IOS.
- Flash: Non-volatile, electrically erasable memory. It stores:
- The Cisco IOS, which is copied to RAM to run.
- NVRAM: Non-volatile RAM. It stores:
- The startup configuration file (startup-config).
- Changes made to the running-config can be permanently saved here.
Routing
Routing: A fundamental process for any data network, transferring information from a source network to a destination network. Routers use routing tables to determine the best path and forward data packets through one of their interfaces, using both static and dynamic protocols.
IP Address
IP Address: A numerical identifier that logically and hierarchically identifies a device within a network that uses the IP protocol. It is located in Layer 3 (Network Layer) of the OSI model.
Other Commands
R1# debug ip routing
(Displays routing table updates).R1# shutdown
(Temporarily shuts down an interface).R1# undebug all
(Disables all debugging).R1# show cdp neighbors
(Shows directly connected neighbors).R1# show cdp neighbors detail
(Shows detailed information about connected neighbors, including IP addresses).R1# debug ip routing
(Displays messages when adding a network to the routing table).
Telnet
Telnet: (Configuration may vary) Typically: COM1 or COM2, 9600 baud, 8 data bits, No parity, 1 stop bit, No flow control.
Router Configuration Commands
router> enable
(Enters privileged mode).router#
(Privileged execution mode).router# configure terminal
(Enters global configuration mode).(config)# hostname R1
(Names the router “R1”).R1(config)# enable secret cisco
(Sets the privileged mode password).R1(config)# line vty 0 3
(Configures virtual terminal lines 0 to 3).R1(config-line)# password inacap
(Sets a password for the VTY lines).R1(config-line)# login
(Enables password checking for VTY lines).
Configuring Interfaces
R1(config)# interface ?
(Shows available interfaces).R1(config)# interface f0/0
(Enters interface configuration mode for FastEthernet0/0).R1(config-if)# ip address 10.10.10.1 255.255.0.0
(Configures the IP address and subnet mask).R1(config-if)# no shutdown
(Enables the interface).R1(config-if)# ctrl + z
(Exits to privileged mode).R1# conf t
(Enters global configuration mode – short forconfigure terminal
).R1(config)# interface serial s0/0/0
(Enters interface configuration mode for Serial0/0/0).R1(config-if)# ip address 150.150.20.1 255.255.255.0
(Configures the IP address and subnet mask).R1(config-if)# clock rate 64000
(Sets the clock rate if the interface is DCE).R1(config-if)# bandwidth 2048
(Sets the bandwidth).R1(config-if)# no shutdown
(Enables the interface).R1(config-if)# exit
(Exits interface configuration mode).
Show Commands
R1# show controllers
(Shows controller information, including DCE/DTE status).R1# show version
(Shows router model, IOS version, and other details).R1# show flash
(Shows flash memory size and content).R1# show running-config
(Shows the current configuration in RAM).R1# show startup-config
(Shows the configuration stored in NVRAM).R1# show ip route
(Shows the routing table).R1# show interfaces
(Shows details of all interfaces).R1# show ip interface brief
(Shows a summary of interface configurations).
Static Routing
- Static Route:
R1(config)# ip route network netmask next-hop
- Default Route:
R1(config)# ip route 0.0.0.0 0.0.0.0 serial0/0/0
(or other interface)
- Floating Static Route:
R1(config)# ip route network netmask next-hop 2
- Administrative distance: 0 (directly connected), 1 (static route), 2 (alternate route)