Community discussions

MikroTik App
 
User avatar
skatsman
just joined
Topic Author
Posts: 3
Joined: Wed Sep 16, 2020 9:23 pm

RB3011 Re-plugging WAN losing INTERNET

Wed Sep 30, 2020 3:25 am

Sorry for the noob question.

When I unplug WAN cable and plug it back in, the link is up but I never get the INTERNET connection until I disable/enable WAN port or renew the IP lease. Is this my configuration or something else?

I have a very basic setup.

RB3011UiAS
WAN on ether1

DHCP client:
/ip dhcp-client option
set clientid_duid code=61 name=clientid_duid value="0xff\$(CLIENT_DUID)"
set clientid code=61 name=clientid value="0x01\$(CLIENT_MAC)"
set hostname code=12 name=hostname value="\$(HOSTNAME)"
/ip dhcp-client
add add-default-route=yes default-route-distance=1 dhcp-options=hostname,clientid disabled=no interface=ether1 use-peer-dns=no use-peer-ntp=no

When I unplug WAN cable and plug it back in I see:
sep/29 18:02:28 interface,info ether1 link down 
sep/29 18:02:39 interface,info ether1 link up (speed 1G, full duplex) 
sep/29 18:02:39 interface,info ether1 detect UNKNOWN 
sep/29 18:02:45 interface,info ether1 detect WAN 

but INTERNET is still unreachable unless I release the lease explicitly:
/ip dhcp-client release numbers=0

and only then I see:
sep/29 18:06:16 dhcp,info dhcp-client on ether1 lost IP address xxx.x.xx.xxx - lease stopped locally 
sep/29 18:06:16 dhcp,info dhcp-client on ether1 got IP address xxx.x.xx.xxx 
sep/29 18:06:17 interface,info ether1 detect INTERNET 

Is this a normal behaivour? What am I missing?

My workaround so far was to run netwatcher to monitor WAN connection and renew the lease when link is down but I have a feeling I don't have to do this.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: RB3011 Re-plugging WAN losing INTERNET

Fri Oct 02, 2020 6:55 pm

suspect the problem is with detect internet configs, I usually disable this by:
/int detect-internet set detect-interface-list=none lan-interface-list=none wan-interface-list=none internet-interface-list=none
 
User avatar
skatsman
just joined
Topic Author
Posts: 3
Joined: Wed Sep 16, 2020 9:23 pm

Re: RB3011 Re-plugging WAN losing INTERNET

Sat Oct 03, 2020 12:08 am

Thanks, CZFan, I'll give it a try.

I noticed that dynamic entries (WAN port IP and default route) are cleared every time ether1 link is down.

For now, I just removed DHCP client and directly configured WAN port address and the default route. Now my internet connection survives modem reboots.
 
User avatar
skatsman
just joined
Topic Author
Posts: 3
Joined: Wed Sep 16, 2020 9:23 pm

Re: RB3011 Re-plugging WAN losing INTERNET

Sun Oct 04, 2020 1:13 am

I did some experimenting with different configuration combinations and replugging the wan cable:
| configuration  | detect-internet  |  Internet works?  |
| :------------- | :--------------: | ----------------: |
| dynamic        | on               | no                |
| dynamic        | off              | no                |
| static         | on               | yes               |
| static         | off              | no                |
Where:
  • dynamic configuration - dhcp client enabled
  • static configuration - dhcp client disabled, wan port address provided, default route provided
  • detect-interent - on: detect-interface-list=WAN lan-interface-list=LAN wan-interface-list=WAN internet-interface-list=WAN, off: all above set to none
  • internet works? - no: link is up but gateway is not pingable, no internet, yes: everything is working fine
I'm still puzzled about the detect-internet feature, what it is for, and why it has an effect on reestablishing the internet connection. Most importantly, if I have detect-internet off I don't have the internet at all.

Who is online

Users browsing this forum: Amazon [Bot], nescafe2002 and 30 guests