Cisco 12.1 - add IP address

Have a Cisco router running 12.1 IOS.  It has a leased line coming in and then a LAN interface going into the local network.  It has three different IP addresses and am told by those that be we need to add another IP address to the interface.  This I'm not sure how to do.  Have just taken over the technical doing of things.  Have been to the Cisco web site and read some things, but it's just not too clear to me.  Can login to the router okay and get into enabled area, but whatever I type just doesn't seem to work.

Can someone give the command to add another IP address to an existing interface?

Much appreciated.

Neil.
NeilLoffhagenAsked:
Who is Participating?
 
scampgbCommented:
Glad that it worked :-)

You can split the points - instructions at http://www.experts-exchange.com/help.jsp#hi69
0
 
scampgbCommented:
Hi NeilLoffhagen,

You need to use the "secondary" IP address feature.

For example, in enable mode:
conf t
Int fastethernet 0
ip address 192.168.1.1 255.255.255.0 secondary


That will add another address to the FastEthernet interface.

I hope that this helps - let me know if I can be of any further help.
0
 
scampgbCommented:
NeilLoffhagen,
If that doesn't help - can you please post a copy of the current config (you get that with "show run"), and details of what address need adding?
It would also help if you can explain WHY you need to add another address :-)
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
netspec01Commented:
The mechanics of adding the secondary ip address as explained by scampgb are correct.  Below is some additional information on secondary ip addresses that you need to be aware of.

You need to be wary of using secondary addresses on low-powered routers.  For instance if you have a 1600 or 2500 class router and have multiple ip addresses on the internal ethernet interface this can easily lead to overloading the router and create packet loss.  

The two IP addresses on the single interface create two network definitions.  Traffic sourced from network A designated by primary address) that are destined for a host on network B (designated by the secondary address) must be sent to the router.  This can create quite a load on the router, cause buffer fails and cause performance issues on the LAN as well as the WAN connection.

So, a "best practice" would be to move traffic between local LANs off of the WAN router and to a local layer-3 switch where it can be fast switched rather than routed.  The L3 switch and the router would run a common routing protocol like OSPF or EIGRP or use static routes to direct trafffic.
0
 
NeilLoffhagenAuthor Commented:
Appreciate all  the quick replies.  Thanks.  A question about the secondary ip address.  It may be just my lack of Cisco knowledge, but to me secondary means second?  So asc ikt balready has three IP addresses and I want to add a fourth IP address do I still use:

ip address 192.168.1.1 255.255.255.0 secondary

or would it be something lke

ip address 192.168.1.1 255.255.255.0 fourth ?

That may sound like a really stupid question, but maybe I am :)

Thanks again,

Neil
0
 
scampgbCommented:
Nothing stupid about the question :-)

Yes, you still use the word "secondary".  Please bear in mind Netspec01's points about load on the router though.
0
 
netspec01Commented:
all subsequent addresses after the 1st use the "secondary" key word.
0
 
NeilLoffhagenAuthor Commented:
Okay.  That makes a bit more sense of the Cisco stuff I've been reading, as I couldn't find any reference to what to use for more than two IPs.

So on Monday when I'm back in the office will try this all out.  Understand about the load issue.  I think the aim is to check we still have connectivity with the new IP address and then to remove the old set.  

I guess another question is how to remove the other IPs once we're sure they are not needed?

Apparently this router has been played with over the months and I've been asked to sort it :)  We're also changing the IP range on the whole LAN as well.  Some person decided to use a range of external IP adddreses on the LAN and now we are changing them to be all 10.1.0.0 range.

Thanks again,

Neil.
0
 
netspec01Commented:
to remove ip addresses on an interface

config t
interface fa0/0
no ip address 192.168.1.1 255.255.255.0

Do that for each address you want to remove.  Don't forget to save your config!
0
 
scampgbCommented:
Best of luck :-)

Removing the IP addresses from the Ethernet interface is fairly straightforward.

Do a "show run" - this will show you the commands you have entered to assign the IPs in the first place.  You then put "no" in front of that command.
So, to remove the address that I mentioned earlier, in enable mode:

conf t
Int fastethernet 0
no ip address 192.168.1.1 255.255.255.0 secondary


One thing that's worth pointing out - it's always a good idea to make sure you're connected to the router with a console cable before you start playing around with IP addresses.  It can be very embarrassing to realise that you've just removed the IP address that you're telnetted to :-)
0
 
NeilLoffhagenAuthor Commented:
Thanks everyone.  The command worked fine.  The IP address was added as instructed.  Not sure who to give the points to, as you all gave great information?
0
 
netspec01Commented:
Well just split up te points then.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.