Method and device for allocating IP address to container

A technology of IP address and server address, which is applied in the field of data processing and can solve problems such as time-consuming and low data communication efficiency

Active Publication Date: 2016-07-13
BEIJING SOHU NEW MEDIA INFORMATION TECH
View PDF4 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the time-consuming operation of packing and unpacking data, the processing m

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for allocating IP address to container
  • Method and device for allocating IP address to container
  • Method and device for allocating IP address to container

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0049] The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0050] The following is an introduction to the specific content of the embodiments.

[0051] The embodiment of the present invention provides a method for allocating IP addresses for containers, refer to figure 1 , which is a flowchart of a method for assigning an IP address to a container provided in an embodiment of the present invention, the method includes:

[0052] S101: When it is detected that any container has an IP address allocation requirement, send an IP address request...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for allocating an IP address to a container.The method includes the steps that when an IP address allocation request of any container is detected, an IP address request is sent to a server according to the pre-configured address of the server, wherein the IP address of a host and a subnet mask are carried in the IP address request; a physical IP address form the server is received and allocated to the container, wherein the physical IP address is determined by the server according to the subnet mask, and the physical IP address and the IP address of the host belong to one network segment; the physical IP address and the container are bound.According to the method, the physical IP address is allocated to the container; when the container of the host sends data, it is not needed that secondary packaging is carried out to meet the requirement a target visual IP address; meanwhile, a data packet does not need to be unpacked when being received, and the data packet is directly routed to the container corresponding to the physical IP address according to the physical IP address of the data packet.By means of the method, in the data communication process, packing time and unpacking time can be saved, and data communication efficiency can be improved.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a method and device for allocating IP addresses to containers. Background technique [0002] Containers are used for application isolation, rights management, etc., that is, applications running in different containers handle a completely isolated state. Containers do not need to install a separate operating system, and containers on the same host share the host system. But each container has its own network, etc., so the host needs to assign IP addresses to each container. [0003] At present, the host maintains a virtual IP address for each container, which does not really exist, so it cannot be directly queried by relying on network routing. In the specific implementation process of the prior art, the container of the host needs to perform a packet operation on the data before sending the data, and when another host receives a data packet for accessing its own container, it al...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L29/12H04L12/741H04L45/74
CPCH04L45/74H04L61/5007H04L2101/695
Inventor 王保全
Owner BEIJING SOHU NEW MEDIA INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products