Solved

Cisco 12.1 - add IP address

Posted on 2004-09-18
12
227 Views
Last Modified: 2010-04-10
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.
0
Comment
Question by:NeilLoffhagen
  • 5
  • 4
  • 3
12 Comments
 
LVL 15

Expert Comment

by:scampgb
ID: 12091739
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
 
LVL 15

Expert Comment

by:scampgb
ID: 12091753
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
 
LVL 5

Expert Comment

by:netspec01
ID: 12091910
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:NeilLoffhagen
ID: 12091966
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
 
LVL 15

Expert Comment

by:scampgb
ID: 12091988
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
 
LVL 5

Expert Comment

by:netspec01
ID: 12091989
all subsequent addresses after the 1st use the "secondary" key word.
0
 

Author Comment

by:NeilLoffhagen
ID: 12092045
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
 
LVL 5

Expert Comment

by:netspec01
ID: 12092063
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
 
LVL 15

Expert Comment

by:scampgb
ID: 12092065
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
 

Author Comment

by:NeilLoffhagen
ID: 12123962
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
 
LVL 5

Assisted Solution

by:netspec01
netspec01 earned 250 total points
ID: 12124596
Well just split up te points then.
0
 
LVL 15

Accepted Solution

by:
scampgb earned 250 total points
ID: 12125004
Glad that it worked :-)

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
QoS for Voip 7 39
Connect two buildings 6 35
Port not opening complex Huwaei Router - Sonicwall - Airport extreme 32 35
FreeRADIUS vs Windows NPS (server 2016) 2 20
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question