Solved

routing question

Posted on 2006-11-05
10
188 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
  • 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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In a WLAN, anything you broadcast over the air can be intercepted.  By default a wireless network is wide open to all until security is configured. Even when security is configured information can still be intercepted! It is very important that you …
In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
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…

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