.. _example_protocols_bgp_neighbor_address-family_ipv6-unicast_attribute-unchanged:
###################
Attribute-Unchanged
###################
Test BGP **address-family ipv6-unicast attribute-unchanged** functionality. This command prevents
the router from modifying specific BGP attributes when advertising IPv6 routes to a neighbor.
The **as-path** option prevents the router from prepending its local AS to the path.
The **med** option preserves the Multi-Exit Discriminator value without modification.
The **next-hop** option keeps the original next-hop address instead of replacing it.
.. image:: attribute-unchanged.svg
:width: 800
*************************************************************************
Test eBGP IPv6 - Default behavior modifies attributes on re-advertisement
*************************************************************************
Description
===========
Baseline test showing default eBGP re-advertisement behavior for IPv6. DUT1 (AS 200)
originates 2001:db8:10::/64. DUT0 (AS 100) receives and forwards to DUT2 (AS 300)
without attribute-unchanged. DUT2 should see next-hop changed to DUT0's IP and
AS-path prepended with AS 100.
Scenario
========
.. include:: attribute-unchanged/testebgpipv6-defaultbehaviormodifiesattributesonre-advertisement
.. raw:: html
********************************************
Test eBGP IPv6 - Attribute-unchanged as-path
********************************************
Description
===========
Verify that **attribute-unchanged as-path** prevents DUT0 from prepending its AS
when re-advertising IPv6 routes. DUT0 forwards to DUT2 without adding AS 100 to the path.
Scenario
========
.. include:: attribute-unchanged/testebgpipv6-attribute-unchangedas-path
.. raw:: html
*********************************************
Test eBGP IPv6 - Attribute-unchanged next-hop
*********************************************
Description
===========
Verify that **attribute-unchanged next-hop** preserves the original next-hop
when re-advertising IPv6 routes. DUT0 forwards to DUT2 keeping DUT1's global address
as next-hop, but AS-path is still prepended with DUT0's AS.
Unlike IPv4 where the preserved next-hop is marked as (inaccessible), in IPv6 BGP
updates carry both a global and a link-local next-hop, so FRR resolves reachability
via the link-local address and the route remains usable.
Scenario
========
.. include:: attribute-unchanged/testebgpipv6-attribute-unchangednext-hop
.. raw:: html
****************************************
Test eBGP IPv6 - Attribute-unchanged med
****************************************
Description
===========
Verify that **address-family ipv6-unicast attribute-unchanged med** preserves the MED value
when re-advertising routes. DUT1 sets MED 50 and DUT2 should see it unchanged.
Scenario
========
.. include:: attribute-unchanged/testebgpipv6-attribute-unchangedmed
.. raw:: html