Understanding Point-to-Point Tunneling Protocol (PPTP)

PPTP是一种网络协议,用于在远程客户端和企业服务器之间创建虚拟私有网络,以安全地传输数据。该协议基于TCP/IP,支持按需、多协议的虚拟网络。通过公共网络如互联网实现。PPTP扩展了PPP协议,通过封装PPP包到IP数据报中,实现在公共网络上的安全通信。文章介绍了PPTP的工作原理、架构和安全性,包括PPP连接、PPTP控制连接和数据隧道等,并讨论了其在企业级远程访问解决方案中的应用。

https://wwwdisc.chimica.unipd.it/luigino.feltre/pubblica/unix/winnt_doc/pppt/understanding_pptp.html

Microsoft Corporation

January 1997

Summary: Point-to-Point Tunneling Protocol (PPTP) is a network protocol that enables the secure transfer of data from a remote client to a private enterprise server by creating a virtual private network (VPN) across TCP/IP-based data networks. PPTP supports on-demand, multi-protocol, virtual private networking over public networks, such as the Internet.

Contents

Introduction
PPTP and Virtual Private Networking
PPTP Architecture
Understanding PPTP Security

Introduction

Point-to-Point Tunneling Protocol (PPTP) is a network protocol that enables the secure transfer of data from a remote client to a private enterprise server by creating a virtual private network (VPN) across TCP/IP-based data networks. PPTP supports on-demand, multi-protocol, virtual private networking over public networks such as the Internet.

The networking technology of PPTP is an extension of the remote access Point-to-Point protocol defined in the document by the Internet Engineering Task Force (IETF) titled "The Point-to-Point Protocol for the Transmission of Multi-Protocol Datagrams over Point-to-Point Links," referred to as RFC 1171. PPTP is a network protocol that encapsulates PPP packets into IP datagrams for transmission over the Internet or other public TCP/IP-based networks. PPTP can also be used in private LAN-to-LAN networking.

The PPTP extension of PPP is explained in the document titled "Point-to-Point Tunneling Protocol," PPTP draft-ietf - ppext - pptp - 00.Text. A draft of this document was submitted to the IETF in June 1996 by the companies of the PPTP Forum, which includes Microsoft Corporation, Ascend Communications, 3Com/Primary Access, ECI Telematics, and US Robotics.

Note  Internet draft documents should be considered as a "works in progress." See www.ietf.org/) for copies of Internet drafts and RFCs mentioned in this document. For more information about PPTP, visit our Web site at www.microsoft.com/ntserver/. See the topic "Network Communications and Telephony" under "All About..."

This document is for network administrators, support personnel, and developers who need to understand how PPTP can be used to provide low-cost remote access solutions. The document includes the following topics:

  • PPTP and secure, virtual private networking (VPN)
     
  • architecture of PPTP
     
  • PPTP security features

PPTP and Virtual Private Networking

The PPTP protocol is included with Windows NT® Server version 4.0 and Windows NT Workstation version 4.0 operating systems. Computers running these operating systems can use the PPTP protocol to securely connect to a private network as a remote access client by using a public data network such as the Internet. In other words, PPTP enables on-demand, virtual private networks over the Internet or other public TCP/IP-based data networks. PPTP can also be used by computers connected to a LAN to create a virtual private network across the LAN.

An important feature in the use of PPTP is its support for virtual private networking by using public-switched telephone networks (PSTNs). PPTP simplifies and reduces the cost of deploying an enterprise-wide, remote access solution for remote or mobile users because it provides secure and encrypted communications over public telephone lines and the Internet. PPTP eliminates the need for expensive, leased-line or private enterprise-dedicated communication servers because you can use PPTP over PSTN lines.

Generally, there are three computers involved in every PPTP deployment:

  • a PPTP client
     
  • a network access server
     
  • a PPTP server

Note  You do not need the network access server to create a PPTP tunnel when using a PPTP client connected to a LAN to connect to a PPTP server connected to the same LAN.

The following section describes a typical PPTP scenario using these computers, explains how they relate to each other, and fully defines each of these components.

Typical PPTP Scenario

A typical deployment of PPTP starts with a remote or mobile PPTP client that needs access to a private enterprise LAN by using a local Internet Service Provider (ISP). Clients using computers running Windows NT Server version 4.0 or Windows NT Workstation version 4.0 use Dial-up Networking and the remote access protocol PPP to connect to an ISP.

The client connects to a network access server (NAS) at the ISP facility. (Network access servers are also referred to as front-end processors (FEPs), dial-in servers, or point-of-presence (POP) servers.) Once connected, the client can send and receive packets over the Internet. The network access server uses the TCP/IP protocol for all traffic to the Internet.

After the client has made the initial PPP connection to the ISP, a second Dial-Up Networking call is made over the existing PPP connection. Data sent using this second connection is in the form of IP datagrams that contain PPP packets, referred to as encapsulated PPP packets.

The second call creates the virtual private networking (VPN) connection to a PPTP server on the private enterprise LAN, this is referred to as a tunnel. This is shown in the following figure:

Figure 1. The PPTP tunnel

Tunneling is the process of sending packets to a computer on a private network by routing them over some other network, such as the Internet. The other network routers cannot access the computer that is on the private network. However, tunneling enables the routing network to transmit the packet to an intermediary computer, such as a PPTP server, that is connected to the both the routing network and the private network. Both the PPTP client and the PPTP server use tunneling to securely route packets to a computer on the private network by using routers that only know the address of the private network intermediary server.

When the PPTP server receives the packet from the routing network, it sends it across the private network to the destination computer. The PPTP server does this by processing the PPTP packet to obtain the private network computer name or address information in the encapsulated PPP packet. Note that the encapsulated PPP packet can contain multi-protocol data such as TCP/IP, IPX, or NetBEUI protocols. Because the PPTP server is configured to communicate across the private network by using private network protocols, it is able to read multi-protocol packets.

The following figure illustrates the multi-protocol support built-into PPTP. A packet sent from the PPTP client to the PPTP server passes through the PPTP tunnel to a destination computer on the private network.

 

Figure 2. Connecting a dial-up networking PPTP client to the private network

PPTP encapsulates the encrypted and compressed PPP packets into IP datagrams for transmission over the Internet. These IP datagrams are routed over the Internet until they reach the PPTP server that is connected to the Internet and the private network. The PPTP server disassembles the IP datagram into a PPP packet and then decrypts the PPP packet using the network protocol of the private network. As mentioned earlier, network protocols on the private network that are supported by PPTP are IPX, NetBEUI, or TCP/IP.

PPTP Clients

A computer that supports the PPTP network protocol, e.g., a Microsoft client, can connect to a PPTP server in two ways:

  • by using an ISP's network access server that supports inbound PPP connections
     
  • by using a physical TCP/IP-enabled LAN connection to connect to a PPTP server

PPTP clients that use an ISP's network access server must be configured with a modem and a VPN device to make the separate connections to the ISP and the PPTP server. The first connection is a dial-up connection using the PPP protocol over the modem to an Internet service provider. The second connection is a VPN connection using PPTP, over the modem and the ISP connection, to tunnel across the Internet to a VPN device on the PPTP server. The second connection requires the first connection because the tunnel between the VPN devices is established by using the modem and PPP connection to the Internet.

The exception to this two-connection requirement is using PPTP to create a virtual private network between computers physically connected to the private enterprise network LAN. In this scenario, a PPTP client is already connected to the network and only uses Dial-Up Networking with a VPN device to create the connection to a PPTP server on the LAN.

PPTP packets from a remote access PPTP client and a local LAN PPTP client are processed differently. A PPTP packet from a remote access PPTP client is placed on the telecommunication device physical media, while the PPTP packet from a LAN PPTP client is placed on the network adapter physical media as illustrated in the following figure:

Figure 3. Placing a PPTP packet on the network media

The figure above illustrates how PPTP encapsulates PPP packets and then places the outgoing PPTP packet on either a modem, ISDN, or LAN network media.

Network Access Servers at an ISP

ISPs use network access servers to support clients that dial in using a protocol, such as SLIP or PPP, to gain access to the Internet. However, to support PPTP-enabled clients, a network access server must provide PPP service.

The ISP network access servers are designed and built to accommodate a high number of dial-in clients. Network access servers are built by companies, such as 3Com, Ascend, ECI Telematics, and U.S. Robotics, which are members of the PPTP Forum.

Note  An ISP that provides a PPTP service by using a PPTP-enabled network access server can support Windows®+ 95, Windows NT versions 3.5 and 3.51, as well as third-party PPP clients, such as Apple Macintosh® or UNIX. These clients can use a PPP connection to the ISP server. The ISP server acts as a PPTP client and connects to the PPTP server on the private network, creating a PPTP tunnel from the ISP server to the PPTP server.

In this scenario, the PPTP architecture described in this document is fundamentally the same; however, all PPTP communication occurs between the network access server and PPTP server. Contact your ISP to see if they provide a PPTP service and how you need to configure PPP and Dial-Up Networking to access the ISP server that supports PPTP.

PPTP Servers on the Private LAN

PPTP servers are servers with routing capabilities that are connected to a private network and to the Internet. In this document, a PPTP server defined as a computer running Windows NT Server version 4.0 and RAS. PPTP is installed as a network protocol. During installation, PPTP is configured by adding virtual devices referred to as virtual private networks (VPNs) to the RAS and Dial-Up Networking. For more information about PPTP server installation requirements, see the document "Using PPTP."

PPTP Architecture

This section provides information about the architecture of PPTP under Windows NT Server version 4.0 or Windows NT Workstation version 4.0. PPTP is designed to provide a secure method for reaching private networks over the Internet. Examining the PPTP reveals the secure design features of the PPTP protocol.

This section describes:

  • PPP protocol
     
  • PPTP control connection
     
  • PPTP data tunneling

PPTP Architecture Overview

The secure communication created using the PPTP protocol typically involves three processes, each of which requires successful completion of the previous process. This document explains these three processes and how they work:

PPP Connection and Communication. A PPTP client uses PPP to connect to an ISP by using a standard telephone line or ISDN line. This connection uses the PPP protocol to establish the connection and encrypt data packets.

PPTP Control Connection. Using the connection to the Internet established by the PPP protocol, the PPTP protocol creates a control connection from the PPTP client to a PPTP server on the Internet. This connection uses TCP to establish the connection and is a called a PPTP tunnel.

PPTP Data Tunneling. Finally, the PPTP protocol creates IP datagrams containing encrypted PPP packets that are then sent through the PPTP tunnel to the PPTP server. The PPTP server disassembles the IP datagrams, decrypts the PPP packets, and then routes the decrypted packets to the private network.

PPP Protocol

PPP is a remote access protocol used by PPTP to send multi-protocol data across TCP/IP-based networks. PPP encapsulates IP, IPX, and NetBEUI packets between PPP frames and sends the encapsulated packets by creating a point-to-point link between the sending and receiving computers.

Most PPTP sessions are started by a client dialing up an ISP network access server. The PPP protocol is used to create the dial-up connection between the client and network access server and performs the following three functions:

  • Establishes and ends the physical connection. The PPP protocol uses a sequence defined in RFC 1661 to establish and maintain connections between remote computers.
     
  • Authenticates usersPPTP clients are authenticated by using the PPP protocol. Clear text, encrypted, or Microsoft encrypted authentication can be used by the PPP protocol.
     
  • Creates PPP datagrams that contain encrypted IPX, NetBEUI, or TCP/IP packets. PPP creates datagrams that contain one or more encrypted TCP/IP, IPX, or NetBEUI data packets. Because the network packets are encrypted, all traffic between a PPP client and a network access server is secure.

This entire process is illustrated in the following illustration.

Figure 4. Dial-up networking PPP connection to ISP

Note  In some situations, remote clients may have direct access to a TCP/IP network, such as the Internet. For example, a laptop computer with a network card can use an Internet tap in a conference room. With a direct IP connection, the initial PPP connection to an ISP is unnecessary. The client can initiate the connection to the PPTP server, without first making a PPP connection to an ISP.

PPTP Control Connection

The PPTP protocol specifies a series of control messages sent between the PPTP-enabled client and the PPTP server. The control messages establish, maintain and end the PPTP tunnel. The following list presents the primary control messages used to establish and maintain the PPTP tunnel.

Table 1. PPTP control message types

Message TypesPurpose
PPTP_START_SESSION_REQUESTStarts Session
PPTP_START_SESSION_REPLYReplies to start session request
PPTP_ECHO_REQUESTMaintains session
PPTP_ECHO_REPLYReplies to maintain session request
PPTP_WAN_ERROR_NOTIFYReports an error on the PPP connection
PPTP_SET_LINK_INFOConfigures the connection between client and PPTP Server
PPTP_STOP_SESSION_REQUESTEnds session
PPTP_STOP_SESSION_REPLYReplies to end session request

Control messages are transmitted in control packets in a TCP datagram. One TCP connection is created between the PPTP client and the PPTP server. This connection is used to exchange control messages. The control messages are sent in TCP datagrams containing the control messages. A datagram contains a PPP header, a TCP header, a PPTP control message, and appropriate trailers, similar to the following:

  

Figure 5. PPTP TCP datagram with control messages

The exchange of messages between the PPTP client and the PPTP server over the TCP connection is used to create and maintain a PPTP tunnel. This entire process is illustrated below:

 

Figure 6. PPTP control connection to PPTP server over PPP connection to ISP

Note that in this illustration, the control connection is for the scenario in which the remote access client is the PPTP client. In the scenario in which the remote access client is not PPTP-enabled and uses a PPTP-enabled ISP network access server, the PPTP control connection begins at the ISP server. For detailed information about the PPTP protocol and its control connection messages and TCP datagram construction, see the PPTP Internet draft.

PPTP Data Transmission

After the PPTP tunnel is established, user data is transmitted between the client and PPTP server. Data is transmitted in IP datagrams containing PPP packets. The IP datagrams are created using a modified version of the Internet Generic Routing Encapsulation (GRE) protocol. (GRE is defined in RFCs 1701 and 1702.) The IP datagram created by PPTP is similar to the following:

 

Figure 7. IP datagram containing encrypted PPP packet as created by PPTP

The IP delivery header provides the information necessary for the datagram to traverse the Internet. The GRE header is used to encapsulate the PPP packet within the IP datagram. The PPP packet was created by RAS. Note that the PPP packet is just one unintelligible block because it is encrypted. Even if the IP datagram were intercepted, it would be nearly impossible to decrypt the data.

Understanding PPTP Security

PPTP extends the strict authentication and encryption security available to computers running RAS under Windows NT Server version 4.0 and Windows NT Workstation version 4.0 to PPTP clients on the Internet. PPTP also can protect the PPTP server and private network by ignoring all but PPTP traffic. Despite the strict security, it is very simple to use PPTP with existing firewalls. This section will help you understand and plan the following:

  • authentication and access control
     
  • data encryption
     
  • PPTP packet filtering
     
  • using third-party firewalls

Authentication

Initial dial-in authentication may be required by an ISP network access server. If this authentication is required, it is strictly to log on to the ISP network access server; it is not related to Windows NT-based authentication. Check with your ISP for their authentication requirements. Apply these requirements in the Dial-Up Networking entry for that ISP.

On the other hand, if the Windows NT Server version 4.0 is configured as a PPTP server, it controls all access to your private network. That is, the PPTP server is a gateway to your private network. The PPTP server requires a standard Windows NT-based logon. All PPTP clients must supply a user name and password. Therefore, remote access logon using a computer running under Windows NT Server version 4.0 or Windows NT Workstation version 4.0 is as secure as logging on from a Windows NT-based computer connected to the local LAN.

Authentication of remote PPTP clients is done by using the same PPP authentication methods used for any RAS client dialing directly to a RAS server. Microsoft's implementation of the Remote Access Service (RAS) supports the Challenge Handshake Authentication Protocol (CHAP), the Microsoft Challenge Handshake Authentication Protocol (MS-CHAP), and the Password Authentication Protocol (PAP) authentication schemes.

Note  MS-CHAP authentication supports the MD4 hash as well as the earlier authentication scheme used in Microsoft LAN Manager.

As with all user accounts, the user accounts of remote users reside in the Windows NT Server version 4.0 directory service and are administered through User Manager for Domains. This provides centralized administration that is integrated with the private network's existing user accounts. Only accounts that have been granted specific access to the network through a trusted domain are permitted. Careful user accounts management is necessary to reduce security risks.

Having a secure password model in place is critical to successful deployment of PPTP because Internet connections are more susceptible to speed or "demon dialer" programs, which can literally crunch through thousands of password and username combinations.

The only way to minimize this type of attack is to implement secure password policies. Passwords should be difficult to guess. For example, you can require passwords to contain upper case letters, lower case letters, numbers, and special characters. It is recommended you require at least three different types of characters to ensure password uniqueness.

Access Control

After authentication, all access to a private LAN continues to use the Windows NT-based security model,. Access to resources on NTFS drives, or to other network resources, requires the proper permissions. It is recommended that the NTFS file system be used for file resources that are accessed by PPTP clients.

For more information about using security on NTFS drives or other network resources, see your product documentation or the Windows NT Workstation version 4.0 and Windows NT Server version 4.0 Resource Kits.

Data Encryption

For data encryption, PPTP uses the RAS "shared-secret" encryption process. It is referred to as a shared-secret because both ends of the connection share the encryption key. Under the Microsoft implementation of RAS, the shared secret is the user password. (Other encryption methods base the encryption on some key available in public; this second method of encryption is known as public key encryption.)

PPTP uses the PPP encryption and PPP compression schemes. The CCP (Compression Control Protocol) used by PPP negotiates encryption.

The user name and password of the PPTP client is available to the PPTP server and supplied by the PPTP client. An encryption key is derived from the hashed password stored on both the client and server. The RSA RC4 standard is used to create this 40-bit session key based on the client password. This key is used to encrypt all data that is passed over the Internet, keeping the remote connection private and secure.

The data in PPP packets is encrypted. The PPP packet containing a block of encrypted data is then encapsulated into a larger IP datagram for routing over the Internet to the PPTP server. If an Internet hacker intercepted your IP datagram, he or she would find only media headers, IP headers, and then the PPP packet containing a block of encrypted data. It would be indecipherable.

Note  Users in the United States and Canada can obtain a 128-bit session key through a cryptography pack for use inside the US. Contact your Microsoft reseller for more information.

PPTP Packet Filtering

Network security from malicious activity can be enhanced by enabling PPTP filtering on the PPTP server. When PPTP filtering is enabled, the PPTP server on the private network accepts and routes only PPTP packets from authenticated users. This prevents all other packets from entering the PPTP server and private network. In conjunction with PPP encryption, this ensures that only authorized encrypted data enters or leaves the private LAN.

PPTP filtering is enabled on the PPTP server using the Protocols tab in the Network option of Control Panel. For step-by-step instruction on enabling PPTP filtering, see the white paper titled "Microsoft Point-to-Point Tunneling Protocol."

Using PPTP with Firewalls and Routers

PPTP traffic uses TCP port 1723, and IP protocol uses ID 47, as assigned by the Internet Assigned Numbers Authority (IANA). PPTP can be used with most firewalls and routers by enabling traffic destined for port 1723 to be routed through the firewall or router.

Firewalls ensure corporate network security by strictly regulating data that comes into the private network from the Internet. An organization can deploy a PPTP server running Windows NT Server version 4.0 behind its firewall. The PPTP server accepts PPTP packets passed to the private network from the firewall and extracts the PPP packet from the IP datagram, decrypts the packet, and forwards the packet to the computer on the private network.

---------------------------------------------------------------------------------------------

© 1997 Microsoft Corporation. rights reserved.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

<think>我们正在讨论Helm部署Cilium时的网络配置参数。根据用户的问题,我们需要解释以下配置项的含义: - tunnel - disabled - hostRouting - true - tunnelProtocol - empty - routingMode - native - tunnelPort - 0 注意:用户给出的配置项似乎是一个列表,但有些是键,有些是值。我们需要将它们配对起来理解。 实际上,用户可能是在列举一些配置项及其可能的值。让我们重新组织一下,常见的配置项包括: - `tunnel`:这是一个模式,但通常我们使用`routingMode`来指定路由模式。 - `disabled`:可能是指某个功能被禁用,但具体需要看上下文。 - `hostRouting`:主机路由。 - `true`:表示启用。 - `tunnelProtocol`:隧道协议。 - `empty`:空,可能表示没有设置。 - `routingMode`:路由模式。 - `native`:原生模式。 - `tunnelPort`:隧道端口。 - `0`:端口号0。 在Cilium的Helm配置中,常见的与网络相关的配置项有: 1. `routingMode`:指定路由模式,可选值包括`tunnel`(隧道模式)和`native`(原生模式,即直接路由)。 2. `tunnelProtocol`:当使用隧道模式时,指定隧道协议,如`vxlan`、`geneve`等。 3. `tunnelPort`:指定隧道使用的UDP端口,如果设置为0,则表示使用默认端口。 4. `hostRouting`:启用主机路由,通常用于直接路由模式(native)中,但也可以在其他模式下使用。 另外,用户提到了`disabled`和`true`,可能是指某些功能的开关,但在上述上下文中,我们主要关注网络配置。 让我们逐一解释: 1. **`routingMode`**:这个参数决定了Cilium如何处理节点之间的网络流量。 - `tunnel`:隧道模式(默认)。在这种模式下,节点之间的流量被封装在隧道中(如VXLAN或Geneve)。这种模式不需要底层网络知道Pod的IP地址,因为所有Pod流量都被封装在节点IP的隧道中。它适用于大多数网络环境,尤其是当节点不在同一个二层网络时。 - `native`:直接路由模式。在这种模式下,Cilium不会对流量进行封装,而是依赖底层网络路由将Pod流量转发到正确的节点。这需要底层网络能够路由Pod IP地址(例如,通过路由协议或静态路由)。这种模式性能更好,但要求网络基础设施支持。 2. **`tunnelProtocol`**:当`routingMode`设置为`tunnel`时,此参数指定使用的隧道协议。可选值有: - `vxlan`:使用VXLAN隧道(默认)。 - `geneve`:使用Geneve隧道。 - `disabled`:禁用隧道。但注意,如果`routingMode`设置为`tunnel`,则不能禁用隧道。实际上,如果设置`routingMode`为`native`,则隧道会被禁用。 3. **`tunnelPort`**:指定隧道使用的UDP端口。默认情况下,VXLAN使用8472端口,Geneve使用6081端口。如果设置为0,则使用该隧道协议的默认端口。也可以指定一个自定义端口。 4. **`hostRouting`**:这个参数控制是否启用基于主机路由的转发。当设置为`true`时,Cilium会利用主机路由表(通过BPF程序)来转发流量。在直接路由模式(`native`)下,通常需要启用主机路由(实际上,在直接路由模式下,主机路由是必须的)。在隧道模式下,主机路由也可以启用,但通常不是必须的,因为隧道封装已经处理了跨节点通信。 5. 关于`disabled`和`true`:在配置中,这些通常是值。例如,我们可以设置`hostRouting=true`来启用主机路由。而`disabled`可能用于某些功能,但在上述参数中,我们主要关注的是`routingMode`和`tunnelProtocol`。当`routingMode`设置为`native`时,隧道就被禁用了(即`tunnelProtocol`实际上被忽略)。 6. **`empty`**:在配置中,可能表示没有设置`tunnelProtocol`,那么将使用默认值(VXLAN)。 7. **`0`**:对于`tunnelPort`,设置为0表示使用默认端口。 总结: - 如果设置`routingMode=tunnel`,则必须选择一种隧道协议(如`vxlan`或`geneve`),并可以指定隧道端口(0表示默认)。 - 如果设置`routingMode=native`,则隧道被禁用,不需要设置隧道协议和端口。此时,需要确保底层网络能够路由Pod IP。 - `hostRouting=true`通常用于直接路由模式(`native`)以启用主机路由,但也可以用于隧道模式以优化某些转发。 注意:在Cilium的Helm chart中,这些配置项通常通过`--set`来设置,例如: ```bash helm install cilium cilium/cilium \ --set routingMode=native \ --set hostRouting=true ``` 或者对于隧道模式: ```bash helm install cilium cilium/cilium \ --set routingMode=tunnel \ --set tunnelProtocol=geneve \ --set tunnelPort=12345 ``` 现在,我们可以根据以上解释回答用户的问题。</think>### Helm部署Cilium网络配置参数详解 以下是Helm部署Cilium时关键网络配置参数的含义及作用: #### 1. **`tunnel` 与 `disabled`** - **`tunnel`**:启用隧道封装模式(默认模式)。所有跨节点Pod流量会被封装在VXLAN或Geneve隧道中,不依赖底层网络路由[^1]。 - **`disabled`**:禁用隧道模式。需配合`routingMode=native`使用,此时直接使用节点网络路由Pod流量。 #### 2. **`hostRouting`** - **`true`**:启用主机路由。Cilium直接操作Linux内核路由表,实现Pod流量的高效转发(推荐在`routingMode=native`时启用)[^1]。 - **`false`**:禁用主机路由,完全依赖eBPF转发(需要特定内核支持)。 #### 3. **`routingMode`** - **`tunnel`**(默认):跨节点流量通过隧道传输,适用于云环境或二层网络隔离的场景。 - **`native`**:直接路由模式,Pod IP直接暴露在底层网络,要求网络支持路由传播(如BGP或静态路由)。 #### 4. **`tunnelProtocol`** - **`vxlan`**(默认):使用VXLAN封装,端口8472。 - **`geneve`**:使用Geneve封装,端口6081。 - **`empty`**:未显式指定时自动选择默认协议(VXLAN)。 #### 5. **`tunnelPort`** - **`0`**:使用协议默认端口(VXLAN=8472, Geneve=6081)。 - **自定义值**(如`8473`):指定自定义UDP端口(需所有节点防火墙放行)。 ### 典型配置场景 1. **隧道模式(云环境默认)** ```bash --set routingMode=tunnel \ --set tunnelProtocol=vxlan \ --set tunnelPort=0 # 使用默认8472端口 ``` 2. **直接路由模式(裸金属/高级网络)** ```bash --set routingMode=native \ --set hostRouting=true \ --set tunnel=disabled ``` > ⚠️ **注意**:切换模式需重建Cilium Pod,生产环境建议通过Helm upgrade逐步迁移[^1]。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值