多平台统一管理软件接口,如何实现多平台统一管理软件接口
500
2022-09-16
华为设备配置Hub and Spoke
1. 配置接口IP地址
[hub-CE-GigabitEthernet0/0/0]ip add 10.1.1.1 24
[hub-CE-GigabitEthernet0/0/1]ip add 20.1.1.1 24
[hub-PE-GigabitEthernet0/0/0]ip add 10.1.1.2 24
[hub-PE-GigabitEthernet0/0/1]ip add 20.1.1.2 24
[hub-PE-GigabitEthernet0/0/2]ip add 30.1.1.2 24
[hub-PE-GigabitEthernet4/0/0]ip add 40.1.1.2 24
[hub-PE-LoopBack0]ip add 2.2.2.2 32
[spoke-PE1-GigabitEthernet0/0/0]ip add 30.1.1.3 24
[spoke-PE1-GigabitEthernet0/0/1]ip add 50.1.1.3 24
[spoke-PE1-LoopBack0]ip add 3.3.3.3 32
[spoke-PE2-GigabitEthernet0/0/0]ip add 40.1.1.4 24
[spoke-PE2-GigabitEthernet0/0/1]ip add 60.1.1.4 24
[spoke-PE2-LoopBack0]ip add 4.4.4.4 32
[spoke-CE1-GigabitEthernet0/0/0]ip add 50.1.1.5 24
[spoke-CE2-GigabitEthernet0/0/0]ip add 60.1.1.6 24
2. 在骨干网上配置OSPF协议,实现骨干网Hub-PE和Spoke-PE的互通
[hub-PE]ospf 1
[hub-PE-ospf-1]area 0
[hub-PE-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[hub-PE-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.255
[hub-PE-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.255
[spoke-PE1]ospf 1
[spoke-PE1-ospf-1]area 0
[spoke-PE1-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.255
[spoke-PE1-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[spoke-PE2]ospf 1
[spoke-PE2-ospf-1]area 0
[spoke-PE2-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[spoke-PE2-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.255
3. 在骨干网上配置MPLS基本能力和MPLS LDP,建立LDP LSP
[hub-PE]mpls lsr-id 2.2.2.2
[hub-PE]mpls
[hub-PE-mpls]label advertise non-null
[hub-PE]mpls ldp
[hub-PE-GigabitEthernet0/0/2]mpls
[hub-PE-GigabitEthernet0/0/2]mpls ldp
[hub-PE-GigabitEthernet4/0/0]mpls
[hub-PE-GigabitEthernet4/0/0]mpls ldp
[spoke-PE1]mpls lsr-id 3.3.3.3
[spoke-PE1]mpls
[spoke-PE1-mpls]label advertise non-null
[spoke-PE1]mpls ldp
[spoke-PE1-GigabitEthernet0/0/0]mpls
[spoke-PE1-GigabitEthernet0/0/0]mpls ldp
[spoke-PE2]mpls lsr-id 4.4.4.4
[spoke-PE2]mpls
[spoke-PE2-mpls]label advertise non-null
[spoke-PE2]mpls ldp
[spoke-PE2-GigabitEthernet0/0/0]mpls
[spoke-PE2-GigabitEthernet0/0/0]mpls ldp
4. 在各PE设备上配置VPN实例,将CE接入PE
[spoke-PE1]ip vpn-instance vpna
[spoke-PE1-vpn-instance-vpna]ipv4-family
[spoke-PE1-vpn-instance-vpna-af-ipv4]route-distinguisher 100:1
[spoke-PE1-vpn-instance-vpna-af-ipv4]vpn-target 100:1 export-extcommunity
[spoke-PE1-vpn-instance-vpna-af-ipv4]vpn-target 200:1 import-extcommunity
[spoke-PE1-GigabitEthernet0/0/1]ip binding vpn-instance vpna
[spoke-PE1-GigabitEthernet0/0/1]ip add 50.1.1.3 24
[spoke-PE2]ip vpn-instance vpna
[spoke-PE2-vpn-instance-vpna]ipv4-family
[spoke-PE2-vpn-instance-vpna-af-ipv4]route-distinguisher 100:3
[spoke-PE2-vpn-instance-vpna-af-ipv4]vpn-target 100:1 export-extcommunity
[spoke-PE2-vpn-instance-vpna-af-ipv4]vpn-target 200:1 import-extcommunity
[spoke-PE2-GigabitEthernet0/0/1]ip binding vpn-instance vpna
[spoke-PE2-GigabitEthernet0/0/1]ip add 60.1.1.4 24
[hub-PE]ip vpn-instance vpn_in
[hub-PE-vpn-instance-vpn_in]ipv4-family
[hub-PE-vpn-instance-vpn_in-af-ipv4]route-distinguisher 100:21
[hub-PE-vpn-instance-vpn_in-af-ipv4]vpn-target 100:1 import-extcommunity
[hub-PE]ip vpn-instance vpn_out
[hub-PE-vpn-instance-vpn_out]ipv4-family
[hub-PE-vpn-instance-vpn_out-af-ipv4]route-distinguisher 100:22
[hub-PE-vpn-instance-vpn_out-af-ipv4]vpn-target 200:1 export-extcommunity
[hub-PE-GigabitEthernet0/0/0]ip binding vpn-instance vpn_in
[hub-PE-GigabitEthernet0/0/0]ip add 10.1.1.2 24
[hub-PE-GigabitEthernet0/0/1]ip binding vpn-instance vpn_out
[hub-PE-GigabitEthernet0/0/1]ip add 20.1.1.2 24
5. 在PE与CE之间建立EBGP对等体关系,引入VPN路由
[spoke-CE1]bgp 65450
[spoke-CE1-bgp]peer 50.1.1.3 as-number 100
[spoke-CE1-bgp]import-route direct
[spoke-PE1]bgp 100
[spoke-PE1-bgp]ipv4-family vpn-instance vpna
[spoke-PE1-bgp-vpna]peer 50.1.1.5 as-number 65450
[spoke-PE1-bgp-vpna]import-route direct
[spoke-CE2]bgp 65460
[spoke-CE2-bgp]peer 60.1.1.4 as-number 100
[spoke-CE2-bgp]import-route direct
[spoke-PE2]bgp 100
[spoke-PE2-bgp]ipv4-family vpn-instance vpna
[spoke-PE2-bgp-vpna]peer 60.1.1.6 as-number 65460
[spoke-PE2-bgp-vpna]import-route direct
[hub-CE]bgp 65410
[hub-CE-bgp]peer 10.1.1.2 as-number 100
[hub-CE-bgp]peer 20.1.1.2 as-number 100
[hub-CE-bgp]import-route direct
[hub-PE]bgp 100
[hub-PE-bgp]ipv4-family vpn-instance vpn_in
[hub-PE-bgp-vpn_in]peer 10.1.1.1 as-number 65410
[hub-PE-bgp-vpn_in]import-route direct
[hub-PE-bgp]ipv4-family vpn-instance vpn_out
[hub-PE-bgp-vpn_out]peer 20.1.1.1 as-number 65410
[hub-PE-bgp-vpn_out]peer 20.1.1.1 allow-as-loop 1
[hub-PE-bgp-vpn_out]import-route direct
6. 在Spoke-PE与Hub-PE之间建立MP-IBGP对等体关系
[spoke-PE1]bgp 100
[spoke-PE1-bgp]peer 2.2.2.2 as-number 100
[spoke-PE1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[spoke-PE1-bgp]ipv4-family vpnv4
[spoke-PE1-bgp-af-vpnv4]peer 2.2.2.2 enable
[spoke-PE2]bgp 100
[spoke-PE2-bgp]peer 2.2.2.2 as-number 100
[spoke-PE2-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[spoke-PE2-bgp]ipv4-family vpnv4
[spoke-PE2-bgp-af-vpnv4]peer 2.2.2.2 enable
[hub-PE]bgp 100
[hub-PE-bgp]peer 3.3.3.3 as-number 100
[hub-PE-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[hub-PE-bgp]peer 4.4.4.4 as-number 100
[hub-PE-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[hub-PE-bgp]ipv4-family vpnv4
[hub-PE-bgp-af-vpnv4]peer 3.3.3.3 enable
[hub-PE-bgp-af-vpnv4]peer 4.4.4.4 enable
7. 检查配置
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~