当前位置:网站首页>Huawei equipment configuration ospf-bgp linkage
Huawei equipment configuration ospf-bgp linkage
2022-07-06 06:49:00 【Tony7483】
1. Configure the interfaces VLAN
[LSW1]vlan batch 12 13
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 12
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 13
[LSW2]vlan batch 12 24
[LSW2-GigabitEthernet0/0/1]port link-type trunk
[LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 12
[LSW2-GigabitEthernet0/0/4]port link-type trunk
[LSW2-GigabitEthernet0/0/4]port trunk allow-pass vlan 24
[LSW3]vlan batch 13 34
[LSW3-GigabitEthernet0/0/1]port link-type trunk
[LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 13
[LSW3-GigabitEthernet0/0/4]port link-type trunk
[LSW3-GigabitEthernet0/0/4]port trunk allow-pass vlan 34
[LSW4]vlan batch 24 34 45
[LSW4-GigabitEthernet0/0/2]port link-type trunk
[LSW4-GigabitEthernet0/0/2]port trunk allow-pass vlan 24
[LSW4-GigabitEthernet0/0/3]port link-type trunk
[LSW4-GigabitEthernet0/0/3]port trunk allow-pass vlan 34
[LSW4-GigabitEthernet0/0/1]port link-type trunk
[LSW4-GigabitEthernet0/0/1]port trunk allow-pass vlan 45
[LSW5]vlan batch 10 45
[LSW5-GigabitEthernet0/0/1]port link-type trunk
[LSW5-GigabitEthernet0/0/1]port trunk allow-pass vlan 45
[LSW5-GigabitEthernet0/0/2]port link-type trunk
[LSW5-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
2. Configure the IP Address
[LSW1-Vlanif12]ip add 10.1.12.1 24
[LSW1-Vlanif13]ip add 10.1.13.1 24
[LSW1]int LoopBack 0
[LSW1-LoopBack0]ip add 10.1.1.1 32
[LSW2-Vlanif12]ip add 10.1.12.2 24
[LSW2-Vlanif24]ip add 10.1.24.2 24
[LSW2]int LoopBack 0
[LSW2-LoopBack0]ip add 10.2.2.2 32
[LSW3-Vlanif13]ip add 10.1.13.3 24
[LSW3-Vlanif34]ip add 10.1.34.3 24
[LSW3]int LoopBack 0
[LSW3-LoopBack0]ip add 10.3.3.3 32
[LSW4-Vlanif24]ip add 10.1.24.4 24
[LSW4-Vlanif34]ip add 10.1.34.4 24
[LSW4-Vlanif45]ip add 10.1.45.4 24
[LSW4]int LoopBack 0
[LSW4-LoopBack0]ip add 10.4.4.4 32
[LSW5-Vlanif45]ip add 10.1.45.5 24
[LSW5-Vlanif10]ip add 10.2.10.5 24
[LSW5]int LoopBack 0
[LSW5-LoopBack0]ip add 10.5.5.5 32
3. To configure OSPF Basic functions of
[LSW1]ospf 1 router-id 10.1.1.1
[LSW1-ospf-1]area 0
[LSW1-ospf-1-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]network 10.1.13.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0
[LSW2]ospf 1 router-id 10.2.2.2
[LSW2-ospf-1]area 0
[LSW2-ospf-1-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.0]network 10.1.24.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.0]network 10.2.2.2 0.0.0.0
[LSW3]ospf 1 router-id 10.3.3.3
[LSW3-ospf-1]area 0
[LSW3-ospf-1-area-0.0.0.0]network 10.1.13.0 0.0.0.255
[LSW3-ospf-1-area-0.0.0.0]network 10.1.34.0 0.0.0.255
[LSW3-ospf-1-area-0.0.0.0]network 10.3.3.3 0.0.0.0
[LSW4]ospf 1 router-id 10.4.4.4
[LSW4-ospf-1]area 0
[LSW4-ospf-1-area-0.0.0.0]network 10.1.34.0 0.0.0.255
[LSW4-ospf-1-area-0.0.0.0]network 10.1.24.0 0.0.0.255
[LSW4-ospf-1-area-0.0.0.0]network 10.4.4.4 0.0.0.0
4. To configure IBGP Full connection
[LSW1]bgp 10
[LSW1-bgp]peer 10.2.2.2 as-number 10
[LSW1-bgp]peer 10.2.2.2 connect-interface LoopBack 0
[LSW1-bgp]peer 10.3.3.3 as-number 10
[LSW1-bgp]peer 10.3.3.3 connect-interface LoopBack 0
[LSW1-bgp]peer 10.4.4.4 as-number 10
[LSW1-bgp]peer 10.4.4.4 connect-interface LoopBack 0
[LSW2]bgp 10
[LSW2-bgp]peer 10.1.1.1 as-number 10
[LSW2-bgp]peer 10.1.1.1 connect-interface LoopBack 0
[LSW2-bgp]peer 10.3.3.3 as-number 10
[LSW2-bgp]peer 10.3.3.3 connect-interface LoopBack 0
[LSW2-bgp]peer 10.4.4.4 as-number 10
[LSW2-bgp]peer 10.4.4.4 connect-interface LoopBack 0
[LSW3]bgp 10
[LSW3-bgp]peer 10.1.1.1 as-number 10
[LSW3-bgp]peer 10.1.1.1 connect-interface LoopBack 0
[LSW3-bgp]peer 10.2.2.2 as-number 10
[LSW3-bgp]peer 10.2.2.2 connect-interface LoopBack 0 [LSW3-bgp]peer 10.4.4.4 as-number 10
[LSW3-bgp]peer 10.4.4.4 connect-interface LoopBack 0
[LSW4]bgp 10
[LSW4-bgp]peer 10.1.1.1 as-number 10
[LSW4-bgp]peer 10.1.1.1 connect-interface LoopBack 0
[LSW4-bgp]peer 10.2.2.2 as-number 10
[LSW4-bgp]peer 10.2.2.2 connect-interface LoopBack 0
[LSW4-bgp]peer 10.3.3.3 as-number 10
[LSW4-bgp]peer 10.3.3.3 connect-interface LoopBack 0
5. To configure EBGP Connect
[LSW4]bgp 10
[LSW4-bgp]peer 10.1.45.5 as-number 20
[LSW4-bgp]import-route direct
[LSW4-bgp]import-route ospf 1
[LSW5]bgp 20
[LSW5-bgp]router-id 10.5.5.5
[LSW5-bgp]peer 10.1.45.4 as-number 10
[LSW5-bgp]ipv4-family unicast
[LSW5-bgp-af-ipv4]network 10.2.10.0 24
6. To configure LSW2 On OSPF The cost value of the protocol
[LSW2]int Vlanif 12
[LSW2-Vlanif12]ospf cost 2
[LSW2]int Vlanif 24
[LSW2-Vlanif24]ospf cost 2
As you can see from the routing table ,LSW3 adopt BGP The protocol can learn the target network segment 10.2.10.0 The routing , The exit interface is Vlanif34; adopt OSPF The protocol can learn the target network segment 10.1.12.0 and 10.1.24.0 The routing , Routing overhead is 2
7. stay LSW3 On the configuration OSPF-BGP Linkage function
[LSW3]ospf 1
[LSW3-ospf-1]stub-router on-startup
8. Check the configuration : preservation 、 restart LSW3
It can be seen that , adopt BGP The protocol can learn the target network segment 10.2.10.0 The routing , The output interface becomes Vlanif12
边栏推荐
- 查询字段个数
- [Yu Yue education] Dunhuang Literature and art reference materials of Zhejiang Normal University
- Day 248/300 关于毕业生如何找工作的思考
- Phishing & filename inversion & Office remote template
- 成功解决TypeError: data type ‘category‘ not understood
- Attributeerror successfully resolved: can only use cat accessor with a ‘category‘ dtype
- 我的创作纪念日
- 今日夏至 Today‘s summer solstice
- LeetCode每日一题(1870. Minimum Speed to Arrive on Time)
- Office-DOC加载宏-上线CS
猜你喜欢
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
利用快捷方式-LNK-上线CS
Reflex WMS中阶系列3:显示已发货可换组
Apache dolphin scheduler source code analysis (super detailed)
LeetCode每日一题(971. Flip Binary Tree To Match Preorder Traversal)
Leetcode - 152 product maximum subarray
电子书-CHM-上线CS
Fedora/rehl installation semanage
基于PyTorch和Fast RCNN快速实现目标识别
Grouping convolution and DW convolution, residuals and inverted residuals, bottleneck and linearbottleneck
随机推荐
机器学习植物叶片识别
Fedora/REHL 安装 semanage
Machine learning plant leaf recognition
Simple use of MySQL database: add, delete, modify and query
Difference between backtracking and recursion
After working for 10 years, I changed to a programmer. Now I'm 35 + years old and I'm not anxious
How do programmers remember code and programming language?
接口自动化测试实践指导(上):接口自动化需要做哪些准备工作
GET 和 POST 请求类型的区别
MySQL5.72. MSI installation failed
《从0到1:CTFer成长之路》书籍配套题目(周更)
SQL Server manager studio(SSMS)安装教程
Leetcode daily question (1870. minimum speed to arrive on time)
Successfully solved typeerror: data type 'category' not understood
Chinese English comparison: you can do this Best of luck
In English translation of papers, how to do a good translation?
Pallet management in SAP SD delivery process
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
钓鱼&文件名反转&office远程模板
Apache DolphinScheduler源码分析(超详细)