3.19 BGP协议的故障排除调试(1-基础配置)

3.19 BGP协议的故障排除调试(1-基础配置)

#BGP排障思路:1.检查BGP邻居关系是否正常;2.检查BGP路由是否正常;3.最后检查BGP协议和其他路由协议的协同方面的问题。

#检查邻居关系时,必须先确认TCP连接没问题。还得注意,BGP对等体双方的参数是否一致和EBGP对等体之间的跳数限制等;

#路由故障诊断的基本手段是检查路由表,用实际路由条目和预期路由表进行比较,发现故障线索。

=================================================================================

1、基础设置

=================================================================================

R1:

sys

sysname R1

int loop 0

ip add 10.0.1.1 32

int loop 1

ip add 20.0.1.1 32

int g0/0/0

ip add 10.0.12.1 24

q

undo info-cen en

------------------------------------------

R2:

sys

sysname R2

int loop 0

ip add 10.0.2.2 32

int g0/0/0

ip add 10.0.12.2 24

int g0/0/1

ip add 10.0.23.2 24

q

undo info-cen en

------------------------------------------

R3:

sys

sysname R3

int loop 0

ip add 10.0.3.3 32

int g0/0/1

ip add 10.0.23.3 24

int g0/0/0

ip add 10.0.34.3 24

q

undo info-cen en

------------------------------------------

R4:

sys

sysname R4

int loop 0

ip add 10.0.4.4 32

int g0/0/0

ip add 10.0.34.4 24

int g0/0/1

ip add 10.0.45.4 24

q

undo info-cen en

------------------------------------------

R5:

sys

sysname R5

int loop 0

ip add 10.0.5.5 32

int loop 1

ip add 20.0.5.5 32

int g0/0/1

ip add 10.0.45.5 24

q

undo info-cen en

------------------------------------------

AS 100配置OSPF路由协议

R2:

ospf 1 router-id 10.0.2.2

area 0

network  10.0.23.2 0.0.0.0

network  10.0.2.2 0.0.0.0

return


------------------------------------------

R3:

ospf 1 router-id 10.0.3.3

area 0

network  10.0.23.3 0.0.0.0

network  10.0.34.3 0.0.0.0

network  10.0.3.3 0.0.0.0

return

------------------------------------------

R4:

ospf 1 router-id 10.0.4.4

area 0

network  10.0.34.4 0.0.0.0

network  10.0.4.4 0.0.0.0

return


------------------------------------------

R3:

dis ospf peer

dis ospf routing


=================================================================================

2、配置BGP路由协议并设置故障点

=================================================================================

故障点:

#故障1,制造R1与R2认证密码不匹配;

#故障2,没有解除R1与R2的EBGP关系多跳限制;

#故障3,R1向R2传递携带团体属性no-advertise的路由

#故障4,R2向R4传递路由不修改下一跳地址;

#故障5,R5的bgp对等体R4的AS编号错误;

#故障6,R5缺少去往R4(10.0.4.4)的路由.

------------------------------------------

R1:

bgp 10

router-id 10.0.1.1

peer 10.0.2.2 as-number 100

peer 10.0.2.2 connect-int loop 0

peer 10.0.2.2 password simple lemon2  #制造R1与R2认证密码不匹配

peer 10.0.2.2 route-policy 1 export

peer 10.0.2.2 advertise-community

network 20.0.1.1 32

route-policy 1 permit node 10

apply community no-advertise        #R1向R2传递携带团体属性no-advertise的路由

ip route-static 10.0.2.2 255.255.255.255 10.0.12.2

------------------------------------------

R2:

bgp 100

router-id 10.0.2.2

peer 10.0.1.1 as-number 10

peer 10.0.1.1 connect-int loop 0

peer 10.0.1.1 password simple lemon3    #制造R1与R2认证密码不匹配

peer 10.0.4.4 as-number 10

peer 10.0.4.4 connect-int loop 0

peer 10.0.4.4 advertise-community

peer 10.0.4.4 password simple lemon3

ip route-static 10.0.1.1 255.255.255.255 10.0.12.1

------------------------------------------

R4:

bgp 100

route-id 10.0.4.4

peer 10.0.2.2 as-number 100

peer 10.0.2.2 connect-int loop 0

peer 10.0.2.2 next-hop-local

peer 10.0.2.2 password simple lemon2

peer 10.0.5.5 as-number 50

peer 10.0.5.5 connect-int loop 0

peer 10.0.5.5 ebgp-max-hop

peer 10.0.5.5 password simple lemon2

ip route-static 10.0.5.5 255.255.255.255 10.0.45.5

------------------------------------------

R5:

bgp 50

route-id 10.0.5.5

peer 10.0.4.4 as-number 1000

peer 10.0.4.4 connect-int loop 0

peer 10.0.4.4 ebgp-max-hop

peer 10.0.4.4 password simple lemon2

ip route-static 20.0.5.5 255.255.255.255

------------------------------------------

你可能感兴趣的:(3.19 BGP协议的故障排除调试(1-基础配置))