<?xml version="1.0" encoding="UTF-8" ?><!-- generator=Zoho Sites --><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://www.daihockhonggiay.com/blogs/tag/link-state-ospf/feed" rel="self" type="application/rss+xml"/><title>Đại học Không Giấy - Blog #Link state OSPF</title><description>Đại học Không Giấy - Blog #Link state OSPF</description><link>https://www.daihockhonggiay.com/blogs/tag/link-state-ospf</link><lastBuildDate>Wed, 10 Sep 2025 18:48:21 -0700</lastBuildDate><generator>http://zoho.com/sites/</generator><item><title><![CDATA[Giao thức định tuyến OSPF]]></title><link>https://www.daihockhonggiay.com/blogs/post/link-state-ospf</link><description><![CDATA[<img align="left" hspace="5" src="https://www.daihockhonggiay.com/li.jpg"/>Bài viết này sẽ giới thiệu với các bạn về giao thức Link state OSPF]]></description><content:encoded><![CDATA[<div class="zpcontent-container blogpost-container "><div data-element-id="elm_GrxzzKXrSaeao4bJieN5Ug" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer-fluid zpcontainer"><div data-element-id="elm_1tBFj7ecQja40A9PT_6A9w" data-element-type="row" class="zprow zprow-container zpalign-items- zpjustify-content- " data-equal-column=""><style type="text/css"></style><div data-element-id="elm_p1InG2arReatN1HSoL3XCg" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"> [data-element-id="elm_p1InG2arReatN1HSoL3XCg"].zpelem-col{ border-style:none; } </style><div data-element-id="elm_405iKdiLR1GiXlrK_rV0FQ" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_405iKdiLR1GiXlrK_rV0FQ"].zpelem-text { border-style:none; } </style><div class="zptext zptext-align-left " data-editor="true"><p style="text-align:left;margin-bottom:20px;"><span style="color:inherit;font-weight:bold;">I. Tổng quan</span></p><p style="text-align:left;margin-bottom:20px;"><span style="color:inherit;">OSPF – Open Shortest Path First là một giao thức định tuyến link – state điển hình. Đây là một giao thức được sử dụng rộng rãi trong các mạng doanh nghiệp có kích thước lớn. Mỗi router khi chạy giao thức sẽ gửi các trạng thái đường link của nó cho tất cả các router trong vùng (area). Sau một thời gian trao đổi, các router sẽ đồng nhất được bảng cơ sở dữ liệu trạng thái đường link (Link State Database – LSDB) với nhau, mỗi router đều có được bản đồ mạng của cả vùng. Từ đó mỗi router sẽ chạy giải thuật Dijkstra tính toán ra một cây đường đi ngắn nhất (Shortest Path Tree) và dựa vào cây này để xây dựng nên bảng định tuyến.</span><span style="font-weight:700;"><br></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-weight:700;">1. Link State</span>&nbsp;</p><p style="text-align:left;margin-bottom:20px;">Link State là giao thức xây dựng đường đi tốt nhất (Shortest path first) thông qua giải thuật Dijkstra. Các router chỉ cần trao đổi thông tin của nhau qua gói tin Hello mà không cần gửi cả bảng định tuyến. Sau khi có thông tin nó sẽ xây dựng ra một bảng định tuyến và đường đi tốt nhất.<br></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Chỉ số AD: là chỉ số tin cậy của các giao thức</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Cost: là giá trị được tính theo công thức 10^8/Bandwidth&nbsp;</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">OSPF chạy trên nền IP còn RIP chạy trên giao thức UDP</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Các gói tin IP vận chuyện các gói tin OSPF thì trường Protocol- ID = 89</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">2. Cơ chế hoạt động của giao thức OSPF&nbsp;</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Router chạy theo OSPF thì nó phải trải qua 4 bước:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Router ID</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Thiết lập Neighbor</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Trao đổi LSDB (Link State Database)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Xây dựng bảng định tuyến</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">a. Router ID là gì ?</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Router ID&nbsp;đơn giản là một giá trị dùng định danh cho Router khi dùng giao thức OSPF</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Có định dạng của một địa chỉ IP A.B.C.D. Có định dạng là địa chỉ IP chứ không phải là địa chỉ IP</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><u>Lấy IP cao nhất</u>&nbsp;trong các&nbsp;<u>Interface đang hoạt động</u>&nbsp;và&nbsp;<u>ưu tiên cổng Loopback</u>.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">+ IP cao nhất: là địa chỉ IP cao nhất. IP có octet đầu cao hơn được xem là lớn hơn</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Vd:&nbsp; 1, 192.168.1.1,</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2, 192.168.1.2,&nbsp; =&gt; là lớn nhất (xét từ 192, sau đó sang 168 sau đó sang 1 và cuối cùng là 2)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3, 172.16.255.255,</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4, 10.255.255.254.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Địa chỉ 2 &gt; 1 &gt; 3 &gt; 4</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vậy ID của Router ở đây là 192.168.1.2</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">+ Interface active: là cổng đang (up/up) Status up và protocol up.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">+ Cổng Loopback sẽ được ưu tiên hơn vì nó ít bị hỏng và ổn định.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">b. Thiết lập quan hệ láng giềng</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Các Router sẽ gửi gói tin Hello (10s/1 lần). Được dùng để tìm ra router láng giềng, chuyển một quan hệ láng giềng sang trạng thái 2 bước (2- Way), sau đó Hello giúp giám sát láng giếng khi nó bị lỗi.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Lần đầu tiên gói tin Hello gửi tới địa chỉ 224.0.0.6</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">2 Router phải thỏa mãn các điều kiện sau mới được gọi là láng giềng (phải đảm bảo 5 thông tin):</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">=&gt; Cùng Area-id: Khi mạng lớn người ta chia làm nhiều vùng, vùng nào hỏng thì chỉ vùng đó chịu tác động. Mỗi một vùng sẽ đặt cho một Area-id. Vùng trung tâm có Area-id phải bằng 0. Mọi vùng khác phải có đường truyền trực tiếp về vùng 0 nó mới truyền được dữ liệu.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">=&gt; Cùng Subnet: 2 ip phải cùng Subnet mới ping và trao đổi được thông tin.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">=&gt; Phải cùng thông số: Hello/Dead-time ở trên 2 cổng. Mặc định Hello là 10s, Dead là 40s sau 40s nó sẻ hủy kết nối.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">=&gt; Phải cùng Xác thực trên 2 cổng. Dành cho mạng lớn (metro). Khi đặt xác thực các router khác không lấy được thông tin.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">=&gt; Phải cùng cờ Stub Area Flag: dành cho OSPF đa vùng (học trong CCNP)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Để xem được hàng xóm dùng lệnh: Show IP OSPF Neighbor</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">c. Trao đổi LSDB (Link State Database)</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Mỗi Router đều chưa một bảng LSDB</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">LSDP: Link State Database. Do nó lớn nên nó chia nhỏ ra thành các bản LSA để gửi</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">LSA: Link State Advertisement. Để gửi được LSA thì nó phải đóng gói vào bản tin LSU</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">LSU: là Link State Update. Để trao đổi và gửi được LSU thì nó có 2 kiểu môi trường gửi:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">- Point - to - Point: 2 router chạy với nhau theo giao thức HDLC hayPPP.&nbsp; Sau khi nó kết nối được hàng xóm thì chỉ có 2 Router&nbsp; trao đổi trực tiếp gọi là Full</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">- Broadcast Multiaccess: là nhiều Router kết nối với nhau thông qua một Swtich. R1, R2, R3, R4 cùng kết nối vào 1 Switch. Lúc này nó trao đổi LSDB sẽ khác hoàng toàn.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Trong 4 Router sẽ bầu ra một Router làm DR-Desigted Router, 3 router còn lại sẽ bầu ra một BDR-Backup DR.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Các Router còn lại sẽ là DR Other. 2 Router là DR Other sẽ không gửi trực tiếp với nhau. Nó sẽ gửi thông tin về DR 1 bản và 1 bản cho BDR. Sau đó DR sẽ gửi phân phối xuống cho các Router còn lại.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">DR Other sẽ gử thông tin về DR bằng địa chỉ 224.0.0.6. DR sẽ gửi LSDB cho DR Other là 224.0.0.5.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Tiêu chí nào được bầu làm DR và BDR:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Trên mỗi cổng kết nối của các Router sẽ có một tham số: Priority(0-255) mặc định là 1. Con nào cao nhất là DR và con nào thấp hơn là BDR.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Câu lệnh: R(config)# int F0/1 =&gt; R(config -if)# ip ospf&nbsp; priority (0-255)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Nếu không may có Priority là bằng nhau nó sẽ dựa vào Router - ID. Router có Router-id cao nhất là DR</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Nếu hệ thống đã có DR và BDR nếu cắm thêm một Router mới có DR cao hơn nó vẫn ưu tiên DR đang hoạt động.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Nếu để Priority là 0 nó sẽ không bầu DR hay BDR</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">c. Xây dựng bảng định tuyến nó dùng giải thuật Dijkstra để đưa ra đường đi tốt nhất</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">3. Cách tính Metric</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Cost=10^8 /bandwidth</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Băng thông phải đổi ra đơn vị: bps</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Vd:</span></p><p style="text-align:center;margin-bottom:20px;"><img src="/Network/2/16.jpg" style="width:456px;height:152px;"><br></p><p style="text-align:left;"><span style="font-weight:700;">4. Cấu hình</span></p><p style="text-align:left;"><span style="font-size:14px;"><span style="font-weight:700;">a. Wildcard mask</span></span></p><p style="text-align:left;"><span style="color:inherit;">Wildcard mask</span><span style="font-size:14px;">&nbsp;là một công cụ lấy ra địa chỉ IP của một dải rất linh hoạt. Nó là một dãy nhị phân 32 bit được dùng kèm với một địa chỉ IP tham chiếu nào đó. Bit của địa chỉ IP tương ứng với Bit 0 là cố định, bit của IP tương ứng với bit 1 sẽ cố định.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Vd: 192.168.1.0/24</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Ta có: IP:192.168.1.0</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WCM: 0&nbsp; . 0 .&nbsp; 0.255</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Vd: 192.168.1.32/27</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp;Ta có: IP: 192.168.1.001xxxxx</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WCM:&nbsp; 0 . 0 . 0 .00011111 =&gt; 0.0.0.31</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">b. Các lệnh cấu hình</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;font-weight:bold;">Chạy OSPF</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config)# Router&nbsp; OSPF&nbsp; Process-id (1-65535) chỉ có ý nghĩa nội bộ.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-Router)# network 192.168.1.0&nbsp; 0.0.0.31&nbsp; area&nbsp; 0&nbsp; (Areal là cùng mạng thành phần này rất quan trọng)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-Router)#default-information originate</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Router(config-router)#redistribute connected [metric cost] subnet.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:bold;">Hiệu chỉnh OSPF</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Router - ID:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config)# Router&nbsp; OSPF&nbsp; 10</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-router)# router-id&nbsp; a.b.c.d (nhập ip vào, IP chính là ID)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Sau đó trở ra mode quản trị:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config)#&nbsp; Clear ip ospf&nbsp; process&nbsp; thì nó mới có hiệu lực</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Priority:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config)# int f0/0</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-if)# ip&nbsp; ospf&nbsp; priority</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Hello/Dead time:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-if)# ip&nbsp; ospf&nbsp; hello-interval&nbsp; thời gian (là giây)</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-if)# ip&nbsp; ospf&nbsp; dead-interval&nbsp; thời gian (là giây)&nbsp;</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;font-weight:bold;">Xác thực trên 2 router</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Vào trong cổng:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-if)# ip&nbsp; ospf&nbsp; authentiacation&nbsp; [MD5]</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Nếu điền key:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">R(config-if)# ip&nbsp; ospf&nbsp; authentiacation-key&nbsp; aptech</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;font-weight:bold;">Các lệnh Show</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Show&nbsp; ip&nbsp; router&nbsp; ospf</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Show&nbsp; ip&nbsp; ospf&nbsp; neighbor</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Show&nbsp; ip&nbsp; ospf&nbsp; database</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Show&nbsp; ip&nbsp; ospf&nbsp; interface</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Show&nbsp; ip&nbsp; protocol&nbsp;</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;"><span style="font-weight:700;">5. Chú ý</span></span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">Dùng lệnh Show&nbsp; ip&nbsp; router:</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">10.0.0.0/24 is subnetted, 1 subnets</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">O E2 10.0.0.0 [110/20] via 192.168.1.20, 00:00:53, Serial0/1/0 =&gt; tương ứng #redistribute connected [metric cost] subnet.</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">C 192.168.1.0/24 is directly connected, Serial0/1/0</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">C 192.168.2.0/24 is directly connected, FastEthernet0/0</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">O 192.168.3.0/24 [110/65] via 192.168.1.20, 00:00:53, Serial0/1/0</span></p><p style="text-align:left;margin-bottom:20px;"><span style="font-size:14px;">O*E2 0.0.0.0/0 [110/1] via 192.168.1.20, 00:00:11, Serial0/1/0&nbsp; =&gt; tương ứng: #default-information originate&nbsp;</span></p><p><span style="color:inherit;font-size:14px;"></span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">II.&nbsp;</span><span style="font-size:14px;color:inherit;font-weight:bold;">Single-area và Multi-area OSPF</span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">1. Cấu hình Single-area OSPF</span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">a. Chạy OSPF</span></p><p style="margin-bottom:20px;">R(config)# Router&nbsp; OSPF&nbsp; Process-id (1-65535) chỉ có ý nghĩa nội bộ.</p><p style="margin-bottom:20px;">R(config-Router)# network 192.168.1.0&nbsp; 0.0.0.31&nbsp; area&nbsp; 0&nbsp; (Areal là cùng mạng thành phần này rất quan trọng)</p><p style="margin-bottom:20px;">R(config-Router)#default-information originate</p><p style="margin-bottom:20px;">Router(config-router)#redistribute connected [metric cost] subnet.</p><p style="margin-bottom:20px;"><span style="font-weight:700;">b. Hiệu chỉnh OSPF</span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">Router - ID</span></p><p style="margin-bottom:20px;">R(config)# Router&nbsp; OSPF&nbsp; 10</p><p style="margin-bottom:20px;">R(config-router)# router-id&nbsp; a.b.c.d (nhập ip vào, IP chính là ID)</p><p style="margin-bottom:20px;">Sau đó trở ra mode quản trị:</p><p style="margin-bottom:20px;">R(config)#&nbsp; Clear ip ospf&nbsp; process&nbsp; thì nó mới có hiệu lực</p><p style="margin-bottom:20px;"><span style="font-weight:700;">Priority</span></p><p style="margin-bottom:20px;">R(config)# int f0/0</p><p style="margin-bottom:20px;">R(config-if)# ip&nbsp; ospf&nbsp; priority</p><p style="margin-bottom:20px;"><span style="font-weight:700;">Hello/Dead time</span></p><p style="margin-bottom:20px;">R(config-if)# ip&nbsp; ospf&nbsp; hello-interval&nbsp; thời gian (là giây)</p><p style="margin-bottom:20px;">R(config-if)# ip&nbsp; ospf&nbsp; dead-interval&nbsp; thời gian (là giây)&nbsp;</p><p style="margin-bottom:20px;"><span style="font-weight:700;">c. Xác thực trên 2 router</span></p><p style="margin-bottom:20px;">Vào trong cổng:</p><p style="margin-bottom:20px;">R(config-if)# ip&nbsp; ospf&nbsp; authentiacation&nbsp; [MD5]</p><p style="margin-bottom:20px;">Nếu điền key:</p><p style="margin-bottom:20px;">R(config-if)# ip&nbsp; ospf&nbsp; authentiacation-key&nbsp; aptech</p><p style="margin-bottom:20px;"><span style="font-weight:700;">d. Các lệnh Show</span></p><p style="margin-bottom:20px;">Show&nbsp; ip&nbsp; router&nbsp; ospf</p><p style="margin-bottom:20px;">Show&nbsp; ip&nbsp; ospf&nbsp; neighbor</p><p style="margin-bottom:20px;">Show&nbsp; ip&nbsp; ospf&nbsp; database</p><p style="margin-bottom:20px;">Show&nbsp; ip&nbsp; ospf&nbsp; interface</p><p style="margin-bottom:20px;">Show&nbsp; ip&nbsp; protocol&nbsp;</p><p style="margin-bottom:20px;"><span style="font-weight:700;">2. Cấu hình Multi-area OSPF</span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">a. cấu hình Multi-area</span></p><p style="margin-bottom:20px;">Router(config)#router ospf 5</p><p style="margin-bottom:20px;">Router(config-router)#redistribute ospf 10 [metric cost] subnet</p><p style="margin-bottom:20px;"><span style="font-weight:700;">b. Redistribute vào OSPF</span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">RIP =&gt; OSPF</span></p><p style="margin-bottom:20px;">Router(config)#router ospf process-id</p><p style="margin-bottom:20px;">Router(config-router)#redistribute rip [metric cost] subnet.</p><p style="margin-bottom:20px;"><span style="font-weight:700;">EIGRP-OSPF</span></p><p style="margin-bottom:20px;">Router(config-router)#redistribute eigrp as-number [metric cost] subnet.</p><p style="margin-bottom:20px;"><span style="font-weight:700;">Static route &amp; Default route =&gt; OSPF</span></p><p style="margin-bottom:20px;">Router(config-router)#redistribute static [metric cost] subnet.</p><p style="margin-bottom:20px;"><span style="font-weight:700;">Connected route =&gt; EIGRP</span></p><p style="margin-bottom:20px;">Router(config-router)#redistribute connected [metric cost] subnet.</p><p style="margin-bottom:20px;"><span style="font-weight:700;">Default route =&gt; OSPF</span></p><p style="margin-bottom:20px;">Router(config-router)#default-information originate.</p><p style="margin-bottom:20px;">Nếu chúng ta không đưa vào tham số metric thì mặc định metric sẽ được đặt cho tuyến được redistribute vào là 20.</p><p style="margin-bottom:20px;"><span style="font-weight:700;">3. Chú ý</span></p><p style="margin-bottom:20px;">Dùng lệnh Show ip&nbsp; router:</p><p style="margin-bottom:20px;">10.0.0.0/24 is subnetted, 1 subnets</p><p style="margin-bottom:20px;">O E2 10.0.0.0 [110/20] via 192.168.1.20, 00:00:53, Serial0/1/0 =&gt; tương ứng #redistribute connected [metric cost] subnet.</p><p style="margin-bottom:20px;">C 192.168.1.0/24 is directly connected, Serial0/1/0</p><p style="margin-bottom:20px;">C 192.168.2.0/24 is directly connected, FastEthernet0/0</p><p style="margin-bottom:20px;">O 192.168.3.0/24 [110/65] via 192.168.1.20, 00:00:53, Serial0/1/0</p><p style="margin-bottom:20px;"><span style="font-size:14px;color:inherit;font-weight:bold;"><span style="color:inherit;"></span></span></p><p style="margin-bottom:20px;">O*E2 0.0.0.0/0 [110/1] via 192.168.1.20, 00:00:11, Serial0/1/0&nbsp; =&gt; tương ứng: #default-information originate&nbsp;</p><p style="margin-bottom:20px;"><span style="font-weight:700;">III. Thực hành</span></p><p style="margin-bottom:20px;"><span style="color:inherit;"><span style="font-weight:700;">1. Cấu hình giao thức định tuyến động OSPF</span></span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">a. Yêu cầu chuẩn bị</span></p><p style="margin-bottom:20px;">2 Router Cisco 2621XM</p><p style="margin-bottom:20px;">2 Switch 2950-24</p><p style="margin-bottom:20px;">2 PC</p><p style="margin-bottom:20px;">Dây cáp Fast Ethrnet,Serial</p><p style="margin-bottom:20px;"><span style="font-weight:700;">b. Yêu cầu nội dung</span></p><p style="margin-bottom:20px;">Đấu nối thiết bị như sơ đồ</p><p style="margin-bottom:20px;">Cấu hình cơ bản</p><p style="margin-bottom:20px;">Cấu hình trên các Interface</p><p style="margin-bottom:20px;">Trên Router R1,R2 cấu hình giao thức OSPF để quảng bá thông tin định tuyến</p><p style="margin-bottom:20px;">Kiểm tra kết nối giữa các thiết bị trong mạng</p><p style="text-align:center;"></p><p style="text-align:left;margin-bottom:20px;"><span style="color:inherit;"></span></p><p style="margin-bottom:20px;"><span><span style="font-weight:700;">c. Video hướng dẫn</span></span></p></div>
</div><div data-element-id="elm_GPxgpF0lSENWtUETwHCmXA" data-element-type="video" class="zpelement zpelem-video "><style type="text/css"> [data-element-id="elm_GPxgpF0lSENWtUETwHCmXA"].zpelem-video{ border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } </style><div class="zpvideo-container zpiframe-align-center zpiframe-mobile-align- zpiframe-tablet-align-"><iframe class="zpvideo " width="560" height="315" src="//www.youtube.com/embed/OMx849gKQVM" frameborder="0" allowfullscreen></iframe></div>
</div><div data-element-id="elm_7YwZ2cPnr88t4K6iO9N6dw" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_7YwZ2cPnr88t4K6iO9N6dw"].zpelem-text { text-transform:none; border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } [data-element-id="elm_7YwZ2cPnr88t4K6iO9N6dw"].zpelem-text :is(h1,h2,h3,h4,h5,h6){ text-transform:none; } </style><div class="zptext zptext-align-left " data-editor="true"><p><span style="color:inherit;font-weight:bold;">2. Cấu hình giao thức định tuyến động OSPFv3&nbsp;</span><br></p><p style="margin-bottom:20px;"><span style="font-weight:700;">a.Yêu cầu chuẩn bị&nbsp;</span><br></p><p style="margin-bottom:20px;">3 Router Cisco 1941</p><p style="margin-bottom:20px;">3 PC</p><p style="margin-bottom:20px;">Dây cáp Fast Ethernet,Serial</p><p style="margin-bottom:20px;"><span style="font-weight:700;">b.Yêu cầu nội dung&nbsp;</span></p><p style="margin-bottom:20px;">Đấu nối thiết bị như sơ đồ</p><p style="margin-bottom:20px;">Cấu hình cơ bản cho Router</p><p style="margin-bottom:20px;">Cấu hình IPv6 trên các Interface</p><p style="margin-bottom:20px;">Cổng giao thức OSPFv3 để quảng bá thông tin định tuyến</p><p style="margin-bottom:20px;">Kiểm tra kết nối giữa các thiết bị trong mạng</p><p style="text-align:center;"></p><p><span style="color:inherit;"></span></p><p style="margin-bottom:20px;"><span style="font-weight:700;">c. Video hướng dẫn</span></p></div>
</div><div data-element-id="elm_1lUKxkGf4z81s_xGkE4ypw" data-element-type="video" class="zpelement zpelem-video "><style type="text/css"> [data-element-id="elm_1lUKxkGf4z81s_xGkE4ypw"].zpelem-video{ border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } </style><div class="zpvideo-container zpiframe-align-center zpiframe-mobile-align- zpiframe-tablet-align-"><iframe class="zpvideo " width="560" height="315" src="//www.youtube.com/embed/QaT7DByGAWk" frameborder="0" allowfullscreen></iframe></div>
</div><div data-element-id="elm_AWq-Yac9XHUr2Lpt3NH5Wg" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_AWq-Yac9XHUr2Lpt3NH5Wg"].zpelem-text { text-transform:none; border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } [data-element-id="elm_AWq-Yac9XHUr2Lpt3NH5Wg"].zpelem-text :is(h1,h2,h3,h4,h5,h6){ text-transform:none; } </style><div class="zptext zptext-align-left " data-editor="true"><h3 class="theme-blog-heading theme-single-blog-heading" style="text-align:left;margin-bottom:20px;outline:none 0px;line-height:normal;"><span style="font-size:14px;font-weight:bold;color:rgb(0, 0, 0);">3. Cấu hình Multi area OSPFv2</span></h3><div><span style="font-size:14px;"><p style="margin-bottom:20px;"><span style="font-weight:bold;">a. Yêu cầu chuẩn bị</span></p><p style="margin-bottom:20px;">3 Router Cisco 3700</p><p style="margin-bottom:20px;">Dây cáp</p><p style="font-weight:bold;margin-bottom:20px;">b. Yêu cầu nội dung</p><p style="margin-bottom:20px;">Đấu nối thiết bị như sơ đồ</p><p style="margin-bottom:20px;">Cấu hình cơ bản cho Router</p><p style="margin-bottom:20px;">Cấu hình giao thức OSPFv2 đa vùng</p><p style="margin-bottom:20px;">Kiểm tra kết nối</p><p style="font-weight:bold;text-align:center;"></p><p style="font-weight:bold;margin-bottom:20px;">c. Video hướng dẫn</p></span></div></div>
</div><div data-element-id="elm_WRnnmIPTF6VVsINqQRW8BQ" data-element-type="video" class="zpelement zpelem-video "><style type="text/css"> [data-element-id="elm_WRnnmIPTF6VVsINqQRW8BQ"].zpelem-video{ border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } </style><div class="zpvideo-container zpiframe-align-center zpiframe-mobile-align- zpiframe-tablet-align-"><iframe class="zpvideo " width="560" height="315" src="//www.youtube.com/embed/3DOaG5fpOpE" frameborder="0" allowfullscreen></iframe></div>
</div><div data-element-id="elm_DgFaVJ0EJe1ZlOBDfTg8pw" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_DgFaVJ0EJe1ZlOBDfTg8pw"].zpelem-text { text-transform:none; border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } [data-element-id="elm_DgFaVJ0EJe1ZlOBDfTg8pw"].zpelem-text :is(h1,h2,h3,h4,h5,h6){ text-transform:none; } </style><div class="zptext zptext-align-left " data-editor="true"><h3 class="theme-blog-heading theme-single-blog-heading" style="margin-bottom:20px;outline:none 0px;line-height:normal;"><span style="font-size:14px;font-weight:bold;color:rgb(0, 0, 0);">4. Cấu hình Multi area OSPFv3</span></h3><div><span style="font-size:14px;color:rgb(0, 0, 0);"><span style="color:inherit;"><p style="font-weight:bold;margin-bottom:20px;">a. Yêu cầu chuẩn bị</p><p style="margin-bottom:20px;">3 Router Cisco 1941</p><p style="margin-bottom:20px;">Dây cáp Serial&nbsp;</p><p style="font-weight:bold;margin-bottom:20px;">b. Yêu cầu nội dung</p><p style="margin-bottom:20px;">Đấu nối thiết bị như sơ đồ</p><p style="margin-bottom:20px;">Cấu hình cơ bản cho Router</p><p style="margin-bottom:20px;">Cấu hình địa chỉ IPv6</p><p style="margin-bottom:20px;">Cấu hình định tuyến Multiarea OSPFv3</p><p style="margin-bottom:20px;">Kiểm tra kết nối</p><p style="font-weight:bold;text-align:center;"></p><p style="font-weight:bold;margin-bottom:20px;">c. Video hướng dẫn</p></span></span></div></div>
</div><div data-element-id="elm_UcS_tyzNhPkzcyo83tkdZg" data-element-type="video" class="zpelement zpelem-video "><style type="text/css"> [data-element-id="elm_UcS_tyzNhPkzcyo83tkdZg"].zpelem-video{ border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } </style><div class="zpvideo-container zpiframe-align-center zpiframe-mobile-align- zpiframe-tablet-align-"><iframe class="zpvideo " width="560" height="315" src="//www.youtube.com/embed/o4FR0FyTRN4" frameborder="0" allowfullscreen></iframe></div>
</div><div data-element-id="elm_KzxzG5Z5ZyRPwd0GvafG9w" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_KzxzG5Z5ZyRPwd0GvafG9w"].zpelem-text { text-transform:none; border-style:none; border-radius:1px; box-shadow:0px 0px 0px 0px #000000; } [data-element-id="elm_KzxzG5Z5ZyRPwd0GvafG9w"].zpelem-text :is(h1,h2,h3,h4,h5,h6){ text-transform:none; } </style><div class="zptext zptext-align-left " data-editor="true"><p><span><br></span></p><p><span><br></span></p><p><span>-----&amp;-----&amp;-----</span><br></p><p><span style="font-weight:bold;">Để quay về danh sách các bài phần Network các bạn chọn link sau</span></p><p><span style="color:inherit;"></span></p><p><a href="https://www.quantrimangdn.com/blogs/post/tong-hop-cac-bai-phan-network" style="color:rgb(74, 43, 212);">https://www.quantrimangdn.com/blogs/post/tong-hop-cac-bai-phan-network</a></p></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Fri, 03 May 2019 01:20:08 +0700</pubDate></item></channel></rss>