JUNOS

JUNOS Cheatsheet #

JUNOS is the operating system used by Juniper Networks devices, including routers and switches. This cheatsheet provides common commands and configurations for JUNOS.

Basic Commands #

Command/OptionExampleDescription
show versionshow versionDisplay the JUNOS version and device info
show configurationshow configurationDisplay the current configuration
show system uptimeshow system uptimeDisplay the system uptime
clicliEnter the CLI mode
commitcommitCommit the current configuration
rollbackrollback 1Rollback to a previous configuration

Interface Configuration #

Command/OptionExampleDescription
edit interfacesedit interfacesEnter interface configuration mode
set interfaceset interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24Set IP address and subnet mask
delete interfacedelete interfaces ge-0/0/0Remove interface configuration
show interfacesshow interfacesDisplay interface status
commitcommitApply the configuration changes

VLAN Configuration #

Command/OptionExampleDescription
edit vlansedit vlansEnter VLAN configuration mode
set vlanset vlans VLAN10 vlan-id 10Create VLAN with ID 10
set interfaceset interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN10Add interface to VLAN
show vlansshow vlansDisplay VLAN configuration
delete vlandelete vlans VLAN10Remove VLAN configuration

Routing Configuration #

Command/OptionExampleDescription
edit routing-optionsedit routing-optionsEnter routing options configuration mode
set static-routeset routing-options static route 192.168.1.0/24 next-hop 192.168.1.1Configure a static route
edit protocolsedit protocols ospfEnter OSPF configuration mode
set areaset protocols ospf area 0.0.0.0Configure OSPF area
show routing-optionsshow routing-optionsDisplay routing options configuration

Access Control #

Command/OptionExampleDescription
edit firewalledit firewallEnter firewall filter configuration mode
set filterset firewall family inet filter MYFILTER term MYTERM then acceptCreate a firewall filter
show firewallshow firewallDisplay firewall configuration
delete filterdelete firewall family inet filter MYFILTERRemove a firewall filter

NAT Configuration #

Command/OptionExampleDescription
edit securityedit securityEnter NAT configuration mode
set natset security nat source rule-set SOURCE_RULE_SET rule SOURCE_RULE match source-address 192.168.1.0/24Configure NAT rule
show security natshow security natDisplay NAT configuration

Troubleshooting #

Command/OptionExampleDescription
pingping 8.8.8.8Test connectivity to a remote host
traceroutetraceroute 8.8.8.8Trace the route to a remote host
show interfacesshow interfacesDisplay interface status
show logshow logDisplay system log

Management #

Command/OptionExampleDescription
clicliEnter CLI mode
commitcommitApply the configuration changes
rollbackrollback 1Rollback to a previous configuration
rebootrebootReboot the device

This cheatsheet covers essential JUNOS commands for configuration, management, and troubleshooting of Juniper devices. For detailed command syntax and additional options, consult the Juniper documentation.

JUNOS

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.