7.1 Introduction
Internet Protocol (PROTOCOL,IP) is the transport mechanism used by the TCP/IP protocol cluster at the network layer.
IP is an unreliable non-connected datagram Protocol-the best effort to deliver (best-effort delivery) services.
7.2 Data Report
The grouping of network layers is called datagrams (datagram).
A datagram is a variable-length grouping that consists of two parts: the header and the data.
VER version
Hlen Header total length of the datagram
Service type (type of Service,tos)
Data length = Total length-the first ministerial degree; The total Length field defines the total datagram length, including the header.
Identity, token, shard offset for sharding.
Time to live: the maximum number of hops (routers) used for the Peugeot datagram
Protocol: Identifies high-level protocols that use IP services.
Checksum:
Source IP address, Destination IP address: During IP datagrams from the source host to the destination host, these IP addresses remain unchanged.7.3 Shards 7.3.1 Maximum Transmission Unit MTUThe IP protocol specifies that the foot of the datagram is 65535 bytes long, and in order to traverse other physical networks, it has to split the datagram, a process called sharding (fragmentation). Source points are typically not fragmented (fragmentation) for IP groupings. Because the transport layer divides the data into the acceptable size of the data link layer used by the IP and source points.
Datagrams can pass through multiple shards when they reach the final end point.
Datagrams can be fragmented by the source host or any router on the way, but the reload of datagrams can only be done on the destination host, since each shard becomes a separate datagram.
When the datagram is fragmented, some of the necessary parts of the header must be copied into all shards the fields related to the reassembly of a datagram are: identity, flag, and Shard offset
Only the data in the datagram is fragmented.
7.3.2 fields related to shardsThe fields associated with a fragment of a datagram are: identity, flag, and Shard offset.identification (identitification)
16 bits. Note: The identity fields for all shards are the same. This identity is unique to the source IP combination to determine this datagram. All shards have the same identification number, which is also the identification number of the original datagram. This identification number is useful for reloading the datagram at the end point. The endpoint knows that all shards with the same identification number must be assembled into a datagram
flag (flag)3-bit, except for the last Shard, the "Still Shard" bit in the flag field of all shards is set to 1.
Shard Offset13 bits. Identifies the relative position of this shard in the datagram.7.4 OptionsThe header of an IP datagram consists of two parts: a fixed portion (20 bytes) and a variable part (no more than 40 bytes)
7.4.1 FormatFormat of options: A byte-Type field, a byte-length field, and a variable-length value field. These three fields are often referred to as TLV (Type-leght-value).
The Type field is 8 bits long and includes three sub-fields: Copy, type, and number. Copy: 1-bit, control option in the presence of shards. Type: 2-bit, 00 datagram control, 10 troubleshooting and management. Item No: 5-bit, defines 6 kinds of
• Length field defines the total length of the option, including the Type field and the Length field itself.
• The Value field contains the data required for some specific options.
7.4.2 Option Type6 Options: Divided into single-byte, multibyte-type 1:No action options(no-operation option)is a 1-byte option to use as a filler between options and options
Type 0: option end option (end-of-option option) is also a 1-byte option for the fill at the end of the option field.
Type 7: The Record routing option (Record-route option) is used to record the Internet router that processes datagrams.
Type 137: Strict source routing option (Strict-source-route option) is used by the source point to pre-specify the route of the datagram when it is transmitted over the Internet.
Type 131: The non-strict source routing option (Loose-source-route option) is similar to strict source routing, but the unspecified router can pass.
Type: the timestamp option (timestamp option) is used to record when the router processes datagrams. 7.5 Checksum
Most of the error detection methods used in TCP/IP protocols are called Test and (checksum). Verify and be able to prevent damage that occurs during the transmission of the packet. The verification and redundancy information attached to the packet.
The sending side calculates the checksum,
Receiver-side computed checksum 7.5.3 IP packet Lieutenant Colonel Test and
Verify in IP and overwrite header only, excluding data.
7.6 IP is running in ATM 7.6.1 ATM Wan
AAL5 is sometimes referred to as a simple and effective adaptation layer (easy and efficient adaptation layer,seal)
The ATM cell has a fixed length of 53 bytes, where the first 5 bytes are the cell header and the remaining 48 bytes are payloads.
AAL5 (more efficient), there is a need to compare other protocols.
route selection of 7.6.2 cells
An ATM network establishes a route between the entry point router and the departure point router.
IP addresses (each router connected to an ATM network has an IP address.) The IP address has a specific router on the IP layer but no effect at the ATM layer)
Physical Address (each address in a network is unique and is specified by the network administrator.) Similar to Mac in LAN, when connection is established)
Virtual circuit identifier (ATM network internal switch uses virtual circuit identifier (VPI,VPC) for cell routing, when data transmission is used)
Address Binding
7.7 Security 7.7.1 Security Issues
There are three security issues that are specifically applied to the IP protocol: Packet theft (packet sniffing), packet tampering (packet modification), and IP spoofing (IP spoofing).
7.7.2 IPSec
IPSec provides the following four services: defining Algorithms and keys, packet encryption, data integrity, origin identification.
7.8 IP Package
The IP package can be considered to contain eight components: the header Add module, processing module, forwarding module, Shard module, reload module, routing table, MTU table and reload table. In addition, some input and output queues are included in the package.
• This package accepts applications from the data link layer and the High-level protocol. 7.8.1 First Add Module
The header Add module (headr-adding module) accepts data from high-level protocols and their destination IP addresses. It encapsulates the data in an IP datagram by adding the IP header
7.8.2 Processing Module
The processing module (processing module) is the core of the IP software package. Receives a datagram from an interface or header to add a module. Data is forwarded and processed.
Gets the data from an input queue/
/Determines whether the data reaches the end point, is the reload
if (the destination address matches a local address) {sends the datagram to the
reload module
return;
}
if ( This machine is a router)
{
TTL-1;
}
if (TTL <=0)
{discards the
message.
send ICMP error message
back
}
Sending packets to the forwarding module
}
7.8.3 Queue
Our package uses two types of queues: the input queue and the output queue. Input Quenes stores datagrams from the data link layer or high-level protocol. Output Squenes is the data that will be sent to the data link layer or high-level protocol.
• The processing module extracts datagrams from the input queue. The shards and reload modules add datagrams to the output queue.
7.8.4 Routing Table
The forwarding module uses the routing table to determine the next hop address of the packet. 7.8.5 Forwarding Module
The forwarding module (forwarding module) receives IP packets from the processing module.
7.8.6 MTU Table
The Shard module uses the MTU table to find the maximum Transmission unit (maximum transfer UNIT,MTU) for a particular interface. The MTU table contains only two columns: interface and MTU.
7.8.7 Shard Module
Extract datagram Length
if (length >mtu)
{
if (d position 1)
{
datagram discarded
send ICMP error message
return
}
else{
calculate the maximum length to fragment
the datagram
to the Shard add header to
Add the required options
}else{
Direct send
7.8.8 Reload Table
The Reload table (ressembly table) is used by the reload module. There are 5 fields: status, source IP address, datagram identifier, timeout, Shard,
A datagram identifier is a number that uniquely defines a datagram and all shards that belong to that datagram.
7.8.9 Reload Module
The Reload module (ressenbly module) receives datagram shards from the processing module that have reached the final destination.
is to find out which datagram a shard belongs to, sort all the shards that belong to the same number of reports, and make a datagram when all the shards arrive. Scheduled to be extended to the Shard data is not yet, reload the module to discard these shards.