Add a static route to a second gateway for WS-6

greg
Member
 
Posts: 3
Joined: Mon Oct 15, 2018 4:03 am
Has thanked: 1 time
Been thanked: 0 time

Add a static route to a second gateway for WS-6

Wed Oct 17, 2018 6:30 pm

Is it possible to add a static route to the switch so that it can be managed by a network that isn't through the default gateway? Alternatively, can a routing protocol (OSPF?) be enabled?

The default gateway is setup to be internet facing, whereas the management network is downstream. ICMP redirects don't seem to be enabled (probably a good thing) and the default gateway (which is over a point-to-point wireless link) is down, the redirect wouldn't be available anyway.

User avatar
mike99
Associate
Associate
 
Posts: 837
Joined: Tue Nov 25, 2014 10:53 am
Location: Quebec, Canada
Has thanked: 95 times
Been thanked: 245 times

Re: Add a static route to a second gateway for WS-6

Wed Oct 17, 2018 9:56 pm

It's a layer 2 device so no route except default gateway. I think they want to avoid routing through cpu even if you only have to set sysctl ip.forwarding value to 0 to avoid this.

Next gen will support static route. I already ask if it could be possible to add a modified version of FRRouting that would write route to the API of the vitesse ASIC instead of linux FIB but I doubt it will happen even if it would be a really cool option.

greg
Member
 
Posts: 3
Joined: Mon Oct 15, 2018 4:03 am
Has thanked: 1 time
Been thanked: 0 time

Re: Add a static route to a second gateway for WS-6

Thu Oct 18, 2018 12:51 am

Thanks for the response, but to clarify...

I'm not wanting to turn the device into a router (forwarding packets at layer 3 between interfaces). This is only about the management interface and setting the next hop address for traffic from the management interface.

If I open a command line then I can view the IPv4 routing table:

admin@Netonix_Switch:/www# ip r
10.20.0.0/24 dev eth0 src 10.20.0.15
default via 10.20.0.1 dev eth0

It shows the connected network and a default route. With this I can't ping the device from the downstream networks. If I then add another route, then I can ping the device from the management networks:

admin@Netonix_Switch:/www# ip route add 10.20.0.0/16 via 10.20.0.2

Is it possible to have this additional route stored somewhere in the configuration (as I expect it will be lost upon power cycle)?

User avatar
mike99
Associate
Associate
 
Posts: 837
Joined: Tue Nov 25, 2014 10:53 am
Location: Quebec, Canada
Has thanked: 95 times
Been thanked: 245 times

Re: Add a static route to a second gateway for WS-6

Fri Oct 19, 2018 12:06 pm

No, you currently can't do it persistent, only via linux CLI with iproute2. Maybe a boot custom script but I'm not aware of a way to do it on netonix.

Maybe a vlan up to your second management and do it through same subnet ?

greg
Member
 
Posts: 3
Joined: Mon Oct 15, 2018 4:03 am
Has thanked: 1 time
Been thanked: 0 time

Re: Add a static route to a second gateway for WS-6

Fri Oct 19, 2018 3:21 pm

I was getting towards the same point of writing a custom rc script. This would no doubt be lost upon upgrade, but I could live with that for now. The firmware (v1.4.9) appears to be openwrt v8.09 with a linux 2.6.26.8 kernel. The switch is being used, so doing development/testing on it is a problem.

I'm assuming changes to the filesystem with be persisted in /jffs by the mini_fo filesystem.

I've added the following script '/etc/init.d/networkstaticroute' with a couple of static routes hard coded:

Code: Select all
 #!/bin/sh /etc/rc.common

START=41
STOP=41

boot() {
 ip route add 10.20.0.0/16 via 10.20.0.2
 ip route add fd0c:898b:471c::/48 via fd0c:898b:471c::2
}

start() {
 echo Nothing to start
}

stop() {
 echo Nothing to stop
}



Then I enabled it with:

Code: Select all
 /etc/init.d/networkstaticroute enable

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 19 guests