In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
The network layer, which is also the third layer of OSI, receives data segmentation or PDU from the transport layer. These bitstreams have been processed into transportable sizes and numbered for reliability. The protocol now used by the network layer adds addresses and other information to the PDU and sends it along the best path to the next router or destination network.
The network layer describes the four basic tasks to be performed:
Addressing with IP addr
Encapsulation
Routin
De-encapsulation
IP is the most commonly used network layer protocol. IP version 4 (IPv4) is currently the most widely used version. It is the only layer 3 protocol used when transmitting data over Internet. The Internet protocol is designed as a low-overhead protocol, which only provides the necessary function of transmitting packets from the source host to the destination host over the Internet. The protocol is not responsible for tracking and managing the flow of packets. These functions are performed by other protocols in other layers.
The basic characteristics of IPv4 are:
Connectionless-do not establish a connection before sending data
Best effort (unreliable transmission)-IPv4 does not use any process to ensure packet arrival, which reduces the processing time of the router and reduces the bandwidth consumed by acknowledgement messages
Media independence-the operation of the protocol is independent of the transport medium used
IP is connectionless, which means that there is no need to establish a connection between the sender and the receiver. IP sends packets without acknowledging the recipient, and connectionless is not a problem for IP, which is part of the "best effort" transport type design. This is also why IP and TCP work together in the TCP/IP protocol family. If the packet is delayed or lost, the problem will be corrected in layer 4, and IP can work efficiently at layer 3.
Because IP is not responsible for reliability and maintaining connections, there is not so much information in the header compared to TCP. IP needs very little data to complete the task, so it has much less bandwidth overhead than TCP.
There is another point to note about media independence: some networks have media limitations and must meet the requirements of the maximum transmission unit (MTU). MTU is determined by the data link layer, and this requirement is sent to the network layer, which creates packets based on this requirement. If the number of packets passing through the network is greater than this requirement, the router connected to the network splits the packet before forwarding it to the media. This process is called slicing.
The IP header contains instructions for transmitting and processing IP packets. When the packet arrives at the router interface, the router needs to know whether it is an IPv4 or IPv6 packet. The router looks at the specific fields in the header to know what type of packet it is. The header also contains address information and other data that determines how to handle the packet as it travels along the path.
The following figure shows the contents of the IPv4 packet header:
Specifically explain the meaning of some of the following fields:
Time to Live (TTL)-the 8-bit TTL field describes the maximum number of hops that a packet can pass before it is dropped or can be transmitted. Each router that processes the packet subtracts the TTL value by 1, and the packet with a TTL value of 0 is discarded.
Type of Service (Tos)-the 8 bits in this field describe the priority that the router uses when processing packets. For example, the data priority of IP voice in the data packet is higher than that of streaming music. The way the router processes packets is called Qos, quality of service.
Flag and Segmentation offset-A router may fragment a packet when it forwards a packet from one medium to another with a low MTU value. After fragmentation occurs, when the packet arrives at the destination host, the IPv4 packet uses the fragment offset and MF flag bits in the header to reconstruct the packet. The shard offset field indicates the order in which packets are shredded when rebuilt.
The host needs a local routing table to ensure that the network layer data layer packets are forwarded to the correct destination network. Unlike routers that contain local and remote routes, the host local routing table generally contains networks or default routes that are directly connected to it. Creating a default gateway on the host creates a local default route. Without a default gateway or route, packets destined for the external network will be discarded.
Routing is the process of making forwarding decisions for each packet that arrives at the gateway interface. In order to forward packets to the destination network, the router needs a route to that network. If the destination network route on the router does not exist, the packet will be forwarded to the default gateway. If no default gateway is configured, the packet will be discarded.
Routing protocol
When a router notices a change in the network on which it acts as a gateway or a change in the link between routers, it forwards this information to other routers. When a router receives information about a new route change, it updates its routing table and in turn passes that information to more routers. In this way, all routers have accurate dynamic update routing tables and can master remote network routes with many hops apart.
Common routing protocols include:
Routing Information Protocol (RIP)
Enhanced Interior Gateway routing Protocol (EIGRP)
Open shortest path first (OSPF)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.