Solved

Cisco 3620 e0/0 Second IP

Posted on 2004-09-02
21
496 Views
Last Modified: 2008-02-01
I wish to add a second IP address to my E0/0 card. Can this be done?  I tried to add it to a sub interface e0/0.1 but it gives me an error about a vlan needing to be configured.  The router is a Cisco 3620.

Thank you
0
Comment
Question by:NTGuru705
  • 8
  • 7
  • 2
  • +1
21 Comments
 
LVL 4

Expert Comment

by:JonSh
ID: 11969778
Yep, you use the IP ADDRESS address mask SECONDARY command, and here it is, excerpted from Cisco's site:

Assigning Multiple IP Addresses to Network Interfaces
Cisco IOS software supports multiple IP addresses per interface. You can specify an unlimited number of secondary addresses. Secondary IP addresses can be used in a variety of situations. The following are the most common applications:

•There might not be enough host addresses for a particular network segment. For example, suppose your subnetting allows up to 254 hosts per logical subnet, but on one physical subnet you must have 300 host addresses. Using secondary IP addresses on the routers or access servers allows you to have two logical subnets using one physical subnet.

•Many older networks were built using Level 2 bridges, and were not subnetted. The judicious use of secondary addresses can aid in the transition to a subnetted, router-based network. Routers on an older, bridged segment can easily be made aware that many subnets are on that segment.

•Two subnets of a single network might otherwise be separated by another network. You can create a single network from subnets that are physically separated by another network by using a secondary address. In these instances, the first network is extended, or layered on top of the second network. Note that a subnet cannot appear on more than one active interface of the router at a time.



--------------------------------------------------------------------------------

Note If any router on a network segment uses a secondary address, all other routers on that same segment must also use a secondary address from the same network or subnet.


--------------------------------------------------------------------------------


To assign multiple IP addresses to network interfaces, use the following command in interface configuration mode:


 Command  Purpose  
Router(config-if)# ip address ip-address mask secondary
 Assigns multiple IP addresses to network interfaces.
 






--------------------------------------------------------------------------------

Note IP routing protocols sometimes treat secondary addresses differently when sending routing updates. See the description of IP split horizon in the "Configuring IP Enhanced IGRP," "Configuring IGRP," or "Configuring RIP" chapters for details.


--------------------------------------------------------------------------------


See the " Creating a Network from Separated Subnets Example" section at the end of this chapter for an example of creating a network from separated subnets.

0
 
LVL 3

Expert Comment

by:Felix2000
ID: 11970231
JonSH is correct in that you need to use the ip address <ip> <mask> secondary command.
I think your inital mistake is your trying to subnet the interface like a serial link.  I don't believe the IOS allows you to subinterface a regular Ethernet link like a serial link, except when using it as a trunk port for multiple vlans.

So you would just do

config term
interface e0/0
ip address <ip> <mask>    (this would be for your first ip)
ip address <ip> <mask> secondary (second ip)
end

-=[ Felix ]=-
0
 
LVL 11

Expert Comment

by:PennGwyn
ID: 11981332
Sub interfaces and secondary addresses each address specific kinds of issues.

Since you weren't clear on the difference, it may be that a secondary address is not the solution to the original problem.  WHY do you wish to assign a second address?  What are you hoping to achieve by that route?

0
 
LVL 4

Expert Comment

by:JonSh
ID: 11981611
PennGwyn raises an interesting point.  

Secondary IP addresses are used to run two completely separate brodcast domains (different IP networks) on the same ethernet

Subinterfaces are putting different VLANS on the same interface as a TRUNKED port, which is almost the same thing except it would have to be connected to a port on a switch that is also TRUNKED and has the same VLAN definitions (or a router with a TPMIM card installed, etc).  

I'm assuming since it's a 3620 and no switch was mentioned, you want a secondary IP, not vlans on a sub-int.

0
 
LVL 1

Author Comment

by:NTGuru705
ID: 11982723
THank you all for the input.. for some reason I was just alerted that posts had been made.. excuse my delay.

To make a long stroy short there are two subnets on the ethernet interface of the 3620... there is one host in the second subnet... and a router.. it is for a specific task basically routing traffic from one machine across a frame relay link... I need to setup a route to this second router but since it is not in the same subnet I need an ip address in that subnet to route the traffic across.. since I only have one ethernet card in the router I just want to attach a second Ip to the ethernet interface and then statically define the route... can I use the secondary for this?

Thnks
0
 
LVL 4

Expert Comment

by:JonSh
ID: 11984061
Yeah, I think you can.  You might have to add the route manually tho.  I'm not sure a secondary will get picked up for the routing table.

0
 
LVL 3

Expert Comment

by:Felix2000
ID: 11985684
It should show up as a connected interface in your routing table.
show ip route
will show you the routing table.
If it is just a few hosts you should be fine with adding a secondary ip.  Though from a security perspective you would not be isolating this box off from the other segment since they would be on the same switch and broadcast domain.

-= Felix |=-
0
 
LVL 1

Author Comment

by:NTGuru705
ID: 11986868
Got it thank you all for your help... any ideas on how many "secondary" ip addresses you can add to a single interface?
0
 
LVL 4

Expert Comment

by:JonSh
ID: 11986880
Hmm...I've never seen an upper limit.....on the other hand, if you really need a lot, I suggest you might need to reexamine your addressing design...
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Author Comment

by:NTGuru705
ID: 11986882
yes I understand I was just asking the question.

Thakns
0
 
LVL 11

Expert Comment

by:PennGwyn
ID: 11998926
Make sure you have "no ip redirects" set on the E0/0 interface.  It knows that both the server and the other router are on the same physical segment, but neither of them has any way to know it.

A second port, either on the 3620 or (better!) the server, would be a better option, but would cost some money.

I've seen legacy networks brought into a router port with a dozen secondary interfaces.  I don't recommend this (I didn't create that mess), but it can be done....

0
 
LVL 1

Author Comment

by:NTGuru705
ID: 12237804
Interestingly enough.. I finally had a chance to work on this..
I got the ip added to the eo/o as a secondary...  the subnet was 255.255.255.248 the primary ip subnet is 255.255.255.0 (dont think that should matter)  but when I added it I was able to ping the ip that I just added from telnet session but I was not able to ping another ip in the 248 subnet which I am sure is on the same physical subnet.. any ideas why?

Thanks
0
 
LVL 4

Expert Comment

by:JonSh
ID: 12238841
because the router doesn't echo packets out the same interface as though they were routed.  No one-armed routers :)

0
 
LVL 1

Author Comment

by:NTGuru705
ID: 12239030
What?

I could not ping the host on the same subnet...

Here is what I am trying to do..

I have two ip subnets on the same physical subnet.  The second has only two ips in it.. one is the address for the router and the other is the address of another host in the same physical subnet.. I need to pass traffic through the one E0/0 for both ip subnets.. can this be done?
0
 
LVL 4

Expert Comment

by:JonSh
ID: 12239136
A qualified yes.  I don't think you can pass traffic from one subnet to the next on the same physical interface asyou have it set up with secondary IP. Essentially you are trying to make a one-armed router.  By definition a router either drops a packet or routes it out a new port.  it doesn't echo the packet back to its source physical network.



0
 
LVL 1

Author Comment

by:NTGuru705
ID: 12240805
even if the logical subnet is different...

Primary IP 10.1.1.1 255.255.255.0
Secondary 10.2.1.1 255.255.255.248

Cant route from the .2 to the .1 and back and forth?
0
 
LVL 4

Accepted Solution

by:
JonSh earned 125 total points
ID: 12242951
nope, even if.  Sorry, not what ya want to hear, is it?
0
 
LVL 1

Author Comment

by:NTGuru705
ID: 12593246
Earlier JonSh you said

•There might not be enough host addresses for a particular network segment. For example, suppose your subnetting allows up to 254 hosts per logical subnet, but on one physical subnet you must have 300 host addresses. Using secondary IP addresses on the routers or access servers allows you to have two logical subnets using one physical subnet.

How would you route between the two subnets if you cant echo packets back out?  Because when your machine sees that the requested ip is not in its subnet it is going to the next hop... and if the request is in the second subnet which you placed on that same e0 then it will need to echo.. right?

Thanks...
0
 
LVL 4

Expert Comment

by:JonSh
ID: 12598188
Yep - We call it a "One-armed router" and we try to avoid it as often as possible.  You should be able to do it with your Cisco 3620 and IOS, but be careful; it becomes easy to swamp the router when a lot of traffic is crossing that single arm.  Me, I'd buy some extra routers (cheap ones) and build some segmenttion :)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
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…
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…

746 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

11 Experts available now in Live!

Get 1:1 Help Now