# Internet Protocol (IP)
![[Internet Protocol - Wikipedia#^ndme9u]]
It is a slight misnomer to describe the internet protocol as a protocol. It is more accurate to call it a set of protocols coupled with an addressing scheme used to facilitate communication between networks. ^g9p613
The protocol data unit of the internet protocol is called a *packet*. It can be said that the responsibility of the internet protocol is to relay packets between hosts that may not be on the same network. If the recipient of a packet is on the same network, the packet is simply wrapped into a link layer frame addressed to the recipient directly. However, if the recipient is not on the same network (as determined by its IP address), the packet is wrapped into a link layer frame addressed to the network's gateway, which is expected to relay the packet to a router one step closer to the recipient (the next hop). This process repeats until the recipient's own gateway receives the packet. ^1ni8sx
![[Internet Protocol - Wikipedia#^1danhv]]
Two noteworthy versions of the IP protocol exist: [[IPv4]] and [[IPv6]].
## The Internet Protocol Uses Underlaying Data Links
![[Internet Protocol - Wikipedia#^tir7z3]]
To facilitate internetwork communication the internet protocol encapsulates data into frames that are sent using the underlaying [[Link Layer]] protocols. Issues can occur if a particular data link becomes unreliable, or if it cannot support required data length. IP deals with both unreliable and diverse links.
![[Internet Protocol - Wikipedia#^lp40qt]]
![[Internet Protocol - Wikipedia#^ewdazi]]
The fragmentation on the IP level is not desirable when higher level protocols implement their own fragmenting, as it adds unnecessary overhead. IP provides functionality to discover the capabilities of underlaying links, allowing higher level protocols to limit the amount of data they send in a particular packet.
![[Internet Protocol - Wikipedia#^9p1ooi]]
![[Maximum Transmission Unit - Wikipedia#^x8kvge]]
![[Maximum Transmission Unit - Wikipedia#^83iij3]]
## Classifying IP Traffic
IP traffic can be classified based on the number of recipients of a particular packet into *unicast*, *broadcast*, *multicast*, and *anycast*.
### Unicast
![[Internet Protocol - Wikipedia#^ykk7ng]]
### Broadcast
![[Internet Protocol - Wikipedia#^ccpiv2]]
### Multicast
![[Internet Protocol - Wikipedia#^7vnt98]]
For more info see [[Multicast]].
### Anycast
![[Internet Protocol - Wikipedia#^x1lm6o]]