1.1.1 ip address
Syntax
ip address ip-address
net-mask [ sub ]
undo ip address [ ip-address net-mask [ sub ] ]
View
Interface view
Parameter
ip-address:
Interface IP address, in dot delimitated decimal format.
net-mask: The
mask of the corresponding subnet in dot delimitated decimal format, or the mask
length to be specified.
sub: To
enable communications among different subnets, the configured slave IP address
should be used.
Description
Use the ip address command to set an
IP address for an interface.
Use the undo ip address command to
delete an IP address of the interface.
By default, no IP address for an interface is
configured.
Users can select proper IP subnet according
to actual conditions. Moreover, in the case that part of the host address is
composed of 0 or the entire host address is composed of 1, the address has some
special use and can not be used as ordinary IP address.
The mask identifies the network number in
an IP address.
Under normal conditions, one interface only
needs to be configured with one IP address. However, to enable one interface of
a router to connect to several subnets, one interface can be configured with
several IP addresses. Among them, one is master IP address, and others are
slave IP addresses. Following is the relationship between the master and slave
IP addresses:
l
If a master IP address is configured while
there’s already an existing master IP address, the original one will be
deleted and the newly configured will take effect.
l
The command undo ip address without
parameters indicates to delete all the IP addresses of the interface. The
command undo ip address ip-address net-mask indicates to
delete the master IP address and undo ip address ip-address net-mask
sub indicates to delete the slave address. All the slave addresses must
be deleted before the master IP address can be deleted.
In addition, any two IP addresses
configured for all interfaces on a router cannot be located in the same subnet.
Related command: ip route-static, display
ip interface, and display interface.
Example
# Configure the interface Serial 0/0/0 with
the master IP address as 129.102.0.1, the slave IP address is 202.38.160.1, and
the subnet mask of both is 255.255.255.0.
[H3C-Serial0/0/0] ip address
129.102.0.1 255.255.255.0
[H3C-Serial0/0/0] ip address
202.38.160.1 255.255.255.0 sub
Syntax
ip address ppp-negotiate
undo ip
address ppp-negotiate
View
Interface view
Parameter
None
Description
Use the ip address ppp-negotiate
command to allow IP address be assigned through negotiation at the interface.
Use the undo ip address ppp-negotiate
command to disable this function.
By default, no interface IP address
negotiation is allowed.
As PPP supports IP address negotiation,
only when the interface is encapsulated with the link-layer protocol PPP, can
the IP address negotiation at this interface be configured.
Normally, it is not necessary to configure
IP address negotiation. Only i