SG

SG

Selasa, 06 Desember 2011

BGP Attribute (community No-Export)


pada posting ini kita akan membahas bagaimana dalam BGP, kita bisa tidak mengadvertise network keluar AS dari AS diri sendiri.

R1

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
 ip address 11.11.11.11 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.1 255.255.255.0
 duplex auto
 speed auto
router eigrp 1
 network 1.1.1.1 0.0.0.0
 network 12.12.12.1 0.0.0.0
 no auto-summary
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 network 11.11.11.11 mask 255.255.255.255
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 send-community both
 neighbor 2.2.2.2 route-map NO-EXPORT out
 no auto-summary
access-list 1 permit 11.11.11.11
route-map NO-EXPORT permit 10
 match ip address 1
 set community no-export



R2
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
 ip address 22.22.22.22 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 24.24.24.2 255.255.255.0
 clock rate 2000000
!
interface FastEthernet0/1
 ip address 23.23.23.2 255.255.255.0
 duplex auto
 speed auto
router eigrp 1
 network 2.2.2.2 0.0.0.0
 network 12.12.12.2 0.0.0.0
 network 23.23.23.2 0.0.0.0
 no auto-summary
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 network 22.22.22.22 mask 255.255.255.255
 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 route-reflector-client
 neighbor 3.3.3.3 next-hop-self
 neighbor 24.24.24.4 remote-as 4
 no auto-summary
!
ip route 33.33.33.33 255.255.255.255 23.23.23.3




R3
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
 ip address 33.33.33.33 255.255.255.255
!
interface Loopback2
 ip address 30.30.30.3 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 23.23.23.3 255.255.255.0
 duplex auto
 speed auto
!
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 23.23.23.3 0.0.0.0
 no auto-summary
!
router rip
 version 2
 network 30.0.0.0
 network 33.0.0.0
 no auto-summary
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 network 33.33.33.33 mask 255.255.255.255
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 update-source Loopback0
 no auto-summary




R4
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 24.24.24.4 255.255.255.0
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/2
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/3
 no ip address
 shutdown
 clock rate 2000000
!
router bgp 4
 no synchronization
 bgp log-neighbor-changes
 network 4.4.4.4 mask 255.255.255.255
 neighbor 24.24.24.2 remote-as 123
 no auto-summary
!
!

sebelum kita pasang route-map NO-EXPORT out di R1, hasilnya seperti ini kalo kita lihat sh ip bg di R4
 Network          Next Hop            Metric LocPrf Weight Path
Network          Next Hop            Metric LocPrf Weight Path
*> 4.4.4.4/32       0.0.0.0                  0                 32768 i
*>11.11.11.11/32    24.24.24.2            0                 0 123 i
*> 22.22.22.22/32   24.24.24.2               0             0 123 i
*> 33.33.33.33/32   24.24.24.2                             0 123 i



setelah kita lakukan route-map NO-EXPORT out di R1, seperti contoh diatas, maka di R4 hanya muncul network :
Network          Next Hop            Metric LocPrf Weight Path
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*> 22.22.22.22/32   24.24.24.2               0             0 123 i
*> 33.33.33.33/32   24.24.24.2                             0 123 i


ok, i will continue to the next post..see u

Tidak ada komentar:

Posting Komentar