Ping
| Document revision: | .NaN (February 5, 2008, 15:52 GMT) |
| Applies to: | V3.0 |
General Information
Summary
Ping uses Internet Control Message Protocol (ICMP) Echo messages to determine if a remote host is active or inactive and to determine the round-trip delay when communicating with it.
Specifications
Packages required: systemLicense required: Level1
Submenu level: /, /tool mac-server ping
Standards and Technologies: ICMP
Hardware usage: Not significant
Description
Ping sends ICMP echo (ICMP type 8) message to the host and waits for the ICMP echo-reply (ICMP type 0) from that host. The interval between these events is called round trip. If the response (that is called pong) has not come until the end of the interval, we assume it has timed out. The second significant parameter reported is ttl (Time to Live). Is is decremented at each machine in which the packet is processed. The packet will reach its destination only when the ttl is greater than the number of routers between the source and the destination.
The Ping Command
Command name: /pingProperty Description
(IP address|MAC address) - IP or MAC address for destination hostcount (integer; default: 0) - how many times ICMP packets will be sentNotes
If DNS service is configured, it is possible to ping by DNS address. To do it from Winbox, you should resolve DNS address first, pressing right mouse button over its address and choosing Lookup Address.
You cannot ping with packets larger that the MTU of that interface, so the packet size should always be equal or less than MTU. If 'pinging' by MAC address, minimal packet size iz 50 bytes.
Only neighbour MikroTik RouterOS routers with MAC-ping feature enabled can be 'pinged' by MAC address.
Example of ping command
An example of Ping command:
/pi 159.148.95.16 count=5 interval=500ms 159.148.95.16 64 byte ping: ttl=59 time=21 ms 159.148.95.16 ping timeout 159.148.95.16 ping timeout 159.148.95.16 ping timeout 159.148.95.16 64 byte ping: ttl=59 time=16 ms 5 packets transmitted, 2 packets received, 60% packet loss round-trip min/avg/max = 16/18.5/21 ms [admin@MikroTik] >
Resolve IP address:
To resolve IP address from a DNS name, type the command:
/ping www.google.lv
and press the [Tab] key:
[admin@MikroTik] > /ping 66.102.11.104
The DNS name www.google.lv changed to IP address 66.102.11.104!
'Ping', using arp requests:
To ping a host in our local network, using ARP requests instead of ICMP:
/ping 10.5.8.130 interface=local 10.5.8.130 with hw-addr 00:30:4F:14:AB:58 ping time=1 ms 10.5.8.130 with hw-addr 00:30:4F:14:AB:58 ping time=1 ms 10.5.8.130 with hw-addr 00:30:4F:14:AB:58 ping time=1 ms 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 1/1.0/1 ms [admin@MikroTik] >
MAC Ping Server
Submenu level: /tool mac-server pingProperty Description
enabled (yes | no; default: yes) - whether MAC pings to this router are allowedExample
To disable MAC pings:
[admin@MikroTik] tool mac-server ping> set enabled=no
[admin@MikroTik] tool mac-server ping> print
enabled: no
[admin@MikroTik] tool mac-server ping>
