Router basic command and static route configuration


Topology Diagram

IP address table:



Learning Objectives
  1. Perform basic configuration tasks on a router
  2. Configure and activate Serial and Ethernet interface
  3. Test connectivity
  4. Gather information to discover causes for lack of connectivity between devices
  5. Configure a static route using an intermediate address.

Task 1: Execute basic command in each router: host name, enable secret, password, login...

  •  Change router name from R1 to GNS3 
            R1>enable
            R1#configure terminal
            R1(config)#hostname GNS3
            GNS3(config)#
  • Enable password before enter to privilege mode (password: gns3)
           R1#configure terminal 
           R1(config)#enable secret gns3  
          
  • Configure Banner 
R1>enable  
Password:  
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
R1(config)#banner motd # 
Warning! This is my banner :)#
Show banner in user mode window
  • Configure password telnet, this configuration will help your router more secure.
R1>enable 
Password: 
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
R1(config)#line vty 0 4 
R1(config-line)#password gns3 
R1(config-line)#login
Use Show running-configure to show result

Password in clear text, easy to attack.
We should use "service password-encryption" to increase secure for telnet password
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
R1(config)#service password-encryption 
R1(config)#exit
Telnet password already encrypted
  • To save router configuration use command "copy running-config startup-config"
R1#copy running-config startup-config 
Destination filename [startup-config]? 
Building configuration... 
[OK]
  • Clear configuration in router use command "erase startup-config
R1#erase startup-config 
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]

        Task 2: Configure IP for each interface in each router and PCs

        • Router R1
        Configure ip address for port serial 2/0 and f0/0

        R1>enable 
        Password: 
        R1#configure terminal 
        Enter configuration commands, one per line.  End with CNTL/Z 
        R1(config)#interface serial 2/0 
        R1(config-if)#ip address 172.16.2.1 255.255.255.0 
        R1(config-if)#clock rate 64000
        R1(config-if)#no shutdown 
        R1(config-if)#exit 
        R1(config)#interface fastEthernet 0/0
        R1(config-if)#ip address 172.16.3.1 255.255.255.0 
        R1(config-if)#no shutdown
        Show result, use command "show ip interface brief"

        Show detail port information in router R1

        • Router R2
        Configure ip address for interface serial 2/0, serial 2/1 and f0/0

        R2>enable 

        Password: 

        R2#configure terminal 

        Enter configuration commands, one per line.  End with CNTL/Z. 

        R2(config)#interface serial 2/0 
        R2(config-if)#ip address 172.16.2.2 255.255.255.0 
        R2(config-if)#clock rate 64000 
        R2(config-if)#no shutdown
        R2(config-if)#exit 
        R2(config)#interface fastEthernet 0/0 
        R2(config-if)#ip address 172.16.1.1 255.255.255.0 
        R2(config-if)#no shut 
        R2(config-if)#exit 
        R2(config)#interface serial 2/1 
        R2(config-if)#ip address 192.168.1.1 255.255.255.0 
        R2(config-if)#clock rate 64000 
        R2(config-if)#no shutdown 
        R2(config-if)#
        Interfaces configuration

        • Router R3
        Configure ip address for interface serial 2/0 and f0/0

        R3>enable 
        Password: 
        R3#configure terminal 
        Enter configuration commands, one per line.  End with CNTL/Z. 
        R3(config)#interface serial 2/0 
        R3(config-if)#ip address 192.168.1.2 255.255.255.0 
        R3(config-if)#clock rate 64000 
        R3(config-if)#no shut 
        R3(config-if)#exit 
        R3(config)#interface fastEthernet 0/0 
        R3(config-if)#ip address 192.168.2.1 255.255.255.0 
        R3(config-if)#no shut
        Router R3 interface configurations
        • PC1
        PC1> ip 172.16.3.2 255.255.255.0 172.16.3.1
        Checking for duplicate address...
        PC1 : 172.16.3.2 255.255.255.0 gateway 172.16.3.1
        • PC2
        PC2> ip 172.16.1.2 255.255.255.0 172.16.1.1
        Checking for duplicate address...
        PC1 : 172.16.1.2 255.255.255.0 gateway 172.16.1.1
        • PC3
        PC3> ip 192.168.2.2 255.255.255.0 192.168.2.1
        Checking for duplicate address...
        PC1 : 192.168.2.2 255.255.255.0 gateway 192.168.2.1

        Task 3: Configure static route

        • Enable debug routing use command "debug ip routing"
        R1#debug ip routing 
        IP routing debugging is on

              • Static route syntax

              or 


              • Router R1
              Reachability towards 172.16.1.0/24,192.168.1.0/24 and route 192.168.2.0 . The next-hop router is R2. The same outbound interface is s2/0. 

              R1> 
              R1>enable
              R1#configure terminal 
              Enter configuration commands, one per line.  End with CNTL/Z. 
              R1(config)#ip route 172.16.1.0 255.255.255.0 serial 2/0 
              *Jan 23 10:22:33.231: RT: SET_LAST_RDB for 172.16.1.0/24  NEW rdb: is directly connected
              *Jan 23 10:22:33.231: RT: add 172.16.1.0/24 via 0.0.0.0, static metric [1/0]
              *Jan 23 10:22:33.235: RT: NET-RED 172.16.1.0/24
               
              R1(config)#ip route 192.168.1.0 255.255.255.0  
              R1(config)#ip route 192.168.1.0 255.255.255.0 serial 2/0 
              *Jan 23 10:23:00.371: RT: SET_LAST_RDB for 192.168.1.0/24  NEW rdb: is directly connected
              *Jan 23 10:23:00.371: RT: add 192.168.1.0/24 via 0.0.0.0, static metric [1/0]
              *Jan 23 10:23:00.375: RT: NET-RED 192.168.1.0/24
               
              R1(config)#ip route 192.168.2.0 255.255.255.0 serial 2/0 
              *Jan 23 10:23:20.967: RT: SET_LAST_RDB for 192.168.2.0/24  NEW rdb: is directly connected
              *Jan 23 10:23:20.971: RT: add 192.168.2.0/24 via 0.0.0.0, static metric [1/0]*Jan 23 10:23:20.971: RT: NET-RED 192.168.2.0/24
              Note: Yellow mark is debug ip routing information. You only can receive this information after enable debug mode use "debug ip routing" command

              • Router R2

              Reachability towards 172.16.3.0/24,192.168.2.0/24  . The next-hop router  R1 outbound interface is s2/0 and R3 outbound interface is s2/1.
              R2#configure terminal 
              Enter configuration commands, one per line.  End with CNTL/Z. 
              R2(config)#ip route 172.16.3.0 255.255.255.0 serial 2/0 
              R2(config)#ip route 192.168.2.0 255.255.255.0 serial 2/1

              •  Router R3

               Reach-ability towards 172.16.3.0/24172.16.1.0/24, 172.16.2.0/24 . The next-hop router  R3 outbound interface is s2/0.
              R3# 
              R3#configure terminal 
              Enter configuration commands, one per line.  End with CNTL/Z. 
              R3(config)#ip route 172.16.3.0 255.255.255.0 serial 2/0 
              R3(config)#ip route 172.16.2.0 255.255.255.0 serial 2/0 
              R3(config)#ip route 172.16.1.0 255.255.255.0 serial 2/0
              Note: You can not just be changed, we must remove old route configuration before add new route information. Otherwise, both old and new route will keep in configuration file.
              To remove ip route, use command "no ip route"
               ExampleR3(config)#no ip route 172.16.1.0 255.255.255.0 serial 2/0

              • Show ip route table use "show ip route" command


              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 not set
                   172.16.0.0/24 is subnetted, 3 subnets
              S       172.16.1.0 is directly connected, Serial2/0
              C       172.16.2.0 is directly connected, Serial2/0
              C       172.16.3.0 is directly connected, FastEthernet0/0
              S    192.168.1.0/24 is directly connected, Serial2/0
              S    192.168.2.0/24 is directly connected, Serial2/0

              • Check connectivity
              Form PC1 ping to PC2 and PC3


                                                 PC1> ping 172.16.1.284 bytes from 172.16.1.2 icmp_seq=1 ttl=62 time=61.365 ms84 bytes from 172.16.1.2 icmp_seq=2 ttl=62 time=73.770 ms84 bytes from 172.16.1.2 icmp_seq=3 ttl=62 time=41.482 ms84 bytes from 172.16.1.2 icmp_seq=4 ttl=62 time=44.665 ms84 bytes from 172.16.1.2 icmp_seq=5 ttl=62 time=41.450 ms
                                                PC1> ping 192.168.2.2
                                                84 bytes from 192.168.2.2 icmp_seq=1 ttl=61 time=65.602 ms
                                                84 bytes from 192.168.2.2 icmp_seq=2 ttl=61 time=58.691 ms
                                                84 bytes from 192.168.2.2 icmp_seq=3 ttl=61 time=57.872 ms
                                                84 bytes from 192.168.2.2 icmp_seq=4 ttl=61 time=58.364 ms
                                                84 bytes from 192.168.2.2 icmp_seq=5 ttl=61 time=62.914 ms
                                                Do same thing in PC2 and PC3.

                                                6 comments:

                                                1. Great information about CCNP.. This is very helpful for us.
                                                  Thank You!!
                                                  I would like to share one useful link for best study purpose on CCNP. You can get most useful CCNP Tutorials here.

                                                  ReplyDelete
                                                2. Nice post. Thanks for sharing such great information
                                                  192.168.1.1

                                                  ReplyDelete
                                                3. Excellent Blog on the Router IP address. If you want to search the IP then visit the 19216811.Global. They have a huge collections of Global IP address.

                                                  ReplyDelete
                                                4. Good Post. I like your blog. Thanks for Sharing good information.
                                                  CCNA Training in Delhi

                                                  ReplyDelete
                                                5. Thanks for the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. BY - router customer support our toll-free no +1 888 509 9555.

                                                  ReplyDelete