首先有关这次试验的几个知识点:
1、解决路由黑洞的方法
a、物理线路的full-mesh
b、BGP重分布到IGP中
c、IBGP的full-mesh(相当于R1-R2-R3逻辑互联)
d、MPLS(最优解决方案)
2、PEER-GROUP作用
a、减少命令行
b、减少buffer
c、应用于IBGP
3、IGP nwtwork的作用
a、从接口发送hello包
b、通告路由
而BGP的network的作用:
只是通告路由(路由表里有的就可以network)。
关于R1/R2/R3/R4/R5的配置分别如下:
路由器R1:
R1#sh run
Building configuration...
Current configuration : 1268 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 13.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router eigrp 100
network 1.0.0.0
network 12.0.0.0
network 13.0.0.0
no auto-summary
!
router bgp 123
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor IBGP peer-group
neighbor IBGP remote-as 123
neighbor IBGP update-source Loopback0
neighbor 2.2.2.2 peer-group IBGP
neighbor 3.3.3.3 peer-group IBGP
no auto-summary
!
ip classless
no ip http server
!
gatekeeper
shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
end
路由器R2:
R2#sh run
Building configuration...
Current configuration : 1349 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 24.1.1.2 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router eigrp 100
network 2.0.0.0
network 12.0.0.0
no auto-summary
!
router bgp 123
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 24.1.1.4 remote-as 4
no auto-summary
!
ip classless
no ip http server
!
gatekeeper
shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
end
路由器R3:
R3#sh run
Building configuration...
Current configuration : 1448 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 35.1.1.3 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 13.1.1.3 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router eigrp 100
network 3.0.0.0
network 13.0.0.0
no auto-summary
!
router bgp 123
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 3.3.3.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 5.5.5.5 remote-as 5
neighbor 5.5.5.5 ebgp-multihop 255
neighbor 5.5.5.5 update-source Loopback0
no auto-summary
!
ip classless
ip route 5.5.5.0 255.255.255.0 35.1.1.5
no ip http server
!
gatekeeper
shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
end
路由器R4:
R4#sh run
Building configuration...
Current configuration : 1075 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
no ip domain lookup
!
ip cef
!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 24.1.1.4 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 4
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
network 4.4.4.0 mask 255.255.255.0
network 24.1.1.0 mask 255.255.255.0
neighbor 24.1.1.2 remote-as 123
no auto-summary
!
ip classless
no ip http server
!
gatekeeper
shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
end
路由器R5:
R5#sh run
Building configuration...
Current configuration : 1273 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
no ip domain lookup
!
ip cef
!
!
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface Loopback1
ip address 192.168.5.5 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 35.1.1.5 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 5
no synchronization
bgp router-id 5.5.5.5
bgp log-neighbor-changes
network 5.5.5.0 mask 255.255.255.0
network 35.1.1.0 mask 255.255.255.0
network 192.168.5.0
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 ebgp-multihop 255
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
ip classless
ip route 3.3.3.0 255.255.255.0 35.1.1.3
no ip http server
!
gatekeeper
shutdown
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
end