cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Ping From Node Using CSMP

376
Views
0
Helpful
0
Comments
mathaker
Contributor

This note illustrates how you can use the CSMP protocol to initiate an IPv6 ping from a CG-Mesh node to another IPv6 host at the head end.  In this example we use the CSMP CLI tool.  We also assume that CSMP message signing (a security measure) is not in use.

Here is how to issue the CSMP post to the node.

C:\>java -jar CsmpRequest-5.4.19.jar -r [2001:db8:3:9:1:3b0b:33:37] -P txreq.json.txt 30

log4j:WARN No appenders could be found for logger (com.cisco.cgms.protocols.coap.CoapClient).

log4j:WARN Please initialize the log4j system properly.

CoapMessage(transaction_type=ACK,status=201,bodylen=0)

Here is what the txreq.json.txt looks like:

C:\>type txreq.json.txt

{"dest":"[2001:db8:1:1:100::10]","count":3,"delay":1}

To get the ping results from the node, use this command:

C:\>java -jar CsmpRequest-5.4.19.jar -r [2001:db8:3:9:1:3b0b:33:37] 31

log4j:WARN No appenders could be found for logger (com.cisco.cgms.protocols.coap.CoapClient).

log4j:WARN Please initialize the log4j system properly.

CoapMessage(transaction_type=ACK,status=205,bodylen=53)

[31/PingResponse]: {"sent": 3,"receieved": 2,"minRtt": 288,"meanRtt": 390,"maxRtt": 492,

"stdevRtt": 10404,"src": "[2001:db8:1:1:100:0:0:10%lowpan]"}

To monitor the ping packets, you may use packet monitoring on the FAN router:

CGR1240# ethanalyzer local interface wpan limit-captured-frames 0

total args=7

/usr/bin/sudo tshark -t ad -l -i wpan0

Capturing on interface(wpan0)

2013-08-22 10:23:02.698450 2001:db8:1:100::11 -> 2001:db8:3:9:1:3b0b:33:37 UDP Source port: 60368  Destination port: 61624

2013-08-22 10:23:03.108718 2001:db8:3:9:1:3b0b:33:37 -> 2001:db8:1:100::11 STUN2 ChannelData TURN Message

2013-08-22 10:23:04.108727 2001:db8:3:9:1:3b0b:33:37 -> 2001:db8:1:1:100::10 ICMPv6 Echo request

2013-08-22 10:23:04.120242 2001:db8:1:1:100::10 -> 2001:db8:3:9:1:3b0b:33:37 ICMPv6 Echo reply

2013-08-22 10:23:04.556996 2001:db8:3:9:: -> 2001:db8:1:1:100::10 ICMPv6 Unreachable (Route unreachable)

2013-08-22 10:23:05.355631 2001:db8:3:9:1:3b0b:33:37 -> 2001:db8:1:1:100::10 ICMPv6 Echo request

2013-08-22 10:23:05.357884 2001:db8:1:1:100::10 -> 2001:db8:3:9:1:3b0b:33:37 ICMPv6 Echo reply

2013-08-22 10:23:06.107551 2001:db8:3:9:1:3b0b:33:37 -> 2001:db8:1:1:100::10 ICMPv6 Echo request

2013-08-22 10:23:06.109831 2001:db8:1:1:100::10 -> 2001:db8:3:9:1:3b0b:33:37 ICMPv6 Echo reply

2013-08-22 10:23:27.535650 2001:db8:3:9:1:3b0b:33:37 -> 2001:db8:3:9:: ICMPv6 Unknown (0x9b) (Unknown (0x02))

Content for Community-Ad

This widget could not be displayed.