Good day!
I’ve tried to create default route.
/ip route add dst-address=0.0.0.0/0 gateway=ether1 disabled=no
try to ping…
/ping 8.8.8.8
But ping won’t go with timeout message.
When I try to ping nexthop - no lost packets.
When I create new default route with gateway’s ip address, no loss.
/ip route add dst-address=0.0.0.0/0 gateway=172.16.0.1%ether1 disabled=no
Why I can’t use the interface name as gateway? Please advice!
Allmost forgot… I receive ip address by dhcp.
gateway=interface works only for ppp interface, it is not going to work on Ethernet interface, IP address is required for it.
It’s a pity
Thank you for reply! Your answer was very helpful!
I asked almost the exact same question.
Thanks for the answer.
{TLDR Version: This only works if the next hop provides proxy arp.}
When you say “use interface X” as the next hop, you’re saying “dump it on this interface, and something will take care of it for you.”
For PPP, tunnels, PVCs, or any non-multi-access type of interface, there’s only you and “the other end” - so this makes sense.
If you pour orange juice into a hose, you expect it to come out the other end, wherever that may be.
When the interface is multi-access like “ether1” or “bridge1” or something like that, it would be like saying “the next hop is the kitchen” but not which door in the kitchen to leave through… so you’d just be pouring orange juice on the floor of the kitchen. Essentially, an ethernet interface needs to know what MAC address to send the packet to. “Just dump it here” doesn’t really make sense. This is true even if there’s no switch between your router and the gateway router; the ethernet protocol doesn’t know this.
However, some routers will let you use this syntax - and will just ARP for the destination IP address (-not- the next hop IP because you didn’t specify any next hop IP). If the default gateway router has proxy-arp enabled, then it might proxy reply to your arp for 8.8.8.8. Your router would get 8.8.8.8 added to its ARP cache on ether1, and then send the packet along its way.
Thanks a lot! For very detailed answer!!!
ZeroByte, one question regarding interface routes for a current routing problem (no BGP):
Provider-Router on ether1: a.a.a.249/30, our address a.a.a.250/30. provider is “dumping” all packets for our PI address-space b.b.b.b/24 on its ether1, too.
Our router (no miktrotik): ether1 a.a.a.a/250, b.b.b.1/24 ether2, c.c.c.254/24 ether3(LAN)
Current config (no mikrotik):
- default route on our router to a.a.a.249
- dst-nat specific dst-adresses (b.b.b.b) on ether1 to specific addresses c.c.c.c on ether3 (dst-nat from PI adress space to some internal servers)
- dst-nat all the rest with dst b.b.b.b/24 to ether2 (1:1 nat), servers with exposed web services (kind of DMZ)
see attached graphic.
Currently I’ve three problems:
- performance lack (our router is also serving some ipsec tunnels)
- I dont’ know any better way to do.
- How to do it better on RouterOS (6.44, RB4011)
any idea or help appreciated.
Ralf.
There are exceptions for IPv6 and IPv6 based on subnet size; for example:
- 8.8.4.4/32
- 2001:4860:4860::8844/128
are effectively point-to-point links and gateway=interface works. Real subnets (prefix length <32 or <128) require an address.
Default IPv6 firewall rule impacts recent Comcast Xfinity change.
http://forum.mikrotik.com/t/xfinity-comcast-dhcpv6-configuration-change/156031/7 is worth reading.
Default setup for Router Advertisements and Forwarding interact and affect default gateway acquisition.
http://forum.mikrotik.com/t/possible-bug-with-dhcpv6-in-routeros-7-8/164906/1 is worth reading.