1-5
mask-length
: Subnet mask length, the number of consecutive ones in the mask.
sub
: Secondary IP address for the interface.
Description
Use the
ip
address
command to assign an IP address and mask to the interface.
Use the
undo
ip
address
command to remove all IP addresses from the interface.
Use the
undo
ip
address
ip-address
{
mask
|
mask-length
} command to remove the primary IP
address.
Use the
undo
ip
address
ip-address
{ mask | mask-length
}
sub
command to remove a secondary IP
address.
By default, no IP address is assigned to any interface.
When assigning IP addresses to an interface, consider the following:
z
You can assign only one primary IP address to an interface.
z
The primary and secondary IP addresses can be located in the same network segment.
z
Before removing the primary IP address, remove all secondary IP addresses.
z
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, or DHCP.
Related commands:
display ip interface
.
Examples
# Assign VLAN-interface 1 a primary IP address 129.12.0.1 and a secondary IP address 202.38.160.1,
with subnet masks being 255.255.255.0.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 129.12.0.1 255.255.255.0
[Sysname-Vlan-interface1] ip address 202.38.160.1 255.255.255.0 sub
Содержание E4510-48G
Страница 109: ...2 18 Sysname interface bridge aggregation 1 Sysname Bridge Aggregation1 shutdown ...
Страница 309: ...6 4 Sysname interface vlan interface 1 Sysname Vlan interface1 ip address dhcp alloc ...
Страница 324: ...8 3 Sysname interface vlan interface 1 Sysname Vlan interface1 ip address bootp alloc ...
Страница 530: ...2 5 Sysname mvlan 100 subvlan 10 to 15 ...
Страница 739: ...8 15 Sysname system view Sysname port security trap addresslearned ...
Страница 819: ...13 11 Sysname system view Sysname public key peer key2 import sshkey key pub ...
Страница 857: ...iii 7 Track Configuration Commands 7 1 Track Configuration Commands 7 1 display track 7 1 track nqa 7 2 ...
Страница 914: ...5 17 Sysname reset oam ...
Страница 1064: ...5 30 Slot 2 Set next configuration file successfully ...
Страница 1325: ...21 13 Examples Redirect to member 2 Sysname irf switch to 2 Sysname Slave 2 ...