# A-level Computing/AQA/Paper 2/Fundamentals of communication and networking/IP standards
## IP Standards

The Internet protocol has evolved over a period of time and undergone several versions. IP version 4 (IPv4) has been the main version through the explosive growth of the Internet through the 80s, 90s and into the 21st century. With a 32 bit address field there are over 4 billion addresses. However due to the way the addresses were subdivided, the way they were allocated and used and the growth, no more addresses are available for new networks. NAT has gone a long way to alleviate the problem, but demand is such that a new and bigger address space has been developed. This is IP version 6 (IPv6). This new version has a 128 bit address field and many new features.

### IPv4

Ipv4 is covered by RFP 791 in all its detail.
IPv4 Header Format :
| Offsets | Octet | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
| Octet | Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
| 0 | 0 | Version | Version | Version | Version | IHL | IHL | IHL | IHL | DSCP | DSCP | DSCP | DSCP | DSCP | DSCP | ECN | ECN | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length | Total Length |
| 4 | 32 | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Flags | Flags | Flags | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset | Fragment Offset |
| 8 | 64 | Time To Live | Time To Live | Time To Live | Time To Live | Time To Live | Time To Live | Time To Live | Time To Live | Protocol | Protocol | Protocol | Protocol | Protocol | Protocol | Protocol | Protocol | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum | Header Checksum |
| 12 | 96 | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address | Source IP Address |
| 16 | 128 | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address | Destination IP Address |
| 20 | 160 | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) | Options (if IHL > 5) |
Fields of interest are
* Version - 4 or 6
* DSCP - This is a priority field allowing for some packets to be marked as higher priority than others.
* Identification - This allows for duplicate packets to be ignored, or missing packets to be flagged up.
* TTL - Time to Live. This is decremented by 1 each time the packet goes through a router. At 0, the packet is deleted.
* Protocol - This describes what the IP packet is encapsulating.
* Source Address - the 32 bit IP address of the Source
* Destination Address - the 32 bit IP address of the destination.

### IPv6

Ipv6 was first covered by RFP 2460 in all its detail, but is often being superceeded.
This version allocates 128 bits for addresses. This is 2$^{32}$ addresses ( 7.9×10 $^{28}$)