联邦:
r1(这里以r1为例)
r2
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 25.1.1.1 0.0.0.0
r3
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255
r4
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255
r5
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255
r6
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255
r7
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 67.1.1.2 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 7.7.7.7 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 47.1.1.2 0.0.0.0
r1
[r1]bgp 100
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 200
r2
[r2]bgp 64512
[r2-bgp]confederation id 200
[r2-bgp]confederation peer-as 64513
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 3.3.3.3 as-number 64512
[r2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[r2-bgp]peer 5.5.5.5 as-number 64513
[r2-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[r2-bgp]peer 5.5.5.5 ebgp-max-hop
[r2-bgp]peer 12.1.1.1 as-number 100
r3
[r3]bgp 64512
[r3-bgp]router-id 3.3.3.3
[r3-bgp]confederation id 200
[r3-bgp]peer 2.2.2.2 as-number 64512
[r3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r3-bgp]peer 4.4.4.4 as-number 64512
[r3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r3-bgp]peer 4.4.4.4 reflect-client
r4
[r4]bgp 64512
[r4-bgp]confederation id 200
[r4-bgp]confederation peer-as 64513
[r4-bgp]peer 3.3.3.3 as-number 64512
[r4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[r4-bgp]peer 7.7.7.7 as-number 64513
[r4-bgp]peer 7.7.7.7 connect-interface LoopBack 0
[r4-bgp]peer 7.7.7.7 ebgp-max-hop
r5
[r5]bgp 64513
[r5-bgp]router-id 5.5.5.5
[r5-bgp]confederation id 200
[r5-bgp]confederation peer-as 64512
[r5-bgp]peer 2.2.2.2 as-number 64512
[r5-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r5-bgp]peer 6.6.6.6 as-number 64513
[r5-bgp]peer 6.6.6.6 connect-interface LoopBack 0
[r5-bgp]peer 2.2.2.2 ebgp-max-hop
r6
[r6]bgp 64513
[r6-bgp]router-id 6.6.6.6
[r6-bgp]confederation id 200
[r6-bgp]peer 5.5.5.5 as-number 64513
[r6-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[r6-bgp]peer 7.7.7.7 as-number 64513
[r6-bgp]peer 7.7.7.7 connect-interface LoopBack 0
[r6-bgp]peer 7.7.7.7 reflect-client
[r6-bgp]peer 5.5.5.5 reflect-client
r7
[r7]bgp 64513
[r7-bgp]router-id 7.7.7.7
[r7-bgp]peer 6.6.6.6 as-number 64513
[r7-bgp]peer 6.6.6.6 connect-interface LoopBack 0
[r7-bgp]confederation id 200
[r7-bgp]confederation peer-as 64512
[r7-bgp]peer 4.4.4.4 as-number 64512
[r7-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r7-bgp]peer 4.4.4.4 ebgp-max-hop
[r7-bgp]peer 78.1.1.2 as-number 300
[r7-bgp]peer 6.6.6.6 next-hop-local
r8
[r8]bgp 300
[r8-bgp]router-id 8.8.8.8
[r8-bgp]peer 78.1.1.1 as-number 200
r2
[r2-bgp]import-route ospf 1
r7
[r7-bgp]import-route ospf 1
r8
[r8-bgp]bgp 300
[r8-bgp]import-route direct
r1
[r1]bgp 100
[r1-bgp]import-route direct
r7
[r7]bgp 64513
[r7-bgp]import-route direct
r2
[r2]bgp 64512
[r2-bgp]import-route direct
在r1上ping r8
在r8上ping r1