Bug 2808 - NetDevices are inconsistent with LinkUp/LinkDown
NetDevices are inconsistent with LinkUp/LinkDown
Status: CONFIRMED
Product: ns-3
Classification: Unclassified
Component: general
ns-3-dev
All All
: P3 major
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-24 16:45 EDT by Tommaso Pecorella
Modified: 2017-11-15 01:38 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2017-10-24 16:45:16 EDT
This problem is known, but its extent has been made clear by MIPv6 GSoC project.

Without a proper LinkUp/LinkDown signalling, the IP interfaces cannot know if a NetDevice is active or it has been disconnected from its endpoint.

In particular, this problem affects Wi-Fi and LTE (and WiMAX too).

The correct behaviour should be:
- Fire LinkUp when the NetDevice is associated to an AP (or an eNB),
- Fire LinkDown when the NetDevice is disassociated.
- No signalling if the NetDevice changes its AP (or eNB) in the same domain - i.e., when IP is not changed and session continuity is handled by L2.
Comment 1 Susanna Ruth Peter 2017-11-13 12:51:47 EST
Hi, 

I am working on continuing the implementation of MIH in ns-3 which would require LinkUp and LinkDown events. Hence, I would like to know what exactly is the issue with LinkUp and LinkDown methods of NetDevice as I was not very clear after going through the bug.
Comment 2 Tommaso Pecorella 2017-11-13 18:58:57 EST
Hi,

the problem is twofold:
1) Not all the NetDevices fire the callback set by AddLinkChangeCallback consistently.
For example, Wi-Fi does it, but LTE doesn't.
2) Ipv*Interfaces are "Up" as soon as the NetDevice is up and running, and they are not set to down when the NetDevice is down.

A better model would be to defer the Ipv*Interface setup to when the netDevice is up for real and to set it to down when the NetDevice loses its connectivity.

that, of course, preserving the capability to manually set an Ipv*Interface to down when needed. However, it should go up only when the NetDevice is up as well.

(In reply to Susanna Ruth Peter from comment #1)
> Hi, 
> 
> I am working on continuing the implementation of MIH in ns-3 which would
> require LinkUp and LinkDown events. Hence, I would like to know what exactly
> is the issue with LinkUp and LinkDown methods of NetDevice as I was not very
> clear after going through the bug.
Comment 3 Susanna Ruth Peter 2017-11-15 01:38:09 EST
Thanks for the clarifications.