Archive by category "Service Provider"

Service Provider Lab Series Part 3

วันนี้กลับมาต่อกับ Service Provider ในตอนที่ 3

ใช้ Diagram เดิมในตอนที่แล้วแบบนี้ครับกันลืม

ในตอนนี้เราจะมาเริ่มทำการ Configure MPLS กันครับ โดยมีข้อกำหนดเพิ่มเติมดังนี้

กำหนดให้แต่ละอุปกรณ์มี Label ในช่วงต่างๆดังนี้

P-XR-1     = 100000 – 199999

P-XR-2     = 200000 – 299999

PE-IOU-1 = 300 – 399

PE-IOU-2 = 400 – 499

PE-IOU-3 = 500 – 599

PE-IOU-4 = 600 – 699

การกำหนดช่วงของ Label มีประโยชน์เพื่อให้การตรวจสอบการทำงานของ MPLS ใน Lab นี้สามารถเห็นการทดลองได้ชัดเจนขึ้นเท่านั้น ห้ามทำในการใช้งานจริงเด็ดขาด

เริ่มต้นการ Configure อุปกรณ์โดยเริ่มจาก P-XR-1 ก่อนและทำให้ครบทุกอุปกรณ์ตามด้านล่างนี้

=== P-XR-1 ===

mpls ldp
router-id 1.1.1.1
interface GigabitEthernet0/0/0/0
interface GigabitEthernet0/0/0/1
interface GigabitEthernet0/0/0/2
interface GigabitEthernet0/0/0/3
mpls label range table 0 100000 199999

=== P-XR-2 ===

mpls ldp
router-id 2.2.2.2
interface GigabitEthernet0/0/0/0
interface GigabitEthernet0/0/0/1
interface GigabitEthernet0/0/0/2
interface GigabitEthernet0/0/0/3
mpls label range table 0 200000 299999

=== PE-IOU-1 ===

mpls label range 300 399
mpls label protocol ldp
interface Ethernet0/0
mpls ip
interface Ethernet0/1
mpls ip
mpls ldp router-id Loopback0 force

=== PE-IOU-2 ===

mpls label range 400 499
mpls label protocol ldp
interface Ethernet0/0
mpls ip
interface Ethernet0/1
mpls ip
mpls ldp router-id Loopback0 force

=== PE-IOU-3 ===

mpls label range 500 599
mpls label protocol ldp
interface Ethernet0/0
mpls ip
interface Ethernet0/1
mpls ip
mpls ldp router-id Loopback0 force

=== PE-IOU-4 ===

mpls label range 600 699
mpls label protocol ldp
interface Ethernet0/0
mpls ip
interface Ethernet0/1
mpls ip
mpls ldp router-id Loopback0 force

 

เมื่อทำการ Configure MPLS เบื้องต้นเสร็จแล้วให้ทำการตรวจสอบ MPLS neighbor ของอุปรณ์ดังในตัวอย่างด้านล่างนี้

== show mpls ldp neighbor ===

=== P-XR-1 ===

เนื่องจาก Output มีรายละเอียดเยอะมากเราสามารถใช้ | ร่วมด้วยเพื่อ filter เฉพาะข้อมูลที่ต้องการได้ดังนี้

=== PE-IOU-4 ===

กรณีที่ MPLS neighbor ไม่เป็นไปตามที่ต้องการใให้ทำการตรวจสอบการ Enable MPLS ที่แต่ละ Interface ในทุกๆอุปกรณ์ด้วย Command

=== show mpls interfaces ===

=== P-XR-1 ===

=== PE-IOU-2 ===

ต่อมาลองดูตัวอย่างของการ Map Label เข้ากับ IP/Prefix ที่ Router โดยใช้ Command

=== show mpls ldp bindings ===

=== P-XR-1 === (ตัด Output บางส่วน)

=== PE-IOU-1 ===

จาก Output ของ PE-IOU-1 แสดง Label บางส่วนเป็น imp-null แสดงให้เห็นว่า PE-IOU-1 เป็นเข้าของ Prefix นั้นเองทำให้ไม่มีการกำหนด Label ให้กับ Prefix นั้นๆ

สำหรับตอนที่ 3 ขอจบเพียงเท่านี้ครับ _/|\_

 

สำหรับข้อมูลเพิ่มเติมใน Internet ได้จาก Keyword ดังต่อไปนี้ : MPLS, Implicit Null Labels (imp-null), MPLS Reserved Labels, Penultimate Hop Popping (PHP)

Service Provider Lab Series Part 2

วันนี้กลับมาต่อกับ Service Provider ในตอนที่ 2

ใช้ Diagram เดิมในตอนที่แล้วแบบนี้ครับกันลืม

ในตอนนี้เราจะมาทำการ Configure OSPF เพิ่มเติมอีกเล็กน้อยคือการให้ P และ PE Router ทำการ Advertised Loopback 0 ของตัวเองออกมาใน Routing table และเพิ่ม Router ID ให้เป็น Loopback 0 IP address เช่นกัน โดยใช้ Command ดังนี้

=== P-XR-1 ===

interface loopback 0
ip address 1.1.1.1 255.255.255.0
router ospf LAB
router-id 1.1.1.1
area 0.0.0.0
interface Loopback0

=== P-XR-2===

interface loopback 0
ip address 2.2.2.2 255.255.255.0
router ospf LAB
router-id 2.2.2.2
area 0.0.0.0
interface Loopback0

=== PE-IOU-1 ===

interface loopback 0
ip address 3.3.3.3 255.255.255.0
router ospf 1
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0

=== PE-IOU-2 ===

interface loopback 0
ip address 4.4.4.4 255.255.255.0
router ospf 1
router-id 4.4.4.4
network 4.4.4.4 0.0.0.0 area 0

=== PE-IOU-3 ===

interface loopback 0
ip address 5.5.5.5 255.255.255.0
router ospf 1
router-id 5.5.5.5
network 5.5.5.5 0.0.0.0 area 0

=== PE-IOU-4 ===

interface loopback 0
ip address 6.6.6.6 255.255.255.0
router ospf 1
router-id 6.6.6.6
network 6.6.6.6 0.0.0.0 area 0

ทำการ Advertised Loopback IP Address เข้าไปที่ IP Address ของ P และ PE Router เข้าไปใน OSPF จากนั้นทำการเช็ค Routing table บน P-XR-1 จะได้ผลดังนี้

กรณีที่ตรวจสอบแล้วผลลัพธ์ไม่ได้แบบในภาพให้ทำการ Clear OSPF process โดยใช้ Command ดังนี้

#clear ip ospf process

ให้ลองทำการเช็ค OSPF neighbor บน P-XR-1 หลังจากทำการแก้ OSPF Router ID บน PE-IOU-1 จะได้ผลดังนี้

 

เมื่อทำการ Configure OSPF เสร็จแล้วให้ทำการ Configure BGP ต่อโดยใช้เงื่อนไขดังนี้

  • กำหนดให้ P-XR-1 และ P-XR-2 เป็น Route reflector server
  • กำหนดให้ PE-IOU-1 ถึง PE-IOU-4 เป็น Route reflector client
  • กำหนดให้ทำการ Peer BGP ด้วย Interface Loopback 0

=== P-XR-1 ===

router bgp 100
bgp router-id 1.1.1.1
address-family ipv4 unicast
neighbor 2.2.2.2
remote-as 100
update-source Loopback0
address-family ipv4 unicast
neighbor 3.3.3.3
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
neighbor 4.4.4.4
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
neighbor 5.5.5.5
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
neighbor 6.6.6.6
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client

=== P-XR-2 ===

router bgp 100
bgp router-id 2.2.2.2
address-family ipv4 unicast
neighbor 1.1.1.1
remote-as 100
update-source Loopback0
address-family ipv4 unicast
neighbor 3.3.3.3
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
neighbor 4.4.4.4
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
neighbor 5.5.5.5
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client
neighbor 6.6.6.6
remote-as 100
update-source Loopback0
address-family ipv4 unicast
route-reflector-client

=== PE-IOU-1 ===

router bgp 100
bgp router-id 3.3.3.3
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 2.2.2.2 activate
exit-address-family

=== PE-IOU-2 ===

router bgp 100
bgp router-id 4.4.4.4
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 2.2.2.2 activate
exit-address-family

=== PE-IOU-3 ===

router bgp 100
bgp router-id 5.5.5.5
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 2.2.2.2 activate
exit-address-family

=== PE-IOU-4 ===

router bgp 100
bgp router-id 6.6.6.6
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 2.2.2.2 activate
exit-address-family

เมื่อทำการ Configure BGP ตามข้อกำหนดเสร็จแล้วให้ทำการตรวจสอบ BGP peer ที่ P-XR-1 และ PE-IOU-4 ดังนี้

=== P-XR-1 ===

sh bgp summary

=== PE-IOU-1 ===

sh ip bgp summary

เมื่อทำการ Peer BGP ครบเรียบร้อยแล้วให้ลองทดสอบการทำงานของ Route reflector ที่ได้ทำการ Configure ไว้โดยลองให้ PE-IOU-1 ทำการเพิ่ม Interface Loopback 100 และทำการ Advertised network เข้าไปใน BGP

=== PE-IOU-1 ===

interface Loopback100

ip address 100.100.100.100 255.255.255.0

router bgp 100

address-family ipv4

network 100.100.100.0 mask 255.255.255.0

หลังจากนั้นให้ทำการตรวจสอบโดยการ Verify ฺBGP route ที่ PE-IOU-4 ดังนี้

=== PE-IOU-4 ===

show ip bgp sum

show ip bgp

จากผลการ Verify โดยใช้ Command “show ip bgp sum” จะเห็นได้ว่า PE-IOU-4 จะเห็น Prefix เข้ามาจาก Neighbor 1.1.1.1 (P-XR-1) และ 2.2.2.2 (P-XR-2) ตัวละ 1 Route ซึ่งเป็น Route reflector server ทั้งคู่

และเมื่อใช้ Command “show ip bgp” จะเห็น Route 100.100.100.0/24 เข้ามา 2 Route และมี 1 Route เป็น Best path

กรณีที่ต้องการหาว่า Best route 100.100.100.0/24 ที่ BGP เลือกไปใส่ลงใน Routing table มาจาก Router ตัวใดให้ใช้ Command “sh ip bgp 100.100.100.0” ที่ PE-IOU-4 จะได้ผลดังนี้

 

จากรูปจะเห็นได้ว่า Route 100.100.100.0/24 ที่เป็น Best route ได้มากจาก Neighbor 1.1.1.1 (P-XR-1) จาก Keyword “best” ในรูปด้านบน

วันนี้จบตอนนี้ 2 ในส่วน BGP เท่านี้ครับ ^^

Service Provider Lab Series Part 1

สลัดความขี้เกียจในวันหยุดกันด้วยการลองหาอะไรใหม่ๆทำกันดีกว่า ^^

ขอเริ่มเขียนหัวข้อต่อเนื่องในรูปแบบ Series ตัวแรกของปีนี้ด้วย Service Provider Lab แล้วกันนะครับ โดยใน Series นี้จะเน้นให้ทำการลอง Config อุปกรณ์ IOS-XR (XRv) ซึ่งเป็นอุปกรณ์ของสาย Service Provider กันครับ สำหรับ IOS-XE นั้นจากการทดสอบการใช้งานแล้วพอว่ามีปัญหาอย่างนึงซึ่งเป็นตัวตัดสินใจให้ผมไม่นำ IOS-XE มาใช้คือเรื่องของระยะเวลาในการ Boot ของอุปกรณ์ซึ่งนานมาก ดังนั้นในส่วนของ PE และ CE ผมจะใช้ IOU-L3 ในการใช้งานทั้งหมด ซึ่งรูปแบบในการ Configure ของ IOS และ IOS-XE ไม่มีความต่างกันมาก(ไม่ต่างเลยล่ะ)ดังนั้นจึงไม่เป็นปัญหาในส่วนนี้ครับ

 

สำหรับ Series นี้จะใช้ Diagram ตามรูปด้านล่างนี้เป็นหลักจะไม่มีการเปลี่ยนแปลงในส่วนของ Core Network ที่ทำเป็นกรอบสีไว้ การแก้ไขตั้งใจว่าจะให้มีการแก้ไขที่อุปกรณ์ CE หรือ Customer Edge เท่านั้น สำหรับความตั้งใจแรกในการทำ Lab นี้ขึ้นมาก็เพื่อทบทวนเนื่อหาที่ผมเคยได้เรียนไปบ้างแล้ว ในส่วนของ MPLS VPN ดังนั้นเนื้อหาจะเป็นการใช้งาน L3 VPN ก่อนเป็นอันดับแรก ถ้ามีไฟต่อก็อาจจะทำในส่วนอื่นต่อไปอีกทีอาจจะเป็น L2 VPN – VPLS ก็ได้

Emulator ที่ผมใช้ในการทำ Lab เช่นเคย UnetLab เจ้าเดิม แต่สำหรับท่านที่ไม่ได้ใช้ UnetLab ก็ยังสามารถลองทำตามได้ตามปกติไม่มีปัญหาแต่ประการใดทั้งในส่วนของ GNS3 และ IOU-Web ก็สามารถนำมาใช้ทำ Lab ได้อย่างไม่มีปัญหา

เนื่องจากคิดว่าจะเขียนเป็น Series คือมีหลายๆตอนดังนั้นในแต่ละตอนจะเป็นแค่ Lab เบาๆ ^^ ไม่รุนแรงมากไม่เน้นทฤษฎี สำหรับในตอนแรกจะเริ่มด้วยการสร้าง OSPF Network ที่ Core Network ของ Service Provider กันก่อนโดยจะใช้แค่ OSPF Area 0 เพียงตัวเดียวเพื่อให้ง่ายในการทำ Lab

สำหรับรายละเอียดของอุปกรณ์ที่ผมใช้คือ XRv และ IOU-L3 มีดังนี้ครับ

XRv

IOU

จากนั้นให้ทำการสร้าง Diagram ใน UnetLab เหมือนกับ Diagram ที่ทำไว้ใน Visio ก็จะได้หน้าตาแบบในรูปต่อไปนี้

หลังจากนั้นให้ทำการ Start อุปกรณ์ทั้งหมดขึ้นมาเพื่อเริ่มทำการ Configure โดยให้เริ่มจาก XRv ทั้งสองตัวก่อนโดยใช้ Command ดังนี้

=== P-XR-1 ===

hostname P-XR-1
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.1.1 255.255.255.252
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.1.5 255.255.255.252
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.1.9 255.255.255.252
interface GigabitEthernet0/0/0/3
ipv4 address 10.1.1.13 255.255.255.252
router ospf LAB
area 0.0.0.0
interface GigabitEthernet0/0/0/0
interface GigabitEthernet0/0/0/1
interface GigabitEthernet0/0/0/2
interface GigabitEthernet0/0/0/3

เมื่อทำการ Configure อุปกรณ์แล้วจะต้องทำการใส่ Command “commit” ตามด้วยทุกครั้งสำหรับ IOS-XR เพื่อให้ Command ที่ใส่เข้าไปมีผลในการทำงาน

=== P-XR-2 ===

hostname P-XR-2
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.1.17 255.255.255.252
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.1.21 255.255.255.252
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.1.25 255.255.255.252
interface GigabitEthernet0/0/0/3
ipv4 address 10.1.1.29 255.255.255.252
router ospf LAB
area 0.0.0.0
interface GigabitEthernet0/0/0/0
interface GigabitEthernet0/0/0/1
interface GigabitEthernet0/0/0/2
interface GigabitEthernet0/0/0/3

ส่วนต่อมาคือ PE Router ทั้ง 4 ตัว

=== PE-IOU-1 ===

hostname PE-IOU-1
interface Ethernet0/0
ip address 10.1.1.2 255.255.255.252
interface Ethernet0/1
ip address 10.1.1.18 255.255.255.252
router ospf 1
network 10.1.1.2 0.0.0.0 area 0
network 10.1.1.18 0.0.0.0 area 0

=== PE-IOU-2 ===

hostname PE-IOU-2
interface Ethernet0/0
ip address 10.1.1.6 255.255.255.252
interface Ethernet0/1
ip address 10.1.1.22 255.255.255.252
router ospf 1
network 10.1.1.6 0.0.0.0 area 0
network 10.1.1.22 0.0.0.0 area 0

=== PE-IOU-3 ===

hostname PE-IOU-3
interface Ethernet0/0
ip address 10.1.1.10 255.255.255.252
interface Ethernet0/1
ip address 10.1.1.26 255.255.255.252
router ospf 1
network 10.1.1.10 0.0.0.0 area 0
network 10.1.1.26 0.0.0.0 area 0

=== PE-IOU-4 ===

hostname PE-IOU-4
interface Ethernet0/0
ip address 10.1.1.14 255.255.255.252
interface Ethernet0/1
ip address 10.1.1.30 255.255.255.252
router ospf 1
network 10.1.1.14 0.0.0.0 area 0
network 10.1.1.30 0.0.0.0 area 0

เมื่อทำการ Configure เสร็จแล้ว อุปกรณ์ทุกตัวจะสามารถ Ping หากันได้หมด กรณีที่มีปัญหาไม่พบ Network ใดๆให้ทำการตรวจสอบการ Configure อุปกรณ์อีกครั้ง และให้ทำการตรวจสอบการ Configure OSPF ด้วย Command ดังนี้

XRv

show ospf neighbor จะต้องได้ผลดังนี้

show ospf interface brief จะต้องได้ผลดังนี้

IOU

show ip ospf neighbor จะต้องได้ผลดังนี้

show ip ospf interface brief จะต้องได้ผลดังนี้

และเมื่อใช้ command “show route” “show ip route” จะได้ผลลัพธ์ดังต่อไปนี้

ตัวอย่าง P-XR-1

show route

ตัวอย่าง PE-IOU-1

show ip route

สำหรับการ Configure OSPF ที่ Core Network ก็จะมีเท่านี้ครับ

 

ในตอนถัดไปจะเป็นการเพิ่ม BGP เข้าไปที่ Core Network รอติดตามกันดูนะครับสวัสดี ^^