![H3C VG Series Getting Started Download Page 20](http://html1.mh-extra.com/html/h3c/vg-series/vg-series_getting-started_3062504020.webp)
Command Manual – Getting Started
H3C VG Series Voice Gateways
Chapter 1 Fundamental Configuration Commands
1-19
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