Community discussions

MikroTik App
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Feature request: more parameters with static IP on interface

Wed Mar 04, 2009 5:54 pm

When I am setting static IP for some interface I am used to set IP, network mask, gateway and DNS.

Mikrotik does not allow that. One may just set IP, netowrk mask, network address and broadcast adress.

First, I do not understand what is the point of entering network address and broadcast address as they are fixed by setting network mask. not once that caused me a problem because when changing IP or mask, i forgot to sync network and broadcast addresses (which are totally redundant) and I got nonfunctional setup. Such errors are very hard to find.

Second, why we cannot set gateway and DNS for such interface, but we must separately set static route and set DNS in DNS option? Isn't it logical that these information are kept with interface as they define connection through that interface and that MT sets other stuff according to these information? If we could set gateway and DNS for interface then it would be more obvious with less space for errors.

On the contrary to this, if one sets DHCP client it of course gathers all these information from DNS and sets MT DNS and routing accordingly, which is obvious and expected. What I ask is just let us enter there data on the interface settings and the treat it as it was gathered from DHCP.
 
User avatar
Eising
Member Candidate
Member Candidate
Posts: 272
Joined: Mon Oct 27, 2008 10:21 am
Location: Copenhagen, Denmark

Re: Feature request: more parameters with static IP on interface

Wed Mar 04, 2009 6:18 pm

I must admit I completely disagree with you here!

Let's take it from the beginning, shall we:
First, I do not understand what is the point of entering network address and broadcast address as they are fixed by setting network mask. not once that caused me a problem because when changing IP or mask, i forgot to sync network and broadcast addresses (which are totally redundant) and I got nonfunctional setup. Such errors are very hard to find.
You don't NEED to enter the network and broadcast address, or netmask for that matter, just type
/ip address add interface=ether1 address=192.168.1.1/24 disabled=no
It will automatically fill in the correct netmask, broadcast and network address based on your CIDR prefix-lenght (/24).

Changing the network size is tricky, I admit that, and there you need to change both broadcast, network and netmask when you do it. I recommend you enter safe-mode before doing it (ctrl-x).
Second, why we cannot set gateway and DNS for such interface, but we must separately set static route and set DNS in DNS option? Isn't it logical that these information are kept with interface as they define connection through that interface and that MT sets other stuff according to these information? If we could set gateway and DNS for interface then it would be more obvious with less space for errors.
DNS doesn't apply per interface, so it's not very logic to set it at the interface level. I haven't seen any enterprise network equipment that does so.
Default gateway as your only gateway is a thing for tiny end-users... In most larger setups you carry these kinds of information through some sort of routing protocol carrying a number of routes including a default gateway, so once again, it wouldn't make much sense to place that at the interface level.

/ip address should be only interface addressing and is so already. I am quite contempt with this.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Feature request: more parameters with static IP on interface

Thu Mar 05, 2009 12:17 pm

First, I do not understand what is the point of entering network address and broadcast address as they are fixed by setting network mask
well, we already have had setup like this:

vlan1, there's user with IP 192.168.0.1, gateway 192.168.0.254
vlan2, there's user with IP 192.168.0.2, gateway 192.168.0.254

and in ROS, we add addresses:
interface=vlan1 address=192.168.0.254 broadcast=192.168.0.1 network=192.168.0.1
interface=vlan2 address=192.168.0.254 broadcast=192.168.0.2 network=192.168.0.2
interface=ethN address=192.168.0.254/24

if there were no such options, you had to do it another way =)
 
msundman
Frequent Visitor
Frequent Visitor
Posts: 76
Joined: Thu Jan 15, 2009 2:44 pm
Location: Stockholm, Sweden
Contact:

Re: Feature request: more parameters with static IP on interface

Thu Mar 05, 2009 1:32 pm

I do NOT think you should be able to set def gw and DNS when defining the interface IP address. That are three completely different things, that belongs in three different sections just as it is now.

Having a def route set on the interface, and then when you work with the routing table and wants to alter the def route, should that update the interface config as well or shouldn't you be allowed to change the def route from /ip route?? No, that just seems messy to me. Keep the routing configuration in the routing table , and interface IP configuration in its own section like it is.

However, I just sent a request to the support a few days ago about being able to easily use the /ip address SET X address=X.X.X.X/YY syntax to change the IP address of an interface and have the network and broadcast properties updated according to "/YY" just like it is when you add an IP address. Currently that only works when adding new IP addresses to interfaces. In most cases you only want standard network and broadcast addresses according to the CIDR prefix.

If you wanna do special setups you can still leave out the "/YY" part of the address and manuall set network=X.X.X.X and broadcast=X.X.X.X.

The reply I got was that this is on the wish list but will probably not be implemented any time soon.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: Feature request: more parameters with static IP on interface

Thu Mar 05, 2009 5:34 pm

You don't NEED to enter the network and broadcast address, or netmask for that matter, just type
/ip address add interface=ether1 address=192.168.1.1/24 disabled=no
It will automatically fill in the correct netmask, broadcast and network address based on your CIDR prefix-lenght (/24).
Yes but it works only when you first time set an IP and netmask. If you change IP and netmask, broadcast and network address are not updated to match new network settings. That is a problem.

My question why should we bother with network and broadcast address. Specifying IP and netmask is enough to define network properties. Network and broadcast address are defined by IP and mask, even mikrotik calucaltes them for you if those fields are empty, so there is no need to be able to set them at all. Actualy, having these field editable and behaving as it is now, just creates space for confusion and errors.
DNS doesn't apply per interface, so it's not very logic to set it at the interface level. I haven't seen any enterprise network equipment that does so.
How come? If you set DHCP among other stuf it provides DNS info. That is perfectly natural and needed option. You have an option to choose if this info will be used to set MT DNS or not. Why such functionality would not be avaliable for fixed network settings?

Actually it is important, as it is not rare case that your ISP provides DNS for you and that DNS is not available openly on the Internet but just to you as their client. So, if I have two separate network link, they both have their DNS-es and each DNS is available only if accessed through belonging link. So, if I use one link as main and other as backup, when I activate backup link I have to set different set of DNS addreses. That is why it is needed to be able to set DNS on interface, so when that interface is activated, it's DNS is used, the same as what happens with interfaces that use DHCP client (or PPoE for instance).
Default gateway as your only gateway is a thing for tiny end-users... In most larger setups you carry these kinds of information through some sort of routing protocol carrying a number of routes including a default gateway, so once again, it wouldn't make much sense to place that at the interface level.
I disagree with you. When yoi set gateway for interface, you define automatic creatin of the defautl gateway using that interface. That is what is usualy needed. When you have DHCP clinet, it does jsut that: asks for gateway from DHCP server and sets it as default gateway, except, if you turn that option off.

I see no reason why we should not the same level of functionality for manualy set network properties on interface. It is very logical that, if you set IP and network mask for the interface, you also specify which is gateway out of that network, so if information is needed it is there.
/ip address should be only interface addressing and is so already. I am quite contempt with this.
What I ask is additional functionality that expands usability of MT, and makes it easier to use. It does not mean you would have to use it, it is just an option.

Do you always turn off DNS and gateway options for DHCP clients? You always prefer to manually set options?
First, I do not understand what is the point of entering network address and broadcast address as they are fixed by setting network mask
well, we already have had setup like this:

vlan1, there's user with IP 192.168.0.1, gateway 192.168.0.254
vlan2, there's user with IP 192.168.0.2, gateway 192.168.0.254

and in ROS, we add addresses:
interface=vlan1 address=192.168.0.254 broadcast=192.168.0.1 network=192.168.0.1
interface=vlan2 address=192.168.0.254 broadcast=192.168.0.2 network=192.168.0.2
interface=ethN address=192.168.0.254/24

if there were no such options, you had to do it another way =)
I am not familiar with VLANs so I cannot quite understand more that that vor VLANS tehre is need to seet broadcast and network address. But, that is exception, right? If user does not specify network mask, ok, then he should set broadcast and network address to have complete definition.

Setting network mask and setting broadcast and network address are two mutually exclusive options. If you set network mask you do not need to set broadcast and network address, even worse, should not be able to set them, because it could just lead to possible mess.
If network mask is not set, then it is not just ok but needed to set network and broadcast address.
I do NOT think you should be able to set def gw and DNS when defining the interface IP address. That are three completely different things, that belongs in three different sections just as it is now.
Network is defined bu IP, mask, gateway and usualy DNS. That is monst common. When you use any mean that assigns dynamicaly network properties for interface, you have options to assign all these information. Only if you set network properties manually, you do not have such functionality.
Having a def route set on the interface, and then when you work with the routing table and wants to alter the def route, should that update the interface config as well or shouldn't you be allowed to change the def route from /ip route?? No, that just seems messy to me. Keep the routing configuration in the routing table , and interface IP configuration in its own section like it is.
Hipoteticaly, if you have an option to specify gateway for the interface, and you do set it, default gateway would be set as it is set for any interface that gets gateway dinamically (by DHCP or other means). If you do not want that you simply do not specify default gateway. What is problem with that?
Even when network properties are set dynamically, you have an option to turn of creating defautl gateway or using DNS information from that interface. That is pretty natural.

However, I just sent a request to the support a few days ago about being able to easily use the /ip address SET X address=X.X.X.X/YY syntax to change the IP address of an interface and have the network and broadcast properties updated according to "/YY" just like it is when you add an IP address. Currently that only works when adding new IP addresses to interfaces. In most cases you only want standard network and broadcast addresses according to the CIDR prefix.

If you wanna do special setups you can still leave out the "/YY" part of the address and manuall set network=X.X.X.X and broadcast=X.X.X.X.
That is exactly what I asked regarding this issue.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Feature request: more parameters with static IP on interface

Thu Mar 05, 2009 5:59 pm

just noticed, that in CLI you can set network and broadcast to 0.0.0.0, which is shown in Winbox as empty fields - you cannot do this with Winbox only %)
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: Feature request: more parameters with static IP on interface

Thu Mar 05, 2009 6:44 pm

In winbox just tick the up arrow next to those 2 fields and they grey out. then hit apply with your new subnet mask and they will automatically correct themselves.

Who is online

Users browsing this forum: fibracapi, gkl1368, Google [Bot], neskiask and 91 guests