I can’t figure out how to add static route in ros v7. If I will use dhcp-client, it works ok
immediate gateway: 192.168.100.100%ether1
but, if I want to put static ip and adding static route it show
Immediate gateway:unknown
. there is no options to set immediate gateway even in the cli
I am on ros v7.2.3
Sob
May 4, 2022, 12:40pm
2
Unless you’re doing something special, you just set gateway as IP address:
/ip route
add dst-address=192.168.200.0/24 gateway=192.168.100.100
the status says IUSH so meaning invalid, unreachable. Please help how to add static route most specially using cli because I can’t connect winbox to my chr hosted server.
Update:
Does not work on chr hosted server. On ros v6 I only add gateway and it’s done but in ros v7 it’s invalid and unreachable
Yes, but still not working.
Sob
May 4, 2022, 4:50pm
7
In short, no, it’s exactly same in v7 as was in v6. There must be something else. For example, if DHCP client works, it adds not only route, but also address with proper mask, which is needed for gateway to be reachable. Did you add that in your manual config?
I guess I figured it out. The network on ip address should be the same as gateway.
ip add add address=[static ip] network=[gateway] interface=ether1
ip route add gateway=[gateway]
On ros v6, the network on ip addresses will be set to
192.168.100.0
but on ros v7 the network on ip addresses should be the gateway
192.168.100.100
In short, no, it’s exactly same in v7 as was in v6. There must be something else. For example, if DHCP client works, it adds not only route, but also address with proper mask, which is needed for gateway to be reachable. Did you add that in your manual config?
No, sorry, I’ve done so many simulation using virtual machine and this is what I was noticed
I guess I figured it out. The network on ip address should be the same as gateway.
ip add add address=[static ip] network=[gateway] interface=ether1
ip route add gateway=[gateway]
On ros v6, the network on ip addresses will be set to
192.168.100.0
but on ros v7 the network on ip addresses should be the gateway
192.168.100.100
Thank you all for your help btw! I was about to give up and switch to v6 without you all!
Sob
May 4, 2022, 5:01pm
11
Again, no. It’s possible to have gateway address in “network” field of IP address. It’s point to point addressing, but it’s not used that much. And it’s exactly the same in v6 and v7. Most common config is still:
/ip address
add address=<static ip>/<correct mask> interface=ether1
Did you perhaps forget to include mask?
Again, no. It’s possible to have gateway address in “network” field of IP address. It’s point to point addressing, but it’s not used that much. And it’s exactly the same in v6 and v7. Most common config is still:
/ip address
add address=<static ip>/<correct mask> interface=ether1
Did you perhaps forget to include mask?
Yes, I included the mask /32 but still not reachable.
I can easily config on v6 but in v7 I can’t. So I guess there is something changed. Or I don’t know.
Again, no. It’s possible to have gateway address in “network” field of IP address. It’s point to point addressing, but it’s not used that much. And it’s exactly the same in v6 and v7. Most common config is still:
/ip address
add address=<static ip>/<correct mask> interface=ether1
Did you perhaps forget to include mask?
Okay, my bad. Thank you for clarification. My mask is incorrect should be /16 in my case