cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

hardware:junos:configuration.html



Juniper Junos

Junos Configuration Command Examples

Show Configuration

Description Command
without more like cisco's 'terminal length 0' > set cli screen-length 0
show configuration
-candidate configuration
> show configuration
> show configuration | display set
> show configuration | display set | no-more
> show configuration | display set | match XXXX
> show configuration security policies |display set
# show
# show | display set
# show | display set |no-more
# show | display set |match XXXX
Show configuration
- Active configuration
> file show /config/juniper.conf.gz
> show system rollback 0 ← active configuration
> show system rollback 1 ← 1 old
> file list /config
> file list /var/db/config

Set Configuration

Description Command
> configure
# load override terminal ← 'Ctrl D' is stop
# show | compare
# show | compare rollback 1
# commit check
# commit
# rollback ? ← check rollback date
# rollback 0 ← active configuration (If you don't commit, please rollback 0)
# rollback 1 ← old configuration
diff rollback configurations >show system rollback NUMBER compare NUMBER
>show system rollback 17 compare 16
# set system max-configuration-rollbacks 49
# run set cli screen-length 0
# commit confirmed 10 ← after 10 minutes


Configuration Flow

Configuration with set commands

#ssh  user01@192.168.0.5

> configure       <- configuration mode

configuration

# show | compare   <- diff configuration
# commit check     <- check configuration
# commit           <- commit configuration. If you want to cancel this configuration, You can use "rollback 0" command.
# exit
> exit

Configuration with load set terminal

#ssh  user01@192.168.0.5

> configure       <- configuration mode

# load set terminal
(abbr)
Ctrl + D

# show | compare   <- diff configuration
# commit check     <- check configuration
# commit           <- commit configuration. If you want to cancel this configuration, You can use  "rollback 0" command.
# exit
> exit

Step by Step Configuration with edit command

#ssh  user01@192.168.0.5

> configure 

# edit XXXXXXX     <- edit is like cd of linux.
# edit XXXXXXX
# up
# top
# edit XXXXXX

# show | display set
# set XXXX
# delete XXXX
# show | compare
# commit check
# commit
# exit             <- you need 'exit' command.
> exit
# edit XXXXXXX
# up
# top
# edit XXXXXX
# show | display set
# set XXXX
# delete XXXX
# show | compare
# commit check
# commit
# exit             <- you need 'exit' command.
> exit


Backup

Backup to Local Home Directory

Backup to '/cf/var/home/USER/FILENAME.conf'

> save FILENAME.conf

Backup to Remote Host

> show configuration | display set | save ftp://USER@192.168.0.10/test-fw_30102013.txt
> show configuration | display set | save USER@192.168.0.5:/home/config/test00-fw/tes00-fw_20120714.txt

> show configuration | display set | save ftp://USER:PASSWORD@192.168.0.5/tes00-fw_20120714.txt


Restore




hardware/junos/configuration.html.txt · Last modified: 2018/11/11 by admin

Page Tools