Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Configuring Recursive DNS Server Addresses for IPv6 Hosts

date_range 24-Nov-23

This example shows how to configure the recursive DNS server address of an IPv6 host. The recursive DNS server address is included in the router advertisement that is sent to the neighboring devices.

Requirements

This example uses the following hardware and software components:

  • Two MX Series routers with IPv6 enabled on the connected interfaces.

  • Junos OS Release 14.1 or later running on all devices.

Overview

The example includes two routers that are directly connected. Configure IPv6 on the directly connected interfaces. Enable router advertisement on the interfaces and configure the recursive DNS server addresses and their lifetimes on the interfaces. This example verifies that the router advertisement sent to the neighboring device includes the configured recursive DNS server addresses.

Topology

Figure 1 shows the sample topology.

Figure 1: Configuring Recursive DNS Server Address for IPv6 HostsConfiguring Recursive DNS Server Address for IPv6 Hosts

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Router R0

content_copy zoom_out_map
set interfaces fe-0/1/3 unit 0 family inet6 address 2001:DB8::1/64 
set interfaces lo0 unit 0 family inet6 address 1::1/128 
set protocols router-advertisement interface fe-0/1/3 max-advertisement-interval 4
set protocols router-advertisement interface fe-0/1/3 min-advertisement-interval 3
set protocols router-advertisement interface fe-0/1/3 dns-server-address abcd:1::1 lifetime 100
set protocols router-advertisement interface fe-0/1/3 dns-server-address abcd:1::2 lifetime 200
set protocols router-advertisement interface fe-0/1/3 dns-server-address abcd:1::3 lifetime 300

Router R1

content_copy zoom_out_map
set interfaces fe-1/3/0 unit 0 family inet6 address 2001:DB8::2/64
set interfaces lo0 unit 0 family inet6 address 1::2/128 
set protocols router-advertisement interface fe-1/3/0 max-advertisement-interval 4
set protocols router-advertisement interface fe-1/3/0 min-advertisement-interval 3
set protocols router-advertisement interface fe-1/3/0 dns-server-address abcd:1::4 lifetime 100

Configuring the Recursive DNS Server Address

Step-by-Step Procedure

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

Note:

Repeat this procedure for Router R1, modifying the appropriate interface names, addresses, and any other parameters for the router.

To configure the recursive DNS server address on Router R0:

  1. Enable IPv6 on the physical interface.

    content_copy zoom_out_map
    [edit interfaces]
    user@R0# set fe-0/1/3 unit 0 family inet6 address 2001:DB8::1/64
    
  2. Configure the loopback address.

    content_copy zoom_out_map
    [edit interfaces]
    user@R0# set lo0 unit 0 family inet6 address 1::1/128
    
  3. Specify the time interval between router advertisements on the interface.

    The router sends advertisements to neighbors after the specified time interval. In this example, Router R0 sends router advertisements to Router R1 after a minimum interval of 3 seconds and a maximum interval of 4 seconds.

    content_copy zoom_out_map
    [edit protocols router-advertisement]
    user@R0# set interface fe-0/1/3 max-advertisement-interval 4
    user@R0# set interface fe-0/1/3 min-advertisement-interval 3
    
  4. Configure the recursive DNS addresses and their lifetimes on the interface.

    content_copy zoom_out_map
    [edit protocols router-advertisement]
    user@R0# set interface fe-0/1/3 dns-server-address abcd:1::1 lifetime 100
    user@R0# set interface fe-0/1/3 dns-server-address abcd:1::2 lifetime 200
    user@R0# set interface fe-0/1/3 dns-server-address abcd:1::3 lifetime 300
    

Results

From configuration mode, confirm your configuration by entering the show interfaces and show protocols commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
user@R0# show interfaces
fe-0/1/3 {
    unit 0 {
        family inet6 {
            address 2001:DB8::1/64;
        }
    }
}
lo0 {
    unit 0 {
        family inet6 {
            address ::1/128;
        }
    }
}
user@R0# show protocols
router-advertisement {
    interface fe-0/1/3.0 {
        max-advertisement-interval 4;
        min-advertisement-interval 3;
        dns-server-address abcd:1::1 {
            lifetime 100;
        }
        dns-server-address abcd:1::2 {
            lifetime 200;
        }
        dns-server-address abcd:1::3 {
            lifetime 300;
        }
    }
}

If you are done configuring the device, commit the configuration.

content_copy zoom_out_map
user@R0# commit

Verification

Verifying That the Router Advertisement Includes the Recursive DNS Server Address

Purpose

Verify that the router advertisement on Router R1 includes the recursive DNS server address configured on Router R0.

Action

From operational mode on Router R1, enter the show ipv6 router-advertisement command.

content_copy zoom_out_map
user@R1> show ipv6 router-advertisement

Interface: fe-1/3/0.0
  Advertisements sent: 18, last sent 00:00:02 ago
  Solicits received: 0
  Advertisements received: 18
  Advertisement from fe80::214:f6ff:fe22:5422, heard 00:00:02 ago
    Managed: 0
    Other configuration: 0
    Reachable time: 0 ms
    Default lifetime: 12 sec
    Retransmit timer: 0 ms
    Current hop limit: 64
    RDNSS address: abcd:1::1
      Lifetime: 100 sec
    RDNSS address: abcd:1::2
      Lifetime: 200 sec
    RDNSS address: abcd:1::3
      Lifetime: 300 sec

Meaning

The recursive DNS server address and the configured lifetime are included in the router advertisements on Router R1.

footer-navigation