lab 8-4 bgp route reflector và route filter

13 466 1
lab 8-4 bgp route reflector và route filter

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Lab 8-4: BGP ROUTE REFLECTOR VÀ ROUTE FILTER Mô tả Trong bài thực hành này, chúng ta sẽ cấu hình IBGP giữa các router sử dụng route reflector và cấu hình route filter đơn giản Mạng của Công ty ABC ở Sài Gòn có cấu hình như hình vẽ. Công ty muốn thiết lập IBGP full mesh giữa các router. Giải pháp được công ty chọn là cấu hình route reflector. Thực hiện 1. Kết nối mạng theo sơ đồ như trên. Cấu hình hostname, địa chỉ IP các cổng serial, loopback theo đúng sơ đồ. Chưa cấu hình giao thức định tuyến. Kiểm tra các kết nối trực tiếp bằng lệnh ping và show cdp neighbor. 2. Cấu hình định tuyến IBGP cho các router: SaiGon3(config)#router bgp 100 SaiGon3(config-router)#neighbor 192.168.1.5 remote-as 100 SaiGon3(config-router)#neighbor 172.24.1.18 remote-as 100 SaiGon3(config-router)#no auto-summary SaiGon3(config-router)#no synchronization SaiGon3(config-router)#network 172.24.1.16 mask 255.255.255.252 SaiGon3(config-router)#network 192.168.1.4 mask 255.255.255.252 Sau khi cấu hình router SaiGon3, cấu hình hai router còn lại đóng vai trò là route reflector client. Chú ý khi cấu hình các client, chỉ cần cấu hình peering giữa các client và server. IBGP không cần thiết phải được cấu hình full mesh. Cấu hình BGP trên router SaiGon1: SaiGon1(config)#router bgp 100 SaiGon1(config-router)#neighbor 192.168.1.6 remote-as 100 SaiGon1(config-router)#no synchronization SaiGon1(config-router)#no auto-summary Cấu hình trên router SaiGon2: SaiGon2(config)#router bgp 100 SaiGon2(config-router)#neighbor 172.24.1.17 remote-as 100 SaiGon2(config-router)#no synchronization SaiGon2(config-router)#no auto-summary Kiểm tra rằng router SaiGon3 có quan hệ peering với cả router SaiGon1 và SaiGon2: SaiGon3#show ip bgp Network Next Hop Metric LocPrf Weight Path *> 172.24.1.16/30 0.0.0.0 0 32768 i *> 192.168.1.4/30 0.0.0.0 0 32768 i *> 200.100.50.0 0.0.0.0 0 32768 i 3. Để hiểu rõ tác dụng của việc sử dụng route reflector, ta cấu hình router SaiGon2 quảng bá một mạng vào trong BGP như sau: SaiGon2(config)#int loopback 0 SaiGon2(config-if)#ip address 199.9.9.1 255.255.255.0 SaiGon2(config-if)#router bgp 100 SaiGon2(config-router)#network 199.9.9.0 Cấu hình trên sẽ đưa network 199.9.9.0 vào BGP. Dùng lệnh show ip route để kiểm tra router SaiGon3 đã có route đến network 199.9.9.0 hay chưa: SaiGon3#show ip bgp Network Next Hop Metric LocPrf Weight Path *> 172.24.1.16/30 0.0.0.0 0 32768 i *> 192.168.1.4/30 0.0.0.0 0 32768 i *>i199.9.9.0 172.24.1.18 0 100 0 i *> 200.100.50.0 0.0.0.0 0 32768 i SaiGon3#show ip route Gateway of last resort is not set B 199.9.9.0/24 [200/0] via 172.24.1.18, 00:02:07 C 200.100.50.0/24 is directly connected, Ethernet0 172.24.0.0/30 is subnetted, 1 subnets C 172.24.1.16 is directly connected, Serial1 192.168.1.0/30 is subnetted, 1 subnets C 192.168.1.4 is directly connected, Serial0 Kiểm tra bảng route của router SaiGon1: SaiGon1#show ip route Gateway of last resort is not set B 200.100.50.0/24 [200/0] via 192.168.1.6, 00:08:10 172.24.0.0/30 is subnetted, 1 subnets B 172.24.1.16 [200/0] via 192.168.1.6, 00:08:10 192.168.1.0/30 is subnetted, 1 subnets C 192.168.1.4 is directly connected, Serial0 Do router SaiGon1 không có quan hệ peering với router SaiGon2 nên trong bảng route không xuất hiện route đến network 199.9.9.0. Để tránh thiết lập cấu hình full mesh, ta phải cấu hình router SaiGon3 đóng vai trò là một route reflector server: SaiGon3(config)#router bgp 100 SaiGon3(config-router)#neighbor 192.168.1.5 route-reflector-client SaiGon3(config-router)#neighbor 172.24.1.18 route-reflector-client Kiểm tra bảng BGP trên router SaiGon1: SaiGon1#show ip bgp BGP table version is 11, local router ID is 192.168.1.5 Network Next Hop Metric LocPrf Weight Path *>i172.24.1.16/30 192.168.1.6 0 100 0 i *>i192.168.1.4/30 192.168.1.6 0 100 0 i *>i199.9.9.0 172.24.1.18 0 100 0 i *>i200.100.50.0 192.168.1.6 0 100 0 i Chú ý là next hop của route 199.9.9.0 là 172.24.1.18 chứ không phải là 192.168.1.6. Tức là route 199.9.9.0 trên router SaiGon1 học được trực tiếp từ router SaiGon2. SaiGon1#ping 199.9.9.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 199.9.9.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 64/68/88 ms 4. Ta cấu hình BGP summary address trên router SaiGon2 SaiGon2(config)#router bgp 100 SaiGon2(config-router)#aggregate-address 199.0.0.0 255.0.0.0 BGP sẽ gửi supernet 199.0.0.0/8 cho router SaiGon3 với bit ATOMIC_AGGREGATE được set lên 1 SaiGon3#show ip bgp BGP table version is 8, local router ID is 200.100.50.1 Network Next Hop Metric LocPrf Weight Path *> 172.24.1.16/30 0.0.0.0 0 32768 i *> 192.168.1.4/30 0.0.0.0 0 32768 i *>i199.0.0.0/8 172.24.1.18 100 0 i *>i199.9.9.0 172.24.1.18 0 100 0 i *> 200.100.50.0 0.0.0.0 0 32768 i SaiGon3#show ip bgp 199.0.0.0 BGP routing table entry for 199.0.0.0/8, version 8 Paths: (1 available, best #1) Advertised to non peer-group peers: 192.168.1.5 Local, (aggregated by 100 172.24.1.18), (Received from a RR-client) 172.24.1.18 from 172.24.1.18 (172.24.1.18) Origin IGP, localpref 100, valid, internal, atomic-aggregate, best, ref 2 Router SaiGon3 sau đó sẽ reflect route này cho router SaiGon1, kiểm tra bảng route của router SaiGon1: SaiGon1#show ip route Gateway of last resort is not set B 199.9.9.0/24 [200/0] via 172.24.1.18, 00:07:55 B 200.100.50.0/24 [200/0] via 192.168.1.6, 00:08:12 172.24.0.0/30 is subnetted, 1 subnets B 172.24.1.16 [200/0] via 192.168.1.6, 00:08:12 192.168.1.0/30 is subnetted, 1 subnets C 192.168.1.4 is directly connected, Serial0 B 199.0.0.0/8 [200/0] via 172.24.1.18, 00:03:31 Theo yêu cầu của công ty, route 199.9.9.0/24 cần phải được lọc không cho đến router SaiGon1, ta cấu hình trên router SaiGon3 như sau: SaiGon3(config)#ip prefix-list Super_Net_Only permit 199.0.0.0/8 SaiGon3(config)#ip prefix-list Super_Net_Only permit 172.24.1.0/24 SaiGon3(config)#ip prefix-list Super_Net_Only permit 200.100.50.0/24 SaiGon3(config)#router bgp 100 SaiGon3(config-router)#neighbor 192.168.1.5 prefix-list Super_Net_Only out Trở lại router SaiGon1, reset các kết nối BGP bằng lệnh clear ip bgp *. Sau đó một thời gian, kiểm tra bảng BGP của router SaiGon1: SaiGon1#show ip bgp BGP table version is 3, local router ID is 192.168.1.5 Network Next Hop Metric LocPrf Weight Path *>i199.0.0.0/8 172.24.1.18 100 0 i *>i200.100.50.0 192.168.1.6 0 100 0 i Lúc này, router SaiGon1 chỉ còn supernet 199.0.0.0/8 trên bảng BGP của nó. Cấu hình SaiGon1#show running-config Building configuration Current configuration: ! version 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname SaiGon1 ! ip subnet-zero no ip domain-lookup ! interface Serial0 ip address 192.168.1.5 255.255.255.252 no ip directed-broadcast no ip mroute-cache clockrate 64000 ! router bgp 100 no synchronization neighbor 192.168.1.6 remote-as 100 no auto-summary ! ip classless ! line con 0 logging synchronous transport input none line aux 0 line vty 0 4 privilege level 15 no login ! end SaiGon3#show running-config Building configuration Current configuration: ! version 12.0 hostname SaiGon3 ! interface Ethernet0 ip address 200.100.50.1 255.255.255.0 no ip directed-broadcast no keepalive ! interface Serial0 ip address 192.168.1.6 255.255.255.252 no ip directed-broadcast no ip mroute-cache ! interface Serial1 ip address 172.24.1.17 255.255.255.252 no ip directed-broadcast clockrate 64000 ! router bgp 100 no synchronization network 172.24.1.16 mask 255.255.255.252 network 192.168.1.4 mask 255.255.255.252 network 200.100.50.0 neighbor 172.24.1.18 remote-as 100 neighbor 172.24.1.18 route-reflector-client [...]... subnet-zero ! interface Loopback0 ip address 199.9.9.1 255.255.255.0 no ip directed-broadcast ! interface Serial0 ip address 172.24.1.18 255.255.255.252 no ip directed-broadcast no ip mroute-cache no fair-queue ! router bgp 100 no synchronization network 199.9.9.0 aggregate-address 199.0.0.0 255.0.0.0 neighbor 172.24.1.17 remote-as 100 no auto-summary ! ip classless ! line con 0 logging synchronous transport...neighbor 192.168.1.5 remote-as 100 neighbor 192.168.1.5 route- reflector- client neighbor 192.168.1.5 prefix-list Super_Net_Only out no auto-summary ! ip classless no ip http server ! ip prefix-list Super_Net_Only seq 5 permit 199.0.0.0/8 ip prefix-list Super_Net_Only . Lab 8-4: BGP ROUTE REFLECTOR VÀ ROUTE FILTER Mô tả Trong bài thực hành này, chúng ta sẽ cấu hình IBGP giữa các router sử dụng route reflector và cấu hình route filter đơn giản Mạng. trò là một route reflector server: SaiGon3(config)#router bgp 100 SaiGon3(config-router)#neighbor 192.168.1.5 route- reflector- client SaiGon3(config-router)#neighbor 172.24.1.18 route- reflector- client Kiểm. mesh. Cấu hình BGP trên router SaiGon1: SaiGon1(config)#router bgp 100 SaiGon1(config-router)#neighbor 192.168.1.6 remote-as 100 SaiGon1(config-router)#no synchronization SaiGon1(config-router)#no

Ngày đăng: 16/11/2014, 19:45

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan