Wednesday, December 22, 2010

Verifying Basic Router Configuration

These commands are for viewing and debugging the configuration

#show running-config

This command displays the current running configuration that is stored in RAM. With a few exceptions, all configuration commands that were used will be entered into the running-config and implemented immediately by the IOS.

R2#show running-config
Building configuration...   Current configuration : 1493 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$7sIu$GqIQ4EcpGqjvKLiZFP5XG.
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
ip domain name home.ab
!
!
interface Loopback0
 ip address 172.16.0.1 255.255.255.224
!
interface Loopback1
 ip address 172.16.0.33 255.255.255.224
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.1.2 255.255.255.252
 serial restart-delay 0
 no fair-queue
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
!
router rip
 version 2
 passive-interface Loopback0
 passive-interface Loopback1
 network 172.16.0.0
 network 192.168.1.0
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
!
control-plane
!
!
!
banner motd ^C This is a private machine. Unauthorized connections are logged and forbiden.^C
!
line con 0
 exec-timeout 0 0
 password 7 060506324F41
 logging synchronous
 login
line aux 0
line vty 0 4
 password 7 0822455D0A16
 login
line vty 5 1276
 password 7 0822455D0A16
 login
!
!
end  

#show startup-config

This command displays the startup configuration file stored in NVRAM. This is the configuration that the router will use on the next reboot.

This configuration does not change unless the current running configuration is saved to NVRAM with the copy running-config startup-config command. Notice in the figure that the startup configuration and the running configuration are identical. They are identical because the running configuration has not changed since the last time it was saved. Also notice that the show startup-config command also displays how many bytes of NVRAM the saved configuration is using.

#show ip route

This command displays the routing table that the IOS is currently using to choose the best path to its destination networks. At this point, R1 only has routes for its directly connected networks via its own interfaces.

R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
     172.16.0.0/27 is subnetted, 2 subnets
R       172.16.0.32 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
R       172.16.0.0 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.2.0 is directly connected, FastEthernet0/0
     192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, Serial1/0
S*   0.0.0.0/0 is directly connected, FastEthernet0/0  

#show ip interface brief

This command displays abbreviated interface configuration information, including IP address and interface status. This command is a useful tool for troubleshooting and a quick way to determine the status of all router interfaces.

R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.10.2.1       YES NVRAM  up                    up
FastEthernet0/1            unassigned      YES NVRAM  administratively down down
Serial1/0                  192.168.1.1     YES NVRAM  up                    up
Serial1/1                  unassigned      YES NVRAM  administratively down down
Serial1/2                  unassigned      YES NVRAM  administratively down down
Serial1/3                  unassigned      YES NVRAM  administratively down down  

#show interfaces

This command displays all of the interface configuration parameters and statistics.

R1#show interfaces
FastEthernet0/0 is up, line protocol is up
  Hardware is AmdFE, address is cc00.0fc8.0000 (bia cc00.0fc8.0000)
  Internet address is 10.10.2.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:02:48, output 00:00:05, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     375 packets input, 51726 bytes
     Received 373 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog
     0 input packets with dribble condition detected
     738 packets output, 73676 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 unknown protocol drops
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out  

#show ip protocols

To display the parameters and current state of the active routing protocol process, use the show ip protocols command in EXEC mode.

The information displayed by the show ip protocols command is useful in debugging routing operations. Information in the Routing Information Sources field of the show ip protocols output can help you identify a router suspected of delivering bad routing information.

The following is sample output from the show ip protocols command that shows Routing Information Protocol (RIP) processes:

Routing Protocol is "rip"
  Sending updates every 30 seconds, next due in 2 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Redistributing: rip
  Default version control: send version 2, receive version 2
    Interface        Send  Recv   Key-chain
    Ethernet0        2     2      trees 
    Fddi0            2     2                      
  Routing for Networks:
    172.19.0.0
    10.2.0.0
    10.3.0.0
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 120)


No comments:

Post a Comment