Routing Problem

82 views
Skip to first unread message

Andrés Millán

unread,
Mar 9, 2018, 5:00:46 AM3/9/18
to ns-3-users
Hello everyone!

I  have a network topology like:

n5---------n0 ) ) ) )  Ap(n4)    ) )  ) ) n1-----------n6

n7--------n2 ) ) )  ) )    ...etc

n0 to n3 have wifi/p2p interface, n5 to n8 has only p2p interface.

My problem is when I set n5 as client and n6,n7,n8 as servers, the topology doesn`t route. Moreover, the routing table show is strange:
 Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 0, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      -      -   2

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 0, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.2     192.168.2.2     255.255.255.255 UH    -      -      -   1
192.168.2.3     192.168.1.2     255.255.255.255 UH    -      -      -   2
192.168.2.5     192.168.1.3     255.255.255.255 UH    -      -      -   2
192.168.2.7     192.168.1.4     255.255.255.255 UH    -      -      -   2
192.168.2.4     192.168.1.2     255.255.255.255 UH    -      -      -   2
192.168.2.6     192.168.1.3     255.255.255.255 UH    -      -      -   2
192.168.2.8     192.168.1.4     255.255.255.255 UH    -      -      -   2
192.168.1.0     0.0.0.0         255.255.255.0   U     -      -      -   2
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.2.2     255.255.255.0   UG    -      -      -   1

Node: 1, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 1, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      -      -   2

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 1, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.4     192.168.2.4     255.255.255.255 UH    -      -      -   1
192.168.2.1     192.168.1.1     255.255.255.255 UH    -      -      -   2
192.168.2.5     192.168.1.3     255.255.255.255 UH    -      -      -   2
192.168.2.7     192.168.1.4     255.255.255.255 UH    -      -      -   2
192.168.2.2     192.168.1.1     255.255.255.255 UH    -      -      -   2
192.168.2.6     192.168.1.3     255.255.255.255 UH    -      -      -   2
192.168.2.8     192.168.1.4     255.255.255.255 UH    -      -      -   2
192.168.1.0     0.0.0.0         255.255.255.0   U     -      -      -   2
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.2.4     255.255.255.0   UG    -      -      -   1

Node: 2, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 2, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      -      -   2

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 2, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.6     192.168.2.6     255.255.255.255 UH    -      -      -   1
192.168.2.1     192.168.1.1     255.255.255.255 UH    -      -      -   2
192.168.2.3     192.168.1.2     255.255.255.255 UH    -      -      -   2
192.168.2.7     192.168.1.4     255.255.255.255 UH    -      -      -   2
192.168.2.2     192.168.1.1     255.255.255.255 UH    -      -      -   2
192.168.2.4     192.168.1.2     255.255.255.255 UH    -      -      -   2
192.168.2.8     192.168.1.4     255.255.255.255 UH    -      -      -   2
192.168.1.0     0.0.0.0         255.255.255.0   U     -      -      -   2
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.2.6     255.255.255.0   UG    -      -      -   1

Node: 3, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 3, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      -      -   2

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 3, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.8     192.168.2.8     255.255.255.255 UH    -      -      -   1
192.168.2.1     192.168.1.1     255.255.255.255 UH    -      -      -   2
192.168.2.3     192.168.1.2     255.255.255.255 UH    -      -      -   2
192.168.2.5     192.168.1.3     255.255.255.255 UH    -      -      -   2
192.168.2.2     192.168.1.1     255.255.255.255 UH    -      -      -   2
192.168.2.4     192.168.1.2     255.255.255.255 UH    -      -      -   2
192.168.2.6     192.168.1.3     255.255.255.255 UH    -      -      -   2
192.168.1.0     0.0.0.0         255.255.255.0   U     -      -      -   2
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   2
192.168.2.0     192.168.2.8     255.255.255.0   UG    -      -      -   1

Node: 4, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 4, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      -      -   1

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 4, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.1     192.168.1.1     255.255.255.255 UH    -      -      -   1
192.168.2.3     192.168.1.2     255.255.255.255 UH    -      -      -   1
192.168.2.5     192.168.1.3     255.255.255.255 UH    -      -      -   1
192.168.2.7     192.168.1.4     255.255.255.255 UH    -      -      -   1
192.168.2.2     192.168.1.1     255.255.255.255 UH    -      -      -   1
192.168.2.4     192.168.1.2     255.255.255.255 UH    -      -      -   1
192.168.2.6     192.168.1.3     255.255.255.255 UH    -      -      -   1
192.168.2.8     192.168.1.4     255.255.255.255 UH    -      -      -   1
192.168.1.0     0.0.0.0         255.255.255.0   U     -      -      -   1
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.1     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.2     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.3     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   1
192.168.2.0     192.168.1.4     255.255.255.0   UG    -      -      -   1

Node: 5, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 5, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 5, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG    -      -      -   1

Node: 6, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 6, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 6, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.3     0.0.0.0         UG    -      -      -   1

Node: 7, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 7, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 7, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.5     0.0.0.0         UG    -      -      -   1

Node: 8, Time: +12.0s, Local time: +12.0s, Ipv4ListRouting table
  Priority: 0 Protocol: ns3::Ipv4StaticRouting
Node: 8, Time: +12.0s, Local time: +12.0s, Ipv4StaticRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      -      -   0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      -      -   1

  Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Node: 8, Time: +12.0s, Local time: +12.0s, Ipv4GlobalRouting table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.7     0.0.0.0         UG    -      -      -   1



My Source Code is below. Thank you so much!!


simulacion2.cc

Andrés Millán

unread,
Mar 10, 2018, 1:03:02 PM3/10/18
to ns-3-users
I am trying to use OLSR on Wifi nodes. I still without comunication between LAN / Other LAN's. Source code is attached.
simulacion2.cc
Reply all
Reply to author
Forward
0 new messages