inet
inet copied to clipboard
Inconsistency in referring to an Interface by RIP config
In the IPv4Configurator config parameter, interfaces are referred to as eth0, eth1, but in the RIP config, interface names are referred to as eth[0] or eth[1].
IPv4 config:
<config>
<interface hosts='host{0-6} whost{0,1} router*' address='10.x.x.x' netmask='255.x.x.x'/>
<route hosts='host*' destination='*' netmask='0.0.0.0' interface='eth0' />
<route hosts='whost*' destination='*' netmask='0.0.0.0' interface='wlan0' />
</config>
RIP Config:
<config>
<interface names='eth[1]' mode='NoRIP' />
<interface names='eth[3]' mode='NoRIP' />
<interface metric='1' />
</config>
Users might find it confusing that RIP refers to interfaces as eth[0], eth[1] and not eth0, eth1 and they might scratch their head for hours figuring out what went wrong :p
P.S. For a working example, you can refer to the scenario I attached in #333.
You are right, this inconsistency is wrong and should be fixed. I'm not sure which way should we go. I tend to think that eth0, wlan0, etc. are not so great after all for two reasons. One is that modules are called eth[0] and wlan[0] in INET, so users are got used to it. Two is that linux doesn't call interfaces 'eth0' and 'wlan0' any more, the interfaces have a more obscure name.
Unfortunately, changing all interface names to eth[0] and wlan[0] is backward incompatible and non-trivial. But INET 4.0 is already backward incompatible in a million ways, so there's that. We will talk about this internally.