# IL (network protocol)

The Internet Link protocol or IL is a connection-based transport-layer protocol designed at Bell Labs originally as part of the Plan 9 operating system and is used to carry 9P. It is assigned the Internet Protocol number of 40. It is similar to TCP but much simpler.
Its main features are:
* Reliable datagram service
* In-sequence delivery
* Internetworking using IP
* Low complexity, high performance
* Adaptive timeouts
As of the Fourth Edition of Plan 9, 2003, IL is deprecated in favor of TCP/IP because it doesn't handle long-distance connections well.

## Header

IL header format :
| Offset | 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 and header length | Version and header length | Version and header length | Version and header length | Version and header length | Version and header length | Version and header length | Version and header length | Type of service | Type of service | Type of service | Type of service | Type of service | Type of service | Type of service | Type of service | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length |
| 4 | 32 | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Identification | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information | Fragment information |
| 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 | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source | IP source |
| 16 | 128 | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination | IP destination |
| 20 | 160 | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Checksum including header | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length | Packet length |
| 24 | 192 | Packet type | Packet type | Packet type | Packet type | Packet type | Packet type | Packet type | Packet type | Special | Special | Special | Special | Special | Special | Special | Special | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port | Src port |
| 28 | 224 | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Dst port | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ | Sequence id↴ |
| 34 | 272 | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence | ↪Acked sequence |