Solved

Cisco 12.1 - add IP address

Posted on 2004-09-18
12
225 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
 

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hi there, This article summarizes what you need if you are going to set up your home or small business Network Attached Storage (NAS) to be accessible from the internet. Of course there are configuration differences based on your NAS or router ma…
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now