As shown in Figure 1, mobile terminals of an enterprise connect to the Internet through the WLAN. Layer 3 forwarding is performed between the AP and AC. There is a Bonjour-compliant printer in VLAN 10 and VLAN 20 each. The administrator requires that user terminals of the enterprise discover all available printing services through Bonjour.
Here, Huawei AC V200R005C00 or later is used.
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.
# Configure the Switch.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 20 30 [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] port link-type hybrid [Switch-GigabitEthernet0/0/2] port hybrid pvid vlan 20 [Switch-GigabitEthernet0/0/2] port hybrid untagged vlan 20 [Switch-GigabitEthernet0/0/2] quit [Switch] interface vlanif 20 [Switch-Vlanif20] ip address 192.168.3.1 255.255.255.0 [Switch-Vlanif20] quit [Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] port link-type hybrid [Switch-GigabitEthernet0/0/3] port hybrid pvid vlan 30 [Switch-GigabitEthernet0/0/3] port hybrid untagged vlan 30 [Switch-GigabitEthernet0/0/3] quit [Switch] interface vlanif 30 [Switch-Vlanif30] ip address 192.168.4.1 255.255.255.0 [Switch-Vlanif30] quit
# Configure the AC.
<HUAWEI> system-view [HUAWEI] sysname AC [AC] vlan batch 30 [AC] interface gigabitethernet 0/0/1 [AC-GigabitEthernet0/0/1] port link-type hybrid [AC-GigabitEthernet0/0/1] port hybrid pvid vlan 30 [AC-GigabitEthernet0/0/1] port hybrid untagged vlan 30 [AC-GigabitEthernet0/0/1] quit [AC] interface vlanif 30 [AC-Vlanif30] ip address 192.168.4.2 255.255.255.0 [AC-Vlanif30] quit [AC] ip route-static 192.168.3.0 255.255.255.0 192.168.4.1 [AC] ip route-static 192.168.2.0 255.255.255.0 192.168.4.1
[Switch] vlan 10 [Switch-Vlan10] mdns relay enable [Switch-Vlan10] mdns probe interval 3600 [Switch-Vlan10] quit [Switch] vlan 20 [Switch-Vlan20] mdns relay enable [Switch-Vlan20] mdns probe interval 3600 [Switch-Vlan20] quit [Switch] mdns gateway ip 192.168.4.2
[AC] mdns gateway enable [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 [AC] mdns group group1 [AC-mdns-group-group1] user-vlan 10 [AC-mdns-group-group1] service-vlan 20 [AC-mdns-group-group1] quit
# Run the display mdns relay command on the Switch to check the mDNS gateway configuration.
[Switch] display mdns relay MDNS Relay Information: -------------------------------------------------------------------------------- MDNS Gateway IP : 192.168.4.2 -------------------------------------------------------------------------------- Relay Enable Vlan : vlan10 vlan20 -------------------------------------------------------------------------------- Relay Probe Vlan : vlan10 vlan20 --------------------------------------------------------------------------------
# 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 Source IP : - -------------------------------------------------------------------------------- Gateway Probe Vlan : - --------------------------------------------------------------------------------
# Run the display mdns service all command on the AC to check service information recorded on the mDNS gateway.
[AC] display mdns service all MDNS Service Info: Service name : Officejet Pro 8100 [C12FFA] (6)._printer._tcp.local TXT Info: Data Length : 297 Service name : _printer._tcp.local PTR Info: Domain Name : Officejet Pro 8100 [C12FFA] (6)._printer._tcp.local Service name : Officejet Pro 8100 [C12FFA] (7)._ipp._tcp.local TXT Info: Data Length : 408 Service name : _ipp._tcp.local PTR Info: Domain Name : Officejet Pro 8100 [C12FFA] (7)._ipp._tcp.local Total: 4
# After the configuration is complete, iPhone can discover services of Printer_1 and Printer_2.
Configuration file of the Switch
# sysname Switch # vlan batch 10 20 30 # mdns gateway ip 192.168.4.2 # vlan 10 mdns relay enable mdns probe interval 3600 vlan 20 mdns relay enable mdns probe interval 3600 # interface Vlanif20 ip address 192.168.3.1 255.255.255.0 # interface Vlanif30 ip address 192.168.4.1 255.255.255.0 # interface GigabitEthernet0/0/2 port link-type hybrid port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet0/0/3 port link-type hybrid port hybrid pvid vlan 30 port hybrid untagged vlan 30 # return
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 # mdns group group1 user-vlan 10 service-vlan 20 # vlan batch 30 # interface Vlanif30 ip address 192.168.4.2 255.255.255.0 # interface GigabitEthernet0/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ip route-static 192.168.3.0 255.255.255.0 192.168.4.1 ip route-static 192.168.2.0 255.255.255.0 192.168.4.1 # return