Difference between revisions of "Juniper: Basic CLI"

From OnnoWiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
After you start the CLI with the cli command, type a question mark (?) to display a list of the available commands:
+
Untuk CLI access, connect dari management PC/ laptop ke router melalui console port.
  
root> ?
+
==Step 1. Connecting, Logging In, dan Starting CLI==
  
Possible completions:
+
Anda akan di tanyakan username & password.
  clear            Clear information in the system
+
Default username adalah root. Biasanya tanpa password untuk login pertama kali. Kadang kala username:password root:root.
  configure        Manipulate software configuration information
 
  file              Perform file operations
 
  help              Provide help information
 
  monitor          Show real-time debugging information
 
  mtrace            Trace multicast path from source to receiver
 
  ping              Ping remote target
 
  quit              Exit the management session
 
  request          Make system-level requests
 
  restart          Restart software process
 
  set              Set CLI properties, date/time, craft interface message
 
  show              Show system information
 
  ssh              Start secure shell on another host
 
  start            Start shell
 
  telnet            Telnet to another host
 
  test              Perform diagnostic debugging
 
  traceroute        Trace route to remote host
 
  
To display the options available for a command, type the command followed by a space and a question mark:
+
Untuk akses ke JUNOS CLI:
  
root> show ?
+
* Matikan power management PC / laptop.
 +
* Connect one satu sisi dari console cable ke serial port adapter, sambungkan adapter ke serial port di PC / laptop, dan sambungkan sisi usung satunya ke console port di Services Router.
 +
* Nyalakan power dari PC / laptop.
 +
* Gunakan aplikasi untuk emulasi terminal. Pastikan: 9600 (bps), 8 (data bit), none (parity), 1 (stop bits), done none (flow control).
 +
* Takan tombol POWER di router, dan pastikan POWER LED menjadi hijau.
 +
* Tunggu system boot, jika dapat login prompt maka login sebagai root.
  
Possible completions:
+
    When you have been authenticated through the CLI, you enter the UNIX shell:
  accounting          Show accounting profiles and records
 
  aps                  Show Automatic Protection Switching information
 
  arp                  Show system Address Resolution Protocol table entries
 
  as-path              Show table of known autonomous system paths
 
  bfd                  Show Bidirectional Forwarding Detection information
 
  bgp                  Show Border Gateway Protocol information
 
  chassis              Show chassis information
 
  class-of-service    Show class-of-service (CoS) information
 
  cli                  Show command-line interface settings
 
  configuration        Show current configuration
 
  connections          Show circuit cross-connect connections
 
  dialer              Show dialer information
 
  dlsw                Show DLSw information
 
---(more 93%)---
 
  
To use command completion, type the first few letters of a command and press the Spacebar or the Tab key.
+
    routername (ttyd0)
  
For example, when you type the following partial command, the system completes the command show chassis hardware and displays hardware information:
 
  
root> sh<tab> ch<tab> h<tab>
+
    login: root
  
Hardware inventory:  
+
    Password:
Item            Version  Part number  Serial number     Description Chassis                                JN000212AA        J2300
+
     JUNOS 8.0R1 2006-07-01 01:59:49 UTC
Routing Engine  RevX1.8  710-009989  CORE97133        RE-J.1
+
    root@%
FPC 0            RevX1.5  710-009991  CORE96352        FPC 
 
PIC 0                                                    2x FE, 2x Serial
 
  
Type the following partial command to display the JUNOS software version running on the router:
+
    At the % prompt, type the cli command and press Enter. The prompt changes to an angle bracket (>) when you enter CLI operational mode.
 +
    root@% cli root
  
root> sh ver
+
    root>
  
Hostname: host
+
For complete instructions, see the Getting Started Guide for your router.
Model: j2300
+
Step 2. Updating the JUNOS Software with the CLI
JUNOS Software Release [8.0-20060607.0] (Export edition)
 
  
To access configuration mode, enter the configure command. The prompt changes to a pound sign (#).
+
After starting up the Services Router, you might want to download the latest version of the JUNOS software from the Juniper Networks Web site and load it onto the router. You can use the CLI, but we recommend the J-Web interface for the download.
  
root> configure
+
To update the JUNOS software with the CLI:
  
root#
+
    Go to https://www.juniper.net/support, and follow the links to download the JUNOS software for J-series routers to an FTP server.
 +
    Download the JUNOS software to the router with the CLI or J-Web interface:
 +
        root> request system software add validate unlink reboot source
  
To activate changes to the configuration, enter the commit command.
+
For complete instructions, see the J-series Services Router Administration Guide.
 +
Step 3. Adding Licenses with the CLI
  
root> commit
+
If you purchased one or more licenses, you received an envelope with instructions for obtaining license keys from the Web. To enable each license on the router, you must add the license key. You can add one or more license keys from the CLI.
  
root#
+
To add a license key and enable a license:
  
To exit configuration mode, enter the exit command. Use the exit command again to exit the CLI completely.
+
    Follow the instructions in your license envelope to generate the license key from the Web site.
 +
    Copy the license key onto the router with the CLI:
 +
        Type the following command, and press Enter:
 +
            root> request system license add terminal
 +
        When prompted, copy and paste the license key from the Web site at the command line, separating multiple license keys with a blank line.
 +
        To exit license key entry, press Ctrl+D.
  
root# exit
+
For complete instructions, see the Getting Started Guide for your router.
root> exit
+
Step 4. Configuring Basic Settings with the CLI
root@%
+
 
 +
In CLI configuration mode, you use the set command to enable features, and the delete command to disable them. The commands you enter do not update the active configuration on the router until you use the commit command.
 +
 
 +
To configure basic settings with the CLI:
 +
 
 +
    From the CLI, enter configuration mode:
 +
        root> configure
 +
        root#
 +
    Set the IP addresses of the built-in Ethernet ports. For example:
 +
        On a J2300 router:
 +
 
 +
            root# set interfaces fe-0/0/0 unit 0 family inet address 192.168.1.1/24
 +
            root# set interfaces fe-0/0/1 unit 0 family inet address 192.168.2.1/24
 +
 
 +
        On a J4350 or J6350 router:
 +
 
 +
            root# set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
 +
            root# set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.1/24
 +
            root# set interfaces ge-0/0/2 unit 0 family inet address 192.168.3.1/24
 +
            root# set interfaces ge-0/0/3 unit 0 family inet address 192.168.4.1/24
 +
 
 +
    The unit number is the logical interface number. IP addresses are configured on the logical interface. Setting the protocol family to inet specifies the routing table of IPv4 addresses.
 +
    Set a default route (default gateway) for IPv4 packets. For example:
 +
        root# set routing-options static route 192.168.1.254/24 next-hop 10.1.1.50
 +
    Configure one or more static routes:
 +
        root# set routing-options static route destination-prefix next-hop address
 +
    Set the hostname. For example:
 +
        root# set system host-name Chicago
 +
    Save your configuration settings and activate them on the Services Router:
 +
        root# commit
 +
 
 +
For complete instructions, see the J-series Services Router Basic LAN and WAN Access Configuration Guide.
 +
 
 +
 
 +
 
 +
 
 +
==Pranala Menarik==
 +
 
 +
* [[Juniper]]

Latest revision as of 16:26, 13 December 2018

Untuk CLI access, connect dari management PC/ laptop ke router melalui console port.

Step 1. Connecting, Logging In, dan Starting CLI

Anda akan di tanyakan username & password. Default username adalah root. Biasanya tanpa password untuk login pertama kali. Kadang kala username:password root:root.

Untuk akses ke JUNOS CLI:

  • Matikan power management PC / laptop.
  • Connect one satu sisi dari console cable ke serial port adapter, sambungkan adapter ke serial port di PC / laptop, dan sambungkan sisi usung satunya ke console port di Services Router.
  • Nyalakan power dari PC / laptop.
  • Gunakan aplikasi untuk emulasi terminal. Pastikan: 9600 (bps), 8 (data bit), none (parity), 1 (stop bits), done none (flow control).
  • Takan tombol POWER di router, dan pastikan POWER LED menjadi hijau.
  • Tunggu system boot, jika dapat login prompt maka login sebagai root.
   When you have been authenticated through the CLI, you enter the UNIX shell:
   routername (ttyd0)


   login: root
   Password:
   JUNOS 8.0R1 2006-07-01 01:59:49 UTC
   root@%
   At the % prompt, type the cli command and press Enter. The prompt changes to an angle bracket (>) when you enter CLI operational mode.
   root@% cli root
   root>

For complete instructions, see the Getting Started Guide for your router. Step 2. Updating the JUNOS Software with the CLI

After starting up the Services Router, you might want to download the latest version of the JUNOS software from the Juniper Networks Web site and load it onto the router. You can use the CLI, but we recommend the J-Web interface for the download.

To update the JUNOS software with the CLI:

   Go to https://www.juniper.net/support, and follow the links to download the JUNOS software for J-series routers to an FTP server.
   Download the JUNOS software to the router with the CLI or J-Web interface:
       root> request system software add validate unlink reboot source

For complete instructions, see the J-series Services Router Administration Guide. Step 3. Adding Licenses with the CLI

If you purchased one or more licenses, you received an envelope with instructions for obtaining license keys from the Web. To enable each license on the router, you must add the license key. You can add one or more license keys from the CLI.

To add a license key and enable a license:

   Follow the instructions in your license envelope to generate the license key from the Web site.
   Copy the license key onto the router with the CLI:
       Type the following command, and press Enter:
           root> request system license add terminal
       When prompted, copy and paste the license key from the Web site at the command line, separating multiple license keys with a blank line.
       To exit license key entry, press Ctrl+D.

For complete instructions, see the Getting Started Guide for your router. Step 4. Configuring Basic Settings with the CLI

In CLI configuration mode, you use the set command to enable features, and the delete command to disable them. The commands you enter do not update the active configuration on the router until you use the commit command.

To configure basic settings with the CLI:

   From the CLI, enter configuration mode:
       root> configure
       root#
   Set the IP addresses of the built-in Ethernet ports. For example:
       On a J2300 router:
           root# set interfaces fe-0/0/0 unit 0 family inet address 192.168.1.1/24
           root# set interfaces fe-0/0/1 unit 0 family inet address 192.168.2.1/24
       On a J4350 or J6350 router:
           root# set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
           root# set interfaces ge-0/0/1 unit 0 family inet address 192.168.2.1/24
           root# set interfaces ge-0/0/2 unit 0 family inet address 192.168.3.1/24
           root# set interfaces ge-0/0/3 unit 0 family inet address 192.168.4.1/24
   The unit number is the logical interface number. IP addresses are configured on the logical interface. Setting the protocol family to inet specifies the routing table of IPv4 addresses.
   Set a default route (default gateway) for IPv4 packets. For example:
       root# set routing-options static route 192.168.1.254/24 next-hop 10.1.1.50
   Configure one or more static routes:
       root# set routing-options static route destination-prefix next-hop address
   Set the hostname. For example:
       root# set system host-name Chicago
   Save your configuration settings and activate them on the Services Router:
       root# commit

For complete instructions, see the J-series Services Router Basic LAN and WAN Access Configuration Guide.



Pranala Menarik