实例图:

这个是FW的配置图片,由于代码不太好看我写在了这个上面

BGP排错实例图

注释代码
一、CS配置
port-group 1
!
Interface Ethernet1/0/1
switchport mode trunk
switchport trunk allowed vlan 113-114
port-group 1 mode active
!
Interface Ethernet1/0/2
switchport mode trunk
switchport trunk allowed vlan 113-114
port-group 1 mode active
!
Interface Ethernet1/0/17
switchport access vlan 117
!
Interface Ethernet1/0/18
switchport access vlan 118
!
interface Vlan40
ip address 172.16.40.62 255.255.255.192
!
interface Vlan113
ip address 10.1.0.253 255.255.255.252
!
interface Vlan114
ip address 10.2.0.253 255.255.255.252
!
interface Vlan117
ip address 10.3.0.253 255.255.255.252
!
interface Vlan118
ip address 10.4.0.253 255.255.255.252
!
router ospf 10
network 10.1.0.252/30 area 0
network 10.2.0.252/30 area 0
network 172.16.40.0/26 area 0
!
router bgp 65500
neighbor 10.3.0.254 remote-as 65500
neighbor 10.3.0.254 update-source 10.3.0.253
neighbor 10.3.0.254 route-map test in
neighbor 10.4.0.254 remote-as 65500
neighbor 10.4.0.254 update-source 10.4.0.253
!
ip prefix-list test seq 5 permit 10.8.0.0/13 le 24
!
route-map test permit 10
match ip address prefix-list test
set local-preference 500
!
route-map test permit 20
!
二、FW配置
router bgp 65500 //创建一个BGP的AS号为65500
neighbor 10.3.0.253 remote-as 65500 //公布邻居
neighbor 10.3.0.253 update-source ethernet0/3 //更新邻居为本地
neighbor 10.4.0.253 remote-as 65500
neighbor 10.4.0.253 update-source ethernet0/4
network 10.11.0.0/24 //公布BGP的网络
network 10.12.0.0/24
network 10.13.0.0/24
network 10.14.0.0/24