Basic concept of network layering (1)

table of Contents

TCP/IP

Physical layer

node

Network interface (network card)

Hub

data link layer

Data Frame

Node physical address

ARP (Address Resolution Protocol)

Bridge

switch

VLAN

VPN

Network layer

IP protocol

router

Gateway

Router and gateway

DNS

ARP

ICMP

Signaling

NAT

IP network

IP tunnel

Tunnel technology


 

TCP/IP

 

Physical layer

Establish physical connections for hosts that communicate with each other. Provide signal transmission media: copper wire, optical fiber.

node

Such as computers, routers.
It is indirectly connected with the network physical layer line through the node's network interface (such as network card), internal data bus.

Network interface (network card)

It is a physical layer signal conversion device, which is responsible for mutual conversion between the byte data in the internal bus of the node and the secondary signal transmitted in the line.

Hub

Physical layer devices, used to connect to physical devices, and all hosts share network bandwidth. It is a broadcast mode , that is, when a certain port of the hub is working, other ports can listen to the information. All ports share a bandwidth, and only two ports can transmit data at the same time, and other ports can only wait.

A hub (HUB) is a connecting device that connects multiple computers or other devices in a computer network, and is the smallest unit for centralized management of the network. Hub in English means center. Like the trunk of a tree, it is the gathering point of branches. HUB is a shared device that mainly provides signal amplification and relay functions. It distributes all signals received by one port to all ports. Some hubs reinforce weak signals before distributing them and resend them. Some hubs arrange signal timing to provide synchronous data communication between all ports.

data link layer

That is, the network card converts the received two-level system signal into bytes, and then writes it into a cache area owned by the operating system kernel in the memory, and switches to the corresponding application process through an interrupt and takes the data away.
Used to handle the hardware part of the link network. Including operating system, hardware device drivers, NIC (Network Interface Card, network adapter, that is, network card)

Data Frame

It is the protocol data unit of the data link layer, including the header, data part, and tail.

Node physical address

MAC (Media Access Control) address is used to define the location of network equipment. A host will have a MAC address.

ARP (Address Resolution Protocol)

In the OSI model, the ARP protocol belongs to the link layer; in the TCP/IP model, the ARP protocol belongs to the network layer. It is a TCP/IP protocol that obtains a physical address (MAC) based on an IP address.

Since the data frame can only be addressed by the destination MAC address during network transmission, the destination IP address must be converted to a MAC address and the data frame must be notified.

The specific conversion method: the data sender sends a broadcast to all hosts in the LAN through the ARP protocol, asks everyone who has the specified IP address, and if there is one, informs its own MAC.

Bridge

Working on the media access control (MAC) sublayer of the data link layer, it is used to transmit data packets in multiple network segments using the same communication protocol.

switch

Data link layer equipment, similar in function to a bridge, can exclusively enjoy network bandwidth, and the work of two ports will not affect the work of other ports. It is mainly used to connect multiple nodes in a local area network ( LAN ) for data exchange in the local area network, which is used for the component local area network.

Switch is a kind of network equipment based on MAC (hardware address of network card) identification and can complete the function of encapsulating and forwarding data packets. The switch can "learn" the MAC address and store it in the internal address table. By establishing a temporary switching path between the originator and target receiver of the data frame, the data frame can directly reach the destination address from the source address. Today's switches are divided into: Layer 2 switches, Layer 3 switches or higher-layer switches. Layer 3 switches can also have routing functions, and the forwarding rate is faster than low-end routers. Its main feature is: once routing, multiple forwarding.

VLAN


1. The trunk port is used for internal VLAN communication, not for inter-VLAN communication.
2. The role of VNAN is to virtualize virtual LANs similar to physical LANs through device logic, so they are also different LANs. Of course, different LANs need Layer 3 routing equipment to communicate.
Layer 2 switching does use MAC address forwarding. Therefore, those unmanageable fool switches do not support VLAN. VLAN is a function of some intelligent Layer 2 machines. Of course they are still second-tier machines. They judge the VLAN by tagging the TAG at the head of the data frame. Of course, this judgment has a more complicated mechanism. Therefore, the Layer 2 switch supporting VLAN does not rely on MAC forwarding alone, nor does it rely on IP to judge.
3. The router's ability to forward data between VLANs also depends on supporting the VLAN protocol 802.1Q, which is capable of single-arm routing. Or a three-layer switch, after generating VLANs, direct routing between VLANs.

VPN

VPN Virtual Private Network (VPN Virtual Private Network) is used to connect distant areas. Such services include IP-VPN and wide area Ethernet.

The function of the virtual private network is to establish a private network on the public network for encrypted communication. It is widely used in corporate networks . VPN gateway through the data packets to achieve the conversion of encrypted data packet destination address and remote access . VPN has a variety of classification methods, mainly classified by protocol. VPN can be implemented in multiple ways such as servers , hardware, and software.

IP-VPN

Refers to the establishment of a VPN on an IP network (Internet).

Network layer

IP protocol

IP (Internet Protocol) Internet Protocol, the role is to transmit various data packets to the other party. To ensure that it is actually delivered to the other party, various conditions must be met. The most important ones are the IP address and MAC address (Media Access Control Address).

The IP address indicates the address to which the node is assigned, and the MAC address refers to the fixed address to which the network card belongs. The IP address can be matched with the MAC address. The IP address can be changed, but the MAC address basically remains unchanged.

In the transfer process before reaching the communication target, those network devices such as computers and routers can only learn a very rough transmission route. This mechanism is called routing (routing).

router

Working at the network layer, it can identify the destination IP address carried in the data frame and forward it to the correct network. It connects a local area network (LAN) and a wide area network (WAN), and is used for data exchange between different network segments. Each node in the LAN exchanges information with the external network through a router. Now routers have switch functions. (One WAN port + 4 LAN ports)

Network layer protocols: IP protocol, ICMP protocol, ARP protocol, RARP protocol and BOOTP protocol.

The router uses a series of algorithms to determine the shortest path between networks.
Routers use static routing or dynamic routing to determine the shortest path between networks. Static routing needs to be manually set by the administrator, while dynamic routing uses some protocols to dynamically discover paths between networks and determine the shortest path. Generally, static routing is used for small networks, and dynamic routing is used for large complex networks.

Router (Router), also known as the selector, is a device that realizes interconnection at the network layer. It is more complex than a network bridge and also has greater flexibility. The router has a stronger ability to interconnect heterogeneous networks, and the connection objects include local area networks and wide area networks. In the past, routers were mostly used in wide area networks. In recent years, because the performance of routers has been greatly improved, and the price has dropped to close to that of bridges, routers are increasingly used in LAN interconnection. A router is a network device that connects multiple networks or network segments. It can "translate" the data information between different networks or network segments, so that they can "read" each other's data to form a better Big network. The router has two typical functions, namely the data channel function and the control function. Data channel functions include forwarding decision, backplane forwarding and output link scheduling, etc., which are generally completed by specific hardware; control functions are generally implemented by software, including information exchange with neighboring routers, system configuration, system management, etc. .

Gateway

The gateway on the computer is configured with an IP address. This IP address corresponds to a router device. When the destination IP that the computer needs to access is not in the local area network, it will be sent to the gateway device and forwarded by the gateway device.

As the access point of the internal network and external network, we generally call it a gateway. The gateway is a concept, not a hardware.

Gateway device

Gateway (Gateway) is also called network connector and protocol converter . The gateway realizes network interconnection above the network layer . It is the most complicated network interconnection device and is only used for the interconnection of two networks with different high-level protocols. The gateway can be used for both wide area network interconnection and local area network interconnection.

Router and gateway

The router integrates the function of the gateway, so the router also has the function of the gateway.

From the definition of gateway and router, if you simply connect two networks, then only the gateway is sufficient.

If you need to connect multiple networks, in order to ensure the reliability of the network, the network structure needs to be designed as a full mesh or partial mesh. In this way, for the communication between the networks, two devices, a gateway and a router, are required, because the current router integrates the gateway Function, so only a router is enough.

Simply put: the router realizes the connection between the local area network and the wide area network, and the gateway realizes the connection between the two networks (between the wide area network and between the local area networks).

DNS

DNS (Domain Name System). DNS can automatically convert domain names into specific IP addresses.

ARP

Communication between IPs depends on the MAC address. When transferring on the network, the MAC address of the next station's specialized equipment will be used to search for the next transfer target. At this time, the ARP protocol (Address Resolution Protocol) is used. ARP is a protocol used to resolve addresses, and the corresponding MAC address can be retrieved based on the IP address of the communicating party.

ARP is a protocol that solves address problems. Use the target IP address as a clue to locate the MAC address corresponding to the next network device that should receive the data packet.

ARP determines the MAC address by means of two types of packets: ARP request and ARP response.

ICMP

There are two points to pay special attention to when constructing an IP network: confirm whether the network is working properly, and diagnose problems when encountering abnormalities.

The main functions of ICMP include: confirm whether the IP packet is successfully delivered to the target address, notify the specific reason why the IP packet is discarded during the sending process, and improve network equipment.

ICMP is (Internet Control Message Protocol) Internet control message protocol. It is the TCP / IP protocol suite a sub-protocol for the IP host , the route passing control messages between devices. The control message refers to the message of the network itself, such as the unreachable network , whether the host is reachable, and whether the route is available. Although these control messages do not transmit user data, they play an important role in the transmission of user data.

Signaling

Various signals are transmitted in the network, some of which are what we need (such as voice calls, data packets for Internet access, etc.), and the other part is not needed by us (it can only be said that it is not directly needed). For the control circuit, this type of signal is called signaling. The transmission of signaling requires a signaling network.

The most traditional signaling is China No. 1 signaling. In the past, telephones were used a lot, but now the most commonly used is No. 7 signaling (both telephone and network transmission). The transmission of any practical application information between communication devices is always accompanied by the transmission of some control information . They work in accordance with the established communication protocol to safely, reliably and efficiently transmit application information to the destination. This information is called protocol control information in the computer network, and called signaling in the telecommunication network . English documents often use the word "Signalling" (signaling process), but most Chinese technical documents only use the word "signaling", that is, "signaling" includes both "Signal" and "Signalling".

definition

Strictly speaking, signaling is a system that allows program-controlled switching, network databases, and other "smart" nodes in the network to exchange the following related information: call establishment, monitoring (Supervision), teardown (Teardown), and distributed application processes. Information (inquiry/response between processes or user-to-user data), network management information. Signaling is a control signal used to ensure normal communication in a wireless communication system, in addition to transmitting user information, to make the entire network work in an orderly manner.

effect

Signaling is different from user information. User information is directly transmitted from the sender to the receiver through the communication network. The signaling usually needs to be transmitted between different links of the communication network (base station, mobile station, and mobile control switching center, etc.). The links are analyzed and processed, and a series of operations and controls are formed through interaction. Its function is to ensure the effective and reliable transmission of user information. Therefore, signaling can be regarded as the control system of the entire communication network, and its performance is very large. To a certain extent, it determines the ability and quality of a communication network to provide services to users.

NAT

NAT (Network Address Translator) is suitable for the use of private addresses in the local network, and the use of global IP addresses when connecting to the Internet. (Intranet/Extranet address translation)

IP network

The IP network is composed of IP subnets interconnected by routing devices. These routing devices are responsible for finding routes among the IP sub-winds and forwarding IP packets to the next IP subnet.

The IP address is the basis of data transmission in the IP network. It identifies a connection in the IP network. A host can have multiple IP addresses. The IP address in the IP packet remains unchanged during network transmission.

IP tunnel

Two networks cannot communicate directly. For example, A and B use IPV6, and the intermediate network C uses IPV4, it must use the function of IP tunnel.

IP tunnel technology: It is a process in which a router encapsulates a network layer protocol into another protocol to transmit it across the network to another router.

Tunneling technology is a data packet encapsulation technology, which encapsulates the original IP packet (its header contains the original sender and final destination) in the data payload of another packet (called encapsulated IP packet) for transmission.

Tunnel technology

Tunneling is a way of transferring data between networks by using the infrastructure of the Internet. The data (or load) transferred using the tunnel can be data frames or packets of different protocols . The tunneling protocol re-encapsulates the data frames or packets of other protocols and then sends them through the tunnel. The new frame header provides routing information to transfer the encapsulated load data through the Internet .

To create a tunnel, both the client and server of the tunnel must use the same tunneling protocol. Tunneling technology can be based on Layer 2 or Layer 3 tunneling protocols, respectively.

The layer 2 tunneling protocol corresponds to the data link layer of the OSI model , and uses frames as the data exchange unit. PPTP ( Point-to-Point Tunneling Protocol ), L2TP (Layer 2 Tunneling Protocol), and L2F (Layer 2 Forwarding Protocol) are all layer 2 tunneling protocols, which encapsulate user data in Point-to-Point Protocol (PPP) frames and send them over the Internet.

The layer 3 tunneling protocol corresponds to the network layer of the OSI model and uses packets as the data exchange unit. IPIP (IP over IP) and the IPSec tunnel mode belong to the layer 3 tunneling protocol, which encapsulates the IP packet in an additional IP header and transmits it through the IP network. No matter which kind of tunnel protocol is composed of transmission carrier, different encapsulation formats and user data packets . The essential difference between them is that the user's data packet is encapsulated in which data packet is transmitted in the tunnel.

PPTP protocol

PPTP (Point to Point Tunneling Protocol) provides encrypted communication between PPTP client and PPTP server. PPTP client refers to the PC running the protocol, such as Windows95/98 that starts the protocol; PPTP server refers to the server running the protocol, such as the Windows NT server that starts the protocol. PPTP is an extension of PPP protocol. It provides a safe method for establishing multi-protocol over the Internet Virtual Private Network (VPN) is a communication method. Remote users can access the company's private network through any ISP that supports PPTP.

Through PPTP, customers can access the public IP network by dialing.

Protocol forwarding

L2F (Layer Two Forwarding protocol) is proposed by Cisco to establish a multi-protocol secure virtual private network communication in a variety of media, such as ATM, frame relay , and IP networks . Remote users can access the public IP network through any dial-up method. First, they dial to the ISP's access server (NAS) in a conventional manner to establish a PPP connection; the NAS establishes a second connection to the HGW server based on user name and other information. In this case, the configuration and establishment of the tunnel is completely transparent to the user.

Tunneling Protocol (L2TP)

L2TP (Layer Two Tunneling Protocol) combines the advantages of L2F and PPTP, allowing users to establish VPN connections from the client or access server. L2TP is an encapsulation protocol that loads PPP frames at the link layer into public network facilities, such as IP, ATM, and frame relay for tunnel transmission .

Generic Routing Encapsulation Protocol (GRE)

Generic Routing Encapsulation ( English : Generic Routing Encapsulation, abbreviated as GRE), a tunneling protocol that can encapsulate multiple network layer protocols in virtual point-to-point links . Generic Routing Encapsulation (GRE) defines a protocol that encapsulates any other network layer protocol on any network layer protocol.

GRE specifies how to use one network protocol to encapsulate another network protocol . The GRE tunnel is defined by the source and destination IP addresses at both ends, allowing users to encapsulate IP, IPX, AppleTalk packets with IP packets, and supports all routing protocols (such as RIP2, OSPF, etc.). Through GRE, users can use public IP networks to connect to IPX networks and AppleTalk networks, and can also use reserved addresses for network interconnection, or hide the corporate network IP address from the public network.

There are two main uses of the GRE protocol: enterprise internal protocol encapsulation and private address encapsulation. In China, since almost all enterprise networks use the TCP/IP protocol, there is no market demand for enterprise internal protocol encapsulation when building tunnels in China. The only reason why enterprises use GRE should be the encapsulation of internal addresses. When an operator provides VPN services in this way to multiple users, there is a possibility of address conflicts.

Routing Encapsulation (GRE) was first proposed by Cisco, and it has become a standard, defined in RFC1701, RFC1702, and RFC2784. Simply put, GRE is a tunneling protocol used to transmit data packets from one network to another.

Features of GRE:

  1. GRE is a standard protocol
  2. Support multiple protocols and multicast
  3. Can be used to create a flexible VPN
  4. Support multipoint tunnel
  5. Able to implement QOS

Disadvantages of GRE:

  1. Lack of encryption mechanism
  2. There is no standard control protocol to maintain the GRE tunnel (protocol and keepalive are usually used)
  3. The tunnel consumes CPU
  4. It is difficult to DEBUG if there is a problem
  5. MTU and IP fragmentation are a problem

 

Guess you like

Origin blog.csdn.net/sinat_37138973/article/details/85049906
Recommended