1

what is the use of extended ping and No Keep alive command in cisco routers.

Let,s we see that using this example topology in gns3.I will tell you how to use and where to use extended ping command in routers.


Step 1:Create a topology like this,

what is the use of extended ping command in cisco routers.


I am going to setup a virtual LAN 10.0.0.0 Network in router R1 and 30.0.0.0 Network in router R2 by using 'no keepalive' command for the interface fastethernet.Keep alive command will check the device that connected to interfaces every 10 seconds.If the device is in down state then router interface line protocol will goes to down state.If we use 'no keepalive' command it wont check for the status of device, so router interface always will be kept in up state.



Step 2:Configure ip address to interfaces in routers like i have given in a topology.

First I am going to give the command 'show ip interface brief' in privileged mode to check what
type interfaces i got in router by default.

R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down
Serial1/0                  unassigned      YES unset  administratively down down
Serial1/1                  unassigned      YES unset  administratively down down
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down
Serial1/4                  unassigned      YES unset  administratively down down
Serial1/5                  unassigned      YES unset  administratively down down
Serial1/6                  unassigned      YES unset  administratively down down
Serial1/7                  unassigned      YES unset  administratively down down
Virtual-Access1            unassigned      YES unset  up                    up


I am going to use fastethernet0/0 for the LAN

In router R1 global config mode,

R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit

*Nov 28 10:53:43.667: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up


R1#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.0.0.1        YES manual up                    down
Serial1/0                  unassigned      YES unset  administratively down down
Serial1/1                  unassigned      YES unset  administratively down down
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down
Serial1/4                  unassigned      YES unset  administratively down down
Serial1/5                  unassigned      YES unset  administratively down down
Serial1/6                  unassigned      YES unset  administratively down down
Serial1/7                  unassigned      YES unset  administratively down down
Virtual-Access1            unassigned      YES unset  up                    up


We can see that the line protocol of interface fastethernet 0/0 is down because it is not connected to any device.Now i am going to give 'no keepalive' command to the interface fastethernet0/0 to stop checking for the device connected for that interface,then this interface will be come up and always kept up until we re-enable 'keepalive' on that interface.


R1(config)#interface fastEthernet 0/0
R1(config-if)#no keepalive
R1(config-if)#exit

*Nov 28 11:02:44.207: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


Now,Give 'show ip interface brief' command in privileged mode to check status of the interafaces
R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.0.0.1        YES manual up                    up
Serial1/0                  unassigned      YES unset  administratively down down
Serial1/1                  unassigned      YES unset  administratively down down
Serial1/2                  unassigned      YES unset  administratively down down
Serial1/3                  unassigned      YES unset  administratively down down
Serial1/4                  unassigned      YES unset  administratively down down
Serial1/5                  unassigned      YES unset  administratively down down
Serial1/6                  unassigned      YES unset  administratively down down
Serial1/7                  unassigned      YES unset  administratively down down
Virtual-Access1            unassigned      YES unset  up                    up

Now,we have a 10.0.0.0 network in router R1 connected to it.Same for the 30.0.0.0 network in R2.


R1(config)#int serial1/0
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#encapsulation ppp
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit


In Router R2 global config mode,

R2(config)#interface serial 1/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#encapsulation ppp
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 30.0.0.1 255.0.0.0
R1(config-if)#no keepalive
R2(config-if)#no shutdown
R2(config-if)#exit


Step 3:Now,enable dynamic routing protocol rip on R1 and R2.

In router R1 global config mode,

R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#network 20.0.0.0
R1(config-router)#exit

In router R2 global config mode,

R2(config)#router rip
R2(config-router)#network 20.0.0.0
R2(config-router)#network 30.0.0.0
R2(config-router)#exit


Step 4:Now i am going to ping 30.0.0.1 from router R1.Before we ping give this command 'debug ip packet' in privileged mode on R1.


R1#ping 30.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/35/68 ms


*Nov 28 11:30:20.627: IP: tableid=0, s=20.0.0.1 (local), d=30.0.0.1 (Serial1/0), routed via FIB
*Nov 28 11:30:20.631: IP: s=20.0.0.1 (local), d=30.0.0.1 (Serial1/0), len 100, sending
*Nov 28 11:30:20.695: IP: tableid=0, s=30.0.0.1 (Serial1/0), d=20.0.0.1 (Serial1/0), routed via RIB
*Nov 28 11:44:20.355: IP: s=30.0.0.1 (Serial1/0), d=10.0.0.1, len 100, rcvd 4


Here,source address is 20.0.0.1 and destination address is 30.0.0.1.How can we ping from 10.0.0.0
network.We have to use Extended ping command let's we see how to use that.

Extended command

R1#ping
Protocol [ip]:
Target IP address: 30.0.0.1
Repeat count [5]: 10
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: yes
Source address or interface: 10.0.0.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:

Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 30.0.0.1, timeout is 2 seconds:
Packet sent with a source address of 10.0.0.1
!!!!!!!!!!
Success rate is 100 percent (10/10), round-trip min/avg/max = 20/28/64 ms


*Nov 28 11:44:20.275: IP: tableid=0, s=10.0.0.1 (local), d=30.0.0.1 (Serial1/0), routed via FIB
*Nov 28 11:44:20.279: IP: s=10.0.0.1 (local), d=30.0.0.1 (Serial1/0), len 100, sending
*Nov 28 11:44:20.355: IP: tableid=0, s=30.0.0.1 (Serial1/0), d=10.0.0.1 (FastEthernet0/0), routed via RIB
*Nov 28 11:44:20.355: IP: s=30.0.0.1 (Serial1/0), d=10.0.0.1, len 100, rcvd 4


Now source address is 10.0.0.1 and destination address is 30.0.0.1.we got reply from the network 30.0.0.0 to 10.0.0.0

I think Every one got an idea of using keepalive and Extended ping command.

That's it!!...











Post a Comment

 
Top