Friday 23 December 2011

Sizes and Packets (Hard)

 Sizes

8 bits = 1 byte
1024 bytes = 1 Kilobyte (KB)
1024 Kilobytes = 1 Megabyte (MB)
1024 Megabytes = 1 Gigabyte (GB)
1024 Gigabytes = 1 Terabyte (TP)



Packets
  
When a Device wants to send a message to another device, the information is sent in envelopes called packets. Packets are 8 bits or 1 byte in size.

Each packet is sent simultaneously unless the connection is broken.

Packet structure

A packet is broken into 3 parts; Header, body, and footer.

Header

Senders IP address - Address of where the packet was sent from.
Destination IP address - Where the packet is going.
Protocol - What protocol its using.
Sequence number - Messages are too large to be sent in one packet so they are sent in multiple packets. The packets don't arrive at the destination in the right order so each packet is given a sequence number so that it can be put back into the right order when it gets to the destination.

e.g.
packet send order = 3,2,4,1
packet receive order = 3,2,4,1
packets order after sequence number has been read = 1,2,3,4

Body

This is where the data being sent is stored.

Footer

Error correction -This is where the packet gives information to the receiving device to figure out if the data is corrupt or not (I will go over this in the protocol and general tutorial
Data to show end of packet - This information tells the device that it is the end of the packet.

To sum up.

  • Packets are 8 bits in size (1 bytes)
  • Packets contain a  header, body and footer.

No comments:

Post a Comment