สนับสนุนการทำ Authentication ทั้งแบบ Clear Text และ MD5
OSPF Overview:
Instances หรือ Process ของ OSPF สามารถเริ่มได้ตั้งแต่ 1 - 65,535 แต่ไม่สมควร Run OSPF มากกว่า 1 Process พร้อมๆ กัน หากไม่จำเป็น
Area ของ OSPF สามารถมีได้ถึง 2^32 หรือประมาณ 4,200,000 Area
ใน Router ที่ Run OSPF จะต้องมี Area 0 อยู่เสมอ ถือว่าเป็น Backbone Area
หากกว่า Network นั้นๆ มีหลาย Area ทุกๆ Area จะต้อง Connect เข้าหา Area 0 เสมอ อาจจะเป็นการต่อ Interface เข้าหา Area 0 หรือทำ Virtual Links วิ่งเข้าหา Area 0 ก็ได้
Default Administrative Distance ของ OSPF คือ 110
Link-State Data Structure: Network Hierarchy:
Link-state routing requires a hierachical network structure that is enforced by OSPF
This two-level hierarchy consists of the following:
Transit area (backbone or area 0)
Regular areas (non-backbone areas)
OSPF Areas - ในความหมายของ Area ใน OSPF จะคล้ายๆ กับเป็น Autonomous System (AS) หนึ่งๆ ซึ่งเหมือนกับเป็นกลุ่มของ Router ที่ Run OSPF ด้วยกัน และมีขอบเขตในการแลกเปลี่ยน Routing Table กันภายในกลุ่มของตัวเองเท่านั้นโดย Default
Localizes impact of a topology change within an area - จำกัดความถี่ในการคำนวณ Algorithm SPF ใหม่ เมื่อมีการเปลี่ยนแปลง Topology ของ Router แต่ละตัว เพราะ Router จะคำนวณอัลกอริทึม SPF ใหม่ ก็ต่อเมื่อได้รับ LSA Update จาก Router ภายใน Area เดียวกันเท่านั้น การคำนวณ SPF ใหม่จะมีผลต่อภาระ Load ของ CPU ของ Router
Link State Advertisement (LSA) - เป็น Packet ข้อมูลที่ OSPF Process ใช้ในการแลกเปลี่ยนสถานะของ Interface และ Link ใน Router ที่ Run OSPF ด้วยกัน:
Detailed LSA flooding stops at the area boundary - จำกัดปริมาณ Packet ที่เกิดขึ้นอันเนื่องมาจากการส่ง LSA Update ให้อยู่ภายในขอบเขตของ Area เดียวกัน (LSA Update จะไม่ถูกส่งข้ามไป Area อื่น)
Neighborship: The Hello Packet ภายใน Hello Packet ของ OSPF ถูกบรรจุด้วยข้อมูลดังต่อไปนี้:
Router ID - หมายถึง IP Address ที่ได้ทำการ Assign เพื่อเป็นการ Identify ให้กับ Router ในการเลือก DR, BDR โดยที่ปกติแล้ว Router ใน OSPF จะเลือก DR จาก Router ID ที่ IP Address ที่สูงที่สุดที่ Set ใน Loopback Interface แต่ถ้าหากว่า Loopback Interface ไม่ถูก Set ไว้ ก็จะทำการเลือก IP Address ที่สูงสุดของ Physical Interface แทน
Hello and dead intervals*
Neighbors
Area ID*
Router priority
DR IP address
BDR IP address
Authentication password*
Stub area flag*
ในการ Form ความสัมพันธ์กันนั้น ค่าที่มี * จะต้องเท่ากัน มิเช่นนั้นจะ Form ความสัมพันธ์กันไม่ได้
OSPF Neighbour States:
Establishing Bidirectional Communication:
Down State R1: E0 172.27.6.1/24 <-> :R2 E1 172.27.6.2/24 ไม่มี Router ตัวไหนที่รับส่ง Hello Packet กัน
Init State R1: Hello -> I am router ID 1.1.1.1, and I see no one. -> to 224.0.0.5 :R2 Hello Packet ถูกส่งไปยัง Router เพื่อนบ้าน แต่เป็นการส่งกันทางเดียว Router อีกฝั่งจะยังไม่เห็น Router เพื่อนบ้านอื่นๆ
Two-Way State R2 Neighbor List 1.1.1.1/32, Int E1 R1: Unicast to R1 <- I am router ID 2.2.2.2, and I see 1.1.1.1. <- Hello :R2 R1 Neighbor List 2.2.2.2/32, Int E0 Hello Packet ถูกรับส่งกันทั้งสองฝั่งซึ่งรวมถึง Router ID ด้วย และหากข้อมูลที่จำเป็นใน Hello Packet ตรงกัน ก็สามารถที่จะ Form ความสัมพันธ์กันได้
Discovering the Network Routes:
Exstart State R1: DBD -> I will start exchange because I have router ID 1.1.1.1 : R2 R1: No, I will start exchange because I have a higher router ID. <- DBD : R2 ทำการเลือก DR/BDR
Exchange State R1: Here is a summary of my LSDB <- DBD : R2 R1: DBD -> Here is a summary of my LSDB : R2 Router ทำการ Flood LSA ออกไปและแลกเปลี่ยนกัน
Adding the Link-State Entries:
Loading State R1: LSAck <- Thanks for the information! -> LSAck : R2 มีการแลก LSA ที่ Update แล้วจาก DR/BDR ไปยัง Router ตัวอื่นๆ ที่ผ่านขั้นตอน ExStart มาแล้ว
Full State R1: LSR -> I need the complete entry for network 172.16.6.0/24 : R2 R1: Here is the entry for network 172.16.6.0/24 <- LSU : R2 R1: LSAck -> Thanks for the information : R2 LSA ทั้งหมดได้รับการ Update ตรงกันทั้งหมดแล้วใน Router ทุกๆ ตัว
LSA Flooding: ในกระบวนการแลกเปลี่ยน LSA หรือ Link State Advertisement ใน Router นั้น LSA Packet จะถูก Share กันในระหว่างกลุ่ม Router ที่ Run OSPF ด้วยกันผ่านทาง Multicast Address หมายเลข 224.0.0.5 ซึ่งใน LSA Packet นี้ จะมีอยู่ด้วยกันหลาย Type
Use the command router ospf <process ID> [vrf <vpn-name>] to start OSPF. router ospf 1
Use the network <ip-address wildcard-mask> command to enable the interfaces.
Identify area assignments area <area-id>. network 0.0.0.0 255.255.255.255 area 0 (all interfaces; not recommend) or Enable explicitly on an interfaces ip ospf <process-id> area <area-id> [secondaries none]
Advertising loopback network as /24 instead of /32: (config-if)# ip ospf network point-to-point learningnetwork.cisco.com/thread/71259
ประเภทของ OSPF Router:
Backbone Router - เป็น Router ที่ทำงานอยู่ใน Area 0 หรือเรียกอีกอย่างว่า Backbone Area
Backbone routers make up area 0.[/li] [li][b]Area Border Router (ABR)[/b] - หมายถึง เราเตอร์ที่รัน OSPF ที่มีอินเทอร์เฟซอยู่มากกว่า 1 Area และถูกใช้เป็นทางเข้าสำหรับเราติ้งเทเบิลของภายนอก Area ที่จะเข้ามา update ภายใน Area ด้านใน ABRs attach all other areas to area 0.[/li] [li][b]Autonomous System Border Router (ASBR)[/b] - หมายถึง เราเตอร์ที่มีอินเทอร์เฟซที่ นอกเหนือจากรัน OSPF แล้ว ยังรันเราติ้งโปรโตคอลอื่นๆ ด้วย เช่น EIGRP, RIP, IS-IS (เราถือว่า เราติ้งโปรโตคอลอื่นๆ เป็น External Autonomous System) และหน้าที่ของ ASBR ก็คือ การถ่ายทอดเราติ้งเทเบิลเข้ามาใน OSPF Area ในทำนองเดียวกัน เมื่อเราเตอร์ตัวใดก็แล้วแต่ต้องการส่งแพ็กเก็ตไปยังเราเตอร์ภายนอกที่อยู่ภายใต้ขอบเขตของเราติ้งโปรโตคอลอื่นๆ มันก็จะต้องส่งแพ็กเก็ตมาหา ASBR ก่อน เพื่อให้ ASBR ดำเนินการต่อให้[/li] [li][b]Internal Router[/b] - หมายถึง เราเตอร์ที่รัน OSPF แต่ทุกๆ Interface อยู่ภายใน Area ของตนเท่านั้น หรือไม่มี Interface ใดๆ อยู่ภายใน Area อื่น หรือ Routing Protocol อื่นๆ เมื่อมันต้องการส่งแพ็กเก็ตไปยังเราเตอร์ตัวอื่นที่อยู่ต่าง area กับมัน มันจะต้องส่งแพ็กเก็ตไปยังเราเตอร์ที่ทำหน้าที่เป็น ABR ใน area ของตนก่อน เพื่อให้ ABR ของตนทำการส่งแพ็กเก็ตต่อไปยังเราเตอร์ที่ทำหน้าที่เป็น Backbone Router ใน area 0 จากนั้น Backbone Router จะช่วยส่งแพ็กเก็ตไปยัง ABR ของ area ปลายทาง เมื่อ ABR ได้รับแพ็กเก็ตแล้ว มันจะค่อยส่งต่อไปให้ internal router ภายในอีกครั้ง[/li][/list]
[b]OSPF Network Types[/b] The three types of networks defined by OSPF are: [list][li]Point-to-point: A network that joins a single pair of routers. - การเชื่อมต่อแบบ จุดต่อจุด เช่น Dedicated Link (T1), PPP เป็นต้น[/li] [li]Broadcast (Broadcast multiaccess;BMA): A multiaccess broadcast network, such as Ethernet.[/li] [li]Nonbroadcast multiaccess (also called NBMA): A network that interconnects more than two routers but that has no broadcast capability. Frame Relay, ATM, and X.25 are examples of NBMA network. - เน็ตเวิร์กที่มีการเชื่อมต่อกันมากกว่า 2 router แต่ไม่มีการ Broadcast Packet [list][li]Five modes of OSPF operation are available for NBMA networks.[/li][/list][/li][/list]
[b]Link State Advertisement Types[/b] Type 1 Router LSAs - เป็น LSA ที่ใช้ในการแชร์กันระหว่างเราเตอร์ที่รัน OSPF ใน AREA เดียวกัน Type 2 Network LSAs Type 3 or 4 Summary LSAs Type 5 Autonomous system external LSAs Type 6 Multicast OSPF LSA Type 7 Defined for not-so-stubby areas Type 8 External attributes LSA for Border Gateway Protocol (BGP) Type 9, 10, 11 Opaque LSAs
สงสัยตรงไหนถามได้เลยคับ 8) [center]Credit: MSIT@MUT&Cisco[/center] Both stub area & totally stubby area allow an ABR to inject a default route. The main difference between these 2 types of areas is: [list][li]Stub area replaces LSA Type 5 (External LSA - created by an ASBR to advertise network from another autonomous system) with a default route[/li] [li]Totally stubby area replaces both LSA Type 5 and LSA Type 3 (Summary LSA - created by an ABR to advertise network from other areas, but still within the AS, sometimes called interarea routes) with a default route.[/li][/list] Below summarizes the LSA Types allowed and not allowed in area types: [table][tr][td]Area Type[/td][td]Type 1 & 2 (within area)[/td][td]Type 3 (from other areas)[/td][td]Type 4[/td][td]Type 5[/td][td]Type 7[/td][/tr] [tr][td]Standard & backbone[/td][td]Yes[/td][td]Yes[/td][td]Yes[/td][td]Yes[/td][td]No[/td][/tr] [tr][td]Stub[/td][td]Yes[/td][td]Yes[/td][td]No[/td][td]No[/td][td]No[/td][/tr] [tr][td]Totally stubby[/td][td]Yes[/td][td]No[/td][td]No[/td][td]No[/td][td]No[/td][/tr] [tr][td]NSSA[/td][td]Yes[/td][td]Yes[/td][td]No[/td][td]No[/td][td]Yes[/td][/tr] [tr][td]Totally stubby NSSA[/td][td]Yes[/td][td]No[/td][td]No[/td][td]No[/td][td]Yes[/td][/tr][/table]
The 7 states to fulfill an OSPF adjacency between two routers are:
Down - neighbor has not been discovered If adjacency is stuck here, there is a mismatch regarding parameters exchanged in Hello messages:
Subnet mask or IP address mismatch
Authentication configuration mismatch
Mismatched timer parameters (Hello, Dead intervals)
Area ID mismatch
Area type mismatch (Normal, Stub, NSSA)
Duplicate router-id
Initializing - one-way communication verified If adjacency is stuck here, there is a mismatch in the interface type (point-to-point vs broadcast)
2-way - two-way communication verified
Exstart - MTU compatibility being verified
Exchange - database description (LSA list) being exchanged If adjacency is stuck either in the Exstart or in the Exchange state, there is an MTU mismatch