CN104717313B - mDNS gateway address configuration method and device - Google Patents
mDNS gateway address configuration method and device Download PDFInfo
- Publication number
- CN104717313B CN104717313B CN201310694703.4A CN201310694703A CN104717313B CN 104717313 B CN104717313 B CN 104717313B CN 201310694703 A CN201310694703 A CN 201310694703A CN 104717313 B CN104717313 B CN 104717313B
- Authority
- CN
- China
- Prior art keywords
- mdns
- message
- address
- gateway
- gateways
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
Abstract
A kind of mDNS gateway address configuration method of present invention offer and device, including:The message that mDNS relay reception mDNS gateways are sent, message include the Internet protocol IP address and gateway IP push message identifications of mDNS gateways;MDNS relayings determine that the type of message is that gateway IP pushes message according to gateway IP push message identifications;MDNS relayings configure the mDNS gateway address in mDNS relayings according to the IP address of the mDNS gateways in message.The present invention is relayed by mDNS and carries out the gateway address configuration of itself according to the gateway IP push messages comprising gateway ip address that mDNS relayings are sent, so that when mDNS gateway ip address changes, also the communication message between VLAN equipment and mDNS gateways can be correctly forwarded, the efficiency and accuracy rate of mDNS link deployments itself gateway IP are improved.
Description
Technical field
The present invention relates to the communication technology more particularly to a kind of multicast domain name systems(English:multicast Domain
Name System, referred to as:mDNS)Relaying(English:relay)Configure the mDNS gateway address configuration of the IP address of mDNS gateways
Method and apparatus.
Background technology
MDNS is mainly realized in no traditional domain name system(English:Domain Name System, referred to as:DNS)Clothes
It realizes the host in LAN in the case of business device mutually to find and communicate.It is based on for example, Bonjour agreements are exactly one
The product of mDNS.Bonjour is the zero configuration network of apple limited liability company(English:zero-configuration
Networking, referred to as:Zeroconf)Realization.The equipment for supporting Bonjour, can be in virtual LAN (English:
Virtual Local Area Network, referred to as:VLAN in), by mDNS and based on the service discovery of DNS(English:DNS-
Based Service Discovery)It can be with other branch in the information on services VLAN identical with discovery of automatic spread itself offer
The information on services of Bonjour equipment offer is provided.
Normally, using mDNS relayings and mDNS gateways(English:mDNS gateway)So that the equipment for supporting Bonjour
It can be with the information on services that travelling across VLAN automatic spread itself provides and the information on services for finding that other support Bonjour equipment to provide.
Wherein, implementor name and the service of the Bonjour equipment of service are provided in VLAN where mDNS gateways are used to record each mDNS relayings
The inquiry request of name and response mDNS relay forwardings.MDNS is relayed with each Bonjour equipment for using and providing service same
One VLAN, each mDNS relaying uniquely correspond to a mDNS gateway, for the inquiry into the identical VLAN of mDNS gateway forwards
Request:By the port numbers in VLAN be 5353 destination addresses be multicast IP (English:Internet Protocal, letter
Claim:IP) the multicast inquiry message of address " 224.0.0.251 " is converted to destination address and is looked into for the unicast of the IP address of mDNS gateways
After asking message, sent to mDNS gateways;And it is used for:The port numbers that mDNS gateways are sent to mDNS relayings are 5353, purpose
Address is that be converted into destination address be multicast ip address " 224.0.0.251 " for the unicast response message of the IP address of mDNS relayings
After multicast response message, the equipment into VLAN is sent.
Based on said program, once the IP address of mDNS gateways changes, then mDNS relayings can not be forwarded correctly identical
Communication message in VLAN between equipment and mDNS gateways.
Invention content
In consideration of it, a kind of mDNS gateway address configuration method of present invention offer and device, to overcome mDNS in the prior art
The IP address of gateway changes, then mDNS relayings can not correctly forward the communication in identical VLAN between equipment and mDNS gateways
The problem of message.
In a first aspect, the present invention provides a kind of mDNS gateway address configuration method, including:
The message that mDNS relay reception mDNS gateways are sent, the message includes the Internet protocol IP of the mDNS gateways
Address and gateway IP push message identification;
The mDNS relayings push message identification according to the gateway IP and determine that the type of the message is gateway IP push
Message;
The mDNS relayings are configured according to the IP address of the mDNS gateways in the message in the mDNS relayings
MDNS gateway address.
In the first possible realization method of first aspect,
The format of the message is identical as mDNS message formats, wherein the source IP address of the message is the mDNS nets
The IP address of pass;
Gateway IP push message identification is that the request-reply QR flag bits of the message are 0 and the message is asked
Topic number QDCOUNT fields are 0,x00 00.
In second of possible realization method of first aspect,
The format of the message is identical as mDNS message formats, wherein the source IP address of the message is the mDNS nets
The IP address of pass;
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number of the message
ANCOUNT fields are 0,x00 00.
With reference to first aspect in the first possible realization method to second of possible realization method of first aspect
Any one, in the third possible realization method of first aspect, what the mDNS relay receptions mDNS gateways were sent
Message, including:
The institute that mDNS gateways are sent when the IP address of the mDNS gateways changes described in the mDNS relay receptions
Message is stated, the IP address of the mDNS gateways in the message is the new IP address of the mDNS gateways.
With reference to first aspect in the first possible realization method to the third possible realization method of first aspect
Any one, in the 4th kind of possible realization method of first aspect,
The mDNS relayings are configured according to the IP address of the mDNS gateways in the message in the mDNS relayings
MDNS gateway address, including:
The mDNS relayings obtain the IP address of the mDNS gateways from the gateway IP push messages after the determination;
Whether the mDNS relayings determination itself preserves configured gateway address;
If the mDNS relayings, which determine, itself preserves configured gateway address, the mDNS relayings judge the report
Whether the IP address of the mDNS gateways in text and the configured gateway address are identical;
If the IP address of the mDNS gateways in the message is differed with the configured gateway address, institute is used
The IP address for stating the mDNS gateways in message replaces the configured gateway address;
If the mDNS relayings determination itself does not preserve configured gateway address, the mDNS in the message is preserved
The IP address of gateway is the mDNS gateway address in mDNS relayings.
Second aspect, the present invention provide a kind of mDNS gateway address configuration, including:
Receiving module, the message for receiving the transmission of mDNS gateways, the message includes the internet of the mDNS gateways
Protocol IP address and gateway IP push message identification;
Determining module determines that the type of the message is gateway IP push for pushing message identification according to the gateway IP
Message;
Configuration module, for being configured in the mDNS relayings according to the IP address of the mDNS gateways in the message
MDNS gateway address.
In the first possible realization method of second aspect,
The format of the message is identical as mDNS message formats, wherein the source IP address of the message is the mDNS nets
The IP address of pass;
Gateway IP push message identification is that the request-reply QR flag bits of the message are 0 and the message is asked
Topic number QDCOUNT fields are 0,x00 00.
In second of possible realization method of second aspect,
The format of the message is identical as mDNS message formats, wherein the source IP address of the message is the mDNS nets
The IP address of pass;
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number of the message
ANCOUNT fields are 0,x00 00.
In conjunction in the first of second aspect and second aspect possible realization method to second of possible realization method
Any one, in the third possible realization method of second aspect, the receiving module is specifically used for:
Receive the message that the mDNS gateways are sent when the IP address of the mDNS gateways changes, the report
The IP address of the mDNS gateways in text is the new IP address of the mDNS gateways.
In conjunction in the first of second aspect and second aspect possible realization method to the third possible realization method
Any one, in the 4th kind of possible realization method of second aspect, the configuration module is specifically used for:
The IP address of the mDNS gateways is obtained from the gateway IP push messages after the determination;
Determine whether itself preserves configured gateway address;
If it is determined that itself preserving configured gateway address, then with judging the IP of the mDNS gateways in the message
Whether location and the configured gateway address are identical;
If the IP address of the mDNS gateways in the message is differed with the configured gateway address, institute is used
The IP address for stating the mDNS gateways in message replaces the configured gateway address;
If it is determined that itself does not preserve configured gateway address, the IP address of the mDNS gateways in the message is preserved
MDNS gateway address in being relayed for the mDNS.
Based on said program, mDNS gateway address configuration method provided by the invention and device relay basis by mDNS
The gateway IP push messages comprising gateway ip address that mDNS relayings are sent carry out the gateway address configuration of itself so that in mDNS
When gateway ip address changes, the communication message between VLAN equipment and mDNS gateways also can be correctly forwarded, ensure that VLAN
The continuity communicated between equipment and mDNS gateways, and improve the efficiency of mDNS link deployments itself gateway IP and accurate
Rate.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, for this
For the those of ordinary skill of field, without having to pay creative labor, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is the flow chart of mDNS gateway address configuration method embodiment one provided by the invention;
Fig. 2 is the flow chart of mDNS gateway address configuration method embodiment two provided by the invention;
Fig. 3 is the structural schematic diagram of mDNS gateway address configuration device embodiment one provided by the invention;
Fig. 4 is the structural schematic diagram of mDNS gateway address configuration device embodiment two provided by the invention;
Fig. 5 is the structural schematic diagram that mDNS gateway address provided by the invention configures system embodiment;
Fig. 6 is the structural schematic diagram of network equipment embodiment provided by the invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
The every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart of mDNS gateway address configuration method embodiment one provided by the invention, as shown in Figure 1, the party
Method embodiment, includes the following steps:
S101, mDNS gateway generate gateway IP and push message, and the IP address of mDNS gateways is included in gateway IP push messages
Message identification is pushed with gateway IP;
S102, mDNS gateway are relayed to mDNS sends gateway IP push messages.
Further, mDNS gateways generate gateway IP and push message, including:
MDNS gateways generate gateway IP identical with mDNS message formats and push message, the source IP of gateway IP push messages
Address is the IP address of mDNS gateways, and gateway IP push message identifications are the request-reply that the gateway IP pushes message(English:
Query/Response, field name:QR)Flag bit is 0, and problem number(English:Number of questions, field
Name:QDCOUNT)Field is 0,x00 00.
Optionally, mDNS gateways generate gateway IP and push message, including:
MDNS gateways generate gateway IP identical with mDNS message formats and push message, the source IP of gateway IP push messages
Address is the IP address of mDNS gateways, and it is 1 that gateway IP push message identifications, which are the QR flag bits that gateway IP pushes message, and
Answer number(English:Number of answers, field name:ANCOUNT)Field is 0x0000.
Normally, QR=0 is query message for identifying mDNS messages.In the case of QR=0, QDCOUNT is for recording
The problem of mDNS messages itself include number, since the mDNS messages are query message, i.e., the mDNS messages itself include at least one
A problem, therefore QDCOUNT must non-zero.In general, QDCOUNT is 0,x00 01 in QR=0.
QR=1 is response message for identifying mDNS messages.In the case of QR=1, ANCOUNT is for recording mDNS reports
The answer number that text body includes, since the mDNS messages are response message, i.e., the mDNS messages itself include at least an answer,
Therefore ANCOUNT must non-zero.In general, ANCOUNT can be 0,x00 01 in QR=1.
It should be noted that IP address used in each interface of mDNS gateways connection mDNS relayings is different, connect any
When mouth IP address changes, generates gateway IP and push message;
MDNS gateways send gateway IP to the corresponding mDNS relayings of the interface and push message.
Optionally, before generating gateway IP push messages, mDNS gateways determine whether mDNS functions enable;If enabled,
Then execute the step of generating gateway IP push messages.
Specifically, mDNS gateways, when determining that mDNS functions enable, as the interface IP being connected with mDNS relayings
When location changes, has the mDNS relayings newly accessed or mDNS gateways and startings, mDNS message formats as shown in Table 1 are generated
Identical gateway IP pushes message, and gateway IP push messages include gateway IP push message identifications, and into corresponding mDNS
Message is pushed after sending gateway IP, so that mDNS relayings can identify DNS formats according to gateway IP push message identifications
Message be that gateway IP pushes message, and configures the net of itself according to the gateway ip address for including in gateway IP push messages
Close address.Wherein, when gateway IP pushes the QR flag bits and QDCOUNT fields that message identification is gateway IP push messages, QR marks
Will position is 0, and QDCOUNT field values are 0x0000;Or gateway IP push message identifications are QR flag bits and ANCOUNT words
Duan Shi, QR flag bit are 1, and ANCOUNT field values are 0x0000.
When specific implementation, gateway IP push messages are encapsulated in User Datagram Protocol(English:User Datagram
Protocol, referred to as:UDP)It is sent in message, wherein the source IP address for sending message is gateway ip address, purpose IP address is
“224.0.0.251”(IPv4)Or " FF02::FB”(IPv6), source port number and destination slogan are 5353, load(English:
payload)Content is indicated with hexadecimal number:
0x00 00,00 00,00 00,00 00,00 00,00 00;
Or 0,x00 00,80 00,00 00,00 00,00 00,00 00.
Table one, mDNS message formats
The load contents of above two gateway IP push messages are only two preferable embodiments, and the embodiment of the present invention is only
Gateway IP push message identification is construed as limiting, in gateway IP push messages other flag bits and field be not construed as limiting.
In the prior art, the gateway address for needing all mDNS under manual configuration mDNS gateways to relay, when mDNS is relayed
When quantity is more, and when mDNS gateway ip address changes, need to carry out again the gateway address that mDNS is relayed one by one
Configuration, allocative efficiency is low to be also easy error.
The embodiment, by mDNS gateways when gateway ip address sends and changes, it includes gateway IP to be sent to mDNS relayings
The gateway IP of address pushes message so that mDNS relayings can configure the gateway address of itself according to gateway ip address, solve
When mDNS gateway ip address changes, mDNS relayings can not correctly forward the communication in VLAN between equipment and mDNS gateways
The problem of message, in particular, when a large amount of mDNS relaying access mDNS gateways, it can be according to the gateway IP push that mDNS gateways are sent
Message configures the gateway ip address of itself, improves the efficiency and accuracy rate of mDNS link deployment gateway address.
Fig. 2 is the flow chart of mDNS gateway address configuration method embodiment two provided by the invention, as shown in Fig. 2, the party
Method includes the following steps:
The message that S201, mDNS relay reception mDNS gateways are sent, the message includes the internet of the mDNS gateways
Protocol IP address and gateway IP push message identification;
S202, mDNS relaying push message identification according to the gateway IP and determine that the type of the message is gateway IP push
Message;
S203, mDNS relaying are configured according to the IP address of the mDNS gateways in the message in the mDNS relayings
MDNS gateway address.
Further, the format of the message is identical as mDNS message formats, wherein the source IP address of the message is institute
State the IP address of mDNS gateways;
Gateway IP push message identification is that the request-reply QR flag bits of the message are 0 and the message is asked
Topic number QDCOUNT fields are 0x0000.
Optionally, the format of the message is identical as mDNS message formats, wherein the source IP address of the message is described
The IP address of mDNS gateways;
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number of the message
ANCOUNT fields are 0,x00 00.
Further, S201, including:
The gateway IP push reports that mDNS relay reception mDNS gateways are sent when mDNS gateway ip address changes
Text, the IP address of mDNS gateways are the new IP address of mDNS gateways.
Further, S203, including:
The mDNS relayings obtain the IP address of the mDNS gateways from the gateway IP push messages after the determination;
Whether the mDNS relayings determination itself preserves configured gateway address;
If the mDNS relayings, which determine, itself preserves configured gateway address, the mDNS relayings judge the report
Whether the IP address of the mDNS gateways in text and the configured gateway address are identical;
If the IP address of the mDNS gateways in the message is differed with the configured gateway address, institute is used
The IP address for stating the mDNS gateways in message replaces the configured gateway address;
If the mDNS relayings determination itself does not preserve configured gateway address, the mDNS in the message is preserved
The IP address of gateway is the mDNS gateway address in mDNS relayings.
Optionally, before S202, further include:
MDNS relayings determine whether mDNS functions enable;
If enabled, mDNS relayings are executed determines that the type of the message is net according to gateway IP push message identifications
The step of closing IP push messages, however, it is determined that the message is that gateway IP pushes message, then mDNS relayings are executed according in the message
The IP address of mDNS gateways the step of configuring the mDNS gateway address in mDNS relaying.
Specifically, mDNS relayings push the mDNS reports that message identification is sent from the mDNS gateways received by gateway IP
After determining gateway IP push messages in text, first confirm that whether the mDNS functions of itself enable, if being not enabled on, without appointing
Where is managed, if enabled, parsed the source IP address of gateway IP push messages, i.e. gateway ip address, is carried out the mDNS gateways of itself
Address configuration.If itself preserving configured mDNS gateway address, and the source of the gateway address and gateway IP push messages
IP address is identical, then without any processing;If itself not preserving configured mDNS gateway address, which is protected
Deposit the mDNS gateway address as itself;Or configured mDNS gateway address pushes the source IP address of message not with gateway IP
Together, then the source IP address is replaced into configured mDNS gateway address as new mDNS gateway address.MDNS is relayed in basis
After gateway IP push message has configured the gateway address of itself, can by the mDNS gateway address as a purpose IP address to mDNS nets
It closes the query message of device multicast in unicast forwarding VLAN and the unicast response message that mDNS gateways are sent is converted into multicast
Equipment of the message into VLAN is sent, and ensures the normal communication of the equipment and mDNS gateways in VLAN.
The embodiment pushes message by mDNS relayings according to the gateway IP comprising gateway ip address that mDNS relayings are sent
Carry out itself gateway address configuration so that when mDNS gateway ip address changes, also can correctly forward VLAN equipment with
Communication message between mDNS gateways ensure that the continuity communicated between VLAN equipment and mDNS gateways, and improve
The efficiency and accuracy rate of mDNS link deployments itself gateway IP.
Fig. 3 is the structural schematic diagram of mDNS gateway address configuration device embodiment one provided by the invention, as shown in figure 3,
The mDNS gateway address configuration device 300, including:Generation module 31 and sending module 32.Wherein, generation module 31, for giving birth to
Message is pushed at gateway IP, includes that the IP address of mDNS gateways and gateway IP push message identification in gateway IP push messages;Hair
Module 32 is sent, gateway IP push messages are sent for being relayed to mDNS.
Further, generation module 31 are specifically used for:
MDNS gateways generate gateway IP identical with mDNS message formats and push message, the source IP of gateway IP push messages
Address is the IP address of mDNS gateways, and it is 0 that gateway IP push message identifications, which are the QR flag bits that the gateway IP pushes message, and
And QDCOUNT fields are 0,x00 00.
Optionally, generation module 31 are specifically used for:
It generates gateway IP identical with mDNS message formats and pushes message, the source IP address of gateway IP push messages is
The IP address of mDNS gateways, it is 1 that gateway IP push message identifications, which are the QR flag bits that gateway IP pushes message, and
ANCOUNT fields are 0,x00 00.
It should be noted that IP address used in each interface of mDNS gateways connection mDNS relayings is different, connect any
When mouth IP address changes, generation module 31 generates gateway IP and pushes message;
Sending module 32 sends gateway IP to the corresponding mDNS relayings of the interface and pushes message.
Optionally, before generating gateway IP push messages, generation module 31 determines whether mDNS functions enable;If making
Can, then execute the step of generating gateway IP push messages.
MDNS gateway address configuration devices described in the embodiment can be used for executing the skill in embodiment of the method shown in Fig. 1
Art scheme, implementing principle and technical effect are similar, repeat no more.
Fig. 4 is the structural schematic diagram of mDNS gateway address configuration device embodiment two provided by the invention, as shown in figure 4,
The mDNS gateway address configuration device 400, including:Receiving module 41, determining module 42 and configuration module 43.Wherein, mould is received
Block 41, for receive mDNS gateways transmission message, the message include the mDNS gateways Internet protocol IP address with
Gateway IP pushes message identification;Determining module 42 is used to push the type that message identification determines the message according to the gateway IP
Message is pushed for gateway IP;Configuration module 43, for according to described in the configuration of the IP address of the mDNS gateways in the message
MDNS gateway address in mDNS relayings.
Further, the format of the message is identical as mDNS message formats, wherein the source IP address of the message is institute
State the IP address of mDNS gateways;
Gateway IP push message identification is that the request-reply QR flag bits of the message are 0 and the message is asked
Topic number QDCOUNT fields are 0,x00 00.
Optionally, the format of the message is identical as mDNS message formats, wherein the source IP address of the message is described
The IP address of mDNS gateways;
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number of the message
ANCOUNT fields are 0,x00 00.
Further, receiving module 41 are specifically used for:
Receive the gateway IP push messages that mDNS gateways are sent when mDNS gateway ip address changes, mDNS nets
The IP address of pass is the new IP address of mDNS gateways.
Further, configuration module 43 are specifically used for:
The IP address of the mDNS gateways is obtained from the gateway IP push messages after the determination;
Determine itself whether preserve configured mDNS gateway address;
It determines and itself preserves configured mDNS gateway address, then judge the IP of the mDNS gateways in the message
Whether address and the configured mDNS gateway address are identical;
If the IP address of the mDNS gateways in the message is differed with the configured mDNS gateway address,
The configured mDNS gateway address is replaced with the IP address of the mDNS gateways in the message;
If it is determined that itself not preserving configured mDNS gateway address, the IP of the mDNS gateways in the message is preserved
Address is the mDNS gateway address in mDNS relayings.
Optionally it is determined that module 42 is determining that the type of the message is gateway according to gateway IP push message identifications
Before IP pushes message, it is additionally operable to:
Determine whether mDNS functions enable;
If enabled, execute and determine that the type of the message is gateway IP push according to gateway IP push message identifications
The step of message, however, it is determined that the message is that gateway IP pushes message, then configuration module 43 is executed according to described in the message
The IP address of mDNS gateways configures the step of mDNS gateway address in the mDNS relayings.
MDNS gateway address configuration devices described in the embodiment can be used for executing the skill in embodiment of the method shown in Fig. 2
Art scheme, implementing principle and technical effect are similar, repeat no more.
Fig. 5 is the structural schematic diagram that mDNS gateway address provided by the invention configures system embodiment, as shown in figure 5, should
MDNS gateway address configures system 500, including:Generation module 31, sending module 32, receiving module 41, determining module 42 and match
Set module 43.Wherein, generation module 31 and sending module 32 and receiving module 41, determining module 42 and configuration module 43 are distinguished
The generation module and sending module that include in mDNS gateway address configuration device 300 that can be as shown in figure 3 and shown in Fig. 4
Receiving module, determining module and the configuration module for including in mDNS gateway address configuration device 400 are identical, can be respectively used to execute
The technical solution in technical solution and embodiment of the method shown in Fig. 2 in embodiment of the method shown in FIG. 1, realization principle
It is similar with technique effect, it repeats no more.
Fig. 6 is the structural schematic diagram of network equipment embodiment provided by the invention, as shown in fig. 6, the network equipment 600
Specific form can be the network switch, which includes processor 601 and interface 602.Processor 601 is by total
Line and interface 602 connect.In Fig. 6 bus is indicated with thick line.Wherein,
Interface 602 can be realized by optical transceiver, electric transceiver, wireless transceiver or its arbitrary combination.For example, light is received and dispatched
Device can be Small Form-Factor Pluggable(English:Small form-factor pluggable transceiver, abbreviation:SFP)It receives
Send out device(English:transceiver), enhance Small Form-Factor Pluggable(English:enhanced small form-factor
Pluggable, abbreviation:SFP+)Transceiver or 10 gigabit Small Form-Factor Pluggables(English:10Gigabit small form-
Factor pluggable, abbreviation:XFP)Transceiver.Electric transceiver can be Ethernet(English:Ethernet)Network interface
Controller(English:Network interface controller, abbreviation:NIC).Wireless transceiver can be that wireless network connects
Mouth controller(English:Wireless network interface controller, abbreviation:WNIC).Interface 602 can wrap
Multiple physical interfaces are included, such as interface 602 includes multiple Ethernet interfaces.
Processor 601 can be central processing unit(English:Central processing unit, abbreviation:CPU), also may be used
To be the combination of CPU and hardware chip.Above-mentioned hardware chip can be the combination of one or more of:Application-specific integrated circuit
(English:Application-specific integrated circuit, abbreviation:ASIC), field programmable gate array
(English:Field-programmable gate array, abbreviation:FPGA), Complex Programmable Logic Devices(English:
Complex programmable logic device, abbreviation:CPLD)And network processing unit(English:network
Processor, abbreviation:NP).
The network equipment 600 further includes memory 603, this is transferred to for storing program code, and by the program code
Processor.Memory 603 may include volatile memory(English:volatile memory), such as random access memory
(English:Random-access memory, abbreviation:RAM);Memory can also include nonvolatile memory(English:non-
volatile memory), such as read-only memory(English:Read-only memory, abbreviation:ROM), flash memory(English
Text:flash memory), hard disk(English:Hard disk drive, abbreviation:HDD)Or solid state disk(English:solid-
State drive, abbreviation:SSD);Memory can also include the combination of the memory of mentioned kind.
In first scene of the present embodiment, processor 601 executes following steps:
First, processor 601 receives the message that mDNS gateways are sent by interface 602, and the message includes described
The Internet protocol IP address and gateway IP of mDNS gateways push message identification;
Wherein, the format of the message is identical as mDNS message formats, and the source IP address of the message is the mDNS nets
The IP address of pass;
Gateway IP push message identification is that the request-reply QR flag bits of the message are 0 and the message is asked
Topic number QDCOUNT fields are 0,x00 00.
Alternatively, the format of the message is identical as mDNS message formats, wherein the source IP address of the message is described
The IP address of mDNS gateways;
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number of the message
ANCOUNT fields are 0,x00 00.
Secondly, processor 601 calls the program code stored in memory 603, executes to be pushed according to the gateway IP and report
Text mark determines that the type of the message is the step of gateway IP pushes message;And
The mDNS gateway address in the mDNS relayings is configured according to the IP address of the mDNS gateways in the message
The step of.
Further, it executes and determines that the type of the message is gateway IP push according to gateway IP push message identifications
The step of message, including:Determine the problem of request-reply QR flag bits of the message are 0 and message number QDCOUNT
Field is 0,x00 00;Or determine that the QR flag bits of the message are 1, and the answer number ANCOUNT fields of the message are
0x00 00。
Further, the mDNS in the mDNS relayings is configured according to the IP address of the mDNS gateways in the message
Gateway address, including:
The IP address of the mDNS gateways is obtained from the gateway IP push messages after the determination;
Determine whether itself preserves configured gateway address;
If it is determined that itself preserving configured gateway address, then with judging the IP of the mDNS gateways in the message
Whether location and the configured gateway address are identical;
If the IP address of the mDNS gateways in the message is differed with the configured gateway address, institute is used
The IP address for stating the mDNS gateways in message replaces the configured gateway address;
If it is determined that itself does not preserve configured gateway address, the IP address of the mDNS gateways in the message is preserved
MDNS gateway address in being relayed for the mDNS.
Optionally, processor 601 is executed determines that the type of the message is net according to gateway IP push message identifications
Before the step of closing IP push messages, further include:
Determine whether mDNS functions enable;
If enabled, execute and determine that the type of the message is gateway IP push according to gateway IP push message identifications
The step of message, however, it is determined that the message is that gateway IP pushes message, then executes according to the mDNS gateways in the message
IP address configures the step of mDNS gateway address in the mDNS relayings.
One of ordinary skill in the art will appreciate that implement the method for the above embodiments be can be with
It is completed come instruction processing unit by program, the program can be stored in computer readable storage medium, and the storage is situated between
Matter is non-transitory(English:non-transitory)Medium can be random access memory, read-only memory, flash memory
Reservoir, hard disk, solid state disk, tape(English:magnetic tape), floppy disk(English:floppy disk), CD(English:
optical disc)And its arbitrary combination.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
Any one skilled in the art in the technical scope disclosed by the present invention, the change or replacement that can be readily occurred in,
It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
Subject to.
Claims (6)
1. a kind of multicast domain name system mDNS gateway address configuration methods, which is characterized in that including:
The message that mDNS relay reception mDNS gateways are sent, the message includes the Internet protocol IP address of the mDNS gateways
Message identification is pushed with gateway IP;
The mDNS relayings push message identification according to the gateway IP and determine that the type of the message is that gateway IP pushes message;
The mDNS relayings configure the mDNS in the mDNS relayings according to the IP address of the mDNS gateways in the message
Gateway address;
The format of the message is identical as mDNS message formats, wherein the source IP address of the message is the mDNS gateways
IP address;
The gateway IP push message identification is the problem of request-reply QR flag bits of the message are 0 and message number
QDCOUNT fields are 0,x00 00;Or
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number ANCOUNT of the message
Field is 0,x00 00.
2. method according to claim 1, which is characterized in that the message that the mDNS relay receptions mDNS gateways are sent, packet
It includes:
The report that mDNS gateways are sent when the IP address of the mDNS gateways changes described in the mDNS relay receptions
Text, the IP address of the mDNS gateways in the message are the new IP address of the mDNS gateways.
3. method according to claim 1 or 2, which is characterized in that mDNS relaying is according to described in the message
The IP address of mDNS gateways configures the mDNS gateway address in the mDNS relayings, including:
The mDNS relayings obtain the IP address of the mDNS gateways from the gateway IP push messages after the determination;
Whether the mDNS relayings determination itself preserves configured mDNS gateway address;
If the mDNS relayings, which determine, itself preserves configured mDNS gateway address, the mDNS relayings judge the report
Whether the IP address of the mDNS gateways in text and the configured mDNS gateway address are identical;
If the IP address of the mDNS gateways in the message is differed with the configured mDNS gateway address, institute is used
The IP address for stating the mDNS gateways in message replaces the configured mDNS gateway address;
If the mDNS relayings determination itself does not preserve configured mDNS gateway address, the mDNS in the message is preserved
The IP address of gateway is the mDNS gateway address in mDNS relayings.
4. a kind of multicast domain name system mDNS gateway address configuration devices, which is characterized in that including:
Receiving module, the message for receiving the transmission of mDNS gateways, the message includes the Internet protocol of the mDNS gateways
IP address and gateway IP push message identification;
Determining module determines that the type of the message is gateway IP push reports for pushing message identification according to the gateway IP
Text;
Configuration module, for configuring the mDNS in the mDNS relayings according to the IP address of the mDNS gateways in the message
Gateway address;
The format of the message is identical as mDNS message formats, wherein the source IP address of the message is the mDNS gateways
IP address;
The gateway IP push message identification is the problem of request-reply QR flag bits of the message are 0 and message number
QDCOUNT fields are 0,x00 00;Or
It is 1 that the gateway IP, which pushes the QR flag bits that message identification is the message, and the answer number ANCOUNT of the message
Field is 0,x00 00.
5. device according to claim 4, which is characterized in that the receiving module is specifically used for:
The message that the mDNS gateways are sent when the IP address of the mDNS gateways changes is received, in the message
The mDNS gateways IP address be the mDNS gateways new IP address.
6. device according to claim 4 or 5, which is characterized in that the configuration module is specifically used for:
The IP address of the mDNS gateways is obtained from the gateway IP push messages after the determination;
Determine itself whether preserve configured mDNS gateway address;
It determines and itself preserves configured mDNS gateway address, then judge the IP address of the mDNS gateways in the message
It is whether identical as the configured mDNS gateway address;
If the IP address of the mDNS gateways in the message is differed with the configured mDNS gateway address, institute is used
The IP address for stating the mDNS gateways in message replaces the configured mDNS gateway address;
If it is determined that itself not preserving configured mDNS gateway address, the IP address of the mDNS gateways in the message is preserved
MDNS gateway address in being relayed for the mDNS.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310694703.4A CN104717313B (en) | 2013-12-17 | 2013-12-17 | mDNS gateway address configuration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310694703.4A CN104717313B (en) | 2013-12-17 | 2013-12-17 | mDNS gateway address configuration method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104717313A CN104717313A (en) | 2015-06-17 |
CN104717313B true CN104717313B (en) | 2018-08-14 |
Family
ID=53416260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310694703.4A Active CN104717313B (en) | 2013-12-17 | 2013-12-17 | mDNS gateway address configuration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104717313B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109981819B (en) * | 2019-03-22 | 2022-05-06 | 新华三技术有限公司合肥分公司 | mDNS message processing method, device and networking system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101883157A (en) * | 2010-06-28 | 2010-11-10 | 华为技术有限公司 | Method and corresponding device for realizing gateway access |
EP2263905A1 (en) * | 2008-04-07 | 2010-12-22 | Mitsubishi Electric Corporation | Communication relay device for train and communication relay method for train |
CN101989345A (en) * | 2010-03-26 | 2011-03-23 | 深圳中兴网信科技有限公司 | Method and system for accessing software shopping mall |
CN102075339A (en) * | 2009-11-23 | 2011-05-25 | 中国电信股份有限公司 | VPN management platform, and implementation method and system for VPN service |
CN102740282A (en) * | 2011-04-01 | 2012-10-17 | 中兴通讯股份有限公司 | Method and system for acquiring IP address of local gateway |
-
2013
- 2013-12-17 CN CN201310694703.4A patent/CN104717313B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2263905A1 (en) * | 2008-04-07 | 2010-12-22 | Mitsubishi Electric Corporation | Communication relay device for train and communication relay method for train |
CN102075339A (en) * | 2009-11-23 | 2011-05-25 | 中国电信股份有限公司 | VPN management platform, and implementation method and system for VPN service |
CN101989345A (en) * | 2010-03-26 | 2011-03-23 | 深圳中兴网信科技有限公司 | Method and system for accessing software shopping mall |
CN101883157A (en) * | 2010-06-28 | 2010-11-10 | 华为技术有限公司 | Method and corresponding device for realizing gateway access |
CN102740282A (en) * | 2011-04-01 | 2012-10-17 | 中兴通讯股份有限公司 | Method and system for acquiring IP address of local gateway |
Also Published As
Publication number | Publication date |
---|---|
CN104717313A (en) | 2015-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3154227B1 (en) | Packet transmission method, node, path management server and storage medium | |
US9130859B1 (en) | Methods and apparatus for inter-virtual local area network multicast services | |
CN110999265B (en) | Managing network connectivity between cloud computing service endpoints and virtual machines | |
US20220078114A1 (en) | Method and Apparatus for Providing Service for Traffic Flow | |
US9843504B2 (en) | Extending OpenFlow to support packet encapsulation for transport over software-defined networks | |
US10375193B2 (en) | Source IP address transparency systems and methods | |
US20150003463A1 (en) | Multiprotocol Label Switching Transport for Supporting a Very Large Number of Virtual Private Networks | |
WO2018059284A1 (en) | Data transmission method and network equipment | |
US9391881B2 (en) | System and methods for dynamic network address modification | |
EP2680507B1 (en) | Packet forwarding method and system, and relay agent device | |
WO2016062169A1 (en) | Message transmission method and apparatus | |
WO2018214809A1 (en) | Message transmission method and device, and storage medium | |
KR20170005129A (en) | Network packet encapsulation and routing | |
CN105637819B (en) | It is used for transmission the method and system of broadcast data | |
KR20150076041A (en) | System for supporting multi-tenant based on private ip address in virtual private cloud networks and operating method thereof | |
US10020954B2 (en) | Generic packet encapsulation for virtual networking | |
CN102273177A (en) | Neighbour discovery protocol mediation | |
US20140032782A1 (en) | Method and apparatus for route selection of host in multihoming site | |
WO2015196923A1 (en) | Method for sending information and network device | |
US9755939B2 (en) | Network wide source group tag binding propagation | |
CN108512669A (en) | It is used for transmission the method and system of broadcast data | |
US10200282B1 (en) | Systems and methods for virtualizing customer-premises equipment | |
WO2017219816A1 (en) | Data transmission method and network address translation device | |
CN113364660A (en) | Data packet processing method and device in LVS load balancing | |
CN104717313B (en) | mDNS gateway address configuration method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |