Skip to content

Commit c33236e

Browse files
committed
GPSR: examples: enable IPv6 addressing for GPSR-over-IPv6; re-record gpsr fingerprints
GPSR-over-IPv6 (configs IPv6/MultiIPv6) could not deliver: the example assigned no global IPv6 addresses, so hosts had only link-local addresses, which IPv6 does not forward. Add an Ipv6NetworkConfigurator -- conditional (hasIpv6Configurator, enabled only by the IPv6 configs, so the IPv4/Generic runs are untouched) -- assign a single on-link /64, point the node IPv6 configurator at it (its default networkConfiguratorModule is ""), and set sendRedirects=false to avoid the redirect storm on this single-link multi-hop network. GPSR-over-IPv6 now routes to global addresses and delivers end-to-end, but only ~2/17 vs IPv4's ~8/17: IPv6 Neighbor Discovery (address resolution + NUD) congests the shared wireless medium far more than IPv4 ARP. Documented as a known limitation in the ini. Fingerprint re-records (behavior sanity-checked; deterministic across -r 2): - gpsr IPv6, MultiIPv6: reflect the now-functional best-effort IPv6 delivery above. - gpsr MultiIPv4, MultiGeneric: pre-existing drift from the IPv6 extension-header refactoring -- these multi-stack configs carry a co-resident IPv6 stack whose refactored ND timing shifts the shared-medium schedule. Behavior verified correct (both deliver 8/17); confirmed the drift is identical with and without the GPSR/IPv6 crash-chain, i.e. not introduced here.
1 parent f9322d2 commit c33236e

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

examples/manetrouting/gpsr/GPSRNetwork.ned

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package inet.examples.manetrouting.gpsr;
77

88
import inet.common.scenario.ScenarioManager;
99
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
10+
import inet.networklayer.configurator.ipv6.Ipv6NetworkConfigurator;
1011
import inet.networklayer.ipv4.RoutingTableRecorder;
1112
import inet.node.gpsr.GpsrRouter;
1213
import inet.physicallayer.wireless.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
@@ -19,6 +20,7 @@ network GPSRNetworkRandom
1920
{
2021
parameters:
2122
int numHosts;
23+
bool hasIpv6Configurator = default(false); // enabled by the IPv6 configs; kept off otherwise so it does not perturb the IPv4/Generic runs
2224
submodules:
2325
radioMedium: Ieee80211ScalarRadioMedium {
2426
parameters:
@@ -29,6 +31,10 @@ network GPSRNetworkRandom
2931
config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
3032
@display("p=100,100;is=s");
3133
}
34+
ipv6Configurator: Ipv6NetworkConfigurator if hasIpv6Configurator {
35+
parameters:
36+
@display("p=100,150;is=s");
37+
}
3238
routingTableRecorder: RoutingTableRecorder {
3339
parameters:
3440
@display("p=100,300;is=s");

examples/manetrouting/gpsr/omnetpp.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,22 @@ description = base config for Ipv4
4242
[Config _IPv6]
4343
abstract = true
4444
description = base config for Ipv6
45+
# NOTE: GPSR-over-IPv6 is only partially functional - it routes to global
46+
# addresses but end-to-end delivery is poor compared to IPv4, because IPv6's
47+
# Neighbor Discovery (address resolution + NUD) congests the shared wireless
48+
# medium far more than IPv4 ARP. This is a known limitation.
4549
**.gpsr.networkProtocolModule = "^.ipv6.ipv6"
4650
**.gpsr.routingTableModule = "^.ipv6.routingTable"
51+
# Assign global IPv6 addresses (a single on-link /64) so packets are forwardable
52+
# (link-local destinations are never forwarded). The node IPv6 configurator must
53+
# be pointed at the global Ipv6NetworkConfigurator explicitly (its default is "").
54+
*.hasIpv6Configurator = true
55+
**.ipv6.configurator.networkConfiguratorModule = "ipv6Configurator"
56+
*.ipv6Configurator.config = xml("<config><interface hosts='*' prefix='2001:db8::/64'/></config>")
57+
# In this single-link multi-hop ad-hoc network every forward goes back out the
58+
# arrival interface; sending ICMPv6 Redirects there is useless (the geographic
59+
# next hop is not reachable by the source) and causes a redirect storm.
60+
**.ipv6.ipv6.sendRedirects = false
4761
*.host[0].app[0].destAddr = "host[1](ipv6)"
4862

4963
[Config _Generic]

tests/fingerprint/examples.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,12 @@
353353
# /examples/manetrouting/gpsr/, -f omnetpp.ini -c _IPv6 -r 0, # abstract-config
354354
# /examples/manetrouting/gpsr/, -f omnetpp.ini -c _Generic -r 0, # abstract-config
355355
/examples/manetrouting/gpsr/, -f omnetpp.ini -c IPv4 -r 0, 20s, 1128-a3bc/tplx;9f6c-df77/~tNl;5d32-0ae4/tyf, PASS, wireless adhoc Ipv4
356-
/examples/manetrouting/gpsr/, -f omnetpp.ini -c IPv6 -r 0, 20s, 97ce-956e/tplx;5f9e-6f8e/~tNl;86e5-9659/tyf, PASS, wireless adhoc
356+
/examples/manetrouting/gpsr/, -f omnetpp.ini -c IPv6 -r 0, 20s, 5a83-8612/tplx;2240-53c0/~tNl;56f2-3400/tyf, PASS, wireless adhoc
357357
/examples/manetrouting/gpsr/, -f omnetpp.ini -c Generic -r 0, 20s, 6b9d-8586/tplx;c58b-970e/~tNl;17f5-8ad3/tyf, PASS, wireless adhoc
358358
# /examples/manetrouting/gpsr/, -f omnetpp.ini -c _Multi -r 0, # abstract-config
359-
/examples/manetrouting/gpsr/, -f omnetpp.ini -c MultiIPv4 -r 0, 20s, 6ae2-6e71/tplx;4dbe-9ad0/~tNl;a896-f33a/tyf, PASS, wireless adhoc Ipv4
360-
/examples/manetrouting/gpsr/, -f omnetpp.ini -c MultiIPv6 -r 0, 20s, 97ce-956e/tplx;5f9e-6f8e/~tNl;0c65-a921/tyf, PASS, wireless adhoc
361-
/examples/manetrouting/gpsr/, -f omnetpp.ini -c MultiGeneric -r 0, 20s, d87a-f4ab/tplx;bb2c-c633/~tNl;70dc-a9a2/tyf, PASS, wireless adhoc
359+
/examples/manetrouting/gpsr/, -f omnetpp.ini -c MultiIPv4 -r 0, 20s, d4a1-5cf9/tplx;c727-b58f/~tNl;9675-abeb/tyf, PASS, wireless adhoc Ipv4
360+
/examples/manetrouting/gpsr/, -f omnetpp.ini -c MultiIPv6 -r 0, 20s, 5a83-8612/tplx;2240-53c0/~tNl;cb6c-dc96/tyf, PASS, wireless adhoc
361+
/examples/manetrouting/gpsr/, -f omnetpp.ini -c MultiGeneric -r 0, 20s, 5c6b-556c/tplx;e56d-c248/~tNl;ea54-2fef/tyf, PASS, wireless adhoc
362362
/examples/manetrouting/gpsr/, -f omnetpp.ini -c Manual -r 0, 20s, 41d0-4325/tplx;b911-bca9/~tNl;8a0e-d569/tyf, PASS, wireless adhoc Ipv4
363363
# /examples/manetrouting/gpsr/, -f omnetpp.ini -c _Dynamic -r 0, # abstract-config
364364
/examples/manetrouting/gpsr/, -f omnetpp.ini -c DynamicIPv4 -r 0, 20s, ce31-f8ed/tplx;8a3b-235d/~tNl;3ecd-bfef/tyf, PASS, wireless adhoc Ipv4

0 commit comments

Comments
 (0)