Tuesday, August 16, 2016

Runnng JUNOS CLI from Shell

This is one tips how to execute JUNOS CLI from shell ( BSD shell ).

Execute / running command from JUNOS CLI

lab@D23_EX4200> show version 
fpc0:
--------------------------------------------------------------------------
Hostname: D23_EX4200
Model: ex4200-48t
JUNOS Base OS boot [12.3R9.4]
JUNOS Base OS Software Suite [12.3R9.4]
JUNOS Kernel Software Suite [12.3R9.4]
JUNOS Crypto Software Suite [12.3R9.4]
JUNOS Online Documentation [12.3R9.4]
JUNOS Enterprise Software Suite [12.3R9.4]
JUNOS Packet Forwarding Engine Enterprise Software Suite [12.3R9.4]
JUNOS Routing Software Suite [12.3R9.4]
JUNOS Web Management [12.3R9.4]
JUNOS FIPS mode utilities [12.3R9.4]

{master:0}

lab@D23_EX4200>

Execute / running command from BSD shell

lab@D23_EX4200> start shell 
% cli show version
fpc0:
--------------------------------------------------------------------------
Hostname: D23_EX4200
Model: ex4200-48t
JUNOS Base OS boot [12.3R9.4]
JUNOS Base OS Software Suite [12.3R9.4]
JUNOS Kernel Software Suite [12.3R9.4]
JUNOS Crypto Software Suite [12.3R9.4]
JUNOS Online Documentation [12.3R9.4]
JUNOS Enterprise Software Suite [12.3R9.4]
JUNOS Packet Forwarding Engine Enterprise Software Suite [12.3R9.4]
JUNOS Routing Software Suite [12.3R9.4]
JUNOS Web Management [12.3R9.4]
JUNOS FIPS mode utilities [12.3R9.4]

%

Friday, August 5, 2016

Juniper JUNOS Configuration Check-out Failed

Below is one example / case of configuration check-out failed in Juniper JUNOS. Even JUNOS allow you to set command line, isn't sure the command is correct one, verify with commit check or straight with commit, you will see failed.

This example is interface access mode with VLAN member more than one members, if you want the interface with more than one member of VLAN, you must set port-mode trunk.

awa@D22_EX2200# show interfaces ge-1/0/7  
unit 0 {
    family ethernet-switching {
        port-mode access;
        vlan {
            members TEST;
        }
    }
}

awa@D22_EX2200# set interfaces ge-1/0/7 unit 0 family ethernet-switching port-mode access vlan members MGMT 

{master:1}[edit]
awa@D22_EX2200# show interfaces ge-1/0/7                                                                       
unit 0 {
    family ethernet-switching {
        port-mode access;
        vlan {
            members [ TEST MGMT ];
        }
    }
}

{master:1}[edit]
awa@D22_EX2200# commit                                                                                         
error: Access interface has more than one vlan member: and
error: configuration check-out failed

{master:1}[edit]

awa@D22_EX2200#