It`s a kind of old story, but still it can be real revelation for those who start to learn networking principles. This is the way to extend your broadcast domain in situation when you are running out of IP addresses. There are some other reasons why to use secondary IP address, but they are unlikely.
Just to be clear: on Cisco IOS you can add as much as you need secondary IP addresses. All of them will be secondary. All other gateways on that segment should have configured secondary IP addresses in order to stay gateways for those networks (in case you are using HSRP or other redundant protocol).
Once again, no metter how many IP addresses you have on single interface, on L2 level, there still will be single broadcast domain.
Now configuration. From global configuration mode, go to desired interface and configure as I did:
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.10.1 255.255.255.0
R1(config-if)#ip address 192.168.15.1 255.255.255.0 secondary
That`s it! Nothing more – nothing less. Now you will be able to route traffic, basically, for two networks over singe interface.
Thanks for visit www.it-tutorials.net and keep watching us as we always deliver new tutorials for you!