Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Overview for Junos OS
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Mapping the Name of the Router to IP Addresses

date_range 21-Mar-23

While using the Domain Name System (DNS) is an easier and more scalable way to resolve IP addresses from hostnames, you might want to manually map the hostname to a static IP address for the following reasons:

  • You might not have a DNS entry for the device.

  • You might not want the computer to contact the DNS server to resolve a particular IP address—you might use this particular IP address frequently, or it might be just for testing or development purposes.

To map a device’s hostname to one or more IP addresses:

  1. Include the inet statement at the [edit system static-host-mapping hostname] hierarchy level.
    content_copy zoom_out_map
    user@host# set system static-host-mapping hostname inet < ip-addresses >
    
  2. Verify the configuration with the show command.
    content_copy zoom_out_map
    [edit system]
    user@host# show
    static-host-mapping {
        hostname {
            inet [ ip-addresses ];
        }
    }
    
footer-navigation