IP Protocol & Addressing - O-LavenderAshburn/Knowledgebase_NetworkAndConnectivity GitHub Wiki

IP Protocol Introduction

The Internet Protocol (IP) is responsible for addressing and routing packets across networks. It defines the format of IP packets and handles addressing to ensure data reaches the correct destination. The IP protocol has two primary versions (IPv4 & IPv6), both widly used throught the world.

IPv4 (Internet Protocol version 4)

IPv4 uses 32-bit addresses, which allows for about 4.3 billion unique addresses. An example IPv4 address 192.168.1.1.

Packet structure


0                                15|16                              31
|__________________________________|________________________________|
| Ver (0-3) | IHL (4-7)  |TOS(8-15)| Total Len (16-31)              |
|----------------------------------|--------------------------------|
|       Identification (0-15)      | Flags | Frag Offset (19-31)    |
|----------------------------------|--------------------------------|
| TTL (0-7)   | Proto (8-15)       | Hdr Chksum (16-31)             |
|----------------------------------|--------------------------------|
|                            Src Addr (0-31)                        |
|----------------------------------|--------------------------------|
|                            Dest Addr (0-31)                       |
|----------------------------------|--------------------------------|
|                        Options (if IHL > 5) [Opt]                 |
|----------------------------------|--------------------------------|
|                                Data                               |
|-------------------------------------------------------------------|

Subnet Masking


IPv6 (Internet Protocol version 6)

IPv6 uses 128-bit addresses, allowing for an extremely large number of unique addresses an IPv6 might look like 2001:0db8:85a3:0000:0000:8a2e:0370:7334 but can aslo be compressed down to 2001:0db8:85a3::8a2e:0370:7334


NAT Network Address Translation