Solved

Can one router interface have two networks / subnets?

Posted on 2002-04-23
8
153 Views
Last Modified: 2013-12-07

Dear experts,

Would like to ask you guys,
is it possible to have two networks / subnets on one switch / hub connected to ONLY ONE router interface (eth0)?
The router would have routing entries for both networks / subnets.

The example is as below:

    (Network A) PC --|
                     |
                     |--- X (Router C) -- WAN -- X --- Net
                     |eth0
    (Network B) PC --|

Network A and B will need to talk to each other, as well
as outgoing to the WAN. Would the router have two IPs (1 from Network A, and 1 from Network B) for the one interface ? As I understand, normally there is only one network connected to one interface so I am wondering if more than 1 network/subnet can be put per interface.

Please advice if this can be done and why..
Thanks!

0
Comment
Question by:Haho
8 Comments
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
ID: 6964653
Yes, it is possible.  Just assign an IP address from the 2nd network to the eth0 port on the router.

I'm not sure on the maximum number of secondary IP can be assign to an interface.  I believe it would be product specific.

In addition, I believe you need to establish proper routing in the router, so that it knows where to forward the packet to depending on the target network.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6964989
Router C needs an IP from each network, then a network route using this IP, that's all
All PC on network A and B use Router C as default gateway.
0
 
LVL 16

Expert Comment

by:SteveJ
ID: 6965636
samri has given you the correct answer. In the Cisco world you'd simply add a secondary IP address, so the config would look like:

int e0/0
ip address 10.1.1.1 255.255.255.0
ip address 50.1.1.1 255.255.255.0 secondary


Steve
0
 
LVL 15

Expert Comment

by:samri
ID: 6966313
SteveJ:
Just q quick question; I remember somebody told me that there is a limit on Cisco on the number of secondary Ip that you could assign to an interface.

and.  you sounds like somebody I knew...

cheers.
0
New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

 
LVL 16

Expert Comment

by:SteveJ
ID: 6966449
samri;

I've got 5 in addition to the primary on one router interface -- a VXR 7206 running 12.2(5). I run EIGRP and OSPF and I haven't had any problems that I could trace to the multiple IP address setup.

I would guess that the upper limit on IP addresses per interface would have something to do with how buffer space is allocated . . .


Haho;

I didn't include any routing config info because I dont know what routing protocols you are running. If you need more detail, post the router model/maker and which routing protocols you are using.

Good luck.
Steve
0
 
LVL 1

Author Comment

by:Haho
ID: 6970238
steve,

it is basically going to run static routing ...
the other interface is basically a WAN point-to-point link.
no problems is it?

Thanxs
0
 
LVL 1

Expert Comment

by:cheechew
ID: 6971166
Router normally allow you to put many ip on an interface. That seldom people come this limitation that affecting the implementation. Even can have many logical interfaces as well. That is what people doing on the colocation business. The limitation most likely will be the bandwitdh usage available on the interface itself.
0
 
LVL 16

Expert Comment

by:SteveJ
ID: 6971317
Haho,

You'll have no problems.

Good luck.
Steve
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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