Chapters Download(126 KB)
Table of Contents
Chapter 1 Fundamental Configuration Commands
1.1 Command Line Interface Commands
1.2 Basic System Configuration Commands
1.2.2 display base-information
1.3 Ethernet Configuration Commands
1.3.5 display interfaces ethernet
1.4 Default Route Configuration Commands
Syntax
display history-command
View
Any view
Parameter
None
Description
Use the display history-command command, you can view the latest 20 commands you have entered.
You can press composite keys <Ctrl+P> and <Ctrl+N> to view the previous history command and the next one respectively.
Example
# Display history commands you have entered.
[VG] display history-command
Current user:h3
No 1. int e 0
No 2. quit
No 3. int e 0
No 4. ing e0
No 5. dis his
No 6. dis current
No 7. dis current
No 8. dis his
No 9. dis his
No10. dis his
No11. dis his
No12. dis his
No13. dis his
No14. dis his
No15. dis his
No16. dis current
No17. dis current
No18. dis his
No19. dis his
Syntax
quit
View
Any view except system view
Parameter
None
Description
Use the quit command to return from the current view to the upper-level view.
Example
# Return to the system view from Ethernet interface view.
[VG]
Syntax
return
View
Any view
Parameter
None
Description
Use the return command to return directly to the system view from the current view (excluding the system view).
Composite key <Ctrl+Z> is equivalent to the command return in function.
Example
# Return to the system view from Ethernet interface view.
[VG]
Syntax
clock { systime HH:MM:SS YYYY MM DD | timezone name { add | minus } HH:MM:SS }
undo clock timezone
View
System view
Parameter
HH:MM:SS: Current time of the VG. the hour ranges 0~23; the minute and second range 0~59.
YYYY, MM and DD: Date information of the VG. YYYY ranges 1997~2097; MM ranges 1~12; the range of DD is the actual number of days in the month.
timezone name: Sets the time zone name and contains 1 to 32 characters.
add HH:MM:SS: Adds the time zone difference.
minus HH:MM:SS: Reduces the time zone difference.
Description
Use the clock command to set the system clock of the VG.
Use the undo clock timezone command to restore the default system time zone.
By default, if the VG has no hardware real time, then the initial time is 1:00:00, January 1, 1998. But if it has hardware real time, it will set system time to hardware real time.
The timing fails when the VG is powered off, so it is required to set date and time again for the VG when absolute time is necessary.
& Note:
After the VG reboots, the system clock will be restored to the default setting, and the timezone value saved before rebooting will be adopted.
Related command: display clock.
Example
# Set system time as 17:15:30, July 15, 2005.
[VG] clock systime 17:15:30 2005 7 15
Syntax
display base-information [ page ]
View
Any view
Parameter
page: Displays information in pages.
Description
Use the display base-information command to display system statistics.
The statistical information includes software version, current configuration information, interface information, memory information, interface traffic. The information is significant for you to get a general idea about the VG.
Example
# Display system statistics.
[VG] display base-information
[Display Version]
......
[Display Current-configuration]
......
[Display Interfaces]
......
[Display Memory Detail]
......
[Display Ip Statistics]
......
[Display Ip Interface]
......
Syntax
display clock
View
Any view
Parameter
None
Description
Use the display clock command, you display current date and time of the system.
When finding incorrect system time with this command, you can adjust it.
Related command: clock.
Example
# Display current date and time of the system.
Current Voice Gateway time:03:05:23 Mar 30 2005
Syntax
display duration
View
Any view
Parameter
None
Description
Use the display duration command to view the period from system startup to the point executing this command.
Example
# Display the period from system startup to the point executing this command.
Voice Gateway VG10-41 uptime is 0 days 1 hours 38 minutes 4 seconds.
Syntax
display reboot
View
Any view
Parameter
None
Description
Use the display reboot command to view system rebooting proposal.
Related command: reboot.
Example
# Display system rebooting schedule.
[VG] display reboot
[10:06:17 May 7 2005] Reboot scheduled for [23:59:59 May 7 2005] by [Console]
Reboot reason: Update Comware program
The above information shows a schedule to reboot the system at 23:59:59, May 7, 2005.
Syntax
display sysname
View
Any view
Parameter
None
Description
Use the display sysname command to view system name.
Related command: sysname.
Example
# Display system name.
[VG] display sysname
VG
Syntax
display system cpu
View
Any view
Parameter
None
Description
Use the display system cpu command to view the CPU occupancy, in percentage.
Example
# Display CPU occupancy.
[VG] display system cpu
Current CPU load: 5%
Syntax
display system memory { all | blksize size } [ detail ]
View
Any view
Parameter
all: Displays the occupancy of all memory blocks
blksize size: Displays the occupancy of memory blocks of a specified size. The size ranges 32, 64, 128, 512, 1024, 2048, 4096, 8196 etc.
detail: Displays details about each memory block, including address, occupied size etc.
Description
Use the display system memory command to view memory occupancy, including the sizes of system memory, various memory blocks, unblocked memory, idle memory, and occupied memory respectively.
Example
# Display occupancy of all memory blocks.
[VG] display system memory all
Total: 19029120 Slice: 1300992 RawSlice: 1706596 Free: 16021532
-------------------------------------------------------------------
Slice Memory Usage:
Block Size 32 Free 1419 Used 420 Total 1839
Block Size 64 Free 5 Used 86 Total 91
Block Size 128 Free 1 Used 315 Total 316
Block Size 256 Free 4 Used 338 Total 342
Block Size 512 Free 2 Used 20 Total 22
Block Size 1024 Free 2 Used 27 Total 29
Block Size 2048 Free 35 Used 350 Total 385
Block Size 4096 Free 8 Used 31 Total 39
----------------------- Slice memory summary -----------------------
Used(Byte) 1027456 Free 1476 Used 1587 Total 3063
Raw Slice Memory Usage:
Total Size: 1662960 Num: 64
------------------ RawSlice detailed information ------------------
(0x00700606*27) (0x02200000*1) (0x02402421*1) (0x02402429*1)
(0x02402428*1) (0x02402427*1) (0x02402426*1) (0x02402425*1)
(0x02402424*1) (0x02402423*1) (0x12012001*3) (0x05005009*3)
(0x0DD0DC0D*1) (0x0DD0DC0C*1) (0x0DD0DC0B*1) (0x0DD0DC0A*1)
(0x0DD0DC09*1) (0x0DD0DC06*1) (0x0DD0DC05*1) (0x05005007*2)
(0x0FE00104*2) (0x0B40B408*1) (0x00D1D101*1) (0x00D0D003*1)
(0x00D0D002*1) (0x00D0D001*2) (0x0B20B201*2) (0x12345670*1)
(0x12345679*1) (0x12345678*1)
Syntax
display version
View
Any view
Parameter
None
Description
Use the display version command to view system version.
By viewing the system version, you can get information about the current software version, hardware configuration, starting time and so on .
Example
# Display system version.
[VG] display version
H3C Comware Software
Comware software, Version 1.80, Feature 0019
Copyright(c) 2004-2006 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
Without the owner's prior written consent, no decompiling
or reverse-engineering shall be allowed.
H3C VG 10-41 uptime is 0 day(s) 0 hour(s) 2 minute(s) 11 second(s)
System returned to ROM by power-on.
H3C VG 10-41 with 1 MPC 852 Processor
Voice Gateway serial number is 00E0FC1213147654
32M bytes SDRAM
8192K bytes Flash Memory
0K bytes NVRAM
Config Register points to FLASH
Hardware Version is MTR 2.0
CPLD Version is CPLD 1.0
Bootrom Version is 1.04
[WAN ] Eth Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
[LAN ] Eth Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
[PHONE0] FXS Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
[PHONE1] FXS Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
[PHONE2] FXS Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
[PHONE3] FXS Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
[LINE ] FXO Hardware Version is 2.0, Driver Version is 1.0,
Cpld Version is 1.0
Syntax
reboot [ mode { interval { hh:mm | mmm } | time { hh:mm [ dd/mm/yyyy ] } [ reason-string ] } ] [ reason reason-string ] [ cancel ]
View
System view
Parameter
mode: Reboots the system at a preset time point or after a preset interval.
interval { hh:mm | mmm }: Specifies an interval to reboot the system, in time form (hh:mm) or in digit form (mmm). Value ranges 0~5999 minutes in digit form.
time hh:mm [ dd/mm/yyyy ]: Specifies a time point to reboot the system. If no date is assigned, it is the current date.
reason-string: Describes the reason for rebooting the system.
cancel: Removes system rebooting at a preset time point or after a preset interval.
Description
Use the reboot command to reboot the VG.
This command is equivalent in function to powering off the VG. But in remote maintenance mode, you can use this command to restart the VG remotely, instead of going to the place where the VG is located and restarting it.
Using the command with the keyword interval or time, you can set system rebooting after a preset interval or at a preset time. This helps in case of online program upgrade and configuration modification. System rebooting is required before the upgraded program takes effect and the same is true of modifying some special configurations. But system rebooting is not recommended when an administrator is maintaining the system, for this may disturb the normal services. This command enables you to select a time when system rebooting does not disturb normal services or disturbs normal services to the lowest degree.
You should decide whether to save configuration files before restarting the system with this command.
Example
# Reboot the system.
[VG] reboot
WARNING: System will REBOOT! Continue?[Y/N]y
System is now rebooting, please wait.
Syntax
sysname sysname
View
Any view
Parameter
sysname: System name, in the range of 1~20 characters.
Description
Use the sysname command to set or modify the system name, which is displayed in view prompt.
By default, the system name is VG.
Related command: display sysname.
Example
# Set the system name as h3c.
[h3c]
Syntax
version
View
System view
Parameter
None
Description
Use the version command to display the software version information of the VG.
Example
# display the software version information of the VG.
[VG] version
H3C Comware Software
Comware software, Version 1.80 Feature 0019
Syntax
debugging dhcp client { event | packet | error | all }
undo debugging dhcp client { event | packet | error | all }
View
Any view
Parameter
event: Events of the DHCP client, including address allocation and data update.
packet: DHCP packets received and sent by the DHCP client.
error: Unrecognized packets or error information.
all: Enables all the debugging for the DHCP client, including debugging for event, packet and error.
Description
Use the debugging dhcp client command to enable debugging for the DHCP client.
Use the undo debugging dhcp client command to disable debugging output.
By default, all the debugging for the DHCP client is disabled.
Example
# Enable debugging for events of the DHCP client.
<VG> debugging dhcp client event
[VG-Ethernet1]ip address dhcp-alloc
[VG-Ethernet1]
User <lijian> execute command <ip add d>.
Ethernet1: FSM state transfer(HALT-->INIT) successfully.
Ethernet1: Send DHCPDISCOVER in 10 seconds.
Ethernet1: Send DHCPDISCOVER success.
Ethernet1: FSM state transfer(INIT-->SELECTING) successfully.
Ethernet1: Select 192.168.70.20 as the server.
Ethernet1: A invalid T2 option appear in DHCPOFFER, use the default value.
Ethernet1: Send DHCPREQUEST packet success.
Ethernet1: FSM state transfer(SELECTING-->REQUESTING) successfully.
Ethernet1: A invalid T2 option appear in DHCPACK, use the default value.
Ethernet1: Alloced ip(192.168.70.1) does not conflict with any other interface,
begin to bind.
Ethernet1: Send arp request for alloced address(192.168.70.1) success.
Ethernet1: Move to BOUND state in 1 seconds if received no arp reply.
%10:21:31: Line protocol ip on the interface Ethernet1 is UP
Ethernet1: Recv no arp reply for 192.168.70.1, begin to use the address.
Ethernet1: Process DHCP_CLIENT_KRT message if index(2), message type(1)
Ethernet1: FSM state transfer(REQUESTING-->BOUND) successfully.
Syntax
debugging ethernet
undo debugging ethernet
View
Any view
Parameter
None
Description
Use the debugging ethernet command to enable debugging for events of the Ethernet interface.
Use the undo debugging ethernet command to disable debugging output.
Example
# Enable debugging for events of the Ethernet interface.
[VG] debugging ethernet
Ethernet0: Send a Ethernet_II frame.
Its Destination MAC address is:ff-ff-ff-ff-ff-ff
Its Source MAC address is:00-e0-fc-20-21-80
It's a arp datagram
Syntax
debugging physical { all | receive | transmit } [ interface ethernet interface-number ]
undo debugging physical { all | receive | transmit } [ interface ethernet interface-number ]
View
Any view
Parameter
All: Debugging information switch for all packets transmitted/received on the specified interface at the physical layer.
Receive: Debugging information switch for all packets received on the specified interface at the physical layer.
Transmit: Debugging information switch for packets transmitted on the specified interface at the physical layer.
interface ethernet interface-number: Specified interface number.
Description
Use the debugging physical command to enable debugging information switch for packets transmitted/received on the specified interface at the physical layer. Use the undo debugging physical command to disable debugging information switch for packets transmitted/received on the specified interface at the physical layer.
Example
# Enable debugging information switch for packets transmitted/received on the specified interface at the physical layer.
[VG] debugging physical receive
Syntax
description string
undo description
View
Interface view
Parameter
string: A string that describes an interface, containing 1 to 64 characters.
Description
Use the description command to configure a string that describes an interface. Use the undo description command to delete a string that describes an interface.
Using the description command to describe an interface does not affect the running of the interface. You can run the display command to view this description.
Example
# Mark interface ethernet 0 as lan.
[VG-Ethernet0] description lan
Syntax
display interfaces ethernet number
View
Any view
Parameter
number: Interface number, which, combined with the parameter type, can define an interface.
Description
Use the display interfaces ethernet command to view the status and other associated information about the current Ethernet interface.
The following information is included:
l The physical status and protocol status
l The physical attributes (for example interface cable)
l The IP address
l The link-layer protocol, and its status and statistics.
l Input/output message statistics
Example
# Display status and other associated information about the Ethernet 0.
[VG] display interfaces ethernet 0
Ethernet0 current state:down, line protocol current state:down
Description: Ethernet interface, Ethernet0 Interface
The Maximum Transmit Unit is 1500
Internet Address is 192.168.80.30(24)
IP Sending Frames' Format is Ethernet_II,Hardware address is 00-e0-fc-20-21-80
Media type is twisted pair, loopback is not set, promiscuous mode not set
Half-duplex mode, 10Mbps-speed mode, link type is autonegotiation
Input queue : (size/max/drops) 0/200/0
FIFO queueing: FIFO
(Outbound queue:Size/Length/Discards)
FIFO: 0/75/0
Last 5 minutes input rate 0.00 bytes/sec, 0.00 packets/sec
Last 5 minutes output rate 0.00 bytes/sec, 0.00 packets/sec
Input: 76 packets, 9858 bytes
70 broadcasts
6 errors, 0 runts, 0 giants
0 CRC,0 frame errors, 0 overrunners
0 aborted sequences 0 no buffers
0 packets with dribble condition detected
Output:28 packets, 1792 bytes
28 broadcasts
0 errors, 0 underruns, 0 collisions
0 packets had been deferred
Syntax
duplex { negotiation | full | half }
undo duplex
View
Ethernet interface view
Parameter
negotiation: Negotiation mode
full: Full duplex mode
half: Half duplex mode
Description
Use the duplex command to set the operating mode of the 10/100Base-TX Fast Ethernet (FE) interface.
Use the undo duplex command to reset the interface mode to the default value.
By default, the Ethernet interface runs in negotiation mode.
When the VG is connected to HUB, it runs in half duplex mode. When connected to the network device which supports full duplex mode and is set in full duplex mode, for example LAN Switch, it runs in full duplex mode.
If you set the interface in negotiation mode, the peer interface must be also in negotiation mode. It is recommended to use the duplex command to set both ends at the same duplex mode if you are not sure they are in the same mode.
Using the command duplex { full | half } first and then the command speed negotiation, you can set the interface run in negotiation mode and start the process to negotiate both speed and operating mode.
Related command: speed, display interfaces ethernet.
Example
# Set 10/100Base-TX FE interface run in full duplex mode.
[VG-Ethernet0]duplex full
Syntax
hub-enable
undo hub-enable
View
System view
Parameter
None
Parameter
Use the hub-enable command to configure the VG to work in HUB mode. Use the undo hub-enable command to restore the default work mode of the VG.
By default, the VG works in the route mode.
& Note:
This command applies on VG 10-40 and VG 10-41 only.
Example
# Configure the VG to work in HUB mode.
[VG] hub-enable
Syntax
interface type number
undo interface type number
View
Any view
Parameter
type: Interface type. Refer to Table 1-1 for interface types that the VG supports.
number: Interface number. Various types of interfaces of the VG are numbered respectively, each type starting from 0 or 1.
Description
Use the interface command to enter the specific interface view or create logical interfaces.
Use the undo interface command to delete a specified logical interface.
You can input the interface type in shortened form, as long as it is not in conflict with other interface types. For example, you can shorten the Ethernet 0 as e0.
Table 1-1 Interface types that the VG supports
Interface type |
Description |
Interface attribute |
Dialer |
Dial interface |
Logical interface |
Ethernet |
Ethernet interface |
Physical interface |
Loopback |
Loopback interface |
Logical interface |
Example
# Enter the Ethernet interface view from the system view.
[VG]interface ethernet 0
[VG-Ethernet0]
Syntax
ip address { ip-address { mask | mask-length } [ sub ] | dhcp-alloc }
undo [ ip address ip-address { mask | mask-length } [ sub ] | dhcp-alloc ]
View
Interface view
Parameter
ip-address: IP address of the Ethernet interface.
mask: Sub-net mask, in dotted decimal notion.
mask-length: Length of the sub-net mask.
sub: Sub-IP address of the Ethernet interface.
dhcp-alloc: Configure the VG as the DHCP client to dynamically obtain the IP address. By default, the allocation of local IP address through DHCP negotiation is disabled.
Description
Use the ip address command to set IP address for the Ethernet interface.
Use the undo ip address command to delete the IP address of the interface.
By default, the IP addresses for Ethernet 0 (WAN) and Ethernet 1 (LAN) are 192.168.192.1 and 192.168.193.1 respectively.
There are five kinds of IP addresses and you can choose one of them accordingly. The all-0 and all-1 addresses cannot be selected as general IP addresses, since they are in special use.
The mask is used to identify the network address in an IP address. For example, if the IP address of an Ethernet interface is 129.9.30.42 and the mask is 255.255.0.0, then it can be concluded by combining the IP address and mask that the corresponding network address is 129.9.0.0.
It usually suffices to configure one IP address for one Ethernet interface. But you can also configure multiple IP addresses for one interface for its connection with multiple sub-nets, with one being the primary address and the rest being the sub-address, that is, secondary address. The configured secondary address becomes the primary one automatically if no primary address is available.
Note that all of the IP addresses configured for the Ethernet interfaces of the VG can be in the same sub-net.
& Note:
When the VG adopts factory default settings, the Ethernet interface has a default IP address. If you modify the address or delete it using the undo ip address command and save your configurations, the default IP address will be lost.
Example
# Configure the master IP address of Ethernet0 as 129.102.0.1 and sub-IP address as 202.38.160.1.
[VG-Ethernet0] ip address 129.102.0.1 255.255.255.0
[VG-Ethernet0] ip address 202.38.160.1 255.255.255.0 sub
# Allocate the local IP address through DHCP negotiation on Ethernet 0.
[VG-Ethernet0] ip address dhcp-alloc
Syntax
loopback
undo loopback
View
Ethernet interface view
Parameter
None
Description
Use the loopback command to enable loopback on the interface.
Use the loopback command to disable loopback on the interface.
By default, loopback is disabled on the interface.
Only for testing some special functions can loopback be set on the interface.
Example
# Enable loopback on the interface.
[VG-Ethernet0]loopback
Syntax
mtu size
undo mtu
View
Ethernet interface view
Parameter
size: MTU size on the interface, in bytes. It ranges 512~1500 for Ethernet_II frames and ranges 512-1500 for Ethernet_SNAP frames.
Description
Use the mtu command to configure or modify the MTU size on the interface.
Use the undo mtu command to reset the MTU size to the default value.
By default, the MTU is 1500 for Ethernet_II frames and 1492 for Ethernet_SNAP frames.
The MTU on the interface affects segmentation and reassembly of the IP packets.
Related command: send-frame-type and display interfaces.
Example
# Set the MTU size on the interface to 1492.
[VG-Ethernet0] mtu 1492
Syntax
send-frame-type { ethernet_ii | ethernet_snap }
undo send-frame-type
View
Ethernet interface view
Parameter
ethernet_ii: The interface sends IP packets in Ethernet_II frames.
ethernet_snap: The interface sends IP packets in Ethernet_SNAP frames.
Description
Use the send-frame-type command to set the send frame format of the IP packets on the interface.
Use the undo send-frame-type command to reset the send frame format to the default value.
By default, IP packets are sent in Ethernet_II frames.
The Ethernet interface of the VG supports two types of frames:
l Ethernet_II
l Ethernet_SNAP
The Ethernet interface can identify received frame formats, and therefore it can receive IP packets in these two types of frames simultaneously. But it can only send IP packets in uniform frames.
Related command: mtu and display interfaces.
Example
# Set the send frame on the interface as Ethernet_SNAP.
[VG-Ethernet0]send-frame-type ethernet_snap
Syntax
speed { 10 | 100 | negotiation }
undo speed
View
Ethernet interface view
Parameter
negotiation: The FE interface runs in negotiation mode.
10: The FE interface runs in 10Base-T (10 Mbps) mode.
100: The FE interface runs in 100Base-T (100 Mbps) mode.
Description
Use the speed command to set the speed at the 10/100Base Ethernet interface.
Use the undo speed command to reset the interface speed to the default value.
By default, the FE interface runs in negotiation mode.
If you set the interface to run in negotiation mode, the peer interface must be also in negotiation mode. It is recommended to use the speed command to set both ends at the same speed mode if you are not sure they are in the same mode.
Using the command speed { 10 | 100 } first and then the command duplex negotiation, you can set the interface speed in negotiation mode and start the process to negotiate both speed and operating mode.
Related command: duplex and display interfaces.
Example
# Set the FE interface run in 10Base-T mode.
[VG-Ethernet0] speed 10
Syntax
ip route-static 0.0.0.0 { 0.0.0.0 | 0 } nexthop-address [ preference value ] [ reject ] [ blackhole ]
undo ip route-static 0.0.0.0 { 0.0.0.0 | 0 } [nexthop-address ] [ preference value ]
View
System view
Parameter
ip-address and mask: Destination IP address and mask, in dotted decimal notion. Since the 1s in 32-bit mask must be consecutive, the mask in dotted decimal notion can be replaced by masklen, whose length is the number of the consecutive 1s in the mask.
nexthop-address: IP address of the next hop (in dotted decimal notion).
preference value: Routing precedence in the range from 1 to 255 and defaults to 60.
reject: Means the route is not reachable.
blackhole: Means this is a blackhole route.
Description
Use the ip route-static command to set a static route.
Use the undo ip route-static command to delete the static route.
By default, no static route is configured.
The IP address and mask of the default route both are 0. If the specified route is absent in the routing table, the default route will be used in forwarding.
When configuring a default route, you can specify the send interface or the IP address of the next hop. For point-to-point interfaces, you just assign the send interface. But for the interfaces which require translation from network addresses to link-layer addresses, for example Ethernet interfaces, you should configure the IP address of the next hop.
& Note:
For PPPoE-supported VG 10-40 and VG 10-41 configured with the Dialer interface, the ip route-static 0.0.0.0 { 0.0.0.0 | 0 } { nexthop-address | dialer 0 ] } [ preference value ] [ reject ] [ blackhole ] command can be used to configure the default route.
Only on the VG 10-40 and VG 10-41, you can configure the next hop as the Dialer interface.
Example
# Configure the next hop of the default route as 129.102.0.2.
[VG] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2