当前位置:网站首页>Configuring OSPF pseudo connection for Huawei devices

Configuring OSPF pseudo connection for Huawei devices

2022-06-12 14:21:00 Tony_ long7483

 Insert picture description here

  1. stay CE1、AR6、CE2 Configure the normal on the OSPF, Publish the network segment address of each interface
    [CE1-GigabitEthernet0/0/0]ip add 10.1.1.4 24
    [CE1-GigabitEthernet0/0/1]ip add 40.1.1.4 24
    [CE1]ospf 1
    [CE1-ospf-1]area 0
    [CE1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
    [CE1-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.255
    [AR6-GigabitEthernet0/0/1]ip add 40.1.1.6 24
    [AR6-GigabitEthernet0/0/2]ip add 50.1.1.6 24
    [AR6]ospf 1
    [AR6-ospf-1]area 0
    [AR6-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.255
    [AR6-ospf-1-area-0.0.0.0]network 50.1.1.0 0.0.0.255
    [CE2-GigabitEthernet0/0/0]ip add 10.2.1.5 24
    [CE2-GigabitEthernet0/0/1]ip add 50.1.1.5 24
    [CE2]ospf 1
    [CE2-ospf-1]area 0
    [CE2-ospf-1-area-0.0.0.0]network 10.2.1.0 0.0.0.255
    [CE2-ospf-1-area-0.0.0.0]network 50.1.1.0 0.0.0.255
  2. stay PE、P Configure the basic of the backbone network on BGP/MPLS IP VPN, Include : Configure the backbone network IGP; Configure the backbone network MPLS and LDP; stay PE Establish between MP-IBGP Peer relationship
    [PE1-LoopBack1]ip add 1.1.1.1 32
    [PE1-LoopBack10]ip add 5.5.5.5 32
    [PE1-GigabitEthernet0/0/0]ip add 20.1.1.1 24
    [PE1]mpls lsr-id 1.1.1.1
    [PE1]mpls
    [PE1]mpls ldp
    [PE1-GigabitEthernet0/0/0]mpls
    [PE1-GigabitEthernet0/0/0]mpls ldp
    [PE1]ospf 1 router-id 1.1.1.1
    [PE1-ospf-1]area 0
    [PE1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0]network 20.1.1.0 0.0.0.255
    [PE1]bgp 100
    [PE1-bgp]peer 3.3.3.3 as-number 100
    [PE1-bgp]peer 3.3.3.3 connect-interface LoopBack 1
    [PE1-bgp]ipv4-family vpnv4
    [PE1-bgp-af-vpnv4]peer 3.3.3.3 enable
    [P-LoopBack1]ip add 2.2.2.2 32
    [P]mpls lsr-id 2.2.2.2
    [P]mpls
    [P]mpls ldp
    [P-GigabitEthernet0/0/0]ip add 20.1.1.2 24
    [P-GigabitEthernet0/0/0]mpls
    [P-GigabitEthernet0/0/0]mpls ldp
    [P-GigabitEthernet0/0/1]ip add 30.1.1.2 24
    [P-GigabitEthernet0/0/1]mpls
    [P-GigabitEthernet0/0/1]mpls ldp
    [P]ospf 1 router-id 2.2.2.2
    [P-ospf-1]area 0
    [P-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
    [P-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0]network 20.1.1.0 0.0.0.255
    [PE2-LoopBack1]ip add 3.3.3.3 32
    [PE2-LoopBack10]ip add 6.6.6.6 32
    [PE2]mpls lsr-id 3.3.3.3
    [PE2]mpls
    [PE2]mpls ldp
    [PE2-GigabitEthernet0/0/0]ip add 30.1.1.3 24
    [PE2-GigabitEthernet0/0/0]mpls
    [PE2-GigabitEthernet0/0/0]mpls ldp
    [PE2]ospf 1 router-id 3.3.3.3
    [PE2-ospf-1]area 0
    [PE2-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
    [PE2-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.255
    [PE2]bgp 100
    [PE2-bgp]peer 1.1.1.1 as-number 100
    [PE2-bgp]peer 1.1.1.1 connect-interface LoopBack 1
    [PE2-bgp]ipv4-family vpnv4
    [PE2-bgp-af-vpnv4]peer 1.1.1.1 enable
  3. To configure PE And CE The connection of :PE And CE Inter operation OSPF
    [PE1]ip vpn-instance vpn1
    [PE1-vpn-instance-vpn1]ipv4-family
    [PE1-vpn-instance-vpn1-af-ipv4]route-distinguisher 100:1
    [PE1-vpn-instance-vpn1-af-ipv4]vpn-target 1:1
    [PE1-GigabitEthernet0/0/1]ip binding vpn-instance vpn1
    [PE1-GigabitEthernet0/0/1]ip add 10.1.1.1 24
    [PE1]ospf 100 router-id 5.5.5.5 vpn-instance vpn1
    [PE1-ospf-100]domain-id 10
    [PE1-ospf-100]import-route bgp
    [PE1-ospf-100]area 0
    [PE1-ospf-100-area-0.0.0.0]network 10.1.1.0 0.0.0.255
    [PE1]bgp 100
    [PE1-bgp]ipv4-family vpn-instance vpn1
    [PE1-bgp-vpn1]import-route direct
    [PE1-bgp-vpn1]import-route ospf 100
    [PE2]ip vpn-instance vpn1
    [PE2-vpn-instance-vpn1]ipv4-family
    [PE2-vpn-instance-vpn1-af-ipv4]route-distinguisher 100:2
    [PE2-vpn-instance-vpn1-af-ipv4]vpn-target 1:1
    [PE2-GigabitEthernet0/0/1]ip binding vpn-instance vpn1
    [PE2-GigabitEthernet0/0/1]ip add 10.2.1.3 24
    [PE2]ospf 100 router-id 6.6.6.6 vpn-instance vpn1
    [PE2-ospf-100]import-route direct
    [PE2-ospf-100]import-route bgp
    [PE2-ospf-100]domain-id 10
    [PE2-ospf-100]area 0
    [PE2-ospf-100-area-0.0.0.0]network 10.2.1.0 0.0.0.255
    [PE2]bgp 100
    [PE2-bgp]ipv4-family vpn-instance vpn1
    [PE2-bgp-vpn1]import-route direct
    [PE2-bgp-vpn1]import-route ospf 100
     Insert picture description here

See go to the opposite end CE Is routed through the user network OSPF route , Not through the backbone BGP route
4. Configure pseudo connection
[CE1-GigabitEthernet0/0/1]ospf cost 10
[CE2-GigabitEthernet0/0/1]ospf cost 10
[PE1]int LoopBack 10
[PE1-LoopBack10]ip binding vpn-instance vpn1
[PE1-LoopBack10]ip add 5.5.5.5 32
[PE1]ospf 100
[PE1-ospf-100]area 0
[PE1-ospf-100-area-0.0.0.0]sham-link 5.5.5.5 6.6.6.6 cost 1
[PE2]int LoopBack 10
[PE2-LoopBack10]ip binding vpn-instance vpn1
[PE2-LoopBack10]ip add 6.6.6.6 32
[PE2]ospf 100
[PE2-ospf-100]area 0
[PE2-ospf-100-area-0.0.0.0]sham-link 6.6.6.6 5.5.5.5 cost 1
5. Check the configuration
 Insert picture description here

See go to the opposite end CE The route through the backbone network BGP route , And there are going to sham-link Destination address routing
 Insert picture description here

See go to the opposite end CE Of OSPF The routing overhead becomes 3, The next hop is access PE Of g0/0/1 Interface , namely , Go to the opposite end VPN Traffic will be forwarded through the backbone
 Insert picture description here
 Insert picture description here

You can see the opposite end CE The routing of is as in the area (Intra Area) I learned

原网站

版权声明
本文为[Tony_ long7483]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121410345248.html