Monday, March 1, 2010

Configure Multiple IP Address on a Cisco Router Interface

Original source from here

Cisco IOS supports multiple IP Addresses on an interface. There will be one Primary IP Address on the interaface and multiple Secondary IP Addresses on the interface. There is no limit on the number of IP Addresses that can be configure on an interface. Configurng multiple IP Addresses on your cisco routers can sometime help where you have multiple subnets having one physical router interface.

The IP Addresses can be from different subnets and from different networks.

To configure multiple IP Addresses,

Configure primary IP Address

From the Interface configuration mode, configure the primary IP Address

ciscorouter# conf term
ciscorouter(config)# int fa0/0
ciscorouter(config-if)# ip address
That configures the primary IP Address.

Configure Secondary IP Address

Now, add the required secondary IP Addresses onto the same interface

ciscorouter(config-if)# ip address secondary
This adds the additional IP Address onto the interface. In the command above, the keyword "secondary" at the end defines the additional IP Address as a secondary IP Address.

How the Routing should be then?

Original source from here


The easiest way to configure multiple routes on the same interface is to use the secondary IP command.

How do I add a static route into my Cisco router?
- Pretty simple
router# config t ; get into the configuration mode
router(config)# ip route A.B.C.D (destination network/host) A.B.C.D (mask) A.B.C.D (next hop); this is a simple static route

Example: -->>

Router 1
interface serial 0
ip address
ip address secondary ! second route on same interface

interface serial 1
ip address
ip address secondary

ip route; goes to serial 0
ip route; goes to serial 0
ip route; goes to serial 1

1 comment:

  1. The secondary ip address in this example do nothing. Both are members of the same subnet.They have no affect on the routing. What were you trying to show?