Reset pppoe connection

When RB750 connects to provider, some times it get IP from 10.x.x.x subnet (DHCP).
How can I reset this connection by script to receive another IP?

mmm… dhcp has nothing to do with pppoe… what exactly do you need?..

Not dhcp. I want mikrotik to reestablish pppoe connection to get another IP.

Here is my script:

# Define Global Variables
:global ddnsipmask
:global ddnsip
:global ddnslastip
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }
:global ddnsinterface "pppoe-ByFly"

# Grab the current IP address on that interface.
:global ddnsipmask [ /ip address get [/ip address find interface=$ddnsinterface ] address ]
:global ddnsip [:pick $ddnsipmask 0 ([:len $ddnsipmask]-3) ]

# Did we get an IP address to compare?
:if ([ :typeof $ddnsip ] = nil ) do={
   :log info ("DynDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
# Did we get correct IP?
#  :if ([:pick $ddnsip 0 2] != 93 || [:pick $ddnsip 0 2] != 82) do={   HERE_I_WANT_TO_REESTABLISH_PPPOE_CONNECTION   }
  :if ($ddnsip != $ddnslastip) do={
    :log info "DynDNS: Sending UPDATE! ($ddnsip)"
    :log info [/tool dns-update name=someone.myddns.com address=$ddnsip key-name=key key=pass]
    :global ddnslastip $ddnsip
  }
}
/interface disable pppoe-ByFly
/interface enable pppoe-ByFly

BTW, when does ByFly assign 10/8 addresses?..

For example, logs from changeip.com:

6/23/2010 1:40:05 AM D:1 R:1 S:1 Success ip=93.84.185.56&hostname=x.myddns.com 93.84.185.56 x Mikrotik/3.x
6/22/2010 1:30:03 PM D:0 R:1 S:1 Success ip=10.0.5.147&hostname=x.myddns.com 93.84.184.0 x Mikrotik/3.x
6/22/2010 4:30:02 AM D:1 R:1 S:1 Success ip=93.84.186.199&hostname=x.myddns.com 93.84.186.199 x Mikrotik/3.x

omg, they’re crazy %)

Hi,
I have the same problem, inaccessible subnet. You could find a solution ?



if you have the same problem - then use the same solution!
http://forum.mikrotik.com/t/reset-pppoe-connection/38693/4