Questions tagged [icmp]

Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.

583 questions
2
votes
1 answer

ICMP echo response packets disappearing between kernel and userspace

I have a Linux system: $ uname -a Linux mybox 4.14.77-v7+ #1 SMP Mon Jan 7 10:09:57 GMT 2019 armv7l Linux The userspace is Alpine Linux 3.8 and libc is musl-libc. The system has two ethernet interfaces, eth0 and eth2. The default routes are…
Tom
  • 7,269
  • 1
  • 42
  • 69
2
votes
1 answer

Python How can I send an ICMP packet without spoofing?

I am trying to send an ICMP packet in python using scapy using my Debian VPS but I am not trying to spoof the IP or anything, but since my server doesn't spoof it won't send it anyways, but I cannot figure out any other way to create an ICMP packet…
Feitan Portor
  • 130
  • 2
  • 8
2
votes
2 answers

'Host Unreachable' returning successful

I have the following block of Python code which i use to Ping multiple addresses import subprocess as s import tkinter as tk from tkinter import * IPT.title("IP Ping Test Tool") canvas_IPT = Canvas(IPT, width=401, height=551) canvas_IPT.pack() …
M.Tomlinson
  • 81
  • 1
  • 9
2
votes
1 answer

IcmpSendEcho (ping) fails on Windows 10

We have a legacy Delphi application which uses IcmpSendEcho (from iphlpapi.dll) to perform echo requests. As I understand it, this performs the same function as "ping" from the command prompt. On Windows XP, the code below works fine. When the IPv4…
AlainD
  • 5,413
  • 6
  • 45
  • 99
2
votes
1 answer

Does the ICMP Header Checksum include the data as well?

As part of a homework assignment, I have to write a C program in Linux that generates ICMP replies to ICMP Echo requests using raw sockets. Does the data in the ICMP Packet have to be included in the checksum as well? Or should I calculate the…
Apoorva Iyer
  • 590
  • 1
  • 7
  • 15
2
votes
1 answer

I can't ping6 my domains in my home network: "mydomain.tld: Name or service not known"

Setup Desktop computer (MyComputer) Mobo: ASRock Distro: Arch Linux Yunohost Server (Yunohost) Mobo: Raspberry Pi 3 Distro: Debian Main App: Yunohost/NextCloud Domain registered at godaddy.com (mydomain.tld) Yunohost Server (Xroklaus) Mobo:…
Folaht
  • 1,053
  • 1
  • 13
  • 32
2
votes
1 answer

Adding icmp-type in Scapy stops code from working

I use the following code to generate ICMP requests, get the results back and also get the round trip time for each request. It works fine, except when I add icmp_type to the packet header. As long as I pass icmp_type, the code stops working. I…
2
votes
1 answer

ICMP request with data

I want to send ICMP request message with some data on the end. I can only send simple ICMP request with no data yet. When i want add some characters at the end of icmp structure that is in buffer, no ICMP request is send. When I delete the ending…
stepanVich
  • 318
  • 4
  • 11
2
votes
2 answers

How to send Ping6 request using Java library (JpCap)

I would like to monitor the ipv6 devices using ping6 request. Please let me know is there any open source library is available to send and receive Ping6 request. I tried with JpCap but couldn't succeed and I got the below error message…
Ravikumar
  • 41
  • 5
2
votes
1 answer

Traceback (most recent call last) & TypeError: unsupported operand type(s) for +: 'int' and 'str'

#!/usr/bin/python import time import random import struct import select import socket def chk(data): x = sum(x << 8 if i % 2 else x for i, x in enumerate(data)) & 0xFFFFFFFF x = (x >> 16) + (x & 0xFFFF) x = (x >> 16) + (x & 0xFFFF) …
user1532437
  • 101
  • 7
2
votes
2 answers

How to differentiate between extension and upper-layer header

I'm trying to parse IPv6 packet received through raw socket and decide if it is ICMPv6 or not. I can process the Ethernet and IPv6 header, but then there are optional extension headers. If the Next Header field of IPv6 header is not ICMPv6, I have…
Raven
  • 4,783
  • 8
  • 44
  • 75
2
votes
4 answers

How to log every ICMP reply message

There is this question i ran into, how can we find the ip address of the ICMP reply message in GNU/Linux?
Amir Zadeh
  • 3,481
  • 2
  • 26
  • 47
2
votes
1 answer

Sniffing detection

Can someone tell me how exactly works "test ICMP"? (One of methods to detect sniffing in local network)
Saint
  • 5,397
  • 22
  • 63
  • 107
2
votes
0 answers

Why ping (ICMP) generates ESP traffic?

I'm reading this article on wikipedia about protocols (OSI model) [1] It says that ICMP(aka ping) and IPsec are at Layer 3(Network Layer). And ESP is at Layer 4(Transport Layer). When I use strongSwan [2] on two machines and I have an established…
2
votes
2 answers

Why does ping use ICMP not TCP?

In our office we've got an Amazon VPC linked to our office network with a bastion server in the middle. When I try to ping servers within the VPC it doesn't work. The answer I got from a co-worker was that "ping won't work because ICMP isn't linked…
hawkeye
  • 34,745
  • 30
  • 150
  • 304