What's new

Static route on Dlink RG-WBR-2300

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ekhoo

Occasional Visitor
I've a client with the service provider's router: I've configured the switch (SG300-28PP) to do both DHCP and routing from 2 subnets & VLANs.

On my test router (Cisco RV042G), I've two static routes to enable internet access:
192.168.1.0/24 --> 192.168.1.254 (Switch IP)
192.168.2.0/24 --> 192.168.2.254 (Switch IP)

But I can't do the same on the D-Link. Any ideas?
When I click submit using the provider's router, it says cannot add route on same subnet.

TMWBR.png service provider screen
rv042r.png my RV042G test router
 
Your gateway and destination IP address should not be in the same network. Your metrics maybe should be 1.

I would need a drawing to provide you with the real answer. But static routes should not be directly connected which is what you have.

Are maybe you could list what VLANs are on your SG300-28 switch and what network is the router plugged into.
 
Last edited:
Internet Router is 192.168.1.1

Two VLANS:
VLAN1 : 192.168.1.x , Switch is 192.168.1.254
VLAN2: 192.168.2.x, Switch is 192.168.1.254

Switch has DHCP for both on, giving IPs from 1.100 to 1.200 and 2.100 to 2.200. Default gateway is switch ip address.

Default route on switch is pointing to router 192.168.1.1.

I'm on VLAN1, so I get 192.168.1.101. I cannot get internet access since there's no route back to my IP from the Gateway since it doesn't know that 192.168.1.101 sent that packet to google.com as it comes from the switch .1.254... shouldn't I add a route back to 192.168.1.x on the router?
 
The RV042G screen above has the route back. If I delete those static routes, the PC loses internet connection.
 
Well if the router 192.168.1.1 is plugged into VLAN1 192.168.1.254 then the static route would be 192.168.2.0 gateway 192.168.1.254 metric 1. No static for 192.168.1.0

I am confused as to why you do not get internet from 192.168.1.101 since that is a directly connected network. I think we are missing a piece of info.

The default gateway for the PC 192.168.1.101 is 192.168.1.254. The default route for the switch points to 192.168.1.1 router right?

You don't need a static route for 192.168.1.0 because it is directly connected. So what are we missing? You are using the /24 mask for each network? The router too? If the mask is smaller then the router will never find the switch IP.

Just noticed you mentioned the default route on the switch is pointed to 192.168.1.1 router.
Is the router 192.168.1.1 plugged into an access port in VLAN1 192.168.1.254?

How does the RV042G fit into all this? How is it connected? What is also confusing is the DLink has the 192.168.1.0 network showing and the RV042G has the 192.168.0.0 network showing. Why when you delete 192.168.0.0 on the RV042G does the routing stop when I don't even see that network on the DLink? And vice versa I don't see the 192.168.1.0 network on the RV042G router. The networks on the router and VLAN need to match. If you have a router plugged in with 192.168.0.0 network on the layer 3 switch and then you plug in a router with 192.168.1.0 network into the same port on the layer 3 switch I would not think they are going to work. They are different networks. The layer 3 switch port is defined to a network through the VLAN.


If you are going to change my layer 3 switch setup over to 192.168.1.0 instead of 192.168.0.0.
Then the following would need to be changed.
IP address on switch.
VLAN1 IP address
default VLAN
default route
It should then function the same.

If you have to support this I would want all the layer 3 switches setup the same not different too confusing when working late at night. Mite I suggest changing the DLink router over to 192.168.0.0 network? If you change your network all static IPs will need to change on the clients.
 
Last edited:
Ok, rechecked. - Default route on switch is 192.168.1.1.
192.168.1.x network gets Internet. The RV042 is my test router. Production is the D-link. Both configured as 192.168.1.1 (I'm swapping between them for testing). Like you said, "No static for 192.168.1.0"

The 192.168.2.x network has no internet even on the RV042G now. Added static route 192.168.2.0 Gateway 192.168.1.254 (switch) to router (RV042) but it still doesn't get internet.

Router (RV042) 192.168.1.1 is plugged into Switch 192.168.1.254 (Access Port 1UP on switch).
 
192.168.2.112 Client on VLAN2 can't ping beyond the Router (192.168.0.1)

192.168.1.114 client on VLAN1 can ping beyond, i.e. the Internet facing IP (i.e. 124.13.125.242)

Something either on the router or the switch isn't right.
 
You need an ACL to allow the 192.168.2.0 network out added to the router. I think the router is blocking all IPs except for the 192.168.1.0 network which is defined to the router. Another option might be to change the mask on the router to class B where you use 255.255.0.0. The router then would then let all 192.168.0.0 networks out to the internet.
 
That sounds plausible. Just after I posted above, I dug around and the RV042G has an option called "Multiple Subnets". When I added 192.168.2.1 to the router, Internet works. So instead of adding this IP thingy, perhaps I can check on the ACLs. And then I'll look at the DLink...
 
I have this happen all the time. My Cisco RV320 router does this. My pfSense is this way. No more free ride if you are inside the network.
 
Last edited:
I added on the RV042 LAN 192.168.2.0-192.168.2.255 access to ANY on the WAN side and vice versa - ANY on the WAN side access to 192.168.2.x.
Viola! Internet works!

I tried the same on the DLink RG-WBR2300 and it works too! Hurray!
 
Similar threads
Thread starter Title Forum Replies Date
T Set static IP and hostname for hosts Routers 8

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top