Double redistribution on a single router (same router)
การ redistribute route ที่หลายๆ คนยังไม่รู้อีกเรื่องหนึ่ง นั่นก็คือ การทำ Double Redistribution ภายใน Router ตัวเดียวกัน (Double Redistribution on a single router or the same router) จากสิ่งที่ถูกค้าสอบถามมาแม้ผมจะตอบคำถามไปแล้ว แต่ก็พยายามหาข้อมูลอ้างอิงใน Web ซึ่งหาเท่าไหร่ก็ไม่เจอ แต่จำได้ว่ามี สุดท้ายนึกได้ว่า สอนในวิชา CCNP ROUTE เลยไปค้นเอกสารดู และเจอจนได้ (ไม่งั้นฝันว่านอนไม่หลับทั้งคืนแน่นอน) เลยวาดรูป และแชร์เป็นความรู้ซะเลยเพราะเชื่อว่าเป็นประโยชน์กับพี่ๆ น้องๆ
1. จากรูป R3 run routing protocol ทั้งหมด 3 protocol ประกอบไปด้วย RIP, EIGRP และ OSPF โดยมีการ redistribute route จาก RIP --> EIGRP--> OSPF 2. จากรูป Net X ถูกประกาศจาก R1 ผ่าน routing protocol RIP และ Net Y ถูกประกาศจาก R2 ผ่าน routing protocol EIGRP 3. R3 ทำการ redistribute Net X จาก RIP ไปยัง EIGRP 4. R3 ทำการ redistribute route ทั้งหมดซึ่งประกอบไปด้วย Net X และ Net Y จาก EIGRP ไปยัง OSPF แต่ทว่า ด้วยกฎของการ redistribute route บน Cisco router แล้ว จะไม่อนุญาติให้ทำการ double redistribute route (redistribute route สองครั้ง) บน router ตัวเดียวกันได้ ดังนั้น Net X จึงไม่สามารถที่จะถูก redistribute จาก EIGRP ไปยัง OSPF ได้ 5. R3 ประกาศเพียงแค่ Net Y เท่านั้น ไปยัง R4 เหตุที่ Cisco router ไม่ยอมให้ทำการ double redistribute route เนื่องจากเป็นกลไกการป้องกันการเกิด routing loop นั่นเอง *** ดังนั้นวิธีแก้ปัญหา หากต้องการให้ router R4 ได้รับ Net X แล้ว ให้ทำการ redistribute โดยตรงระหว่าง routing protocol RIP กับ OSPF เลยนะครับแต่ก็ต้องระวังเรื่อง routing loop ให้ดี โดยสามารถศึกษาเรื่อง routing loop ได้จาก link ข้างล่างครับ https://web.facebook.com/chaiwat.amorn/posts/2297431380298757
สำหรับตัวอย่าง configuration เพื่อให้พี่ๆ น้องๆ ไปลงอทำ lab กัน ดังนี้ครับ
Configuration:
R1: ! hostname R1 ! interface Loopback0 description Net X ip address 1.1.1.1 255.255.255.255 ! interface GigabitEthernet0/0 ip address 10.1.3.1 255.255.255.0 ! router rip version 2 network 1.0.0.0 network 10.0.0.0 no auto-summary ! end ======================= R2: ! hostname R2 ! interface Loopback0 description Net Y ip address 2.2.2.2 255.255.255.255 ! interface GigabitEthernet0/1 ip address 10.2.3.2 255.255.255.0 ! router eigrp 1 network 2.0.0.0 network 10.0.0.0 ! end
======================= R3: ! hostname R3 ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Loopback13 ip address 13.13.13.13 255.255.255.255 ! interface Loopback23 ip address 23.23.23.23 255.255.255.255 ! interface Loopback34 ip address 34.34.34.34 255.255.255.255 ! interface GigabitEthernet0/0 ip address 10.1.3.3 255.255.255.0 ! interface GigabitEthernet0/1 ip address 10.2.3.3 255.255.255.0 ! interface GigabitEthernet0/2 ip address 10.3.4.3 255.255.255.0 ! router rip version 2 passive-interface GigabitEthernet0/1 passive-interface GigabitEthernet0/2 network 10.0.0.0 network 13.0.0.0 no auto-summary ! router eigrp 1 network 10.2.3.0 0.0.0.255 network 23.23.23.23 0.0.0.0 redistribute rip metric 10000 100 255 1 1500 ! router ospf 2 redistribute eigrp 1 subnets network 10.3.4.0 0.0.0.255 area 0 network 34.34.34.34 0.0.0.0 area 0 ! end ======================= R4: ! hostname R4 ! interface Loopback0 ip address 4.4.4.4 255.255.255.255 ! interface GigabitEthernet0/2 ip address 10.3.4.4 255.255.255.0 ! router ospf 2 network 0.0.0.0 255.255.255.255 area 0 ! end ============================
เมื่อเปรียบให้: - Net X = 1.1.1.1/32 - Net Y = 2.2.2.2/32 จากรูปการ show ip route บน R3 จะเห็นว่า: - R3 ได้รับ Net 1.1.1.1/32 มาจาก R1 ผ่านทาง routing protocol RIP - R3 ได้รับ Net 2.2.2.2/32 มาจาก R2 ผ่านทาง routing protocol EIGRP แต่เมื่อไป show ip route บน R4 จะพบว่า R4 เห็นเพียงแค่ Net 2.2.2.2/32 เท่านั้น และไม่เห็น Net 1.1.1.1/32 ซึ่งเป็นไปตามกฎที่ได้กล่าวเอาไว้
หวังว่าจะเป็นประโยชน์กับพี่ๆ น้องๆนะครับ ปล. ขนาดป่วยก็ยังไม่วายแชร์ความรู้ ก็ใจมันรักอ่ะ 555 โก้-ชัยวัฒน์ (KoChaiwat)
Create Date : 09 พฤศจิกายน 2561 |
Last Update : 9 พฤศจิกายน 2561 18:25:03 น. |
|
1 comments
|
Counter : 2984 Pageviews. |
|
|
|