Example for Configuring IPv6 DNS Proxy
Networking Requirements
As shown in Figure 10-4, Users access the DNS server to resolve domain names through RouterA enabled with DNS proxy. If the route from RouterA to the DNS server is unreachable, the IPv6 address configured for DNS spoofing is used to respond to the DNS query packets.
Configuration Roadmap
The configuration roadmap is as follows:
Configure the DNS server function on RouterA to forward DNS packets.
Configure IPv6 DNS spoofing on RouterA.
Procedure
- Configure an IPv6 address for GE1/0/0.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] ipv6 [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] ipv6 enable [RouterA-GigabitEthernet1/0/0] ipv6 address fc00:1::1 64 [RouterA-GigabitEthernet1/0/0] quit
- Configure a DNS server.
# Enable dynamic DNS.
[RouterA] dns resolve
# Configure a DNS server that the DNS proxy or relay connects to.
[RouterA] dns server ipv6 fc00:2::2
# Enable IPv6 DNS proxy.
[RouterA] dns proxy ipv6 enable
- Configure DNS spoofing and specify the IPv6 address in response messages as fc00:3::3.
[RouterA] dns spoofing ipv6 fc00:3::3
- Configure a static route.
[RouterA] ipv6 route-static fc00:2:: 64 fc00:1::2
You need to configure a static IPv6 route on the DNS server so that DNS packets can be sent and received properly.
- Verify the configuration.
# Run the display current-configuration command to view the DNS proxy configuration on RouterA.
<RouterA> display current-configuration | include dns dns resolve dns server ipv6 FC00:2::2 dns proxy ipv6 enable dns spoofing ipv6 FC00:3::3
Configuration File
Configuration file of RouterA
# sysname RouterA # ipv6 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address FC00:1::1/64 # dns resolve dns server ipv6 FC00:2::2 dns proxy ipv6 enable dns spoofing ipv6 FC00:3::3 # ipv6 route-static FC00:2:: 64 FC00:1::2 # return
Configuration file of RouterB
# sysname RouterB # ipv6 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address FC00:1::2/64 # interface GigabitEthernet2/0/0 ipv6 enable ipv6 address FC00:2::1/64 # return