msg="Ipv4AddressGeneratorImpl::Add(): Address Collision: 12.1.0.1", file=../src/internet/model/ipv4-address-generator.cc, line=380 libc++abi.dylib: terminating

687 views
Skip to first unread message

Zhuotao Liu

unread,
Nov 16, 2014, 12:08:32 AM11/16/14
to ns-3-...@googlegroups.com
Dear all, 

I have some problems regarding with the address collision. I have searched the previous posts, but I did not find a solution. Thanks a lot for your help. 

I am using the PointToPointDumbbellHelper to create an topology supporting larger numbers of hosts. Specifically, I am trying to have millions of hosts in the topology. The followings are how I assign the IPv4 addresses for the hosts: 

==========code==============
d.AssignIpv4Addresses (Ipv4AddressHelper ("10.1.0.0", "255.255.0.0"),
                         Ipv4AddressHelper ("11.1.0.0", "255.255.0.0"),
                         Ipv4AddressHelper ("12.1.0.0", "255.255.0.0"));
===========code===============

d is the PointToPointDumbbellHelper. 

I think I have changed the net mask to allow larger numbers of host. But I keep getting the 'address collision' error. 

============error message=============
msg="Ipv4AddressGeneratorImpl::Add(): Address Collision: 12.1.0.1", file=../src/internet/model/ipv4-address-generator.cc, line=380 libc++abi.dylib: terminating
============error message===============

Do you know how to fix it? 

Thanks a lot for your help. 
Sky. 

Tommaso Pecorella

unread,
Nov 16, 2014, 3:15:47 AM11/16/14
to ns-3-...@googlegroups.com
Hi,

no idea, we should use a sample program to test. Mind attaching one ?

Ty.

Zhuotao Liu

unread,
Nov 16, 2014, 12:46:43 PM11/16/14
to ns-3-...@googlegroups.com
Hi Ty,

Great thanks for your reply.

Sure. I can attach my program here. The followings are how I create
the dumbbell topology.

PointToPointHelper bottleNeckLink;
bottleNeckLink.SetDeviceAttribute("DataRate", StringValue ("10Mbps"));
bottleNeckLink.SetDeviceAttribute("Mtu", StringValue ("1500"));
bottleNeckLink.SetChannelAttribute("Delay", StringValue ("1ms"));


//leaf helper:
PointToPointHelper pointToPointLeaf;
pointToPointLeaf.SetDeviceAttribute("DataRate", StringValue ("100000Mbps"));
pointToPointLeaf.SetChannelAttribute("Delay", StringValue ("1ms"));

// Dumbbell constructor: nLeaf normal flows and nAttacker attack flows
PointToPointDumbbellHelper d (2000, pointToPointLeaf,
2000, pointToPointLeaf,
bottleNeckLink);

// Install Stack to the whole nodes
InternetStackHelper stack;
d.InstallStack (stack);

// Assign IP Addresses
// Three sets of address: the left, the right and the router
d.AssignIpv4Addresses (Ipv4AddressHelper ("10.1.0.0", "255.255.0.0"),
Ipv4AddressHelper ("11.1.0.0", "255.255.0.0"),
Ipv4AddressHelper ("12.1.0.0", "255.255.0.0"));


The error happens when I try to assign the IP addresses.

Thanks,
Zhuotao
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "ns-3-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ns-3-users/Fdi2HBQY_0c/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Nov 16, 2014, 1:07:02 PM11/16/14
to ns-3-...@googlegroups.com
SIGH !

I guess you don't know that there's a button in the bar above the message creation: "Attach a file". Perhaps we should suggest to Google to make it bigger. Huge maybe.

Second point: I'm sorry if I didn't read carefully your message. The answer doesn't need to check the code, it is plainly obvious.
Each point-to-point link is using a new network (because they are point-to-point links). Decreasing the mask size you got the opposite effect to the one you was searching for.
Your network mask should be something like "255.255.255.252".

Cheers,

T.

Zhuotao Liu

unread,
Nov 16, 2014, 1:27:40 PM11/16/14
to ns-3-...@googlegroups.com
Oh. Sorry for that. 

Because my projects contain a lot of files. So even if I attach the file containing the ip address assignment code, it may still not be able to run the code. Anyway, thanks for your help and sorry for the inconvenience. 

As for the NetMask, if I set the mask as 255.255.255.252, then there will be only 3 IP addresses available? right? Since I want more IP addresses, I should instead use 255.255.0.0 (2^16=65536 addresses). Right? 

Thanks a lot. :)

Zhuotao 

Zhuotao Liu

unread,
Nov 16, 2014, 1:53:43 PM11/16/14
to ns-3-...@googlegroups.com
Thanks T,

It works now. :)

Thanks a lot.
Zhuotao

Tommaso Pecorella

unread,
Nov 16, 2014, 1:58:40 PM11/16/14
to ns-3-...@googlegroups.com
Hi,

no, you're wrong. Dumbbell helper will assign 2 addresses of a new network for each endpoint in the "bell" (they are P2P links). The 255.255.255.252 netmask, contains 4 addresses, but only 2 are usable, so it's the bare minimum.

About how many "host" you can have in the topology... up to you. Decreasing the network mask to "255.255.0.0" is neither necessary or useful, as the "left" and "right" nodes are not in the same network anyway. No node is in the same network indeed.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages