ip prefix-list の確認 |
Dynalconf HOME |
Dynamips/Dynagenを使用してprefix-listの動作を確認します。AS65000からAS65001へルートをアドバタイズし、prefix-listでアドバタイズするルートをフィルタします。
ip prefix-list {list-name | list-number} [seq number] {deny network/length | permit network/length} [ge ge-length] [le le-length]
length < ge-length <= le-length <= 32
ip prefix-list PREFIX permit 192.168.1.0/24
ip prefix-list PREFIX permit 192.168.0.0/16 ge 24
ip prefix-list PREFIX permit 192.168.0.0/16 le 24
ip prefix-list PREFIX permit 192.168.0.0/16 ge 18 le 24
ip prefix-list PREFIX permit 0.0.0.0/0
ip prefix-list PERMIT seq 20 permit 192.168.0.0/0 ---> プレフィックス長が0
ip prefix-list PERMIT seq 20 permit 0.0.0.0/0
ip prefix-list PREFIX permit 0.0.0.0/0 le 32
ip prefix-list PREFIX permit 0.0.0.0/0 ge 32
ip prefix-list PERMIT seq 10 permit 0.0.0.0/1 le 32 ip prefix-list PERMIT seq 20 permit 192.168.0.0/16 ge 28 le 30 ip prefix-list PERMIT seq 30 permit 192.168.0.0/16 le 20 ip prefix-list PERMIT seq 40 permit 192.168.0.0/16 ge 21 le 24 ip prefix-list PERMIT seq 50 permit 0.0.0.0/0 ge 32
route-map PERMIT permit 10 match ip address prefix-list PERMIT
router bgp 65001 redistribute connected neighbor 150.0.0.2 remote-as 65002 neighbor 150.0.0.2 route-map PERMIT out
R2#sh bgp ipv4 unicast Network Next Hop Metric LocPrf Weight Path *> 10.123.38.0/24 150.0.0.1 0 0 65001 ? *> 192.168.100.240/28 150.0.0.1 0 0 65001 ? *> 192.168.135.0 150.0.0.1 0 0 65001 ? *> 192.168.224.0/20 150.0.0.1 0 0 65001 ? *> 192.168.250.8/30 150.0.0.1 0 0 65001 ? *> 192.168.251.1/32 150.0.0.1 0 0 65001 ?
1. Dynagen .net file 2. R1 3. R2
R2 : sh bgp ipv4 unicast sh ip route bgp 1. show command
Dynalconf HOME |