Configuring a Primary IP Address for an Interface
Context
Interfaces on the same router can be assigned IP addresses on overlapping network segments, but the IP addresses cannot be located on the same network segment. For example, an interface has been assigned 10.1.1.1/16. If you assign 10.1.1.2/24 to another interface on the same router, the system displays a warning message but the configuration succeeds. If you assign 10.1.1.2/16 to another interface, the system displays an error message, indicating that the configuration fails because of an IP address conflict.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run ip address ip-address { mask | mask-length }
A primary IP address is configured for the interface.
By default, no IP address is configured for an interface.
Each interface has only one primary IP address. If you configure multiple primary IP addresses for an interface, the last configured IP address becomes the primary IP address of the interface.