Community discussions

MikroTik App
 
aniecki
just joined
Topic Author
Posts: 19
Joined: Fri Jul 29, 2016 10:02 pm

Last octet bit of of IP address

Sat Apr 03, 2021 8:49 pm

Hi guys,

The default IP to access the MT router is 192.162.88.1, - is there a way to change it to, say, 192.162.88.2, or even 192.168.88.254.

I understand that it cannot be 192.162.88.0 as this is the network. But why network must end with zero, don't know. It must be that way, apparently. The last octet bit is always zero for a network..

One last point, how a gateway (needed for the DHCP server) is related to the router's IP? Will it be the same? As I expect it is...

Thanks.



Then if I
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Last octet bit of of IP address

Sat Apr 03, 2021 9:05 pm

If you select a larger network like 192.168.80.0/20, you will have a network that covers from 192.168.80.0 to 192.168.95.255 (Some more than 4000 IP large network), you can set 192.168.88.0 as an valid IP on your router.

Normally IP is set on the bridge interface that is used on the inside. You can select any valid IP within the subnet you have selected for an IP to your router. So if you have a network like 192.168.88.0/24, you can set 192.168.88.1 to 192.168.88.254 for your router. You have to ta care that DHCP does not give out that IP to another device.
 
aniecki
just joined
Topic Author
Posts: 19
Joined: Fri Jul 29, 2016 10:02 pm

Re: Last octet bit of of IP address

Sat Apr 03, 2021 10:05 pm

Thanks for the info. This nicely explains the second part.

Then still, the router's IP (gateway IP?) - is there a way to change it, not to end as 1, but 2 (say 192.162.88.2) .
Or is this per "some" default, the first host address from the network is assigned to the router?

Ta.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Last octet bit of of IP address

Sat Apr 03, 2021 10:23 pm

You can change it from command line with a command some like this:
/ip address set [find where address~"192.168.88.1"] address=192.168.88.2/24
Or in Winbox
IP->Address-><open current ip>Change address to new, then OK
Remember that you will loose ssh/winbox connection and you need to connect to new IP.
 
aniecki
just joined
Topic Author
Posts: 19
Joined: Fri Jul 29, 2016 10:02 pm

Re: Last octet bit of of IP address

Sat Apr 03, 2021 10:52 pm

Excellent, thanks again!

That is the info I wanted... just in time to start Easter.

Cheers!
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2984
Joined: Mon Apr 08, 2019 1:16 am

Re: Last octet bit of of IP address

Sun Apr 04, 2021 3:21 pm

Some Eastern thinking ....

- Your remark on the zero value for the network, was correct (a long time ago). This was correct for a class C network in the 1980's , when Unix computers used the null address (000) for broadcast, where others used 255 as broadcast. The Unix variant disappeared and the null value became a usable unicast address. Since CIDR we dropped the A/B/C address classes, and made supersets and subsets of the class C , to better use the available IPv4 addresses. So the last octet bit of an IP address is not always zero/null for the network start. https://www.cisco.com/c/en/us/support/d ... 788-3.html

- For changing the IP address on the MT router, one can always add multiple addresses (in most cases IP address to the bridge). When connected via the new address, and after changing the DHCP server "networks" information for the new address for the Gateway, one can safely remove the 192.168.88.1 from the address list.

Who is online

Users browsing this forum: BioMax, GoogleOther [Bot], massinia and 30 guests