EBGP配置

R1和R2两条线相连

R1配置
interface Ethernet0/0/0
 undo shutdown
 ip address 172.16.1.1 255.255.255.0
interface Ethernet0/0/1
 undo shutdown
 ip address 192.168.1.1 255.255.255.0
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
interface LoopBack100
 ip address 100.100.100.100 255.255.255.255
bgp 100
 network 100.100.100.100 255.255.255.255
 peer 2.2.2.2 as-number 200
 peer 2.2.2.2 ebgp-max-hop 2
 peer 2.2.2.2 connect-interface LoopBack0
ip route-static 2.2.2.0 255.255.255.0 172.16.1.2
ip route-static 2.2.2.0 255.255.255.0 192.168.1.2

R2配置
interface Ethernet0/0/0
 undo shutdown
 ip address 172.16.1.2 255.255.255.0
interface Ethernet0/0/1
 undo shutdown
 ip address 192.168.1.2 255.255.255.0
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255           
bgp 200
 peer 1.1.1.1 as-number 100
 peer 1.1.1.1 ebgp-max-hop 2
 peer 1.1.1.1 connect-interface LoopBack0
 ip route-static 1.1.1.0 255.255.255.0 172.16.1.1
 ip route-static 1.1.1.0 255.255.255.0 192.168.1.1

本文出自 “侯志清” 博客,谢绝转载!

你可能感兴趣的:(EBGP)