inet icon indicating copy to clipboard operation
inet copied to clipboard

Changing the IPv4 address of a loopback interface

Open ManiAm opened this issue 5 years ago • 2 comments

I am having trouble changing the ipv4 address of a loopback interface. Please take a look at Step23 in OSPF examples in here:

https://github.com/ManiAm/inet/blob/INETex/examples_INETex/routing_protocol_ospf/omnetpp.ini

Apparently changing the loopback address has no effect. Going through the configurator code, I noticed that the configurator iterates over topology.linkInfos and since there is no links attached to the loopback interface, it misses it.

https://github.com/inet-framework/inet/blob/b02af3321836f33c1e9e81313cc607eda8697423/src/inet/networklayer/configurator/ipv4/Ipv4NetworkConfigurator.cc#L623

ManiAm avatar Oct 01 '18 03:10 ManiAm

Indeed, the NetworkConfiguratorBase class uses isLoopback() function throughout the code to avoid configuring loopback interfaces.

levy avatar Oct 01 '18 07:10 levy

If we could up-vote features, then I would up-vote this one. This is very useful in routing (ospf, BGP, etc.) scenarios when you want to test the propagation of a route into the network.

ManiAm avatar Nov 07 '19 06:11 ManiAm