Solved

routing question

Posted on 2006-11-05
10
193 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 500 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
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

695 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