J-series Services Router Quick Start
12
!
Basic Connection and Configuration with the CLI
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:
1.
From the CLI, enter configuration mode:
root>
configure
root#
2.
Set the IP addresses of the built-in Ethernet ports. For example:
!
On a J2300, J4300, or J6300 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.
3.
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
4.
Configure one or more static routes:
root#
set routing-options static route
destination-prefix
next-hop
address
5.
Set the hostname. For example:
root#
set system host-name Chicago
6.
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
.