This article shows how to assign different host names to each member of a Virtual Chassis (VC).
If you have a three member EX 4200 Virtual Chassis (VC), the following is worth considering when you connect to the console of the VC switch:
All members of the VC share the same configuration, so if you do “set system hostname”, then all three systems implicitly inherit the same name.
1. To assign different host names in each member of a Virtual Chassis (VC), add group configuration for each member in the Virtual Chassis. In this example, there are three members, numbered 0, 1 and 2: set groups member0 system host-name router01a set groups member1 system host-name router01b set groups member2 system host-name router01c set apply-groups [ member0 member1 member2 ]
set groups member0 system host-name router01a set groups member1 system host-name router01b set groups member2 system host-name router01c set apply-groups [ member0 member1 member2 ]
Config:
groups { member0 { system { host-name router01a; } } member1 { system { host-name router01b; } } member2 { system { host-name router01c; } } } apply-groups [ member0 member1 member2 ];
2. Remove the ‘main’ system host-name in order for step 1 to take effect; otherwise, it overrides the group configuration. If you don't do step 2, when you log into the console, it still may only say “router01”.
{MASTER}[edit] user@router01# delete system host-name {master:0}[edit] user@router01# commit fpc0: configuration check succeeds fpc1: commit complete fpc2: commit complete fpc0: commit complete {MASTER}[edit] user@router01a#
The hostname in the command prompt immediately reflects the change as router01a.
2021-03-23: Updated the article terminology to align with Juniper's Inclusion & Diversity initiatives