Knowledge Search


×
 

[EX/QFX] Configuring a different host name on each member of a Virtual Chassis

  [KB34650] Show Article Properties


Summary:

This article shows how to assign different host names to each member of a Virtual Chassis (VC).

Symptoms:

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:

  • The login prompt reflects the system host-name. If you just set a name for the VC as a whole, you will see the same hostname regardless of which console you connect to.
  • Juniper VC assumes – perhaps reasonably – that since most commands are only valid on the master VC member, you should always connect there. Thus when you connect to a non-master VC member, you are redirected to the master anyway.

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.

Solution:
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 Juniper01a
set groups member1 system host-name Juniper01b
set groups member2 system host-name Juniper01c
set apply-groups [ member0 member1 member2 ]

 

Config:

groups {
    member0 {
        system {
            host-name Juniper01a;
        }
    }
    member1 {
        system {
            host-name Juniper01b;
        }
    }
    member2 {
        system {
            host-name Juniper01c;
        }
    }
}
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 “Juniper01”.

{MASTER}[edit]
jtac@Juniper01# delete system host-name
{master:0}[edit]
jtac@Juniper01# commit
fpc0:
configuration check succeeds
fpc1:
commit complete
fpc2:
commit complete
fpc0:   
commit complete

{MASTER}[edit]
jtac@Juniper01a#
 

The hostname in my command prompt immediately reflects the change as Juniper01a.

Related Links: