![Huawei S6700 Series Configuration Manual Download Page 188](http://html.mh-extra.com/html/huawei/s6700-series/s6700-series_configuration-manual_169517188.webp)
10.2.1.0/30 BGP 255 0 RD 10.1.3.2 Vlanif40
10.2.1.2/32 BGP 255 0 RD 10.1.3.2 Vlanif40
10.3.1.0/30
BGP
255
0
RD
10.1.3.2
Vlanif40
As shown in the routing table, Switch B learns the route to the network segment 10.3.1.0 through
BGP, and the outgoing interface is Vlanif40. The routes to the network segments 10.1.2.0 and
10.1.4.0 respectively can be learned through OSPF. The costs of the two routes are 2.
Step 7
Enable OSPF-BGP linkage on Switch B.
[SwitchB]
ospf
1
[SwitchB-ospf-1]
stub-router on-startup
[SwitchB-ospf-1]
quit
[SwitchB]
quit
Step 8
Verify the configuration.
# Restart Switch B.
NOTE
Confirm the action before you use the command because the command leads to the breakdown of the
network in a short time. In addition, when restarting a switch, ensure that the configuration file of the
switch is saved.
<SwitchB>
reboot
System will reboot! Continue?[Y/N]
y
# View the routing table of Switch A. As shown in the routing table, the route to the network
10.3.1.0 can be learned through BGP, and the outgoing interface is Vlanif40.
[SwitchA]
display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.2/32 OSPF 10 4 D 10.1.2.2 Vlanif40
4.4.4.0/24 BGP 255 0 RD 4.4.4.4 Vlanif40
4.4.4.4/32 OSPF 10 4 D 10.1.2.2 Vlanif40
5.5.5.0/24 BGP 255 0 RD 10.2.1.2 Vlanif40
10.1.1.0/30 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.2.0/30 Direct 0 0 D 10.1.2.1 Vlanif40
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.2.2/32 Direct 0 0 D 10.1.2.2 Vlanif40
10.1.3.0/30 OSPF 10 2 D 10.1.1.2 Vlanif10
10.1.3.1/32 BGP 255 0 RD 4.4.4.4 Vlanif40
10.1.4.0/30 OSPF 10 3 D 10.1.2.2 Vlanif40
10.1.4.1/32 BGP 255 0 RD 4.4.4.4 Vlanif40
10.2.1.0/30 BGP 255 0 RD 4.4.4.4 Vlanif40
10.2.1.2/32 BGP 255 0 RD 4.4.4.4 Vlanif40
10.3.1.0/30 BGP 255 0 RD 4.4.4.4 Vlanif40
# View the routing table of Switch B. As shown in the routing table, only OSPF routes exist in
the routing table temporarily and their costs are equal to or greater than 65535. This is because
IGP route convergence is faster than BGP route convergence.
[SwitchB]
display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32
OSPF
10
65536
D
10.1.1.1
Vlanif10
2.2.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
4.4.4.4/32
OSPF
10
65536
D
10.1.3.2
Vlanif40
S6700 Series Ethernet Switches
Configuration Guide - IP Routing
4 OSPF Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
169