Cisco: Configuring secondary IP addresses on an interface.

Secondary IP addressing:  Borrowed from the excellent OverBlog:  http://cisco2960.over-blog.com/2014/03/assigning-multiple-ip-addresses-to-network-interfaces.html

Why would we configure secondary ip on an interface

Answer:

With secondary addressing, multiple IP subnets coexist in the same LAN.  It’s a handy tool for non-disruptively adding IP addresses to an existing LAN, without making changes to the LAN itself, and without having to renumber IP interfaces in existing subnet(s) on that LAN.

ip address 192.168.1.1 255.255.255.0

ip address 192.168.2.1 255.255.255.192 secondary

Is it like creating subinterfaces for router on the stick?

Sort of. But unlike router-on-a-stick those subnets won’t be divided by vlans.

But we bridging 2 subnets together and it is going to be one broadcast domain I suspect.

Exactly. However many subnets you create within a single interface, they will all be in the same vlan and broadcast domain. So if for instance host 192.168.1.5 sends a broadcast, all hosts in both 192.168.1.0/24 and 192.168.2.0/24 will receive it.

Do we have to configure VLANS on the switches and trunk port between router and switch?

No. This will be an untagged port which knows nothing about vlans.

Cisco IOS software supports multiple IP addresses per interface. You can specify an unlimited number of secondary addresses. Secondary IP addresses can be used in a variety of situations. The following are the most common applications:

•There might not be enough host addresses for a particular network segment. For example, suppose your subnetting allows up to 254 hosts per logical subnet, but on one physical subnet you must have 300 host addresses. Using secondary IP addresses on the routers or access servers allows you to have two logical subnets using one physical subnet.

•Many older networks were built using Level 2 bridges, and were not subnetted. The judicious use of secondary addresses can aid in the transition to a subnetted, router-based network. Routers on an older, bridged segment can easily be made aware that many subnets are on that segment.

•Two subnets of a single network might otherwise be separated by another network. You can create a single network from subnets that are physically separated by another network by using a secondary address. In these instances, the first network is extended, or layered on top of the second network. Note that a subnet cannot appear on more than one active interface of the router at a time.

Note If any router on a network segment uses a secondary address, all other routers on that same segment must also use a secondary address from the same network or subnet.
To assign multiple IP addresses to network interfaces, use the following command in interface configuration mode:

Router(config-if)# ip address ip-address mask secondary

Leave a comment