[这个贴子最后由gzwyx在 2005/06/02 07:37pm 第 1 次编辑]
没想到还能找到华硕6005HW的内部命令集及使用说明:http://homepages.paradise.net.nz/kemyst/id27.htm
CLI Guide
Version 1.22
1 May 2002
Nik Kitson
Revision History
1.0 Document created (26/05/2001)
1.1 Added updates for Firmware 63 (2001)
1.2 Updated SNMP instructions for firmware 63 (2001)
1.21 Added pinhole example page & updated broken FTP links (4/9/2001)
1.22 Fixed PPTP info & removed QoS example. (1/5/2001)
Navigation
help - shows all available commands in the current directory
help all - shows all available commands & syntax for current directory
. - executes last command
home - gets you back to the root directory
When you first get into command line mode, the prompt will be something like 192.168.1.1>. To change to a sub-directory, type the name of the command. To get back to the root directory, type "home" You can either run a command from a sub-directory or type the full path from the root directory eg the command "ip arp" is the same as the commands ip followed by arp (see output below to get what I mean)
192.168.1.1> ip arp
# ppp_device ARP table is empty
arp add ethernet 192.168.1.2 00:c0:df:a5:64:ad # 5m
192.168.1.1> ip
192.168.1.1 ip> arp
# ppp_device ARP table is empty
arp add ethernet 192.168.1.2 00:c0:df:a5:64:ad # 3m41s
Main commands
clrcfg (null) - Clear All Configuration. This is bad and you normally should not type this in.
cpclrcfg (null) - Clear All Configuration for Internal Test. Yet again, an unwise choice
restart - Reboots the router.
uptime - shows how long the system has been running since the last reboot eg up 1 hour 8 minutes
user (null) - Enter User Mode Console. This jumps you straight back to the friendly menu system.
version - show system firmware revision eg ADSL MODEM version Ver63114
testled (null) - Set Test Led Blinking. This is a complete waste of time. If the blinking annoys you, reboot the router.
event help|next|previous|recent|show|unshow - control display of events. This is quite handy, it gives you a detailed look at the event log.
config save - this saves any changes you have made and works from any directory. If you have cooked a running config, don';t use this option!!
The commands below can be run from the root directory, but you need to append the directory name before the command. It';s generally easier to go to the appropriate directory and type "help all" to figure out what each one does. If you click on each of these commands, you will see the output of "<command> help all".
Command Summary
ap
atm
bridge
bsp
buffer
bun
chips
config
dhcpclient
dhcpserver
edd
ethernet
flashfs Contents of the flash memory.
httpd The HTTP daemon has a fixed configuration (& has been removed from 632001.)
ip
ip arp
ip arp add
ip arp delete
ip arp flush
ip arp list
ip ipatm
ip ping ICMP ping
ip ping1 ICMP ping with adjustable packet size and timeout
ip rip Configure RIP v1 or v2 and route poisoning
ip route Add/remove static routes
ip snmp Configure SNMP communites and traps
ip statistics View & reset ARP, IP, ICMP, TCP and UDP statistics
isfs
led
nat Turn NAT on/off on a given interface. Setup port mapping
oamcli
portcli
ppp Detailed PPP confiuration options (including PPTP authentication)
pptp Configure PPTP tunnels for PPTP to ATM DSL bridging.
r1483
snmp Second menu for configuring SNMP communities/traps
tftp Manage boot image & config files with TFTP. Use in conjunction with Linux or Windows TFTP daemon
ap
event [<lines>|show|unshow] - internal trace buffer dump
messages <all>|<active>|<free> [<verbose>] - AP messages
pwc - print current context
queues <all>|<active>|<free> [<verbose>] - queue status
sema <all>|<active>|<free> [<verbose>] - semaphore status
status [<verbose>] - global status
tasks <all>|<active>|<free> - task status
timers <all>|<active>|<free> - timer status
trace <mem>|<queues>|<semaphore>|<tasks>|<timer> - set trace option
untrace <mem>|<queues>|<semaphore>|<tasks>|<timer> - reset trace option
version - display library version information
atm
info - ATM driver information
pool - More useless ATM information
bridge
device command - Alter bridge configuration
ethertype [<port> "any"|"ip"|"pppoe"] - Set or display forwarded packet types
filter - Display filtering database
filterage [age] - Set or display filter age time
flush [<port>] - Flush filtering database on port(s)
info - Show version
interface command - Process interface command
portfilter [<source port> "all"|<dest ports>] - Set or display ports to forward to
spanning {command} - Control spanning tree operation
status - Display bridge status
version - Show version
bsp
version - Display version of implementation
line - Use activate/deactivate the line
mode - Set operation mode [auto,ansi,dmt,lite]
gain - Set transmit gain (requires re-enable)
debug - Set debugging
autostart - Enables modem to connect on power-up
rates - Get channel rates
channel - Get actual bit rate for downstream and upstream
status - Display modem channel status [all]
setAFE - Set Analog Front End [AFE134,AFE234]
up - Use activate the line
down - Use deactivate the line
loop - Begin ADSL Loop Test.
ploop - Begin ADSL Loop Test for Ping Command.
load - Bit/bin loading
enhance - Set Enhance Mode [on|off]
priority - Set Priority [ansi|g.hs]
vendor - Set VendorID [value]
alarm - Get Alarm indication
getes - Get error second
trellis - Set Trellis [on|off]
dyinggasp - Send Dying Gasp
buffer
list - list the buffer pools
info - [<name>] show [or set] current pool
show - [<n>] show buffer <n> in current pool, or all buffers in use
steal - <n> steal <n> buffers from current pool, (0 to reset)
version - display version information for buffer pools
bun
help [command] - Display usage syntax for [command]
version - Show software version
build - Show build information
config <config_spec> - Enter manual configuration request
list config - Display all configuration requests
list devices - Display registered driver devices
list ports - Display registered ports
list channels <port_name> - Display enabled channels on a port
list all open channels <port_name> - Display all open channels on a port
list objects - Display all data objects
show device <device_name> ... - Display device information
show port <port_name> - Display port information
show channel <port_name> <channel_number> - Display channel information
set port <port_name> / <attribute> = <value> - Set port attribute
set channel <portname> <channelnumber> / <attribute> = <value> - Set channel attribute
reset port <port_name> - Reset port hardware
list classes - List available port classes
show class <classname> - Show class members
chips
cpu - print percentage of cpu cycles used
debug - enter debug process
exit - abort from ATMos
info - print out version information and machine';s address
mem - memory used on a process-by-process basis
stack - stack usage on a process-by-process basis
rb <addr> - read byte at address <addr>
rh <addr> - read halfword at address <addr>
rw <addr> - read word at address <addr>
tell <process> <string> - send string to process using TELL message
wb <addr> <val> - write byte <val> at address <addr>
wh <addr> <val> - write halfword <val> at address <addr>
ww <addr> <val> - write word <val> at address <addr>
config
list - List all modules registered
print [low | medium | high] [<module>] - Print configuration
reset [<module>] - Reset configuration to default
save - Save configuration
resource [<process> [<resource> [<value>]]] - Control resources
version - Display version information
dhcpclient
Valid DHCP client commands are:
config - Displays client configuration file
help - Gives help on available commands
pool - Show DHCP client pool allocation stats
status - Shows status of active lease, or [all] leases
trace - Activates trace option(s)
untrace - Deactivates trace option(s)
version - Show software version
dhcpserver
Valid DHCP server commands are:
config - Displays server configuration file
help - Gives help on available commands
pool - Show DHCP pool allocation statistics
reset - Reset and restart DHCP server
status - Shows status of server leases
trace - Activates trace option(s)
untrace - Deactivates trace option(s)
version - Display software version
edd
event [level] - set event logging level
interface [id] command - process interface command for device id
status - device status
version - display driver information
ethernet
event [level] - set event logging level
interface [id] - command - process interface command for device id
status - device status
version - display driver information
flashfs
cat <file> - show file contents
fsck - file system check, checks FLASH integrity
id <x> - display chip ID for device x
info - display file system information
ls [-l] - list FLASHFS files [more detail]
rewrite <file> - rewrite boot area with ISFS file <file>
chkflashfs - check flashfs filing system.
syschkflashfs - system check flashfs filing system.
checksum - show program block checksum
trace [level] - show/set tracing level
update - commit ISFS files to FLASH
version - display version number
wipe - irreversibly erase FLASH contents. HINT: Don';t mess with this!
httpd
event [level] - show or set event level
version - show version
ip
This is all the really useful stuff on configuring IP services. You can play with ARP, ping, IP ATM services, RIP, routing and SNMP.
ip arp
add syntax
arp add <i/f> a.b.c.d x:x:x:x:x:x
- add ethernet address x:x:x:x:x:x equivalence to IP
address a.b.c.d on interface <i/f>
delete syntax
arp delete <i/f> a.b.c.d
- delete mappings to IP address a.b.c.d
on interface <i/f>
flush syntax
arp flush - delete cached ethernet addresses
arp list - list resolved ethernet addresses. Only requires arp
config
config [save] - display config or save to flash
cp_ping
ping <host> [<ttl> [<size>]] - request echo from <host>
device
device - list interface definitions
device add <i/f> <type> <file> [mtu <size>] [<IPaddr>|dhcp]
- create interface definition
device delete <i/f>
- remove interface definition
device flush - remove all interface definitions
disable syntax:
disable [<i/f>] - prevent use of interfaces or just interface <i/f>
enable syntax:
enable [<i/f> [mtu <size>] [<IPaddr>]]
- enable use of all interfaces or interface <i/f> if given
- set <i/f> IP address to <IPaddr>
- set MTU for interface
ipatm
abort syntax:
ipatm abort <n> - delete open underlying ATM device file no. <n>
arp syntax:
ipatm arp - list ARP cache entries
arpserver syntax:
ipatm arpserver <i/f> [<addr> | here]
- set ATMARP server address on interface <i/f>
files syntax:
ipatm files - list files open to underlying ATM devices
lifetime syntax:
ipatm lifetime <secs>
- remove ATM connection after <secs> idle
ipatm lifetime - show lifetime
pvc syntax:
ipatm pvc add <i/f> <port> [<vpi>/]<vci> [pcr <pcr>] [remoteip <IP addr>] - - configure PVC for use eg ipatm pvc add ppp_atm 1 0/100 150
ipatm pvc delete <port> [<vpi>/]<vci> - delete PVC
ipatm pvc flush - delete all PVCs in use
structure syntax:
ipatm structure <1-3> -The ATM Forum defines three structures for the combined use of number and subaddress
nat syntax:
nat add <i/f> - install NAT on interface
nat delete <i/f> - uninstall NAT from interface
norelay syntax:
norelay [all | <i/f name> [<i/f name>] [forward]] - disallow relaying between i/fs
ping syntax:
ping <host> [<ttl> [<size>]] - request echo from <host>
ping1 syntax:
ping1 <host> [ [<size>] [<delay>us]] - extended ping with variable packet size and timeout
relay syntax:
relay - list existing relays in place
relay all | <i/f name> [<i/f name>] [forward] - allow relaying between i/fs
rip
The default is to send and receive RIP routes on all interfaces. It';s probably a good first step to type rip send ppp_device none, unless your ISP allows you to send RIP.
accept syntax:
rip accept [all | <i/f name>] [none | <version>*] - accept only RIP <version>s routes
allowed syntax:
rip allowed - list RIP versions allowed.
boot syntax:
rip boot - broadcast RIP request for routes
hostroutes syntax:
rip hostroutes [off] - accept RIP routes to hosts
killrelay syntax:
rip killrelay <relay name> - remove RIP relay
poison syntax:
rip poison [off] - kill RIP routes returning to their source
relay syntax:
rip relay <RIP version> <relay name> [<i/f name> [<timeout>]] - define RIP relay (e.g. on non-broadcasting subnet)
relays syntax:
rip relays - show active RIP relays
rxstatus syntax:
rip rxstatus - print reception status
send syntax:
rip send [all | <i/f name>] [none | <version>*] - send only RIP <version>s routes
trigger syntax:
rip trigger - trigger broadcast of routing information
route
route add <dom name> a.b.c.d <relay> [am:bm:cm:dm [<cost> [<timeout s>]]] - define/edit an IP forwarding route
route delete <dom name> - delete a route
route flush - delete all routes
routes syntax:
routes - show IP forwarding routes
snmp
access syntax:
snmp access [read | write] <community> [<IP addr>] - allow read-only or read-write access
snmp access delete <community> [<IP addr>] - revoke specified access
snmp access flush - revoke all access
snmp access list - list allowed access
config syntax:
config [save] - display config or save to flash
trap syntax:
snmp trap add <community> <IP addr> [<port>] - add a trap destination
snmp trap delete <community> <IP addr> [<port>] - delete a trap destination
snmp trap flush - delete all trap destinations
snmp trap list - list trap destinations
version syntax:
version - display version information
statistics
arp syntax:
stats arp [reset] - report/reset ARP/RARP statistics
icmp syntax:
stats icmp [reset] - report/reset ICMP statistics
ip syntax:
stats ip [reset] - report/reset IP statistics
raw syntax:
stats raw [reset] - report/reset Raw IP statistics
tcp syntax:
stats tcp [reset] - report/reset TCP statistics
udp syntax:
stats udp [reset] - report/reset UDP statistics
subnet syntax:
subnet add <net name> <i/f name> a.b.c.d am:bm:cm:dm - create subnet definition
subnet delete <net name> - remove subnet definition
subnet flush - remove all subnet definitions
version syntax:
version - display software version no.
isfs
ls - list ISFS files
rm <file> - remove file from ISFS
cat <file> - show file contents
trace [level] - show/set tracing level
version - displays version number
led
help
version
status
gpio
trigger
message
enable
disable
globalenable
globaldisable
nat
event [<level>] - show or change current event tracing level
interfaces - list interfaces
inbound help | <command> - set up rules for inbound packets
inbound list - list all rules
inbound add <i/f name> <port>/<proto> <internal IP> - add a rule / static port translation / "pinhole". Proto value is either UDP or TCP only. There is no support for proto 50/51 (ESP/AH IPSEC) or 47 (GRE) in ver63(2001).
eg
inbound add ppp_device 80/tcp 192.168.1.2 will forward the external HTTP port to a web server on 192.168.1.2 internal address. More pinhole/NAPT examples.
inbound delete <rule num> - delete a rule
inbound flush - delete all rules
info - show information about configured options
protocols - list protocols supported via ALGs. Supported application NAT hacks in firmware 63(2001) are listed below.
Name Port/IP protocol
ftp 21/tcp
nmt 389/tcp
nmt 1503/tcp
nmt 1720/tcp
rtsp 554/tcp
rtsp 7070/tcp
sessions <i/f name> [summary | all] - list active sessions
stats <i/f name> [reset] - show statistics
version - display ATMOS NAT version
app help | <command> - set up application for NAT eg NetMeeting
oamcli
config - display message saying there is no storable configuration
version - show oamcli version
getversion - get the oam process version
inf <port> <vpi> <vci> <flags>
Where
<port> - is a port number
<vpi>/<vci> - is a number, or ';any';
<flags> - is one or both of ';f4'; ';f5'; and one or both of ';etoe'; ';segment
list - list channels state
ccglobalaccept - toggle auto acceptance/rejection of CC activate requests
pmglobalaccept - toggle auto acceptance/rejection of PM activate requests
segmentset <port> <vpi> <vci> <flags> - set up a segment sink point
segmentclear <port> <vpi> <vci> <flags> - remove a segment sink point
faultset <port> <vpi> <vci> <flags> - turn fault management on
faultclear <port> <vpi> <vci> <flags> - turn fault management off
faultwatch <port> <vpi> <vci> <flags> - turn fault monitoring on
faultunwatch <port> <vpi> <vci> <flags> - turn fault monitoring off
faultbegin <port> <vpi> <vci> <flags> - declare a fault state
faultend <port> <vpi> <vci> <flags> - clear a fault state
ccset <port> <vpi> <vci> <flags> - set up reception of activation requests
ccclear <port> <vpi> <vci> <flags> - clear reception of activation requests
ccsetauto <port> <vpi> <vci> <flags> - set up auto accept of activation requests
ccactivate <port> <vpi> <vci> <flags> <dir> - send activate request
ccdeactivate <port> <vpi> <vci> <flags> <dir> - send deactivate request
ccstart <port> <vpi> <vci> <flags> <dir> - start transmission/reception of CC cells
ccstop <port> <vpi> <vci> <flags> <dir> - stop transmission/reception of CC cells
loopset <port> <vpi> <vci> <flags> <llid> - enable loopback
loopclear <port> <vpi> <vci> <flags> - disable loopback
loop <port> <vpi> <vci> <flags> <llid> - send a loopback cell
loopstats <port> <vpi> <vci> <flags> - display loopback stats
pmset <port> <vpi> <vci> <flags> - set up reception of activation requests
pmclear <port> <vpi> <vci> <flags> - clear reception of activation requests
pmsetauto <port> <vpi> <vci> <flags> - set up auto accept of activation requests
pmactivate <port> <vpi> <vci> <flags> <txblock> <rxblock> <dir> - send activate request
pmdeactivate <port> <vpi> <vci> <flags> - send deactivate request
pmstart <port> <vpi> <vci> <flags> <txblock> <rxblock> <dir> - start transmission/reception of PM cells
pmstop <port> <vpi> <vci> <flags> <dir> - stop transmission/reception of PM cells
pmstats <port> <vpi> <vci> <flags> - display PM stats
portcli
8khzsource [<port> [int|off]] - set source of 8kHz reference signal
errors [diff] - show error counts
portinfo [<port>] - show port information
portload [<port>] - show port loading
portmode <port>|all uni30|uni31|uni40|iispuser|iispnet|mast|gsmp|ifmp
- set port mode (group of flags)
setportflag <port>|all <portflag> - set port flag
show <port> - show detail information for a port
speed <port> [tx default|<cps>][rx default|cps] - set port speed
stats [diff] - print statistics
unsetportflag <port>|all <portflag> - clear port flag
version - show switch CLI version
vport - add or remove virtual ports
ppp
bcp
<channel> bcp stp|nostp - set if BCP uses spanning tree packets over this channel
clear
<channel> clear - clear channel to initial state
disable
<channel> disable - disable PPP on this channel
discard
<channel> discard [<size>] - send LCP ';discard'; packet
echo
<channel> echo [<size>] - send LCP ';echo'; packet
enable
<channel> enable - enable this channel with current settings
event
event [<1-5>] - set/read current event report level
hdlc
<channel> hdlc [1|0] - set HDLC headers on this channel
info
<channel> info [all] - show information about this channel
interface
<channel> interface <n> - attach channel to specified interface interface <n> localip <ipaddr>: set local IP address on specified interface interface <n> stats show statistics on specified interface
lcpmaxconfigure
<channel> lcpmaxconfigure [<n>] - set/read current LCP Max Configure setting
lcpmaxfailure
<channel> lcpmaxfailure [<n>]- set/read current LCP Max Fail setting
lcpmaxterminate
<channel> lcpmaxterminate [<n>] - set/read current LCP Max Terminate setting
llc
<channel> llc [1|0] - set LLC headers on this channel
ports
ports - display the available port names
pvc
<channel> pvc [[[<port>] <vpi>] <vci>] [ip|mac] [listen] - set PVC details for this channel
pppoe
<channel> pppoe [enable|disable|acname <name> service <name>|mac xx:xx:xx:xx:xx:xx] - configure PPPoE
qos
<channel> qos [cbr|ubr] [pcr <pcr-tx> [<pcr-rx>]] - set QoS details for this channel. Best to leave this off, as QoS is just going to slow down the router.
remoteip
<channel> remoteip <ipaddr> - set IP address for dial-in to this channel
svc
<channel> svc [listen|addr <addr>] [ip|mac] - set SVC details for this channel. SVC';s not normally used.
theylogin
<channel> theylogin [pap|chap|none] - set login required to this channel
tunnel
<channel> tunnel <n> pptp|l2tp in|out - associate <channel> with tunnel number <n>
user
user - list all user settings
user add <name> pwd <passwd> [pap|chap] - create new user setting
user delete <name>|all - delete user setting or all settings
version - display version information for PPP
vjcomp
<channel> vjcomp [1|0] - set VJ TCP/IP header compression on this channel
welogin
<channel> welogin none | <name> <password> [pap|chap] - set our login details over this channel
pptp
bind
bind [<ipaddress>|any|none] - define local interface to listen on for incoming connections
connect
<tunnel> connect - connect an outgoing tunnel to a remote PNS
create
<tunnel> create <ipaddress>|listen - create an outgoing or incoming (listening) tunnel object
delete
<tunnel> delete - delete a tunnel object
disconnect
<tunnel> disconnect - explicitly disconnect a tunnel
event
[<tunnel>] event [<n>] - read or set current event reporting level for a tunnel
info
<tunnel> info - show information about a tunnel
list
list - list active tunnels
status
<tunnel> status - synonym for ';<tunnel> info';
version - show PPTP version number
r1483
event [level] - set event logging level
info - display driver information
interface command - process interface command
files - show files open
info - show driver version
stats [reset] - show or reset driver statistics
version - show driver version
pvc [none | [<vpi>/]<vci> [pcr <pcr>]] [<port>] - set PVC status - device status
snmp
The SNMP configuration commands can be used to configure the router to work with MRTG or any other standard SNMP v2 application. . The default read community is public and the default write community is asus with firmware 63 (2001). I strongly suggest you change these defaults. IMPORTANT: The SNMP write community is also the password to access the command line mode. If you add an IP address to your write community string, you will no longer be able to access command line mode via a console cable.
access syntax:
snmp access [read | write] <community> [<IP addr>] - allow read-only or read-write access
snmp access delete <community> [<IP addr>] - revoke specified access. IP optional
snmp access flush - revoke all access
snmp access list - list allowed access
config syntax:
config [save] - display config or save to flash
trap syntax:
snmp trap add <community> <IP addr> [<port>]- add a trap destination. Port optional
snmp trap delete <community> <IP addr> [<port>] - delete a trap destination. Port optional
snmp trap flush - delete all trap destinations
snmp trap list - list trap destinations
version syntax:
version - display version information
tftp
list - list active tftp connections
version - displays version and trace status
connect <addr | hostname> - set IP address or host for transfers
get get <file> [<local file>] - get file from remote host
put put <file> [remote file] - put file onto remote host ( AAM6000 default firmware file is called "image". It may be wise to back this up if you are playing ...)
trace [+flag][-flag][-*][help] - set trace options
led
version
status
gpio
trigger
message
enable
disable
globalenable
globaldisable |