实验要求
- 如图连接网络,合理规划IP地址,AS 200内IGP协议为OSPF
- R1属于AS 100;R2-R3-R4小AS 234 R5-R6-R7小AS 567,同时声明大AS 200,R8属于AS 300
- R2-R5 R4-R7之间为联邦EBGP邻居关系
- R1-R8之间通信
实验步骤
合理规格IP地址,AS200内IGP协议为OSPF
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/0]int l0
[R1-LoopBack0]ip add 1.1.1.1 24
[R2]int g 0/0/1
[R2-GigabitEthernet0/0/1]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/1]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 23.1.1.1 24
[R2-GigabitEthernet0/0/0]int g 0/0/2
[R2-GigabitEthernet0/0/2]ip add 25.1.1.1 24
[R2-GigabitEthernet0/0/2]int l0
[R2-LoopBack0]ip add 2.2.2.2 24
[R3]int g 0/0/1
[R3-GigabitEthernet0/0/1]ip add 23.1.1.2 24
[R3-GigabitEthernet0/0/1]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
[R3-GigabitEthernet0/0/0]int l0
[R3-LoopBack0]ip add 3.3.3.3 24
[R4]int g 0/0/1
[R4-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[R4-GigabitEthernet0/0/1]int g 0/0/2
[R4-GigabitEthernet0/0/2]ip add 47.1.1.1 24
[R4-GigabitEthernet0/0/2]int l0
[R4-LoopBack0]ip add 4.4.4.4 24
[R5]int g 0/0/2
[R5-GigabitEthernet0/0/2]ip add 25.1.1.2 24
[R5-GigabitEthernet0/0/2]int g 0/0/0
[R5-GigabitEthernet0/0/0]ip add 56.1.1.1 24
[R5-GigabitEthernet0/0/0]int l0
[R5-LoopBack0]ip add 5.5.5.5 24
[R6]int g 0/0/1
[R6-GigabitEthernet0/0/1]ip add 56.1.1.2 24
[R6-GigabitEthernet0/0/1]
[R6-GigabitEthernet0/0/1]int g 0/0/0
[R6-GigabitEthernet0/0/0]ip add 67.1.1.1 24
[R6-GigabitEthernet0/0/0]int l0
[R6-LoopBack0]ip add 6.6.6.6 24
[R7]int g 0/0/1
[R7-GigabitEthernet0/0/1]ip add 67.1.1.2 24
[R7-GigabitEthernet0/0/1]int g 0/0/2
[R7-GigabitEthernet0/0/2]ip add 47.1.1.2 24
[R7-GigabitEthernet0/0/2]int g 0/0/0
[R7-GigabitEthernet0/0/0]ip add 78.1.1.1 24
[R7-GigabitEthernet0/0/0]int l0
[R7-LoopBack0]ip add 7.7.7.7 24
[R8]int g 0/0/1
[R8-GigabitEthernet0/0/1]ip add 78.1.1.2 24
[R8-GigabitEthernet0/0/1]int l0
[R8-LoopBack0]ip add 8.8.8.8 24
[R2]ospf 1 router-id 92.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]net 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]net 23.1.1.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]net 25.1.1.1 0.0.0.0
[R3]ospf 1 router-id 93.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 23.1.1.2 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 34.1.1.1 0.0.0.0
[R4]ospf 1 router-id 94.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]net 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]net 34.1.1.2 0.0.0.0
[R4-ospf-1-area-0.0.0.0]net 47.1.1.1 0.0.0.0
[R5]ospf 1 router-id 95.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]net 5.5.5.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]net 25.1.1.2 0.0.0.0
[R5-ospf-1-area-0.0.0.0]net 56.1.1.1 0.0.0.0
[R6]ospf 1 router-id 96.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]net 6.6.6.6 0.0.0.0
[R6-ospf-1-area-0.0.0.0]net 56.1.1.2 0.0.0.0
[R6-ospf-1-area-0.0.0.0]net 67.1.1.1 0.0.0.0
[R7]ospf 1 router-id 97.7.7.7
[R7-ospf-1]area 0
[R7-ospf-1-area-0.0.0.0]net 7.7.7.7 0.0.0.0
[R7-ospf-1-area-0.0.0.0]net 67.1.1.2 0.0.0.0
[R7-ospf-1-area-0.0.0.0]net 47.1.1.2 0.0.0.0
R1属于AS 100;R2-R3-R4小AS 234 R5-R6-R7小AS567,同时声明大AS 200,R8属于AS300,R2-R5 R4-R7之间为联邦EBGP邻居关系
[R1]bgp 100
[R1-bgp]route-select
[R1-bgp]router-id 91.1.1.1
[R1-bgp]peer 12.1.1.2 as-number 200
[R1-bgp]ipv4-family unicast
[R1-bgp-af-ipv4]undo synchronization
[R1-bgp-af-ipv4]net 1.1.1.0 24
[R1-bgp-af-ipv4]peer 12.1.1.2 enable
[R2]bgp 234
[R2-bgp]router-id 92.2.2.2
[R2-bgp]confederation id 200
[R2-bgp]confederation peer-as 567
[R2-bgp]peer 3.3.3.3 as-number 234
[R2-bgp]peer 3.3.3.3 connect-interface l0
[R2-bgp]peer 5.5.5.5 as-number 567
[R2-bgp]peer 5.5.5.5 ebgp-max-hop 5
[R2-bgp]peer 5.5.5.5 connect-interface l0
[R2-bgp]peer 12.1.1.1 as-number 100
[R2-bgp]ipv4-family unicast
[R2-bgp-af-ipv4]undo synchronization
[R2-bgp-af-ipv4]net 2.2.2.0 24
[R2-bgp-af-ipv4]peer 3.3.3.3 enable
[R2-bgp-af-ipv4]peer 3.3.3.3 next-hop-local
[R2-bgp-af-ipv4]peer 5.5.5.5 enable
[R2-bgp-af-ipv4]peer 12.1.1.1 enable
[R3]bgp 234
[R3-bgp]router-id 93.3.3.3
[R3-bgp]confederation id 200
[R3-bgp]peer 2.2.2.2 as-number 234
[R3-bgp]peer 2.2.2.2 connect-interface l0
[R3-bgp]peer 4.4.4.4 as-number 234
[R3-bgp]peer 4.4.4.4 connect-interface l0
[R3-bgp]ipv4-family unicast
[R3-bgp-af-ipv4]undo synchronization
[R3-bgp-af-ipv4]net 3.3.3.0 24
[R3-bgp-af-ipv4]peer 2.2.2.2 enable
[R3-bgp-af-ipv4]peer 2.2.2.2 reflect-client
[R3-bgp-af-ipv4]peer 4.4.4.4 enable
[R4]bgp 234
[R4-bgp]router-id 94.4.4.4
[R4-bgp]confederation id 200
[R4-bgp]confederation peer-as 567
[R4-bgp]peer 3.3.3.3 as-number 234
[R4-bgp]peer 3.3.3.3 connect-interface l0
[R4-bgp]peer 7.7.7.7 as-number 567
[R4-bgp]peer 7.7.7.7 ebgp-max-hop 5
[R4-bgp]peer 7.7.7.7 connect-interface l0
[R4-bgp]ipv4-family unicast
[R4-bgp-af-ipv4]undo synchronization
[R4-bgp-af-ipv4]net 4.4.4.0 24
[R4-bgp-af-ipv4]peer 3.3.3.3 enable
[R4-bgp-af-ipv4]peer 3.3.3.3 next-hop-local
[R4-bgp-af-ipv4]peer 7.7.7.7 enable
[R5]bgp 567
[R5-bgp]router-id 95.5.5.5
[R5-bgp]confederation id 200
[R5-bgp]confederation peer-as 234
[R5-bgp]peer 2.2.2.2 as-number 234
[R5-bgp]peer 2.2.2.2 ebgp-max-hop 5
[R5-bgp]peer 2.2.2.2 connect-interface l0
[R5-bgp]peer 6.6.6.6 as-number 567
[R5-bgp]peer 6.6.6.6 connect-interface l0
[R5-bgp]ipv4-family unicast
[R5-bgp-af-ipv4]undo synchronization
[R5-bgp-af-ipv4]net 5.5.5.0 24
[R5-bgp-af-ipv4]peer 2.2.2.2 enable
[R5-bgp-af-ipv4]peer 6.6.6.6 enable
[R5-bgp-af-ipv4]peer 6.6.6.6 next-hop-local
[R6]bgp 567
[R6-bgp]router-id 96.6.6.6
[R6-bgp]confederation id 200
[R6-bgp]peer 5.5.5.5 as-number 567
[R6-bgp]peer 5.5.5.5 connect-interface l0
[R6-bgp]peer 7.7.7.7 as-number 567
[R6-bgp]peer 7.7.7.7 connect-interface l0
[R6-bgp]ipv4-family unicast
[R6-bgp-af-ipv4]undo synchronization
[R6-bgp-af-ipv4]net 6.6.6.0 24
[R6-bgp-af-ipv4]peer 5.5.5.5 enable
[R6-bgp-af-ipv4]peer 7.7.7.7 enable
[R6-bgp-af-ipv4]peer 7.7.7.7 reflect-client
[R7]bgp 567
[R7-bgp]router-id 97.7.7.7
[R7-bgp]confederation id 200
[R7-bgp]confederation peer-as 234
[R7-bgp]peer 4.4.4.4 as-number 234
[R7-bgp]peer 4.4.4.4 ebgp-max-hop 5
[R7-bgp]peer 4.4.4.4 connect-interface l0
[R7-bgp]peer 6.6.6.6 as-number 567
[R7-bgp]peer 6.6.6.6 connect-interface l0
[R7-bgp]peer 78.1.1.2 as-number 300
[R7-bgp]ipv4-family unicast
[R7-bgp-af-ipv4]undo synchronization
[R7-bgp-af-ipv4]net 7.7.7.0 24
[R7-bgp-af-ipv4]peer 4.4.4.4 enable
[R7-bgp-af-ipv4]peer 6.6.6.6 enable
[R7-bgp-af-ipv4]peer 6.6.6.6 next-hop-local
[R7-bgp-af-ipv4]peer 78.1.1.2 enable
[R8]bgp 300
[R8-bgp]router-id 98.8.8.8
[R8-bgp]peer 78.1.1.1 as-number 200
[R8-bgp]ipv4-family unicast
[R8-bgp-af-ipv4]undo synchronization
[R8-bgp-af-ipv4]net 8.0.0.0
[R8-bgp-af-ipv4]net 8.8.8.0 24
[R8-bgp-af-ipv4]peer 78.1.1.1 enable
R1-R8之间通信