Community discussions

MikroTik App
 
User avatar
gazingbazooka
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Mon Feb 10, 2020 7:10 pm
Location: Toronto, Canada

DHCP-Client doesn't pickup IP after cable change

Thu May 07, 2020 5:08 pm

I got a weird issue that's more of an annoyance but I thought it was localized to my crappy modem but that's not the case.

Setup is RB2011, RB3011 and RB750GR3 connected to a modem in bridge mode, this is in separate locations.

In the past I had some Internet speed issues and I tested it by unplugging the Modem from the MikroTik and running a speed test straight up on the Modem to appease my ISP.

The issue was when I plugged the wire back to the MikroTik it didn't pickup the IP automatically from the Modem. I had to reset the modem to get it back on track. I thought it was just me but a similar situation occurred at a friends house with the GR3 and it didn't get the IP either. Different Modem but same MikroTik setup. Is there some setting I'm missing on the DHCP-Client?

Very bare bones here:
/ip dhcp-client
add disabled=no interface=ether1
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19363
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: DHCP-Client doesn't pickup IP after cable change

Thu May 07, 2020 5:59 pm

Can you confirm if the ISP client gets bounded?
In my case with bell fibre, the client works in that the Router gets a new IP address and gateway but it does not automatically get moved to the route rule.
I had to manually get the new gateway and put that in my route rule.

Now I simply do it via a script in the client advanced settings. If ip changes, find new gateway and put that in my route rule.
add default-route-distance=255 dhcp-options=hostname,clientid disabled=no \
interface=vlanbell script=":if (\$bound=1) do={ /ip route set [find commen\
t=\"BellFibre\"] gateway=(\$\"gateway-address\") disabled=no; :log warning\
\_(\"New ISP1 gateway: \".(\$\"gateway-address\")) }" use-peer-dns=no \
use-peer-ntp=no

My cable connection on the other hand works magically everytime there is a change the new ISP and gateway get translated to the route rule automatically.
I have never been able to explain why there is a difference?????????
@mkx sob or sindy ??

/ip dhcp-client
add add-default-route=no comment=defconf dhcp-options=hostname,clientid \
disabled=no interface=Eastlink_eth1 use-peer-dns=no use-peer-ntp=no

Without the vlan script the ip client would look the same as cable.
add add-default-route=no disabled=no interface=vlanbell use-peer-dns=no \
use-peer-ntp=no

The only difference is type of connection belll fibre on a vlan, vice straight cable.
The vlan is attached to the eth-5 interface.

interface ethernet
set [ find default-name=ether5 ] comment=Port5 name=Bell_eth5 speed=100Mbps
set [ find default-name=ether1 ] comment=Port1 name=Eastlink_eth1 speed=\
100Mbps
Last edited by anav on Thu May 07, 2020 6:10 pm, edited 3 times in total.
 
User avatar
gazingbazooka
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Mon Feb 10, 2020 7:10 pm
Location: Toronto, Canada

Re: DHCP-Client doesn't pickup IP after cable change

Thu May 07, 2020 6:05 pm

Thanks. This is running Rogers Ignite. I'll try to spot check that once the internet usage dies down later tonight by pulling the cable.

Shouldn't this happen automagically?

Who is online

Users browsing this forum: gigabyte091 and 66 guests