routing question

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
mikeleahyAsked:
Who is Participating?
 
Don JohnstonConnect With a Mentor InstructorCommented:
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
 
Pete LongTechnical ConsultantCommented:
>>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
 
mikeleahyAuthor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Don JohnstonInstructorCommented:
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
 
mikeleahyAuthor Commented:
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
 
Don JohnstonInstructorCommented:
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
 
mikeleahyAuthor Commented:
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
 
Don JohnstonInstructorCommented:
>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
 
mikeleahyAuthor Commented:
but why would u want to trunk to a router
0
 
Don JohnstonInstructorCommented:
Because you have a layer 2 switch with more than one VLAN that need to be able to communicate with each other.
0
All Courses

From novice to tech pro — start learning today.