BGP路由属性-基础版
实验说明:
1、R1,R2,R3之间互联网段以及他们的loopback0通告进OSPF 1 area 0,loopback0为X.X.X.X/32,R1是1.1.1.1/32
2、R1和R2之间,R1和R3之间通过loopback0接口建立IBGP
3、R2和R4之间,R3和R4之间通过直连链路建立EBGP邻居
4、R4上通过network方式通告loopback0接口
5、查看R1访问R4的loopback0接口走哪条路
具体配置:
1、R1,R2,R3之间互联网段以及他们的loopback0通告进OSPF 1 area 0,loopback0为X.X.X.X/32,R1是1.1.1.1/32
AR1:
interface GigabitEthernet0/0/0
ip address 10.1.12.1 24
interface GigabitEthernet0/0/1
ip address 10.1.13.1 24
interface GigabitEthernet0/0/2
ip address 10.1.15.1 24
interface LoopBack0
ip address 1.1.1.1 32
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.12.1 0.0.0.0
network 10.1.13.1 0.0.0.0
AR2:
interface GigabitEthernet0/0/0
ip address 10.1.12.2 24
interface GigabitEthernet0/0/1
ip address 10.1.24.2 24
interface GigabitEthernet0/0/2
interface LoopBack0
ip address 2.2.2.2 32
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.12.2 0.0.0.0
AR3:
interface GigabitEthernet0/0/0
ip address 10.1.13.3 24
interface GigabitEthernet0/0/1
ip address 10.1.34.3 24
interface GigabitEthernet0/0/2
interface LoopBack0
ip address 3.3.3.3 32
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.1.13.3 0.0.0.0
2、R1和R2之间,R1和R3之间通过loopback0接口建立IBGP
AR1:
bgp 123
router-id 1.1.1.1
peer 2.2.2.2 as-number 123
peer 2.2.2.2 connect-interface LoopBack0
peer 3.3.3.3 as-number 123
peer 3.3.3.3 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
peer 3.3.3.3 enable
AR2:
bgp 123
router-id 2.2.2.2
peer 1.1.1.1 as-number 123
peer 1.1.1.1 connect-interface LoopBack0
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
peer 1.1.1.1 next-hop-local
AR3:
bgp 123
router-id 3.3.3.3
peer 1.1.1.1 as-number 123
peer 1.1.1.1 connect-interface LoopBack0
peer 10.1.34.4 as-number 40
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
peer 1.1.1.1 next-hop-local
3、R2和R4之间,R3和R4之间通过直连链路建立EBGP邻居
AR2:
bgp 123
peer 10.1.24.4 as-number 40
ipv4-family unicast
peer 10.1.24.4 enable
AR3:
bgp 123
peer 10.1.34.4 as-number 40
ipv4-family unicast
peer 10.1.34.4 enable
AR4:
interface GigabitEthernet0/0/0
ip address 10.1.24.4 24
interface GigabitEthernet0/0/1
ip address 10.1.34.4 24
interface GigabitEthernet0/0/2
interface LoopBack0
ip address 192.168.1.4 24
bgp 40
router-id 4.4.4.4
peer 10.1.24.2 as-number 123
peer 10.1.34.3 as-number 123
ipv4-family unicast
undo synchronization
peer 10.1.24.2 enable
peer 10.1.34.3 enable
4、R4上通过network方式通告loopback0接口
bgp 40
ipv4-family unicast
network 192.168.1.0
5、查看R1访问R4的loopback0接口走哪条路
检查现象:R1-display BGP routing-table看到R2和R3bgp传递过来的路由条目
注:>代表最优,R1默认走R2访问192.168.1.0(R4的loopback0)
思考:为什么在访问R4的loopback口的时候走的是R2,却不是R3呢?如果想走R3,我们又该怎么配置才能使访问时走R3呢?
——·扫描下方微信二维码,回复“实验手册”。即可领取完整电子版手册或为你答疑解惑。·——
|