Description

As per document: https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/host-name-edit-system.html#host-name__d544856e43


You can also use the %s character to designate where to substitute the Routing Engine name. For example, on Routing Engine 1, set system host-name %s_my_host sets the hostname to re1_my-host.


However, when host name is checked on show LLDP neighbor it do not show RE

Solution

Every time we configure %s and something else, the rest after %s is not showed on show lldp neighbor.


When configured:

re0-cr01.rdu101> show configuration | display set | match host

set groups re0 system host-name "%s-cr01.rdu101"

set groups re1 system host-name "%s-cr01.rdu101"

re0-cr01.rdu101>

 

This is a device that is directly connected to it, and you can see the name is not showing up correctly

dr01.rdu103 (wjennifer)# show lldp neighbor | match et-6

et-6/1/0 ae3 b4:f9:5d:ab:dd:67 et-0/0/6 re0.ultralab.juniper.net

et-6/3/0 ae3 b4:f9:5d:ab:dd:67 et-1/0/6 re0.ultralab.juniper.net


When configuring first the name of the router and then %s and it show it like this:

 

[email protected]# set groups re1 system host-name cr01.nuq237-%s-test 

 

labroot@coriander-re0> show lldp neighbors 

Local Interface  Parent Interface  Chassis Id     Port info     System Name

et-0/1/0      -          40:de:ad:98:6a:15  513        cr01.nuq237-re1.ultralab.juniper.net

et-0/1/1      -          40:de:ad:98:6a:15  514        cr01.nuq237-re1.ultralab.juniper.net

fxp0        -          e8:24:a6:be:6d:cd  522        QNC-JTAC-LSW-E09-52 

 

Clearly the behavior is not the expected. This was changed on higher EVO versions starting on 22.3R1-EVO

 

Now, you can use first the name and then %s or you can use the same configuration as on Junos, it works fine.

 

{master}[edit]

[email protected]# set groups re0 system host-name re0-cr01.rdu101

 

labroot@coriander-re0> show lldp neighbors   

Local Interface  Parent Interface  Chassis Id     Port info     System Name

et-0/1/0      -          40:de:ad:98:6a:15  513        re0-cr01.rdu101.ultralab.juniper.net

et-0/1/1      -          40:de:ad:98:6a:15  514        re0-cr01.rdu101.ultralab.juniper.net

Modification History

2025-01-28 : Article Created