Example for Configuring the mDNS Gateway in Layer 2 Networking Between an AC and APs
Networking Requirements
As shown in Figure 4-34, mobile terminals of an enterprise connect to the Internet through the WLAN. Layer 2 forwarding is performed between the AC and AP_1 and AP_2. Departments 1 and 2 belong to VLAN 10 and VLAN 20 respectively, and each department has a Bonjour-compliant printer. The enterprise requires that the Apple terminals discover services provided by all printers in the enterprise using Bonjour.
Procedure
- Connect iPhone, Printer_1, and Printer_2 to the Internet through the WLAN. For details, see Example for Configuring WLAN Services on a Small-Scale Network.
If mobile terminals with Apple iOS V6.0 or later dynamically obtain IP addresses using DHCP, run the dns-list command in the global address pool view or the dhcp server dns-list command in the interface address pool view to configure the DNS server IP address.
- Enable the mDNS gateway on the AC.
<HUAWEI> system-view [HUAWEI] sysname AC [AC] mdns gateway enable
- Configure an mDNS group on the AC.
[AC] mdns group group1 [AC-mdns-group-group1] user-vlan 10 [AC-mdns-group-group1] service-vlan 20 [AC-mdns-group-group1] quit
- On the AC, configure the service types that can be recorded by the mDNS gateway.
[AC] mdns permit service-type _raop._tcp.local id 0 [AC] mdns permit service-type _airplay._tcp.local id 1 [AC] mdns permit service-type _printer._tcp.local id 2 [AC] mdns permit service-type _device-info._tcp.local id 3 [AC] mdns permit service-type _rfb._tcp.local id 4 [AC] mdns permit service-type _sftp-ssh._tcp.local id 5 [AC] mdns permit service-type _ssh._tcp.local id 6 [AC] mdns permit service-type _smb._tcp.local id 7 [AC] mdns permit service-type _afpovertcp._tcp.local id 8 [AC] mdns permit service-type _universal._sub._ipp._tcp.local id 9
- Configure the AC to periodically discover services.
[AC] vlan 10 [AC-vlan10] mdns probe interval 100 [AC-vlan10] quit [AC] interface vlanif 10 [AC-Vlanif10] ip address 192.168.2.1 24 [AC-Vlanif10] quit [AC] vlan 20 [AC-vlan20] mdns probe interval 100 [AC-vlan20] quit [AC] interface vlanif 20 [AC-Vlanif20] ip address 192.168.3.1 24 [AC-Vlanif20] quit
- Verify the configuration.
# Run the display mdns gateway command on the AC to check the mDNS gateway configuration.
[AC] display mdns gateway mDNS Information: -------------------------------------------------------------------------------- mDNS Gateway Status : Enable mDNS Gateway Policy : Disable mDNS Policy no-match action : Deny mDNS Gateway Unicast : Disable mDNS Source IP : - -------------------------------------------------------------------------------- Gateway Probe Vlan : vlan10 vlan20 --------------------------------------------------------------------------------
# Run the display mdns service all command on the AC to check service information recorded on the mDNS gateway.
# After the configuration is complete, Bonjour-compliant terminals can discover printers in VLAN 10 and VLAN 20.
Configuration Files
Configuration file of the AC
# sysname AC # mdns gateway enable mdns permit service-type _raop._tcp.local id 0 mdns permit service-type _airplay._tcp.local id 1 mdns permit service-type _printer._tcp.local id 2 mdns permit service-type _device-info._tcp.local id 3 mdns permit service-type _rfb._tcp.local id 4 mdns permit service-type _sftp-ssh._tcp.local id 5 mdns permit service-type _ssh._tcp.local id 6 mdns permit service-type _smb._tcp.local id 7 mdns permit service-type _afpovertcp._tcp.local id 8 mdns permit service-type _universal._sub._ipp._tcp.local id 9 # vlan batch 10 20 # vlan 10 mdns probe interval 100 vlan 20 mdns probe interval 100 # mdns group group1 user-vlan 10 service-vlan 20 # interface Vlanif10 ip address 192.168.2.1 255.255.255.0 # interface Vlanif20 ip address 192.168.3.1 255.255.255.0 # return