首页 > 代码库 > source address of ping

source address of ping

*A:SRC_R6# show router  route-table 


===============================================================================

Route Table (Router: Base)

===============================================================================

Dest Prefix[Flags]                            Type    Proto    Age         Pref

      Next Hop[Interface Name]                                   Metric    

-------------------------------------------------------------------------------

0.0.0.0/0                                     Remote  Static   01h03m48s   5

       10.2.6.2                                                     1

10.2.6.0/27                                   Local   Local    01h03m48s   0

       int_to_r2                                                    0

10.10.10.6/32                                 Local   Local    02h11m34s   0

       system                                                       0

192.168.20.0/24                               Local   Local    01h21m15s   0

       vprn10_r6                                                    0

-------------------------------------------------------------------------------

No. of Routes: 4

Flags: L = LFA nexthop available    B = BGP backup route available

       n = Number of times nexthop is repeated

===============================================================================

*A:SRC_R6# ping 192.168.10.1 source  192.168.20.1 

PING 192.168.10.1 56 data bytes

64 bytes from 192.168.10.1: icmp_seq=1 ttl=62 time=3.84ms.

64 bytes from 192.168.10.1: icmp_seq=2 ttl=62 time=3.81ms.

64 bytes from 192.168.10.1: icmp_seq=3 ttl=62 time=3.72ms.

64 bytes from 192.168.10.1: icmp_seq=4 ttl=62 time=3.64ms.

64 bytes from 192.168.10.1: icmp_seq=5 ttl=62 time=4.04ms.


---- 192.168.10.1 PING Statistics ----

5 packets transmitted, 5 packets received, 0.00% packet loss

round-trip min = 3.64ms, avg = 3.81ms, max = 4.04ms, stddev = 0.137ms

*A:SRC_R6# ping 192.168.10.1 source  10.2.6.6     

PING 192.168.10.1 56 data bytes

64 bytes from 192.168.10.1: icmp_seq=1 ttl=62 time=3.91ms.

64 bytes from 192.168.10.1: icmp_seq=2 ttl=62 time=2.85ms.

64 bytes from 192.168.10.1: icmp_seq=3 ttl=62 time=2.76ms.

64 bytes from 192.168.10.1: icmp_seq=4 ttl=62 time=2.68ms.

64 bytes from 192.168.10.1: icmp_seq=5 ttl=62 time=3.59ms.


*A:SRC_R6# debug  router  ip icmp 

*A:SRC_R6# ping 192.168.10.1 source  10.2.6.6 

PING 192.168.10.1 56 data bytes


1 2014/08/04 21:20:10.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.2.6.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


2 2014/08/04 21:20:10.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  ingressing on int_to_r2:

   192.168.10.1 -> 10.2.6.6

   type: Echo Reply (0)  code: No Code (0)

"

64 bytes from 192.168.10.1: icmp_seq=1 ttl=62 time=3.14ms.


3 2014/08/04 21:20:11.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.2.6.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


4 2014/08/04 21:20:11.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  ingressing on int_to_r2:

   192.168.10.1 -> 10.2.6.6

   type: Echo Reply (0)  code: No Code (0)

"

64 bytes from 192.168.10.1: icmp_seq=2 ttl=62 time=3.06ms.


5 2014/08/04 21:20:12.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.2.6.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


6 2014/08/04 21:20:12.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  ingressing on int_to_r2:

   192.168.10.1 -> 10.2.6.6

   type: Echo Reply (0)  code: No Code (0)

"

64 bytes from 192.168.10.1: icmp_seq=3 ttl=62 time=2.97ms.


7 2014/08/04 21:20:13.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.2.6.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


8 2014/08/04 21:20:13.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  ingressing on int_to_r2:

   192.168.10.1 -> 10.2.6.6

   type: Echo Reply (0)  code: No Code (0)

"

64 bytes from 192.168.10.1: icmp_seq=4 ttl=62 time=2.89ms.


9 2014/08/04 21:20:14.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.2.6.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


10 2014/08/04 21:20:14.44 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  ingressing on int_to_r2:

   192.168.10.1 -> 10.2.6.6

   type: Echo Reply (0)  code: No Code (0)

"

64 bytes from 192.168.10.1: icmp_seq=5 ttl=62 time=2.80ms.


---- 192.168.10.1 PING Statistics ----

5 packets transmitted, 5 packets received, 0.00% packet loss

round-trip min = 2.80ms, avg = 2.97ms, max = 3.14ms, stddev = 0.120ms



*A:SRC_R6# ping 192.168.10.1 source  10.10.10.6 

PING 192.168.10.1 56 data bytes


11 2014/08/04 21:23:58.16 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


12 2014/08/04 21:23:59.16 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"

"

Request timed out. icmp_seq=1.

Request timed out. icmp_seq=2.

Request timed out. icmp_seq=3.

Request timed out. icmp_seq=4.

Request timed out. icmp_seq=5.


---- 192.168.10.1 PING Statistics ----

5 packets transmitted, 0 packets received, 100% packet loss


*A:SRC_R6# ping 192.168.10.1                    

PING 192.168.10.1 56 data bytes


16 2014/08/04 21:24:22.22 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


17 2014/08/04 21:24:23.22 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


18 2014/08/04 21:24:24.22 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


19 2014/08/04 21:24:25.22 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"


20 2014/08/04 21:24:26.22 EST MINOR: DEBUG #2001 Base PIP

"PIP: ICMP

instance 1 (Base), interface index 3 (int_to_r2), 

ICMP  egressing on int_to_r2:

   10.10.10.6 -> 192.168.10.1

   type: Echo (8)  code: No Code (0)

"

Request timed out. icmp_seq=1.

Request timed out. icmp_seq=2.

Request timed out. icmp_seq=3.

Request timed out. icmp_seq=4.

Request timed out. icmp_seq=5.


---- 192.168.10.1 PING Statistics ----

5 packets transmitted, 0 packets received, 100% packet loss

*A:SRC_R6# ping 192.168.10.1 


so, the default source address of ping is the address of interface system.