r1 анонсит несколько сетей и дефолт двум пирам. peering должен передать то же самое в сторону r2 двумя вланами.
Также со стороны r2 анонсится часть сети, которая принадлежит peering и по итогу должна анонсится в сторону r1.
peering:
interface Loopback2 ip address 10.32.0.1 255.254.0.0 !
r2:
interface Loopback0 ip address 10.33.0.1 255.255.0.0 !
конфигурация r1:
interface Loopback0 ip address 10.38.12.1 255.255.255.0 ! interface Loopback1 ip address 10.38.13.1 255.255.255.0 ! interface Loopback2 ip address 10.38.14.1 255.255.255.0 ! interface FastEthernet0 switchport trunk allowed vlan 1,11,22,1002-1005 switchport mode trunk no ip address ! interface FastEthernet1 no ip address ! interface FastEthernet2 no ip address ! interface FastEthernet3 no ip address ! interface FastEthernet4 no ip address shutdown duplex auto speed auto ! interface Vlan1 no ip address ! interface Vlan11 ip address 10.38.11.1 255.255.255.252 ! interface Vlan22 ip address 10.38.22.1 255.255.255.252 ! router bgp 1001 bgp router-id 10.38.11.1 bgp log-neighbor-changes network 10.38.11.0 mask 255.255.255.252 network 10.38.12.0 mask 255.255.255.0 network 10.38.13.0 mask 255.255.255.0 network 10.38.22.0 mask 255.255.255.252 neighbor 10.38.11.2 remote-as 1002 neighbor 10.38.11.2 soft-reconfiguration inbound neighbor 10.38.11.2 prefix-list peer1 out neighbor 10.38.22.2 remote-as 1002 neighbor 10.38.22.2 default-originate neighbor 10.38.22.2 soft-reconfiguration inbound neighbor 10.38.22.2 prefix-list peer2 out ! ip forward-protocol nd no ip http server no ip http secure-server ! ! ! ! ip prefix-list peer1 seq 5 permit 10.38.12.0/24 ip prefix-list peer1 seq 10 deny 0.0.0.0/0 ! ip prefix-list peer2 seq 5 deny 10.38.12.0/24
конфигурация r2:
interface Loopback0 ip address 10.33.0.1 255.255.0.0 ! interface FastEthernet0 switchport trunk allowed vlan 1,33,44,1002-1005 switchport mode trunk no ip address ! interface FastEthernet1 no ip address ! interface FastEthernet2 no ip address ! interface FastEthernet3 no ip address ! interface FastEthernet4 no ip address shutdown duplex auto speed auto ! interface Vlan1 no ip address ! interface Vlan33 ip address 10.38.33.2 255.255.255.252 ! interface Vlan44 ip address 10.38.44.2 255.255.255.252 ! router bgp 1002 bgp router-id 10.38.44.2 bgp log-neighbor-changes network 10.33.0.0 mask 255.255.0.0 network 10.38.33.0 mask 255.255.255.252 network 10.38.44.0 mask 255.255.255.252 neighbor 10.38.33.1 remote-as 1002 neighbor 10.38.44.1 remote-as 1002
конфигурация peering:
interface Loopback0 ip address 10.44.24.1 255.255.255.0 ! interface Loopback2 ip address 10.32.0.1 255.254.0.0 ! interface GigabitEthernet0/0 ip address dhcp duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/0.33 encapsulation dot1Q 33 ip address 10.38.33.1 255.255.255.252 ! interface GigabitEthernet0/0.44 encapsulation dot1Q 44 ip address 10.38.44.1 255.255.255.252 ! interface GigabitEthernet0/1 no ip address duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/1.11 encapsulation dot1Q 11 ip address 10.38.11.2 255.255.255.252 ! interface GigabitEthernet0/1.22 encapsulation dot1Q 22 ip address 10.38.22.2 255.255.255.252 ! router bgp 1002 bgp router-id 10.38.11.2 bgp log-neighbor-changes bgp redistribute-internal bgp soft-reconfig-backup network 10.32.0.0 mask 255.254.0.0 network 10.38.11.0 mask 255.255.255.252 network 10.38.22.0 mask 255.255.255.252 network 10.38.33.0 mask 255.255.255.252 network 10.38.44.0 mask 255.255.255.252 network 10.44.24.0 mask 255.255.255.0 neighbor 10.38.11.1 remote-as 1001 neighbor 10.38.11.1 soft-reconfiguration inbound neighbor 10.38.11.1 prefix-list peering-out out neighbor 10.38.22.1 remote-as 1001 neighbor 10.38.22.1 soft-reconfiguration inbound neighbor 10.38.22.1 prefix-list peering-out out neighbor 10.38.33.2 remote-as 1002 neighbor 10.38.33.2 soft-reconfiguration inbound neighbor 10.38.33.2 prefix-list dr out neighbor 10.38.44.2 remote-as 1002 neighbor 10.38.44.2 soft-reconfiguration inbound neighbor 10.38.44.2 prefix-list pr out ! ip forward-protocol nd no ip http server no ip http secure-server ! ! ! ! ip prefix-list dr seq 5 deny 0.0.0.0/0 ip prefix-list dr seq 10 permit 0.0.0.0/0 le 32 ! ip prefix-list peering-out seq 5 permit 10.32.0.0/15 ip prefix-list peering-out seq 10 permit 10.44.24.0/24 ! ip prefix-list pr seq 5 permit 0.0.0.0/0 !