HP VPN Firewall Appliances Network Management Command Reference
46
Related commands
display ip interface
ip address
Use ip address to assign an IP address and mask to the interface.
Use undo ip address to remove all IP addresses from the interface.
Use undo ip address ip-address { mask | mask-length } to remove the primary IP address.
Use undo ip address ip-address { mask | mask-length } sub to remove a secondary IP address.
Syntax
ip address ip-address { mask-length | mask } [ sub ]
undo ip address [ ip-address { mask-length | mask } [ sub ] ]
Default
No IP address is assigned to any interface.
Views
Interface view
Default command level
2: System level
Parameters
ip-address: IP address of interface, in dotted decimal notation.
mask-length: Subnet mask length, the number of consecutive ones in the mask.
mask: Subnet mask in dotted decimal notation.
sub: Secondary IP address for the interface.
Usage guidelines
When assigning IP addresses to an interface:
• You can assign only one primary IP address to an interface.
• The primary and secondary IP addresses can be located in the same network segment.
• Before removing the primary IP address, remove all secondary IP addresses.
• You cannot assign a secondary IP address to the interface that is configured to borrow an IP
address through IP unnumbered or obtain one through BOOTP, DHCP, or PPP negotiation.
Examples
# Assign GigabitEthernet 0/1 a primary IP address 129.102.0.1 and a secondary IP address
202.38.160.1 with the subnet masks both 255.255.255.0.
<Sysname> system-view
[Sysname] interface gigabitethernet 0/1
[Sysname-GigabitEthernet0/1] ip address 129.102.0.1 255.255.255.0
[Sysname-GigabitEthernet0/1] ip address 202.38.160.1 255.255.255.0 sub
Related commands
display ip interface