(Optional) Configuring a Secondary IP Address for an Interface
Context
Generally, an interface needs only a primary IP address. In some special scenarios, you need to configure secondary IP addresses for an interface. For example, a router connects to a physical network through an interface, and hosts on this network belong to two network segments. To enable the router to communicate with all hosts on the physical network, configure a primary IP address and a secondary IP address for this interface. You can configure multiple IP addresses for a Layer 3 interface on a router, one as the primary IP address, and the others as secondary IP addresses. Each Layer 3 interface can have a maximum of 31 secondary IP addresses.
The primary and secondary IP addresses of an interface can be located on overlapping network segments but not the same network segment. For example, if an interface has been assigned a primary IP address 10.1.1.1/24 and you assign secondary IP address 10.1.1.2/16 sub to this interface, the system displays a warning message but the configuration succeeds.
The primary IP address of one interface and secondary IP address of another interface on the same router can be located on overlapping network segments but not on the same network segment. For example, if an interface has been assigned a primary IP address 10.1.1.1/16 and you assign secondary IP address 10.1.1.2/24 sub to another interface on the router, the system displays a warning message but the configuration succeeds.