Compared with router IDs, OSPF hostnames are easier to memorize. Therefore, using hostnames to identify routers can facilitate network management.
Usage Scenario
To facilitate network management, configure hostnames to identify routers.
Either dynamic or static OSPF hostnames can be configured. In dynamic mode, a hostname can be configured on and advertised by the local device. The mapping between the local device's router ID and hostname can then be queried on a remote router that successfully learns this dynamic hostname.
Pre-configuration Tasks
Before configuring a hostname, complete the following tasks:
- Configure an IP address for each interface to ensure that neighboring routers can use the IP addresses to communicate with each other.
- Configure basic OSPF functions.
Checking the Configurations
Run either of the following commands to check dynamic OSPF hostnames:
- display ospf [ process-id ] hostname-table
- display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa | opaque-link | opaque-area ] [ link-state-id ] [ originate-router [ advertising-router-id ] | self-originate | hostname hostname ] [ age { min-value min-age-value | max-value max-age-value } * ]
- display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa | opaque-link | opaque-area ] [ link-state-id ] [ originate-router [ advertising-router-id ] | self-originate ] [ age { min-value min-age-value | max-value max-age-value } * ] [ resolve-hostname ]