Questions tagged [packet]

A packet is one unit of binary data capable of being routed through a computer network.

This is a small amount of computer data sent over a network. Any time you receive data from the Internet, it comes to your computer in the form of many little packets.

Each packet contains:

  • A label which uniquely identifies it
  • The IP address of its origin and destination
  • A sequence number (for sorting)
  • A checksum (for error checking

The process of sending and receiving packets is known as "packet-switching." Packets from many different locations can be sent on the same lines and be sorted and directed to different routes by various computers along the way, the packets are then sorted by their sequence number once they reach their destination. It works a lot like the post office, except billions of packets are transferred each day, and most packets take less than a few seconds to reach their destination. Even FedEx same-day delivery can't compete with that.

Packet Definition. 2013. Packet Definition. [ONLINE] Available at: http://www.techterms.com/definition/packet. [Accessed 30 April 2013].

1562 questions
11
votes
2 answers

Track a packet as it goes through the kernel (linux)

I have two machines which are set up to use Ip-Security and machine A (lets call them A and B) has a socket which is bound to a particular UDP port on the local machine and it polls it frequently to see if anything is received on it. When I disable…
mmtauqir
  • 8,499
  • 9
  • 34
  • 42
11
votes
3 answers

Average UDP packet loss and packet re-ordering

I'd like to garner fellow SO'ers experience with regards to the issue of UDP packet loss (or drop-out). Initially my understanding is that given direct point to point connections where the NICs are connected via a crossover cable and ample buffer on…
Sami Kenjat
  • 185
  • 2
  • 12
11
votes
2 answers

What happens after a packet is captured?

I've been reading about what happens after packets are captured by NICs, and the more I read, the more I'm confused. Firstly, I've read that traditionally, after a packet is captured by the NIC, it gets copied to a block of memory in the kernel…
Rayne
  • 14,247
  • 16
  • 42
  • 59
10
votes
1 answer

For how long a router keeps records in the NAT and can they be reused forwarding requests from other hosts?

There is an answer explaining in simple terms how a router works translating requests from the local network to outside and back (https://superuser.com/questions/105838/how-does-router-know-where-to-forward-packet) what is not clear - for how long a…
alex.49.98
  • 609
  • 5
  • 13
10
votes
6 answers

HTTP packet reconstruction

If I have a large HTTP packet which has been split up into a number of TCP packets, how can I reconstruct them back into a single HTTP packet? Basically, where in the packet do I look to tell when a HTTP packet is starting/ending? I can't seem to…
mike
  • 3,146
  • 5
  • 32
  • 46
10
votes
2 answers

How to send a UDP packet to a specific computer when all the computer on the network have the same public IP address?

Here's the problem, it's very simple (to understand..): I have 2 computers at home, they both have the same public IP address (e.g. 1.2.3.4). I have 1 computer at a coffee place (different network) so it has a different public IP address. I want to…
Stage Two
  • 189
  • 1
  • 2
  • 6
9
votes
2 answers

Looking For A Packet Description Language (Preferably With A C# Implementation)

I am in the process of developing a special-purpose network tool with some packet sniffing and decoding capabilities. I am looking for languages designed to assist in the dissection/decoding of arbitrary packet formats. Idealy, the solution should…
daveaglick
  • 3,600
  • 31
  • 45
9
votes
1 answer

Which is the intended bit (not byte) order in internet RFC packet diagrams

I am parsing ICMPv6 datagrams on my home wired network, and can't find an explicit mention of the bit-ordering convention in the specific RFC. Multi-byte fields are network order, but what about bits within a byte? Machines are byte-addressible, but…
init_js
  • 4,143
  • 2
  • 23
  • 53
9
votes
7 answers

how to calculate end-to-end delay in this scenario

Here is my question: We wish to send a message of size 150,000 bytes over the network. There are four hops, each of length 20km and running at 100 Mb/s. However, before sending we split the message into 1500 byte packets. What is the end-to-end…
Ross
  • 305
  • 1
  • 2
  • 10
9
votes
2 answers

Send packet and change its source IP

Lets say I have an application written in python to send a ping or e-mail. How can I change the source IP address of the sent packet to a fake one, using, e.g., Scapy? Consider that that the IP address assigned to my eth0 is 192.168.0.100. My e-mail…
Jay
  • 347
  • 2
  • 5
  • 10
9
votes
2 answers

Scapy packet sent cannot be received

I'm trying to send UDP Packets with scapy with the following command: >> send(IP(dst="127.0.0.1",src="111.111.111.111")/UDP(dport=5005)/"Hello") . Sent 1 packets. And from tcpdump I can see: 22:02:58.384730 IP 111.111.111.111.domain >…
ethanjyx
  • 1,970
  • 7
  • 28
  • 50
9
votes
3 answers

get packet size in scapy / python

In Scapy (or even just Python, for that sake), how do I get the size in bytes of a given packet? I'm tempted to use the function len but I'm not sure what exactly it returns in the case of packets. >>> len(IP(dst="www.google.com")) 20 >>>…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
8
votes
4 answers

Send TCP SYN packet with payload

Is it possible to send a SYN packet with self-defined payload when initiating TCP connections? My gut feeling is that it is doable theoretically. I'm looking for a easy way to achieve this goal in Linux (with C or perhaps Go language) but because it…
zzy
  • 751
  • 1
  • 13
  • 25
8
votes
2 answers

UDP - Optional Checksum

From what I have read about UDP, it has no error handling, no checking for things like sequence of data sent/recieved, no checking for duplicate packets, no checking for corrupt packets and obviously no guarantee that the packets sent are even…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
8
votes
2 answers

What to send over serial ports

I'm sorry if this is a very vague question, but I can't seem to formulate it properly to find anyone else with this issue. The main question is, once you have a serial connection established between two devices, how do you use that connection to…
JBausmer
  • 914
  • 9
  • 11