Page 1 of 1

change IP, GATEWAY and DNS ADDRESS

Posted: Tue Sep 15, 2009 1:43 pm
by erudite
I have mikrotik 2.9.45 version configure by one engineer who have left the company.It is configure as dhcp, NAT and firewall. We have a change of IP ADDRESS. Pls can somebody help me on how to change it to the new ip , gateway and DNS ?

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Tue Sep 15, 2009 3:37 pm
by SurferTim
Should not be a problem. I use ssh to manage my MT boxes.

/ip address
add address=xx.xx.xx.xx/xx interface=ether1

/ip route add gateway=xx.xx.xx.yy

/ip dns
set primary-dns=zz.zz.zz.zz
set secondary-dns=ww.ww.ww.ww

Replace all with appropriate settings. Remove the old settings once the new ones operate ok.

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Wed Sep 16, 2009 11:37 am
by erudite
Thanks for your reply. If i implement all this command script with the new set of IP paramenter, won't it remove the old IPs ? OR How do I remove the Old onces after implementation. thanks

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Wed Sep 16, 2009 12:07 pm
by SurferTim
Inserting the new ips will not remove anything. The old ips should remain and working until you remove them.
/ip address
print
remove X

Replace X with the line number of the ip you wish to remove. Same with the gateway.

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Wed Sep 16, 2009 12:19 pm
by erudite
Thanks once again. Now inserting the new ips with the old once in place, will it work with the new ip settings without removing the old onces ?

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Wed Sep 16, 2009 12:26 pm
by SurferTim
Yes. It should work with both ips.

ADD: The one it uses is normally determined by the masquerade or srcnat in "/ip firewall nat". If you use the masquerade rule rather than src-nat, the results may be unpredictable until you remove all but one ip from that interface.

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Wed Sep 16, 2009 1:28 pm
by erudite
AM greatful, I will implement this then get back to you later.

Re: change IP, GATEWAY and DNS ADDRESS

Posted: Thu Sep 17, 2009 12:28 pm
by erudite
It works after removing the former gatway IP.
thanks once again.
bye