Today, the Huawei Datacom HCIE exam room just received the news that the question has been changed. The lobby immediately asked everyone for the technical documents you need from Brother Jun! SRv6 replaces BGP VPNv4 to realize communication between different sites! ! Freshly released, come and take a look!


Today, the Huawei Datacom HCIE exam room just received the news that the question has been changed. The lobby immediately asked everyone for the technical documents you need from Brother Jun!


SRv6 replaces BGP VPNv4 to realize communication between different sites! !


Freshly released, come and take a look!


01 Experiment purpose




Use SRv6 to replace MPLS communication of BGP VPNv4 to realize communication between three customer sites


02 Experimental topology




03 Experimental steps



Step 1. Configure the IGP protocol of the backbone network


This example uses the isis protocol. The purpose of this step is to make loopback interface 0, which is the BGP update source, routable.


The configuration is as follows


3 PE devices shut down DCN

undo dcn

Warning: This operation will disable DCN function. Continue? [Y/N]:y

PE1:

isis 1

 is-level level-2

 cost-style wide

 network-entity 49.1111.1111.1111.1111.00

 is-name PE1

 #

 ipv6 enable topology ipv6

interface LoopBack0

 description BGP-Source

 ipv6 enable

 ipv6 address 1::1/128

 isis ipv6 enable 1

interface Ethernet1/0/0

 undo shutdown

 ipv6 enable

 ipv6 address 2123::1/64

 isis ipv6 enable 1

PE2:

isis 1

 is-level level-2

 cost-style wide

 network-entity 49.2222.2222.2222.2222.00

 is-name PE2

 #

 ipv6 enable topology ipv6

interface LoopBack0

 description BGP-Source

 ipv6 enable

 ipv6 address 2::2/128

 isis ipv6 enable 1

interface Ethernet1/0/0

 undo shutdown

 ipv6 enable

 ipv6 address 2123::2/64

 isis ipv6 enable 1

PE3:

#

isis 1

 is-level level-2

 cost-style wide

 network-entity 49.3333.3333.3333.3333.00

 is-name PE3

 #

 ipv6 enable topology ipv6

interface LoopBack0

 ipv6 enable

 ipv6 address 3::3/128

 isis ipv6 enable 1

interface Ethernet1/0/0

 undo shutdown

 ipv6 enable

 ipv6 address 2123::3/64

 isis ipv6 enable 1


Verify the neighbor relationship of ISIS. The correct result is as follows


[PE2]display isis peer

                          Peer information for ISIS(1)

                         

  System Id     Interface          Circuit Id        State HoldTime Type     PRI

--------------------------------------------------------------------------------

PE1*            Eth1/0/0           PE3.01             Up   29s      L2       64

PE3*            Eth1/0/0           PE3.01             Up   7s       L2       64 


Check the IPv6 routing table obtained by ISIS, focusing on the routing information of the loopback interface addresses of the other two devices.


[PE2]display ipv6 routing-table protocol isis

_public_ Routing Table : IS-IS

Summary Count : 4


IS-IS routing table status : <Active>

Summary Count : 2


Destination  : 1::1                                    PrefixLength : 128

NextHop      : FE80::3A6E:A4FF:FE01:100                Preference   : 15

Cost         : 10                                      Protocol     : ISIS-L2

RelayNextHop : ::                                      TunnelID     : 0x0

Interface    : Ethernet1/0/0                           Flags        : D


Destination  : 3::3                                    PrefixLength : 128

NextHop      : FE80::3A6E:A4FF:FE03:100                Preference   : 15

Cost         : 10                                      Protocol     : ISIS-L2

RelayNextHop : ::                                      TunnelID     : 0x0

Interface    : Ethernet1/0/0                           Flags        : D


IS-IS routing table status : <Inactive>

Summary Count : 2


Destination  : 2::2                                    PrefixLength : 128

NextHop      : 2::2                                    Preference   : 15

Cost         : 0                                       Protocol     : ISIS-L2

RelayNextHop : ::                                      TunnelID     : 0x0

Interface    : LoopBack0                               Flags        :                


Destination  : 2123::                                  PrefixLength : 64

NextHop      : 2123::2                                 Preference   : 15

Cost         : 0                                       Protocol     : ISIS-L2

RelayNextHop : ::                                      TunnelID     : 0x0

Interface    : Ethernet1/0/0                           Flags        :                


Test the communication of the loopback interface to facilitate the establishment of BGP neighbor relationships later.


[PE2]ping ipv6 -a 2::2 1::1

  PING 1::1 : 56  data bytes, press CTRL_C to break

    Reply from 1::1

    bytes=56 Sequence=1 hop limit=64 time=38 ms

    Reply from 1::1

    bytes=56 Sequence=2 hop limit=64 time=43 ms

    Reply from 1::1

    bytes=56 Sequence=3 hop limit=64 time=34 ms

            

  --- 1::1 ping statistics---

    3 packet(s) transmitted

    3 packet(s) received

    0.00% packet loss

    round-trip min/avg/max=34/38/43 ms


[PE2]ping ipv6 -a 2::2 3::3

  PING 3::3 : 56  data bytes, press CTRL_C to break

    Reply from 3::3

    bytes=56 Sequence=1 hop limit=64 time=29 ms

    Reply from 3::3

    bytes=56 Sequence=2 hop limit=64 time=43 ms

    Reply from 3::3

    bytes=56 Sequence=3 hop limit=64 time=45 ms

    Reply from 3::3

    bytes=56 Sequence=4 hop limit=64 time=38 ms    


Step 2. Configure L3VPN content such as PE’s VPNv4 neighbor relationship and VPN instance


Configure VPNv4 neighbor, R2 plays the role of RR


PE2:

bgp 100

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack0

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack0

 #

 ipv4-family unicast

  undo synchronization

 #

 ipv4-family vpnv4

  policy vpn-target

  peer 1::1 enable

  peer 1::1 reflect-client

  peer 3::3 enable

  peer 3::3 reflect-client

PE1:

bgp 100

 router-id 1.1.1.1

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack0

 #

 ipv4-family unicast

  undo synchronization

 #

 ipv4-family vpnv4

  policy vpn-target

  peer 2::2 enable

PE3:

bgp 100

 router-id 3.3.3.3

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack0

 #

 ipv4-family unicast

  undo synchronization

 #

 ipv4-family vpnv4

  policy vpn-target

  peer 2::2 enable

[PE2]dis bgp vpnv4 all peer


 BGP local router ID : 2.2.2.2

 Local AS number : 100

 Total number of peers : 2                 Peers in established state : 2


  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State  PrefRcv

  1::1            4         100        7        7     0 00:03:20 Established        0

  3::3            4         100        6        5     0 00:02:23 Established        0      

The BGP VPNv4 neighbor relationship is all normal. Since no VPN instance has been deployed yet, no customer routes appear at this time.


Step 3. Configure a VPN instance on the PE, and the protocol with the client is BGP.


Configure VPN instances on 3 PE devices


ip vpn-instance QYT

 ipv4-family

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity


Configure the contents of PE1 and CE-HZ


PE1

bgp 100

 ipv4-family vpn-instance QYT

  peer 10.1.12.2 as-number 64512

  peer 10.1.12.2 substitute-as

 CE-HZ:

 bgp 64512

 router-id 10.2.2.2

 peer 10.1.12.1 as-number 100

 #

 ipv4-family unicast

  undo synchronization

  network 10.2.2.2 255.255.255.255

  peer 10.1.12.1 enable


Configure the contents of PE2 and CE-SH


PE2

bgp 100

 ipv4-family vpn-instance QYT

  peer 10.1.23.3 as-number 64512

  peer 10.1.23.3 substitute-as

CE-SH  

bgp 64512

 router-id 10.3.3.3

 peer 10.1.23.2 as-number 100

 #

 ipv4-family unicast

  undo synchronization

  network 10.3.3.3 255.255.255.255

  peer 10.1.23.2 enable


Configure the contents of PE3 and CE-BJ


PE3:

bgp 100

 ipv4-family vpn-instance QYT

  peer 10.1.34.4 as-number 64512

  peer 10.1.34.4 substitute-as

CE-BJ

  bgp 64512

 router-id 10.4.4.4

 peer 10.1.34.3 as-number 100

 #

 ipv4-family unicast

  undo synchronization

  network 10.4.4.4 255.255.255.255

  peer 10.1.34.3 enable


View all client-side routing information on PE2


[PE2]display bgp vpnv4 all routing-table


 BGP Local router ID is 2.2.2.2

 Status codes: * - valid, > - best, d - damped, x - best external, a - add path,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

 RPKI validation codes: V - valid, I - invalid, N - not-found



 Total number of routes from all PE: 3

 Route Distinguisher: 1:1



        Network            NextHop                       MED        LocPrf    PrefVal Path/Ogn


 *>i    10.2.2.2/32        1::1                           0          100        0      64512i

 *>     10.3.3.3/32        10.1.23.3                      0                     0      64512i

 *>i    10.4.4.4/32        3::3                           0          100        0      64512i

    

 VPN-Instance QYT, Router ID 2.2.2.2:


 Total Number of Routes: 3

        Network            NextHop                       MED        LocPrf    PrefVal Path/Ogn


   i    10.2.2.2/32        1::1                           0          100        0      64512i

 *>     10.3.3.3/32        10.1.23.3                      0                     0      64512i

   i    10.4.4.4/32        3::3                           0          100        0      64512i


At this point, the conventional L3VPN has been configured, and it is not much different from MPLS L3VPN.


Step 4. Configure SRv6


Important SRv6 logic:


Similar to BGP VPNv4, a forwarding path for SRv6 BE needs to be established between PEs.

Note that the End.DT4 standard SID (prefix ID) can be dynamically allocated through BGP or statically configured. When static configuration and dynamically assigned SID exist at the same time, the static configuration takes effect first.

Classic configuration steps on PE devices:


1. Enable SRv6 globally and configure the encapsulation source address and Locator (locator)


segment-routing ipv6 //Enter SRv6 configuration mode

encapsulation source-address 2001::2:2

locator QYT ipv6-prefix 2001:2::96 static 16 //The configuration locator is named QYT, and the assigned prefix is the static prefix of 2001:2::/96

PE1:

segment-routing ipv6//Enter SRv6 configuration mode

encapsulation source-address 1::1 //Configure the source address of encapsulated SRv6. This address is usually advertised in the global IGP.

locator QYT ipv6-prefix 2001:1::96 static 16 //The configuration locator is named QYT, and the assigned prefix is the static prefix of 2001:1::/96.


Each PE can be assigned a different prefix locator


PE2:

segment-routing ipv6

 encapsulation source-address 2::2

 locator QYT ipv6-prefix 2001:2:: 96 static 16

PE3:

segment-routing ipv6

 encapsulation source-address 3::3

 locator QYT ipv6-prefix 2001:3:: 96 static 16


View locator information allocated by SRv6


[PE1]display segment-routing ipv6 locator QYT verbose


                        Locator Configuration Table

                        ---------------------------


LocatorName  : QYT                                       LocatorID   : 2

IPv6Prefix   : 2001:1::                                  PrefixLength: 96

StaticLength : 16                                        Reference   : 0

Default      : N                                         ArgsLength  : 0

AutoSIDBegin : 2001:1::1:0

AutoSIDEnd   : 2001:1::FFFF:FFFF

[PE2]display segment-routing ipv6 locator QYT verbose


                        Locator Configuration Table

                        ---------------------------


LocatorName  : QYT                                       LocatorID   : 2

IPv6Prefix   : 2001:2::                                  PrefixLength: 96

StaticLength : 16                                        Reference   : 0

Default      : N                                         ArgsLength  : 0

AutoSIDBegin : 2001:2::1:0

AutoSIDEnd   : 2001:2::FFFF:FFFF


Total Locator(s): 1

[PE3]display segment-routing ipv6 locator QYT verbose


                        Locator Configuration Table

                        ---------------------------


LocatorName  : QYT                                       LocatorID   : 1

IPv6Prefix   : 2001:3::                                  PrefixLength: 96

StaticLength : 16                                        Reference   : 0

Default      : N                                         ArgsLength  : 0

AutoSIDBegin : 2001:3::1:0

AutoSIDEnd   : 2001:3::FFFF:FFFF


2. The PE carries SID information when transmitting private network routes to neighbors under the BGP VPNv4 address family.


[PE1]bgp 100


[PE1-bgp]ipv4-family vpnv4



[PE1-bgp-af-vpnv4]peer 2::2 prefix-sid //The VPNv4 address family carries SID information when transmitting customer routes to neighbor 2::2 (RR).

This information is carried in the BGP Update message.

!

[PE2]bgp 100


[PE2-bgp]ipv4-family vpnv4


[PE2-bgp-af-vpnv4]peer 1::1 prefix-sid

[PE2-bgp-af-vpnv4]peer 3::3 prefix-sid

!

[PE3]bgp 100


[PE3-bgp]ipv4-family vpnv4


[PE3-bgp-af-vpnv4]peer 2::2 prefix-sid


3. On the PE, enable the function of allocating prefix IDs to customer routes under the BGP VPN instance address family, and call the previously configured locator.


[PE1]bgp 100


[PE1-bgp]ipv4-family vpn-instance QYT


[PE1-bgp-QYT]segment-routing ipv6 best-effort //Enable SRv6 BE function under BGP instance address family


[PE1-bgp-QYT]segment-routing ipv6 locator QYT //Call the previously configured locator named QYT. The route from the customer can carry the SID assigned by the locator.

!

[PE2]bgp 100


[PE2-bgp] ipv4-family vpn-instance QYT

[PE2-bgp-QYT]  segment-routing ipv6 locator QYT

[PE2-bgp-QYT]  segment-routing ipv6 best-effort

!

[PE3]bgp 100

[PE3-bgp] ipv4-family vpn-instance QYT

[PE3-bgp-QYT]  segment-routing ipv6 locator QYT

[PE3-bgp-QYT]  segment-routing ipv6 best-effort


4. Call the previously configured SRv6 Locator function under the IGP protocol, update the SRv6 SID to the neighbor, and complete the following configuration on PE1 to 3 devices:


isis

segment-routing ipv6 locator QYT

[PE2]display isis route //View the route of the ISIS protocol. After enabling ISIS to support segment routing and calling it, you will see the corresponding assigned prefix segment to other PE loopback interfaces in the route.

                        ISIS(1) Level-2 Forwarding Table

                        --------------------------------


 IPV6 Dest.     ExitInterface      NextHop                    Cost     Flags    

--------------------------------------------------------------------------------

1::1/128        Eth1/0/0           FE80::3A6E:A4FF:FE01:100   10       A/-/-/-  

2::2/128        Loop0              Direct                     0        D/-/L/-  

3::3/128        Eth1/0/0           FE80::3A6E:A4FF:FE03:100   10       A/-/-/-  

2001:1::/96     Eth1/0/0           FE80::3A6E:A4FF:FE01:100   10       A/-/-/-  

2001:2::/96     -                  -                          0        A/-/L/-  

2001:3::/96     Eth1/0/0           FE80::3A6E:A4FF:FE03:100   10       A/-/-/-  

2123::/64       Eth1/0/0           Direct                     10       D/-/L/-  

     Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,

            U-Up/Down Bit Set, LP-Local Prefix-Sid


View information about SRv6 forwarding VPN instance routing data


[PE1]display segment-routing ipv6 local-sid end-dt4 forwarding


                    My Local-SID End.DT4 Forwarding Table

                    -------------------------------------


SID        : 2001:1::1:0/128                              FuncType : End.DT4

VPN Name   : QYT                                          VPN ID   : 2

LocatorName: QYT                                          LocatorID: 2


Total SID(s): 1

[PE2]display segment-routing ipv6 local-sid end-dt4  forwarding


                    My Local-SID End.DT4 Forwarding Table

                    -------------------------------------


SID        : 2001:2::1:0/128                              FuncType : End.DT4

VPN Name   : QYT                                          VPN ID   : 2

LocatorName: QYT                                          LocatorID: 2

[PE3]display segment-routing ipv6 local-sid end-dt4 forwarding


                    My Local-SID End.DT4 Forwarding Table

                    -------------------------------------


SID        : 2001:3::1:0/128                              FuncType : End.DT4

VPN Name   : QYT                                          VPN ID   : 2

LocatorName: QYT                                          LocatorID: 1


Total SID(s): 1


Test communication between sites


<CE-BJ>ping -a 10.4.4.4 10.3.3.3

  PING 10.3.3.3: 56  data bytes, press CTRL_C to break

    Reply from 10.3.3.3: bytes=56 Sequence=1 ttl=253 time=60 ms

    Reply from 10.3.3.3: bytes=56 Sequence=2 ttl=253 time=40 ms

    Reply from 10.3.3.3: bytes=56 Sequence=3 ttl=253 time=60 ms

    Reply from 10.3.3.3: bytes=56 Sequence=4 ttl=253 time=50 ms


  --- 10.3.3.3 ping statistics ---

    4 packet(s) transmitted

    4 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 40/52/60 ms


<CE-BJ>ping -a 10.4.4.4 10.2.2.2

  PING 10.2.2.2: 56  data bytes, press CTRL_C to break

    Reply from 10.2.2.2: bytes=56 Sequence=1 ttl=253 time=40 ms

    Reply from 10.2.2.2: bytes=56 Sequence=2 ttl=253 time=40 ms

    Reply from 10.2.2.2: bytes=56 Sequence=3 ttl=253 time=60 ms


  --- 10.2.2.2 ping statistics ---

    3 packet(s) transmitted