IP Routing Protocol - MP BGP (Multiprotocol BGP) ===================================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is MP_BGP?** MP-BGP (Multiprotocol BGP) is an extension of the Border Gateway Protocol (BGP) that allows it to carry routing information for multiple network layer protocols, not just IPv4 unicast. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why was MP-BGP introduced?** Standard BGP only supports IPv4 unicast. MP-BGP was introduced to support: * IPV6 routing * Multicast routing * MPLS VPNs (VPNv4/VPNv6) * Layer 2 VPNs (L2VPN) * Ethernet VPNs (EVPN) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are Address Families (AFI/SAFI)?** MP-BGP uses AFI (Address Family Identifier) and SAFI (Subsequent Address Family Identifier) to distinguish between different types of routing information, such as: * IPv4 unicast: AFI=1, SAFI=1 * IPv6 unicast: AFI=2, SAFI=1 * VPNv4: AFI=1, SAFI=128 * L2VPN: AFI=25, SAFI=70 .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is MP-BGP backward compatible with BGP?** Yes. MP-BGP is an extension, so routers that support MP-BGP can still interoperate with routers running standard BGP for IPv4 unicast. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is MP-BGP commonly used?** * Service Provider Networks: For MPLS Layer 3 VPNs * Data Centers: For EVPN and VXLAN overlays * Multicast Networks: To distribute multicast routing information * IPv6 Deployments: To support IPv6 routing alongside IPv4 .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are the benefits of MP-BGP?** * Flexibility: Supports multiple protocols in a single BGP session * Scalability: Efficient for large-scale VPN and data center deployments * Separation of control planes: Keeps different routing domains logically isolated .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is MP-BGP Windows specific?** No, MP-BGP is not Windows specific. It is a standardized routing protocol used across various platforms and network devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is MP-BGP Linux specific?** No, MP-BGP is not Linux specific. It can be implemented on Linux-based routers and network appliances as well as other operating systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by MP-BGP?** MP-BGP uses TCP as its transport protocol, specifically on port 179. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by MP-BGP?** MP-BGP uses TCP port 179. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is MP-BGP using client-server model?** MP-BGP uses a peer-to-peer model where routers establish TCP sessions to exchange routing information, not a strict client-server model. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`MP_BGP Version&RFC Details ` * :ref:`MP_BGP Basic Setup on Ubuntu using IPv6 ` * :ref:`MP_BGP Protocol Packet Details ` * :ref:`MP_BGP Usecases ` * :ref:`MP_BGP Basic Features ` * :ref:`MP_BGP Feature : Multiprotocol Support ` * :ref:`MP_BGP Feature : AFI_SAFI Mechanism ` * :ref:`MP_BGP Feature : MP_REACH_NLRI Attribute ` * :ref:`MP_BGP Feature : MP_UNREACH_NLRI Attribute ` * :ref:`MP_BGP Feature : Backward Compatibility ` * :ref:`MP_BGP Feature : Separate Routing Tables ` * :ref:`MP_BGP Feature : Flexible Transport ` * :ref:`MP_BGP Feature : Scalability ` * :ref:`MP_BGP Feature : Policy Control ` * :ref:`MP_BGP Feature : Extensibility ` * :ref:`Reference links ` .. _MP_BGP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _MP_BGP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _MP_BGP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _MP_BGP_step5: .. tab-set:: .. tab-item:: MP_BGP Version&RFC Details .. csv-table:: :file: ./MP_BGP/MP_BGP_Version_RFC_details.csv :widths: 10,10,10,30 :header-rows: 1 .. _MP_BGP_step20: .. tab-set:: .. tab-item:: MP_BGP Basic Setup on Ubuntu using IPv6 **Testcase 1: MP-BGP Session Establishment for IPv6** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Ubuntu virtual machines. * Connect both VMs using a virtual Ethernet cable. 1. Open GNS3 2. Add **two Ubuntu VMs** to the canvas 3. Connect the VMs using an **Ethernet link** 4. Start both virtual machines * Step-2 : Install FRR on Both VMs .. code-block:: shell $ sudo apt update $ sudo apt install frr frr-pythontools -y * Step-3 : Enable Required FRR Daemons .. code-block:: shell $ sudo nano /etc/frr/daemons .. note:: Make sure the following lines are set to "yes": .. code-block:: text zebra=yes bgpd=yes Then restart and enable FRR: .. code-block:: shell $ sudo systemctl restart frr $ sudo systemctl enable frr * Step-4 : Start Wireshark Capture in GNS3 * Right-click the Ethernet link between VM1 and VM2 * Click **Start Capture** * Step-5 : Assign IPv6 Addresses to Interfaces .. code-block:: shell VM A: $ sudo ip -6 addr add 2001:db8:1::1/64 dev enp0s8 $ sudo ip link set enp0s8 up VM B: $ sudo ip -6 addr add 2001:db8:1::2/64 dev enp0s8 $ sudo ip link set enp0s8 up .. note:: * Replace `enp0s8` with your actual interface name (check using `ip a`) * Both interfaces must be on the same IPv6 subnet * Step-6 : Configure MP-BGP for IPv6 on Both VMs .. code-block:: shell # On VM A $ sudo vtysh configure terminal router bgp 65001 bgp router-id 1.1.1.1 neighbor 2001:db8:1::2 remote-as 65002 address-family ipv6 unicast neighbor 2001:db8:1::2 activate exit-address-family exit exit write # On VM B $ sudo vtysh configure terminal router bgp 65002 bgp router-id 2.2.2.2 neighbor 2001:db8:1::1 remote-as 65001 address-family ipv6 unicast neighbor 2001:db8:1::1 activate exit-address-family exit exit write * Expected Behavior (Wireshark Capture) * **TCP handshake** between the two BGP peers * **BGP OPEN** messages exchanged: - BGP version - AS number - BGP Identifier - Optional parameters including **Multiprotocol capability for IPv6** * **BGP KEEPALIVE**: - Periodic messages to maintain the session * **BGP UPDATE**: - Empty UPDATE with no route advertisements - Confirms that MP-BGP capability negotiation succeeded .. note:: * This test verifies that BGP sessions can be established over IPv6 using MP-BGP extensions. * No prefixes are advertised in this test. * Wireshark Capture :download:`Download wireshark capture ` **Testcase 2: MP_REACH_NLRI – IPv6 Route Advertisement** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Cisco 7200 routers (C7200). * Connect both routers using a virtual Ethernet cable. 1. Open GNS3 2. Add **two C7200 routers** to the canvas 3. Connect the routers using an **Ethernet link** 4. Start both routers and open their **console** windows * Step-2 : Configure IPv6 and BGP on Both Routers .. code-block:: none # On R1: config terminal ipv6 unicast-routing interface FastEthernet0/0 ipv6 address 2001:1::1/64 no shutdown exit interface Loopback0 ipv6 address 2001:10::1/128 exit router bgp 65000 bgp router-id 1.1.1.1 no bgp default ipv4-unicast neighbor 2001:1::2 remote-as 65001 address-family ipv6 neighbor 2001:1::2 activate network 2001:10::1/128 exit-address-family exit # Check connectivity from R1 ping ipv6 2001:1::2 # On R2: config terminal ipv6 unicast-routing interface FastEthernet0/0 ipv6 address 2001:1::2/64 no shutdown exit interface Loopback0 ipv6 address 2001:20::2/128 exit router bgp 65001 bgp router-id 2.2.2.2 no bgp default ipv4-unicast neighbor 2001:1::1 remote-as 65000 address-family ipv6 neighbor 2001:1::1 activate network 2001:20::2/128 exit-address-family exit # Check connectivity from R2 ping ipv6 2001:1::1 * Step-3 : Start Wireshark Capture in GNS3 * Right-click the Ethernet link between R1 and R2 * Click **Start Capture** * Expected Behavior (Wireshark Capture) * **TCP handshake** between the two BGP peers. * **BGP OPEN** message: - Contains BGP version - AS number - BGP Identifier - Optional parameters including **Multiprotocol capability for IPv6** * **BGP KEEPALIVE**: - Periodic messages to keep the session alive * **BGP UPDATE**: - Includes **MP_REACH_NLRI** (Multiprotocol Reachable NLRI) - Carries the IPv6 loopback prefixes: - 2001:10::1/128 from R1 - 2001:20::2/128 from R2 - Path attributes: - **NEXT_HOP** (IPv6 next-hop address) - **AS_PATH** - **MP_REACH_NLRI** .. note:: * This test validates IPv6 prefix advertisement over MP-BGP. * MP_REACH_NLRI is used to carry reachability information for IPv6 routes. * The UPDATE message confirms successful route propagation over BGP IPv6 AFI/SAFI. * Wireshark Capture :download:`Download wireshark capture ` **Testcase 3: MP_UNREACH_NLRI – IPv6 Route Withdrawal** * Step-1 : Launch GNS3 and Create Network Topology .. note:: * Use GNS3 to simulate two Cisco 7200 routers (C7200). * Connect both routers using a virtual Ethernet cable. 1. Open GNS3 2. Add **two C7200 routers** to the canvas 3. Connect the routers using an **Ethernet link** 4. Start both routers and open their **console** windows * Step-2 : Configure IPv6 and BGP on Both Routers .. code-block:: none # On R1: config terminal ipv6 unicast-routing interface FastEthernet0/0 ipv6 address 2001:1::1/64 no shutdown exit interface Loopback0 ipv6 address 2001:10::1/128 exit router bgp 65000 bgp router-id 1.1.1.1 no bgp default ipv4-unicast neighbor 2001:1::2 remote-as 65001 address-family ipv6 neighbor 2001:1::2 activate network 2001:10::1/128 exit-address-family exit # Check connectivity from R1 ping ipv6 2001:1::2 # On R2: config terminal ipv6 unicast-routing interface FastEthernet0/0 ipv6 address 2001:1::2/64 no shutdown exit interface Loopback0 ipv6 address 2001:20::2/128 exit router bgp 65001 bgp router-id 2.2.2.2 no bgp default ipv4-unicast neighbor 2001:1::1 remote-as 65000 address-family ipv6 neighbor 2001:1::1 activate network 2001:20::2/128 exit-address-family exit # Check connectivity from R2 ping ipv6 2001:1::1 * Step-3 : Start Wireshark Capture in GNS3 * Right-click the Ethernet link between R1 and R2 * Click **Start Capture** * Step-4 : Withdraw IPv6 Routes to Trigger MP_UNREACH_NLRI .. code-block:: none # On R1: config terminal router bgp 65000 address-family ipv6 no network 2001:10::1/128 exit-address-family exit * Expected Behavior (Wireshark Capture) * **TCP handshake** between the two BGP peers * **BGP OPEN** messages exchanged: - Contains BGP version - AS number - BGP Identifier - Optional parameters including **Multiprotocol capability for IPv6** * **BGP KEEPALIVE** messages maintain the session * **BGP UPDATE** messages: - Initially include **MP_REACH_NLRI** - Carries IPv6 loopback prefixes: - `2001:10::1/128` from R1 - `2001:20::2/128` from R2 - Includes path attributes like **AS_PATH**, **NEXT_HOP**, etc. - Later includes **MP_UNREACH_NLRI**: - Lists the **withdrawn IPv6 prefixes** - No NLRI field (since it's a withdrawal) - Confirms removal of advertised prefixes from BGP table .. note:: * This test verifies **route withdrawal using MP_UNREACH_NLRI** in an MP-BGP IPv6 environment. * MP_UNREACH_NLRI is essential for removing IPv6 prefixes in BGP updates. * Wireshark Capture :download:`Download wireshark capture ` .. _MP_BGP_step6: .. tab-set:: .. tab-item:: MP_BGP Protocol Packet Details **MP_BGP OPEN Packet** .. csv-table:: :file: ./MP_BGP/MP_BGP_Packetdetails1.csv :widths: 10,20,30,10 :header-rows: 1 **MP_BGP UPDATE Packet** .. csv-table:: :file: ./MP_BGP/MP_BGP_Packetdetails2.csv :widths: 10,20,30,10 :header-rows: 1 **MP_BGP KEEPALIVE Packet** .. csv-table:: :file: ./MP_BGP/MP_BGP_Packetdetails3.csv :widths: 10,20,30,10 :header-rows: 1 **MP_BGP NOTIFICATION Packet** .. csv-table:: :file: ./MP_BGP/MP_BGP_Packetdetails4.csv :widths: 10,20,30,10 :header-rows: 1 .. _MP_BGP_step7: .. tab-set:: .. tab-item:: MP_BGP Usecases .. csv-table:: :file: ./MP_BGP/MP_BGP_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _MP_BGP_step8: .. tab-set:: .. tab-item:: MP_BGP Basic Features .. csv-table:: :file: ./MP_BGP/MP_BGP_Basic_Features.csv :widths: 10,10,30 :header-rows: 1 .. _MP_BGP_step9: .. tab-set:: .. tab-item:: MP_BGP Feature : Multiprotocol Support **Multiprotocol Support - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature1_Multiprotocol_Support_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step10: .. tab-set:: .. tab-item:: MP_BGP Feature : AFI_SAFI Mechanism **AFI_SAFI Mechanism - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature2_AFI_SAFI_Mechanism.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step11: .. tab-set:: .. tab-item:: MP_BGP Feature : MP_REACH_NLRI Attribute **MP_REACH_NLRI Attribute - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature3_MP_REACH_NLRI_Attribute_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step12: .. tab-set:: .. tab-item:: MP_BGP Feature : MP_UNREACH_NLRI Attribute **MP_UNREACH_NLRI Attribute - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature4_MP_UNREACH_NLRI_Attribute_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step13: .. tab-set:: .. tab-item:: MP_BGP Feature : Backward Compatibility **Backward Compatibility - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature5_Backward_Compatibility_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step14: .. tab-set:: .. tab-item:: MP_BGP Feature : Separate Routing Tables **Separate Routing Tables - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature6_Separate_Routing_Tables_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step15: .. tab-set:: .. tab-item:: MP_BGP Feature : Flexible Transport **Flexible Transport - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature7_Flexible_Transport_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step16: .. tab-set:: .. tab-item:: MP_BGP Feature : Scalability **Scalability - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature8_Scalability_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step17: .. tab-set:: .. tab-item:: MP_BGP Feature : Policy Control **Policy Control - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature9_Policy_Control_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step18: .. tab-set:: .. tab-item:: MP_BGP Feature : Extensibility **Extensibility - Testcases** .. csv-table:: :file: ./MP_BGP/MP_BGP_Feature10_Extensibility_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _MP_BGP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links