Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

routing question

Posted on 2006-11-05
10
Medium Priority
?
199 Views
Last Modified: 2010-04-17
hi
suppose i have two subnets 192.168.1.x and 192.168.2.x   i have a router with the following command on it

router rip
network 192.168.1.0 255.255.255.0
network 192.168.2.0 255.255.255.0

so the router should route between the two subnets. how can the router have an interface in both subnets if it only has one ethernet interface??? am i doing this right??

rgds
mike
0
Comment
Question by:mikeleahy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 57

Expert Comment

by:Pete Long
ID: 17876304
>>how can the router have an interface in both subnets if it only has one ethernet interface???

Just cause it onlt has one Eth Interface doesnt mean is only has one interface - is this a cisco router? if so whats in the WIC Slot?
0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 1500 total points
ID: 17876566
The configuration above does not enable the routing between those two networks. It enables the RIP routing protocol. Or put another way, it makes THIS router able to tell AONTHER router about networks it knows about.

As for how a router can have an interface in two subnet when it only has on interface:

You can assign multiple IP addresses to a single interface using the "secondary" keyword at the end of the address statement.
Or you can create subinterfaces with each having it's own IP address.

 
0
 

Author Comment

by:mikeleahy
ID: 17879630
ok so guys, how do i enable routing between the two subnets . it only has one ethernet interface , it is a cisco router. if a pc in subnet 192.168.2.x wants to talk to a pc in 192.168.1.x, how do i make this happen
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 50

Expert Comment

by:Don Johnston
ID: 17880351
Are these two PC's on the same segment (wire, hub)?

If they are, you can't do it with a single LAN interface router.

Are they in the same location?

If not, you'll need some type of WAN link and another router.

If they're in the same location and on a switch, does the switch support VLANs and trunks?

If so, you can do it by trunking to a router.

Sorry there's no easy answer.
0
 

Author Comment

by:mikeleahy
ID: 17880368
yes, two pcs are in the same location. they would be on the same switch. would it matter if they were on different switches. what is trunking to a router
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 17880400
Trunking is transporting more than one VLAN over a physical link by adding the VLAN ID before sending.

If they were on different switches, then it would still matter if the switch supports VLANs and trunking.

Both PCs at the same location, on the same switch. If the switch doesn't support VLANs then why are they on different IP networks? At any rate, in that situation, apply IP addresses of both networks to the same interface on the router (use the secondary keyword at the end of one of the address statements).

If the PC's are on different VLANs, then we'll need to know if your router/OS supports trunking on an ethernet interface. So we'll need the model and OS version of the router.
0
 

Author Comment

by:mikeleahy
ID: 17880428
oh yeah sorry. i understand that trunking is connecting one or more switches for vlan transporting. but why do u say trunking over a router. your statement

"At any rate, in that situation, apply IP addresses of both networks to the same interface on the router (use the secondary keyword at the end of one of the address statements"

answers my questions. if my router config was roughly

ip routing

interface ethernet 0
ip address 192.168.1.1 255.255.255.0
ip address 192.168.2.1 255.255.255.0 secondary

would that route packets between a host on the 192.168.1.x subnet and 192.168.2.x subnet if the router were configured as the gateway for the pcs
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 17880786
>but why do u say trunking over a router.

Most of the time, trunking is done between switches. Because of that, many people are not aware that you can trunk TO a router.

>would that route packets between a host on the 192.168.1.x subnet and 192.168.2.x subnet if the router were configured as the gateway for the pcs

Correct.
0
 

Author Comment

by:mikeleahy
ID: 17880837
but why would u want to trunk to a router
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 17880885
Because you have a layer 2 switch with more than one VLAN that need to be able to communicate with each other.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Hello , This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router . The following demonstr…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
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…
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…
Suggested Courses

636 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