#

Wednesday, November 15, 2017

Assigning Many IP Addresses to a Single Interface

When you have a network on an interface with 192.168.1.0/24 and you run out of IPs and you need to put more servers there, you can use secondary IP on that interface and bring up another range like 192.168.2.0/24. Another practical use of secondary address is during IP address space migrations.

Configuration is simple like the following..

R1(config)#int e0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#ip address 192.168.2.1 255.255.255.0 secondary 
R1(config-if)#ip address 192.168.3.1 255.255.255.0 secondary 
R1(config-if)#ip address 192.168.4.1 255.255.255.0 secondary

Here I have assigned 192.168.1.1 as the primary interface IP address and other 3 IPs as secondary IP addresses.

This will be shown in the routing table under the same interface..


















But you will not see them on show ip interface brief output..



Note that you can assign IP addresses of the same range as secondary IP addresses too..

1 comment:

  1. This is a very good tip especially to those fresh to the
    blogosphere. Brief but very precise info… Many thanks for
    sharing this one. A must read article!

    ReplyDelete