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 172.20.20.1 255.255.255.0
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 172.20.21.1 255.255.255.0 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.
pls let me know the model #of this cisco router
-thanks
Dave
Not sure if I correctly remember. But, very likely on a 2811
i have got a 1841 cisco router. it have got secondary interfaces. i have tried on packet tracer with same router model “1841” but secondary is not available.
I’ve configured several secondary IP addresses on my 1811, and for some reason only the primary is reachable from the internet. Any advice? They are all on the same subnet, and when doing a trace route on the secondary IPs it times out at the last hop before my router.
Jon M,
It seems like maybe the packets TTL (time to live) is expiring before it gets there. Unless someone has something else, that’s all I could think of.
no answer of my qustion
What are the IP and subnet assigned to the primary and secondary address. Its possible that your secondary IP doesnt have a route to the internet or it doesnt participate on the routing protocol that you use. If that is the case, you need to setup a static route for the secondary IP.
Hi,
Is it possible to Configure same IP Address in the Different interfaces on a Router.
Thanks & Regards,
Robinson A
Hi..
My ISP has given me details below:
IP: xxx.xxx.xxx.xxx
SM: xxx.xxx.xxx.xxx
Gateway: xxx.xxx.xxx.xxx
DNS1: xxx.xxx.xxx.xxx
DNS2: xxx.xxx.xxx.xxx
How can I enter this information on a router interface?
Regards,
What is the effect of having many subnets on a single router interface? Does it affect browsing speed or increase latency?
Hi,
If I use secondary IP of different subnets and in the same interface (e.g Vlan1) I use standby IP (HSRP), may I have conflict?
Regards,
Hi
If you want assign the ip address,subnet Mask and default Gateway
This is IP Address and Subnet Mask
R1(config)#int g 0/1
R1(config-if)#ip address 1.1.1.1 255.0.0.0
R1(config-if)#exit
Defautl Gateway is
R1(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2
or
R1(config)#ip default-gateway 1.1.1.2
Secondary IP is
R1(config)#int G 0/1
R1(congig-if)#ip address 1.1.1.1 255.0.0.0
R1(config-if)#ip address 1.2.1.1 255.0.0.0 secondary
R1(config-if)#ip address 1.3.1.1 255.0.0.0 sedondary
R1(config-if)#ip address 1.4.1.1 255.0.0.0 secedonary
R1(config-if)#n shutdown
R1(config-if)#exit
For Every Network their is a seprate gateway you need to assign,it is depend on your subnet and isp assigned Gateway.
the effect is that you can have the router accessible by multiple subsets. should not change much at all.
if u are trying to trace using the secondary i beleave you need to change the routing table to match the secondary network number. something like
ciscorouter# conf t
ciscorouter(config)# int fa0/1
ciscorouter(config-if)# ip address 192.168.1.1 255.255.255.0
ciscorouter(config-if)# ip address 192.168.2.1 255.255.255.0 sec
ciscorouter(config-if)# exit
ciscorouter(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.1
that should forward traffic properly