华为设备配置OSPF-BGP联动

1. 配置各接口所属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]po表格排序数字从小到大rt 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]por表格排序t trunk allow-pass vlan网络安全密钥是什么 12

[LSW2-GigabitEthernet0/0/4]port link-type trospf报文类型有哪些unk

[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]por饼干拼音t 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 tr华为官网unk

[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]p华为将和苹果三星谈判ort trunk allow-pass vlan 45

[LSW5-GigabitEthernet0/0/2]port link-type trunk

[LSW5-GigabitEthernet0/0/2]port trunk allow-pass vlan 10

2. 配置各接口的IP地址

[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 ad网络安全内容怎么写d 10.1.ospf配置34.4 24

[LSW4-Vlanif45]ip adbgp协议d 10.1.45.4 24

[LSW4]int网络/安全 Loop网络安全专业Back 0

[LSW4-LoopBack0]ip add 10.4.4.4 3网络安全内容怎么写2

[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. 配置OSPF的基本功能

[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]neospf协议使用的算法是twork 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]o表格排序数字从小到大spf 1 rout路由交换技术期末试题及答案er-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 ro华为nova7uter-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. 配置IBGP全连接

[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 LoopB路由交换技术ack 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 conne路由交换技术总结和体会ct-interface LoopBack 0

[LSW3]bgpospf工作原理 10

[LSW3-bgp]peer 10.1.1.1 as-number 10

[LSW3-bgp]peer 10.1.1.1 connect-interface LoopBack 0

[LSW3-bgp]p网络安全知识内容eer 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.ospf七种状态1.1.1 connect-interface LoopBa冰柜排行榜ck 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网络安全教育心得体会-interf路由交换技术总结和体会ace LoopBack 0

5. 配置EBGP连接

[LSW4]bgp 10

[LSW4-bgp]peer 10.1.45.5 as-number 20

[LSW4-bgp]import-route direct

[LSW4-bgp]i华为手机官网mospf工作原理port-route ospf 1

[LSW5]bgp 20

[LSW5-bgp]r网络安全法outer-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. 配置LSW2上OSPF协议的开销值

[LSW2]i华为将和苹果三星谈判nt Vlanif 12

[LSW2-Vlanif12]os网络安全专业pf cost 2

[LSW2]int Vlanif 24

[LSW2-Vlanif24]ospf cost 2华为p50


                                            华为设备配置OSPF-BGP联动


                                            华为设备配置OSPF-BGP联动

从路由表中可以看出,LSW3通过BGP协议可以学习到目标网段10.2.10.0的路由,出接口是Vlanif34;通过OSPF协议可以学习到目标网段10.1.12.0和华为手机官网10.1.24.0的路由,路由开销都是2

7. 在LSW3上配置OSPF-BGP联动功能

[LSW3]ospf 1

[LSW3-ospf-1]stub-router on-startup

8. 查看配置:保存、重启LSW3

可以看出路由交换技术实训报告,通过BGP协议可以学习到目标网段10.2.10.0的路由,出接口变为Vlanif12


                                            华为设备配置OSPF-BGP联动