Community discussions

MikroTik App
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Immediate gateway: unknown

Wed May 04, 2022 10:16 am

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
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Immediate gateway: unknown

Wed May 04, 2022 3:40 pm

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
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 7:02 pm

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Immediate gateway: unknown

Wed May 04, 2022 7:04 pm

Those is a cli command...
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 7:24 pm

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
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 7:25 pm

Those is a cli command...
Yes, but still not working.
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Immediate gateway: unknown

Wed May 04, 2022 7:50 pm

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?
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 7:52 pm

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
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 7:54 pm

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
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 7:56 pm

Thank you all for your help btw! I was about to give up and switch to v6 without you all!
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Immediate gateway: unknown  [SOLVED]

Wed May 04, 2022 8:01 pm

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?
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 8:10 pm

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.
 
rexsllemel
just joined
Topic Author
Posts: 13
Joined: Mon Mar 18, 2019 7:41 am

Re: Immediate gateway: unknown

Wed May 04, 2022 8:14 pm

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 :lol: should be /16 in my case

Who is online

Users browsing this forum: aoravent, mtest001, phascogale, Soleous75 and 78 guests