1.13.3 Configuring OSPF summary route
- Networking Requirements
• • Switch A and Switch B in AS 200, AS 200 using the OSPF as the IGP.
• • Switch C, Switch D and Switch E located within AS 100, AS 100 using the OSPF as the IGP.
• • Switch B and Switch C EBGP connection, configure OSPF and BGP introduction of direct routes, configure OSPF
process import BGP routes.
• • In order to reduce routing table size Switch A and Switch B disposed on the route summarization, only the summary route
10.0.0.0/8.
- Configuration Step
(1) the IP address of an interface (omitted)
(2) Configuration OSPFConfigure Switch A.
<SwitchA> system-view
[SwitchA] router id 11.2.1.2
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quitConfigure Switch B.
<SwitchB> system-view
[SwitchB] router id 11.2.1.1
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 11.2.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quitConfigure Switch C.
<SwitchC> system-view
[SwitchC] router id 11.1.1.2
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quitConfiguration Switch D.
<SwitchD> system-view
[SwitchD] router id 10.3.1.1
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quitConfiguration Switch E.
<SwitchE> system-view
[SwitchE] router id 10.4.1.1
[SwitchE] ospf
[SwitchE-ospf-1] area 0
[SwitchE-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[SwitchE-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[SwitchE-ospf-1-area-0.0.0.0] quit
[SwitchE-ospf-1] quit
(3) arranged BGP, OSPF, and the introduction of direct routes
Configure Switch B.
[SwitchB] bgp 200
[SwitchB-bgp] peer 11.1.1.2 as 100
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] import-route ospf
[SwitchB-bgp-ipv4] import-route direct
[SwitchB-bgp-ipv4] peer 11.1.1.2 enable #注意不要少了这句
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
Configure Switch C.
[SwitchC] bgp 100
[SwitchC-bgp] peer 11.1.1.1 as 200
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] import-route ospf
[SwitchC-bgp-ipv4] import-route direct
[SwitchC-bgp-ipv4] peer 11.1.1.1 enable #注意不要少了这句
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
(4) arranged OSPF into BGP routes on Switch B and Switch C
OSPF configuration introduced a BGP route on Switch B.
[SwitchB] ospf
[SwitchB-ospf-1] import-route bgp
OSPF configuration introduced a BGP route on Switch C.
[SwitchC] ospf
[SwitchC-ospf-1] import-route bgp
View the routing table of SwitchA.
[SwitchA] display ip routing-table
(5) arranged on the route aggregation Switch B, only the summary route 10.0.0.0/8.
[SwitchB-ospf-1] asbr -summary 10.0.0.0 8
Check the routing table of Switch A.
[SwitchA] display ip routing-table