Question regarding default gateway advertissment

92 views
Skip to first unread message

Radovan Záborský

unread,
Apr 17, 2023, 4:06:20 PM4/17/23
to ns-3-users
Hello everyone,

to fully understand the network topology and to avoid any misunderstandings I created simple diagram which is attached to this post.

I'm currently working on VANET simulation in which WAVE nodes on network 10.1.1.0/24 communicate with LTE nodes on network 7.0.0.0/8 through default gateway which is connected to WAVE access points alongside the road using Ethernet cable. Ethernet interfaces use network address of 9.1.1.0/24 and are connected to Openflow switch.
The WAVE nodes use OLSR routing algorithm in combination with static routing (static routing is used to set the default gateway route).
To sum it up we have these three main networks:
My problem is:
That when the WAVE node wants to send packets to the LTE network it asks directly for the MAC address of the default gateway even though, based on the OLSR routing table, it should know that it can access the default gateway using one of the access points. By sending ARP request with Dest. IP of the default gateway the WAVE node never receives the MAC address of the default gateway, thus it never sends it's packets to the LTE network.

So my question is:
Is there any method to advertise or set the default gateway route in such way, that the WAVE node understands, that in order to access the default gateway it should send the packets to one of the access points first ? Is NS-3 even able to do something like this by default ?

Other static routes in the network are set correctly. The default gateway by itself is able to send packets to the LTE network. Also the WAVE nodes are able to send packets to the default gateway. (they know about the route through the OLSR routing table)
The only problem is, as I mentioned, with sending packets to different network from the WAVE nodes.
I tried OLSR, AODV and DSDV routing protocols but none can help me with this problem.

I'm using:
  • NS-3 version 3.30
  • Ubuntu 22.04
  • OFSwitch13 module for the OF switch
Any suggestions are greatly appreciated. If something isn't clear feel free to ask, I will gladly provide more information.

Thanks,
Rado.

Tommaso Pecorella

unread,
Apr 17, 2023, 7:01:52 PM4/17/23
to ns-3-users
That when the WAVE node wants to send packets to the LTE network it asks directly for the MAC address of the default gateway even though, based on the OLSR routing table, it should know that it can access the default gateway using one of the access points. By sending ARP request with Dest. IP of the default gateway the WAVE node never receives the MAC address of the default gateway, thus it never sends its packets to the LTE network.

I see several issues there...
1) Your "default gateway" is in a different subset w.r.t. the WAVE nodes (9.1.1.0/24 Vs 10.1.1.0/24), so it's not a default gateway, it's a router. Mind: ns-3 doesn't have a NAT, so 10.0.0.0/8 is just a normal address.
2) ARPs: you'll always see ARPs, because nodes know each other by their IP addresses. When you set a default router, you tell the node the IP address of the default router - not its MAC address. So you'll see an ARP anyway.

My best guess is that you did set a 9.1.1.x default gateway (mind, it's a router) in a node in the 10.1.1.x space. The node will not find it (as expected) and drops the packets.

Radovan Záborský

unread,
Apr 18, 2023, 3:28:55 AM4/18/23
to ns-3-users
I'm sorry, there has been a misunderstanding. I know that there will always be an ARP request in the network. I'm asking if there is some way to set the default route
for the  WAVE nodes in such way, that they will use one of the APs to access the 9.1.1.x network and thus the router.

Thanks,
Rado.
Dátum: utorok 18. apríla 2023, čas: 1:01:52 UTC+2, odosielateľ: Tommaso Pecorella

Tommaso Pecorella

unread,
Apr 18, 2023, 5:22:08 AM4/18/23
to ns-3-users
Without details I'd say that you should add the AP address (10.1.1.x/24) as the default gateway.
However, the scheme you did draw has two APs, and I don't know how the terminal switch between the two.

Reply all
Reply to author
Forward
0 new messages