Community discussions

MikroTik App
 
rebuilder86
just joined
Topic Author
Posts: 18
Joined: Sun Mar 13, 2022 6:56 am

Backup and restore only DHCP LEASE and QUEUE part of config?

Sat Aug 06, 2022 7:50 am

Im about to have an expert come and hard reset my RB3011 because he came last week to configure it with load balancing and failover, and he worked on it for a while then said, "SORRY , IT CANT BE DONE IN THIS STATE, I NEED TO RESTART IT AND HAVE NO DEFAULT CONFIG!"
So he will come and hard reset it again apparently, in order to make the damn thing happy with beign given 2 WAN ports.

So firtsly, is that true?

If so, how do i make it so i dont have to do this god forsaken process again:
I'd have to add a whole bunch of static DHCP server entries for all my customer router mac addresses,
and then, id have to add all the complicated queue rules again.

Last time, i had to just take a screenshot of the setup, because that was the only way to copy the data in any meaningful way. Using the export function creates a damn mess that excel cannot deal with.

IS it possible to just restore / import the DHCP server leases part, and the queues part?
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Backup and restore only DHCP LEASE and QUEUE part of config?

Sun Aug 07, 2022 12:14 am

I'd say that need for reset is probably not exactly true, but sometimes it may be simpler to start from scratch, rather than hunting for forgotten parts of previous config that conflict with something.

As for keeping some of it, except for few things like system user accounts or certificates, export is what you want. Just don't open it in Excel, it's text file with commands, use some plaintext editor. Then you can find e.g. blocks starting with "/ip dhcp-server" (there's more than one with different parts) and import them back by pasting them in Terminal.

Or if you have expert at your disposal, simply tell him to do it. It shouldn't take him more than few minutes.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2855
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Backup and restore only DHCP LEASE and QUEUE part of config?

Sun Aug 07, 2022 12:28 am

I do export configurations with such a script to be able to restore whole configration from binary backup or just parts from the rsc file
/system scheduler
add interval=1d name=ExportConfig on-event=ExportConfig policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=nov/23/2020 start-time=05:58:46
/system script
add dont-require-permissions=no name=ExportConfig owner=teodor policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
    local databiezaca [/system clock get date]\r\
    \n:local dzien [ :pick \$databbiezaca 4 6 ]\r\
    \n:local mies [ :pick \$databbiezaca 0 3 ]\r\
    \n:local rok [ :pick \$databbiezaca 7 11 ]\r\
    \n:local plik \"\"\r\
    \n#:set plik (\"\$[/system identity get name]\".\"_\".\"\$rok\".\"\$mies\"\
    .\"\$dzien\")\r\
    \n:set plik (\"\$[/system identity get name]\")\r\
    \n:log info \"Eksportuje konfiguracje \$plik\"\r\
    \n/export file=\"\$plik\"\r\
    \n/system backup save name=\"\$plik\"\r\
    \n/tool e-mail send to=emailaddresstosendto subject=(\"Konfiguracja \$plik (\$[/\
    system resource get architecture-name]/\$[/system resource get version]) @\
    \_\$[/system clock get date] \$[/system clock get time]\") file=\"\$plik.rsc,\$plik.backup\" \r\
    \n"
/tool e-mail
configure e-mail settings according to your needs
 
rebuilder86
just joined
Topic Author
Posts: 18
Joined: Sun Mar 13, 2022 6:56 am

Re: Backup and restore only DHCP LEASE and QUEUE part of config?

Sun Aug 07, 2022 6:40 am

right!, well, thanks for that,. we did the export but then during the load balancing excercise it became apparant my entire network was going to operate completely differently, now with multiple LANs on multiple ports with no bridge, (apparently thats faster) so no more bridge meant that everyone on the 3,4,5,6,7 etc LAN ports needed to have new LAN IPs, which also meant that i cant run a DHCP server on those ports apparently.

So everything changed and all the queue and DHCP list became invalid anyway lol.
 
AidanAus
Member Candidate
Member Candidate
Posts: 177
Joined: Wed May 08, 2019 7:35 am
Location: Australia
Contact:

Re: Backup and restore only DHCP LEASE and QUEUE part of config?

Mon Aug 08, 2022 10:29 am

right!, well, thanks for that,. we did the export but then during the load balancing excercise it became apparant my entire network was going to operate completely differently, now with multiple LANs on multiple ports with no bridge, (apparently thats faster) so no more bridge meant that everyone on the 3,4,5,6,7 etc LAN ports needed to have new LAN IPs, which also meant that i cant run a DHCP server on those ports apparently.

So everything changed and all the queue and DHCP list became invalid anyway lol.
what are you trying to achieve out of the load balancing?
I dont know how to write this without being rude as I have tried a couple times but from the information you have provided so far I dont think that separating the lans are needed at all and this can either be done jsut through the route table(always want to achieve this if possible) or it will need to hit the firewall/mangle rules and at that point who care what subnet they are on cos you can filter out traffic in either a broad or really specific way.
 
rebuilder86
just joined
Topic Author
Posts: 18
Joined: Sun Mar 13, 2022 6:56 am

Re: Backup and restore only DHCP LEASE and QUEUE part of config?

Sun Aug 14, 2022 7:15 am

so the guy came and did the hard reset and all that, but now everyone is complaning about lag and slow internet. the day after the guy finished, he did say to me, please set up the firewall and security, whcih i have not yet done.

i have no idea how to do that.
I had my brothe rin law log in and look at it, he sent me a screenshot video of the interface menu and the 2 wan ports were up but one of them was randomly showing 0 throughput for brief half second intervals, every 4 or 5 seconds.

So i tol dhim to turn that wan port off, disable in interface, but then apparently it didnt fix it, so he turned it back on.

Now its doing that random 0 kbps throughput on all ports.

Is this some kind of hack where somoene is bringing us donw because i have no firewall?
THere is intense competition where i host this thing, and the culture here is just digusting crab mentallity, i could very much imagine that someone is upset with me doing well and is trying to bring down my network.

COuld this wierd random drop out every 4 seconds be some kind of denial of service attack from within my network becasue i didnt do anything to get the firewall up and running?

Who is online

Users browsing this forum: Google [Bot] and 49 guests