The device as the mDNS gateway needs to maintain service lists of all service provisioning devices. A service list records the service name, service type, service VLAN, TTL, host name, and IP address. The TTL is provided by a service provisioning device to the mDNS gateway, and represents the aging time of a service. If the mDNS gateway receives mDNS response packets from a service provisioning device within the aging time, the mDNS gateway updates its service information. If the mDNS gateway does not receive mDNS response packets from a service provisioning device within the aging time, the mDNS gateway deletes its service information.
To improve availability and maintainability, the device as the mDNS gateway also supports the periodic discovery function and mDNS group function.
Periodic discovery function: If the mDNS gateway has been deployed on a network, a service provisioning device will proactively notify the mDNS gateway of service information when connecting to the network. If the service provisioning device exists before the mDNS gateway is connected to the network, the device will not notify the gateway of service information. In this case, you can configure periodical service discovery. After the function is configured, the mDNS gateway sends a service query message at a specified interval, and updates the service information list after receiving a response from the service provisioning device. This ensures real-time update of the service information list on the mDNS gateway.
mDNS group function: By default, the mDNS gateway queries service information lists of all service provisioning devices when receiving an mDNS request packet from a user requesting for a service. The mDNS gateway then replies to the user with a message containing the service provisioning devices that can provide the service. All the service provisioning devices mapping the service are visible to the user; therefore, service resources cannot be isolated. You can configure an mDNS group on the mDNS gateway to implement service resource isolation and refined service management. After receiving an mDNS request packet from a user requesting for a service, the mDNS gateway queries the mDNS group based on the user VLAN. If the user VLAN is added to a certain mDNS group, the gateway queries and replies with the requested service from the service list provided by the service VLAN mapping the mDNS group. If no mDNS group is specified for the user VLAN or no service VLAN is configured in the mDNS group, the gateway queries and replies with the requested service from the service lists provided by all service VLANs.
To improve network security, the device supports the trusted mDNS relay agent function when it functions as the mDNS gateway. The administrator can enable the trusted mDNS relay agent function on the Switch functioning as the mDNS gateway and configure the IP address of the trusted mDNS relay agent. The Switch then only processes unicast packets from the trusted mDNS relay agent, and discards unicast packets from untrusted mDNS relay agents. If bogus mDNS relay agents on the network forge mDNS packets, this function prevents the bogus mDNS relay agents from threatening network security.
Before configuring the mDNS gateway, complete the following tasks:
Deploying the mDNS relay if the mDNS gateway and service provisioning device are located on different network segments.
The system view is displayed.
The mDNS gateway is enabled.
By default, the mDNS gateway is disabled.
When the device as the mDNS gateway and service provisioning device are located on different network segments, the mDNS relay but not the mDNS gateway needs to be configured to periodically update service lists.
An IP address needs to be configured for the VLANIF interface corresponding to the VLAN to which the mDNS service provisioning device belongs.
The trusted mDNS relay agent function is enabled and the IP address of the trusted mDNS relay agent is configured.
By default, the trusted mDNS relay agent function is disabled.
The service type that can be recorded by the mDNS gateway is configured.
By default, an mDNS gateway can record all service types. After this command is executed, an mDNS gateway can record only the specified service type.
When deploying mDNS gateway services, it is recommended that you configure service types that can be recorded by the mDNS gateway.