Example for Configuring the mDNS Gateway
Service Requirements
Departments 1 and 2 of an enterprise belong to VLAN 101 and VLAN 102, respectively. A Bonjour-capable printer is added to each department. When submitting printing requests using Apple STAs, employees in both the departments want to discover and use printers in VLAN 101 and VLAN 102. Bonjour technology advertises available services using mDNS packets. Therefore, STAs can discover services only in the local VLAN. To resolve this problem, you can configure an AC as the mDNS gateway, so that STAs can discover services across VLANs.
Networking Requirements
AC networking mode: Layer 2 networking in bypass mode
Data Planning
Item |
Data |
---|---|
Communication interface of the AC |
VLANs to which STAs and service provisioning devices belong: VLAN 101 and VLAN 102 VLANIF 101: 10.23.101.3/24 VLANIF 102: 10.23.102.3/24 |
Scheduled service discovery |
Enabled. The interval for discovering services is 150 seconds. |
Configuration Roadmap
- Deploy the AC, STAs, and service provisioning devices on a Layer 2 network and ensure that they can communicate with each other.
- Configure the mDNS gateway. To proactively query and update existing services on the network, enable scheduled service discovery on the mDNS gateway.
Configuration Notes
When the AC and service provisioning devices are deployed on a Layer 3 network, you need to enable scheduled service discovery on the mDNS relay agent instead of the mDNS gateway.
If scheduled service discovery is enabled in the VLAN, and no VLANIF interface is configured on the AC accordingly, you need to specify a source interface to ensure that service provisioning devices can send response packets to the AC.
Only one mDNS gateway can be deployed on a service sharing network.
If the number of network services recorded by the mDNS gateway exceeds 64, you are advised to divide services into different mDNS groups for refined management.
If the AC and APs are connected at Layer 3 and direct forwarding is used, it is recommended that the mdns centralized-control enable command be executed in the VAP profile view to enable tunnel forwarding for mDNS packets so that mDNS packets can be forwarded to the AC for centralized processing.
Procedure
- Configure the AC, STAs, and service provisioning devices to communicate with each other.# Add GE0/0/2 on the aggregation device SwitchB to VLAN 101 and VLAN 102.
<SwitchB> system-view [SwitchB] vlan batch 101 102 [SwitchB] interface GigabitEthernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] port link-type trunk [SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 101 102 [SwitchB-GigabitEthernet0/0/2] quit
# Choose Create to create VLAN 101. Add GE0/0/1 to VLAN 101 and configure an IP address for VLANIF 101.
and clickCreate VLAN 102 in the same way as VLAN 101. Add GE0/0/1 to VLAN 102 and configure an IP address for VLANIF 102.
- Configure the mDNS gateway.
# Choose Bonjour gateway, and click Apply to configure the scheduled service discovery function.
, enable - Verify the configuration.
When an Apple STA accesses the WLAN of department 1, it can discover and use printers of department 2.