Juniper SRX common commands

1, restore factory defaults
root> Request System zeroize Media
#media this parameter is no way in the simulator configuration.
This command will clear all configurations except the os system, (including logs, licensing, etc.) a new machine or a device to restore the factory settings, the default user name is root, no password.

2, load the factory configuration
root # load factory-default
Note mode conversion: Read factory settings does not delete the log, license, local files, and so on, but reset root.

3, configuration ROOT password
first: root # set system root-authentication plain-text-password
This is interactive configuration, you try to know the
second: root # the SET System root-ENCRYPTED-password authentication  
Possible Completions:
  <encrypted-password> encrypted password string
where the latter has passed through the MD5 password is encrypted to a ciphertext (configured with the copy and paste, he does not interact)

4, cover copy of the current configuration changes to the running configuration
root # commit
modify the configuration mode is a copy, it means you do not necessarily all the configuration takes effect, commit is to copy the current configuration of the cover to the command, srx these configurations are saved automatically, and are numbered, numbered from 0, the closer the smaller time

5. Create a user
the SET the User System the Login AAA uid 2001
the SET System the Login the User class AAA Super-the User
the SET the User System the Login AAA authentication Plain-text-password
"$ 1 $ JjTpAOWR $ Qdo4LZbv6vIH.9Lfrnmtp1" # This paragraph is the ciphertext, which is above the second thing in secret configuration method to fill in
[edit]
root @ SRx 1 # edit the User System the Login AAA
[edit the User System the Login AAA]
root @ # SRx 1
found no above the brackets, this in fact is the current path, and edit at the same time that can be configured to enter the path, and then you can configure the parameters in the current path, this is the junos hierarchical configuration, try to know.

6, set the interface IP
the root @ Srx1 the interfaces GE-SET # 0/0/0 0 Unit Family inet address 1.1.1.2/24
Note here that the points
1, unit similar to the sub-interfaces, SRX is not allowed on the interface directly with ip of
2, if an interface ip ip behalf of the physical interface, unit 0 must be

7、替换IP
[edit]
root@SRX1# edit interfaces ge-0/0/0
[edit interfaces ge-0/0/0]
root@SRX1# replace pattern 1.1.1.2/24 with 1.1.1.3/24

8, a plurality of ports simultaneously provided
[Edit]
the root wildcard Range SET # @ Srx1 the interfaces GE-0/0 / [0-1,3] Full-Duplex Link-MODE
the interfaces {
    GE-0/0/0 {
        Link-MODE Duplex-Full;
        Unit 0 {
            Family {inet
                address 1.1.1.2/24;     
            }
        }
    }
    GE-0/0 / {. 1
        Link-MODE Full-Duplex;
    }
    GE-0/0 /. 3 {
        Link-MODE Full-Duplex ;
    }

9, delete multiple
[Edit]
root @ # SRx 1 the Delete wildcard in the interfaces GE-0/0 / [0-1,3]

10, protection configuration
protect key
unprotect keywords
that directly add two levels is like, unless system zeroize media, otherwise the protection of the state, can not afford to dry him.

11, the configuration rollback, the coexistence of a number, you can set
root @ SRx 1 # ROLLBACK?
Possible Completions:
  <[the Enter]> the Execute the this the Command
  0 2017-07-04 06:34:34 UTC root Via cli by
  1 2017-07 Via CLI 05:48:28 UTC by -04 the root
  2 2017-07-04 03:37:11 UTC by the root Via CLI
  . 3 2017-07-04 03:32:07 UTC Via CLI by the root
  . 4 2017-07-04 Via cli root by UTC 03:29:17
  5 2017-07-04 03:27:59 UTC by Via cli root
  6 2017-07-04 03:25:04 UTC root Via cli by
  7 2017-07-04 02: Via OTHER UTC by root 56:05
  | A Pipe through the Command

12, the number provided rollback
the root Srx1 # @ max SET System Configurations-ON-50-rollbacks are
the root Srx1 # @ max-SET System Configurations ON-Flash 100-                    
the Value 100 Not IS WITHIN Range (0..49) AT '100'
can be found that a total of up to 50 can be saved, these two commands, in fact, only a Petty is also possible, he is used to confirm the number of the rollback, the second on-flush is used to set how much you have saved in a configuration file config file folder device belongs, but he does not mean that the rest of the configuration is not saved, not saved, then how do you recover? In fact, the rest is stored in a directory and then var, you can check Quguan network, I think it was also a question of this question, the reply is still very accurate.

13, the default fallback (sorry mechanism)
root @ SRx 1 # the commit Confirmed    
the commit Confirmed by Will BE Automatically rolled the Back in 10 minutes The unless Confirmed
the commit Complete
# the commit Confirmed by Will BE rolled the Back in 10 minutes
by default is 10 minutes, not if within 10 minutes and then commit, he will automatically rollback

14, commonly used commands
root @ SRX1 # status # see who is the configuration
root @ SRX1 # delete # delete all the current configuration level
root @ SRX1 # run show version # view the version
root @ SRX1 # commit check # submit inspection (check grammar, do not take effect)
root @ SRx 1 # the commit the Comment the TEST1 # to submit configuration marked mark
root @ SRX1 # active interfaces ge- 0/0/0 # enable the configuration
root @ SRX1 # deactivate interfaces ge- 0/0/0 # is not enabled ( configuration does not take effect)
root @ SRx 1 # the sET System host-name SRx 1 # set the host name
root @ SRX1 # run show system users # view the login user
root @ SRX1 # run show system commit # View ROLLBACK
root @ SRx 1 # RUN Show System Uptime # View equipment uptime
root @ SRX1> request system reboot # reboot
root @ SRX1> request system power- off # off
root @ SRX1> show interfaces terse # View interface status and interface IP
root @ SRX1> show security monitoring fpc 0 # view cpu, memory

Guess you like

Origin www.cnblogs.com/xwupiaomiao/p/12067763.html