On Mon, 2008-11-24 at 03:45 -0800, Norman wrote:
> Hello,
> Does anybody know if it is possible to assign /32 address to node (not
> necessarily using a helper - I'm aware of that bug), that will act as
> RID (Router ID).
> I'm basically looking for a sort of Loopback 0 interface (in Cisco
> terminology).
I am not sure this is related to your problem, but there is already a
loopback interface with address 127.0.0.1 which is automatically added
to every ipv4 stack when it is aggregated to a node.
regards,
Mathieu
No, multiple address per interface is a feature tom is working on for
the next version of ns-3 (ns-3.5).
But you could easily add a copy of LoopbackIpv4Interface which does what
you want.
sorry,
Mathieu
There is no other way than to patch the src/internet-stack directory.
Mathieu
Norman,
In response to above, no, presently there is not clean support for that.
See this bug:
http://www.nsnam.org/bugzilla/show_bug.cgi?id=188
We are reworking the Ipv4Interface class to allow it to hold multiple
IPv4 addresses (one primary and multiple secondary), as in Linux, but
that support will not be merged until after ns-3.3 is released. The
code that implements this IP aliasing is presently in the private branch
http://code.nsnam.org/tomh/ns-3-ip
Regarding your other question:
> My personal observation is that the same type of symptom (lack of
> routing) is same for three different (separate) type of
> configurations:
> 1. Adding an extra loopback (as described above)
> 2. Adding second IP address to the same interface (this is unsupported
> as you pointed out Mathieu)
> 3. Adding a sort of pseudo-interface (additional csma or p2p) to act
> as loopback and addressing it with /32 (as I described in my initial
> email).
>
> All three scenarios are failing in the same way - routing is broken.
>
I believe that this in general is related to the lack of support for
stub networks, as has been recently called out in the end of bug 406:
http://www.nsnam.org/bugzilla/show_bug.cgi?id=406
I believe that, after bug 406 is fixed, you should be able to create a
new virtual device (a second loopback) and put an address on it and use
that as a router ID; I'll write a test case for that scenario.
I am going to prioritize fixing the above this week and will get back to
you when I make progress.
- Tom
The global route manager is a port of the Dijkstra algorithm from
quagga's OSPFv2 implementation. OSPF shortest path computation is a
two-stage process; in the first stage, routes to shared and transit
links are computed, and in the second stage, routes to stub networks and
interfaces are computed. We only implemented the first stage initially,
since it was sufficient to cover initial use cases in which every link
was part of the routing topology.
Yes, you can directly set routes using the static routing API available
in class ns3::Ipv4.
- Tom
Norman,
Could you please have a look at the test programs in this bug report:
http://www.nsnam.org/bugzilla/show_bug.cgi?id=432
I tried to reproduce the above topology, and I found that I could get
static routing to work correctly, and global routing to work with a
small patch to ns-3-dev. These programs take advantage of the patches
to recent bugs (400, 406) that were checked into ns-3-dev in the past
day or so.
Do you think that the /32 issue is fixed for you now?
Tom
Norman,
I put the example programs into ns-3-dev recently, and they should be in
the ns-3.3 release, so you can test that when it is published.
Tom
I think the problem may be due to declaring these devices as
point-to-point rather than csma. The example script
examples/global-routing-slash32.cc works fine with ns-3.3, but when I
change the stub interfaces from csma to point-to-point device types, I
get the failure you note above.
Can you retry, for now, declaring those stubs as CsmaNetDevice type? I
will fix the point-to-point code shortly, which presently assumes that
exactly 2 devices will be on a point-to-point link (this assumption can
be relaxed).
Tom