cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
301
Views
0
Helpful
4
Replies

InterVLAN routing

b.go
Level 1
Level 1

Hi all,

I have following network diagram,

Router1(2651XM)

|

switch1(2950) -- VLAN1

|

VLAN2 -- router2 (pc) -- LAN3

Router1 and switch1 are configured as router on a stick config (with VLAN1 & VLAN2). Another PC(acts like router2 to LAN3) is being added.

A static route has been added in router1, so router1 is able to ping to LAN3.

VLAN2 to LAN3 is able to ping each other. But VLAN1 clients are not able to see LAN3. Traceroute result from VLAN1 client only shows path till router2 address.

1. Is the reply from LAN3 being blocked by VLAN1 ?

Any helps and ideas will be greatly appreciated. Thank you.

Best regards,

b.go

1 Accepted Solution

Accepted Solutions

konigl
Level 7
Level 7

Your Router2 (PC) needs a static route to VLAN1 that points to the VLAN2 IP address of Router1 (2651XM) as the next hop.

Router1 was able to ping LAN3 because its interface on VLAN2 initiated the ping, and Router2 knew how to reply to that VLAN2 address since it also connects to VLAN2. Routers always know how to send routed traffic to networks they are connected to. It's the indirectly connected ones that they have trouble with; that's where static routes and routing protocols come in.

If your Router2 is a Microsoft Windows server with two network interface cards, then you can run the following from a command prompt (assuming VLAN1 is 192.168.1.0, VLAN2 is 192.168.2.0, and VLAN3 is 192.168.3.0, with all subnets using mask 255.255.255.0):

route -p add 192.168.1.0 mask 255.255.255.0 192.168.2.1 metric 1

where 192.168.2.1 is the IP address of Router1's VLAN2 interface. Then, whenever Router2 has traffic destined for VLAN1, first it will decide that it needs to send that traffic to Router1, then it will use its VLAN2 interface (let's call it 192.168.2.2) to get it there.

Hope this helps.

View solution in original post

4 Replies 4

konigl
Level 7
Level 7

Your Router2 (PC) needs a static route to VLAN1 that points to the VLAN2 IP address of Router1 (2651XM) as the next hop.

Router1 was able to ping LAN3 because its interface on VLAN2 initiated the ping, and Router2 knew how to reply to that VLAN2 address since it also connects to VLAN2. Routers always know how to send routed traffic to networks they are connected to. It's the indirectly connected ones that they have trouble with; that's where static routes and routing protocols come in.

If your Router2 is a Microsoft Windows server with two network interface cards, then you can run the following from a command prompt (assuming VLAN1 is 192.168.1.0, VLAN2 is 192.168.2.0, and VLAN3 is 192.168.3.0, with all subnets using mask 255.255.255.0):

route -p add 192.168.1.0 mask 255.255.255.0 192.168.2.1 metric 1

where 192.168.2.1 is the IP address of Router1's VLAN2 interface. Then, whenever Router2 has traffic destined for VLAN1, first it will decide that it needs to send that traffic to Router1, then it will use its VLAN2 interface (let's call it 192.168.2.2) to get it there.

Hope this helps.

Hi, you're right, it works. Many thanks for your helps.

But I have another question here. The router2(pc) has already had default gateway to 192.168.2.1, so I always assume that any path which is not in its routing table will be forwarded through 192.168.2.1.

Before I add the 192.168.1.0 route to router2, does router2 forward any unknown routes(incl. 192.168.1.0) to 192.168.2.1 ?

Thank you for your helps.

Best regards,

b.go

If Router2 has a route pattern of 0.0.0.0 mask 0.0.0.0 pointing to next hop 192.168.2.1, then traffic destined for any address that did not have a more explicit route pattern in the table will ultimately be sent to 192.168.2.1, the "gateway of last resort", for further handling.

If you have this 0.0.0.0/0 route pattern as well as route patterns for the directly connected interfaces, then you should not need a more specific static route to reach the 192.168.1.0/24 subnet. It does not hurt to have the 192.168.1.0 pattern in there; but it should work without it, in the network design you have described. I would be concerned if it does NOT work without it.

Have you thought about enabling a routing protocol such as RIP on the routers? This would take care of filling in the route tables for you, with regard to your VLAN subnets. You can keep the 0.0.0.0 static route on Router2 as a backup route to the ones learned through RIP. Just remember that RIP version 1 doesn't include mask information, only version 2 does. If you need mask info and Router2 can't do RIPv2 then your only recourse is static and default routes, as we have been discussing.

Hope this helps.

Hi, you're right. Routing protocols should handle this always changing network. Static and default routes are my only option here, since I am not very familiar with NT4.0 routing protocols features.

Thank you very much for this great discussion and the assistance.

Best regards,

b.go

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: