Ubiquiti EdgeRouter [51/57] Configuration mode

Ubiquiti EdgeRouter [51/57] Configuration mode
48
Appendix A: Command Line InterfaceEdgeOS
User Guide
Ubiquiti Networks, Inc.
Configuration Mode
To switch to configuration mode, use the configure
command.
ubnt@ubnt:~$ configure
[edit]
ubnt@ubnt#
For the show, set, and delete commands, you can press the
? key for help.
set ? View the available commands.
show ? View the settings that you have configured.
(Because configurations vary, the list you see will differ
from the sample list displayed below.)
delete ? View the settings that you can delete.
Enter show and press the ? key.
ubnt@ubnt# show
firewall interfaces protocol service system
[edit]
To display the available command completions, press the
tab key.
Note: The tab does not display onscreen.
ubnt@ubnt# show
Possible completions:
firewall Firewall
interfaces Network interfaces
protocols Routing protocol parameters
service Services
system System parameters
The EdgeRouter uses three configurations:
Working When you make changes to the working
configuration, they are not applied until you commit the
changes to the active configuration.
Active When you commit changes to the active
configuration, they are applied; however, the changes
do not become part of the boot configuration until you
save the changes to the boot configuration.
Boot When the EdgeRouter reboots, it loads the boot
configuration for use.
The following scenarios cover some of the most
commonly used commands:
Configure an Interface (see below)
“Remove the Default User Account” on page 49
“Create a Firewall Rule” on page 49
“Manage the Configuration File” on page 52
Configure an Interface
To configure an interface, do the following:
Assign an IP address and subnet mask
Enter a description
Use the set, compare, commit, and save commands.
To configure an interface, use the set command.
ubnt@ubnt:~$ configure
[edit]
To view the possible completions for the eth0 address,
enter set interfaces ethernet eth0 address and press the
? key.
ubnt@ubnt# set interfaces ethernet eth0 address
Possible completions:
<x.x.x.x/x> IP address and prefix length
<h:h:h:h:h:h:h:h/x> IPv6 address and prefix length
dhcp Dynamic Host Configuration Protocol
dhcpv6 Dynamic Host Configuration Protocol
for IPv6
[edit]
ubnt@ubnt# set interfaces ethernet eth0 address
10.1.1.80/23
[edit]
ubnt@ubnt# set interfaces ethernet eth0 description
“production LAN”
These changes affect the working configuration, not the
active configuration. To see what changes have been
made to the working configuration, use the compare
command:
ubnt@ubnt# compare
[edit interfaces ethernet eth0]
+address 10.1.1.2/24
+description “production LAN”
[edit]
To make the changes active, use the commit command:
ubnt@ubnt# commit
[edit]
If you reboot the EdgeRouter, the changes will be lost. To
save these changes, use the save command to save the
active configuration to the boot configuration.
ubnt@ubnt# save
Saving configuration to ‘/config/config.boot’...
Done
[edit]
ubnt@ubnt# exit
exit
ubnt@ubnt:~$
ubnt@ubnt:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down,
A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 10.1.1.80/23 u/u production LAN
eth1 - u/D
eth2 - u/D
lo 127.0.0.1/8
::1/128
u/u
ubnt@ubnt:$ ping 10.1.0.1
PING 10.1.0.1 (10.1.0.1) 56(84) bytes of data.
64 bytes from 10.1.0.1: icmp_req=1 ttl=64 time=0.460 ms
64 bytes from 10.1.0.1: icmp_req=2 ttl=64 time=0.407 ms
^C
--- 10.1.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time
999 ms
rtt min/avg/max/mdev = 0.407/0.433/0.460/0.033 ms

Содержание

Похожие устройства

Скачать