Berikut adalah contoh route filter simple pada quagga (zebra) OS linux
menggunakan : distribute-list, route-map, access-list dan prefix-list.
ilustrasi :ro1 asn 30 mengadvertise 2 network (10.10.10.0/24 dan 10.10.11.0/24)
ke 3 neighbor yaitu ro2 ip address 172.16.10.1 asn 30
ro3 ip address 10.30.30.1 asn 30
ro4 ip address 10.20.20.1 asn 30
konfigurasi menjadi :
! Zebra configuration saved from vty
! 2008/07/05 20:06:11
!
hostname BGP-1
password 8 /iSqSePQHzkao
enable password secret
log file /usr/local/quagga/logs/bgpd.log
service password-encryption
no banner motd
!
bgp multiple-instance
bgp config-type cisco
!
router bgp 30
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
bgp dampening
network 10.10.10.0
network 10.10.11.0
neighbor 10.20.20.1 remote-as 30
neighbor 10.20.20.1 update-source dummy0
neighbor 10.20.20.1 next-hop-self
neighbor 10.20.20.1 default-originate
neighbor 10.20.20.1 soft-reconfiguration inbound
neighbor 10.20.20.1 distribute-list to-ro4 out
neighbor 10.30.30.1 remote-as 30
neighbor 10.30.30.1 update-source dummy0
neighbor 10.30.30.1 next-hop-self
neighbor 10.30.30.1 soft-reconfiguration inbound
neighbor 10.30.30.1 route-map to-ro3 out
neighbor 172.16.10.1 remote-as 30
neighbor 172.16.10.1 update-source dummy0
neighbor 172.16.10.1 next-hop-self
neighbor 172.16.10.1 soft-reconfiguration inbound
neighbor 172.16.10.1 route-map to-ro2 out
no auto-summary
!
access-list to-ro4 permit any
!
ip prefix-list satu seq 10 permit 10.10.10.0/24
ip prefix-list satu seq 20 permit 10.10.11.0/24
ip prefix-list satu seq 9999 deny any
ip prefix-list dua seq 10 permit 10.10.10.0/24
ip prefix-list dua seq 20 permit 10.10.11.0/24
ip prefix-list dua seq 9999 deny any
!
route-map to-ro3 permit 10
match ip address prefix-list satu
set local-preference 1000
!
route-map to-ro2 permit 10
match ip address prefix-list dua
set local-preference 1000
!
line vty
Terima kasih telah mampir dan membaca tulisan ini
Salam.
No comments:
Post a Comment