Skip to content

Commit 49ef43a

Browse files
committed
examples/bgpv4/BgpIpv6Basic: use addRemoteRoutes instead of manual on-link routes
Now that the configurator can install the directly-connected routes without the precomputed remote routes, drop the hand-written on-link <route> workaround: run the configurator with addRemoteRoutes=false so it auto-generates the on-link (direct) routes and the host default routes, leaving the inter-AS routes to be learned via BGP. Only the graphical (tyf) fingerprint changes; tplx (all events), ~tNl (on-wire traffic) and ~tND (packet data) are byte-identical, i.e. the simulation trajectory is unchanged. hostA still receives 20/21 ping replies once BGP converges (the first is lost during convergence).
1 parent acd32bd commit 49ef43a

4 files changed

Lines changed: 14 additions & 20 deletions

File tree

examples/bgpv4/BgpIpv6Basic/BgpIpv6Basic.ned

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ network BgpIpv6Basic
2424
parameters:
2525
@display("p=100,100;is=s");
2626
config = xmldoc("Ipv6Config.xml");
27-
// no auto static routes: routers get only the on-link routes configured
28-
// manually below, so the inter-AS routes can only come from BGP
29-
addStaticRoutes = false;
27+
// auto-generate the on-link (direct) routes and the host default routes,
28+
// but NOT the inter-AS (remote) routes -- those can only come from BGP
29+
addRemoteRoutes = false;
3030
}
3131
rA: Router {
3232
parameters:

examples/bgpv4/BgpIpv6Basic/Ipv6Config.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
<interface hosts="rB" towards="hostB" address="2001:db8:0:20::1"/>
1010
<interface hosts="hostB" address="2001:db8:0:20::100"/>
1111

12-
<!-- on-link (directly-connected) routes only; the inter-AS routes are left for BGP -->
13-
<route hosts="rA" destination="2001:db8:0:1::" prefixLength="64" interface="eth1"/>
14-
<route hosts="rA" destination="2001:db8:0:10::" prefixLength="64" interface="eth0"/>
15-
<route hosts="rB" destination="2001:db8:0:1::" prefixLength="64" interface="eth0"/>
16-
<route hosts="rB" destination="2001:db8:0:20::" prefixLength="64" interface="eth1"/>
17-
18-
<!-- hosts default-route to their gateway router -->
19-
<route hosts="hostA" destination="::" prefixLength="0" interface="eth0" gateway="2001:db8:0:10::1"/>
20-
<route hosts="hostB" destination="::" prefixLength="0" interface="eth0" gateway="2001:db8:0:20::1"/>
12+
<!-- No manual routes: the configurator adds the on-link (direct) routes and the host
13+
default routes automatically; the inter-AS routes are left for BGP (the configurator
14+
is run with addRemoteRoutes=false) -->
2115
</config>

examples/bgpv4/BgpIpv6Basic/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ What it demonstrates / verifies:
1515
- IPv6 reachability is exchanged using the **`MP_REACH_NLRI`** path attribute
1616
(AFI=2 / SAFI=1), per RFC 4760 — rA advertises `2001:db8:0:10::/64`, rB advertises
1717
`2001:db8:0:20::/64`, each via a `<Network>` element in `BgpConfig6.xml`.
18-
- The learned routes are actually **installed and used**: the configurator adds only
19-
on-link routes (`addStaticRoutes = false` + manual `<route>` entries), so the inter-AS
20-
routes can come *only* from BGP. `hostA` pinging `hostB` therefore succeeds only once
21-
BGP has converged.
18+
- The learned routes are actually **installed and used**: the configurator is run with
19+
`addRemoteRoutes = false`, so it adds the on-link (direct) routes and the host default
20+
routes automatically, but leaves out the inter-AS (remote) routes — those can come
21+
*only* from BGP. `hostA` pinging `hostB` therefore succeeds only once BGP has converged.
2222

2323
Notes:
2424

2525
- The BGP Identifier is a 4-octet router id even for IPv6 (RFC 4271/6286); it is set
2626
explicitly via `bgp.routerId` since an IPv6 router has no IPv4 address to derive it from.
27-
- The manual on-link `<route>` entries are a workaround for a configurator limitation
28-
(`addDirectRoutes` is only applied when `addStaticRoutes` is true); see
29-
`plan/pending/configurator-decouple-direct-routes.md`.
27+
- `addRemoteRoutes` (and the matching `addManualRoutes`) let the configurator install the
28+
directly-connected routes without the precomputed remote shortest-path routes that would
29+
otherwise mask the protocol under test; see `plan/pending/configurator-decouple-direct-routes.md`.

tests/fingerprint/examples.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
/examples/bgpv4/BgpUpdate/, -f omnetpp.ini -c General -r 0, 30s, 9552-83f7/tplx;3a06-a4f0/~tNl;62be-5688/~tND;0573-e0b4/tyf, PASS, ospf EthernetMac Ipv4
3232
/examples/bgpv4/BgpAndOspf/, -f omnetpp.ini -c General -r 0, 1000s, 1e22-36e3/tplx;2b66-00b2/~tNl;430e-7064/~tND;de89-afd7/tyf, PASS, ospf EthernetMac Ipv4
3333
/examples/bgpv4/BgpAndOspfSimple/, -f omnetpp.ini -c General -r 0, 1000s, dc15-38aa/tplx;dacd-0cbd/~tNl;46d3-bcb3/~tND;8a59-2347/tyf, PASS, ospf EthernetMac Ipv4
34-
/examples/bgpv4/BgpIpv6Basic/, -f omnetpp.ini -c General -r 0, 30s, 7ed5-3294/tplx;8d57-7c0c/~tNl;d6e7-ba7e/~tND;2e97-8361/tyf, PASS, EthernetMac Ipv6
34+
/examples/bgpv4/BgpIpv6Basic/, -f omnetpp.ini -c General -r 0, 30s, 7ed5-3294/tplx;8d57-7c0c/~tNl;d6e7-ba7e/~tND;2e97-8771/tyf, PASS, EthernetMac Ipv6
3535

3636
/examples/clock/, -f omnetpp.ini -c General -r 0, 10ms, 35c3-8325/tplx;0000-0000/~tNl;0000-0000/~tND;a4b7-bff5/tyf, PASS,
3737

0 commit comments

Comments
 (0)