1. Shell Mode:
login: root
password:
root@%
2. Operational Mode:
To Login
root@% cli
root>
3. Configuration Mode:
To Set Hostname and password
root> configure/edit
root# set system host-name Core
root# set system root-authentication plain-text-password
New password:
root# commit
root@Core#
root@Core> request system reboot
To exit from the current mode
root#exit
To check the interfaces
root@Core> show interfaces terse
To show all the available interfaces on a Juniper Router you are using, use the following command.
root> show interfaces
To view the status of a specific interface information on Juniper Router running on JunOS, use the following command syntax.
root> show interfaces em0
To show the Configuration
To check the current configuration settings on a Juniper Router, execute the following command at the Operational CLI mode.
root> show configuration
Viewing configurations commands starting with the specific group of commands use the following command syntax.
For example, to show all the command of Operation CLI mode starting with “set” prefix, execute the following command.
root> show configuration | display set
To configure the IP address
root@Core# set interfaces em0 unit 0 family inet address 172.16.20.1/28
To configure loopback address
root@Core# set interfaces lo0 unit 0 family inet address 1.1.1.1/32
To set Static route
root@Core# set routing-options static route 0.0.0.0/0 next-hop 172.16.20.1
To View Routing Table (Routes)
The following command is used to view the all the routes on a Juniper Router running on the JunOS.
root> show route
To show MAC address or ARP
root>show arp | match "16.23.43.75"
root>show arp | match "16.23.43.75"
To Clear ARP
root>clear arp interface ae16.83
To show System Service
root@JuniperSW> show system services
NAT
root# set policy-options prefix-list NAT_list 10.10.10.0/24
root# commit
root# set services nat pool NAT_Pool address 10.10.10.0/24
root# commit
root# set services nat pool NAT_Pool address-range low 10.10.10.1 high 10.10.10.100
root@CORE# set services nat rule NAT_rule match-direction input
root# set services nat rule NAT_rule term NAT_term from source-prefix-list NAT_list
root# set services nat rule NAT_rule term NAT_term then translated translation-type basic-nat44
root# commit
Juniper Nat
Interface-based source NAT
set security nat source rule-set 1 from zone trust
set security nat source rule-set 1 to zone untrust
set security nat source rule-set 1 rule 1A match source-address 0.0.0.0/0
set security nat source rule-set 1 rule 1A then source-nat interface
commit
Pool-based source NAT
set security nat source pool src_nat_pool_napt address 100.100.110.20/32 to 100.100.100.29/32
set security nat source rule-set src_nat_napt from zone trust
set security nat source rule-set src_nat_napt to zone untrust
set security nat source rule-set src_nat_napt rule napt_1 match source-address 192.168.1.0/24
set security nat source rule-set src_nat_napt rule napt_1 then source-nat pool src_nat_pool_napt
set security nat proxy-arp interface ge-0/0/0.0 address 100.100.100.20/32 to 100.100.100.29/32
set security nat source pool src_nat_pool_napt address 100.100.110.20/32 to 100.100.100.29/32
set security nat source rule-set src_nat_napt rule snat_1 match source-address 192.168.10.5/32
set security nat source rule-set src_nat_napt rule snat_1 match source-address 192.168.11.5/32
set security nat source rule-set src_nat_napt rule snat_1 match destination-address 0.0.0.0/0
set security nat source rule-set src_nat_napt rule snat_1 then source-nat pool snat_pool_1
set security nat proxy-arp interface ge-0/0/0.0 address 100.100.100.20/32 to 100.100.100.29/32
***
0 Comments