Chapterبەش 4 · Lectureوانە 4.1

How Routers Learn Routes: Routing Protocols, Metrics and Loopsڕێدۆزەکان چۆن ڕێگەکان فێر دەبن: پرۆتۆکۆڵەکانی ڕێدۆزی، پێوانەکان و ئەڵقەکانی ڕێدۆزی

Static versus dynamic routing; what a routing protocol is and its four jobs (learn, advertise, choose, converge); convergence; metrics — hop count, OSPF cost from bandwidth, EIGRP bandwidth and delay — with the two-roads story; IGPs, EGPs and autonomous systems; the family tree of routing protocols and classful versus classless; routing loops with the village story, counting to infinity and the five cures: maximum hop count, split horizon, route poisoning and poison reverse, triggered updates and hold-down timers.

بەرامبەر ؛ چییە و چوار ئەرکەکەی (فێربوون، ڕاگەیاندن، هەڵبژاردن، )؛ — ژمارەی ، تێچووی لە ، و — لەگەڵ چیرۆکی دوو ڕێکە؛ ، و ؛ داری بنەماڵەی و پۆلدار بەرامبەر بێپۆل؛ لەگەڵ چیرۆکی گوندەکە، ژماردن تا و پێنج چارەسەرەکە: زۆرترین ، ، و ژەهراویکردنی پێچەوانە، و .

22 min read24 خولەک خوێندنەوە · 19 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain the difference between static and dynamic routing and what a routing protocol is made of.
  • Name the four jobs of a routing protocol and define convergence.
  • Compare the metrics of RIP, OSPF and EIGRP and predict which path each chooses.
  • Place RIP, OSPF, IS-IS, EIGRP and BGP in the family tree (IGP/EGP, distance vector, link state, path vector, classful/classless).
  • Explain how routing loops and counting to infinity happen and how the five cures stop them.
  • جیاوازیی نێوان و و پێکهاتەی ڕوون بکەیتەوە.
  • چوار ئەرکەکەی ناو ببەیت و پێناسە بکەیت.
  • ، و بەراورد بکەیت و پێشبینی بکەیت هەریەکەیان کام ڕێگا هەڵدەبژێرێت.
  • ، ، ⁦IS-IS⁩، و لە داری بنەماڵەکەدا دابنێیت (/، ، ، ، پۆلدار/بێپۆل).
  • ڕوون بکەیتەوە و ژماردن تا چۆن ڕوو دەدەن و پێنج چارەسەرەکە چۆن دەیانوەستێنن.

Two ways to fill a routing tableدوو ڕێگا بۆ پڕکردنەوەی خشتەی ڕێدۆزی

A router knows its directly connected networks by itself. For every other network it needs a route, and there are two ways to get one. With static routes an administrator types each route by hand, as in Static routes. With dynamic routing the routers run a routing protocol: they tell each other which networks they know, and each router works out the best path by itself.

ڕاستەوخۆ بەستراوی خۆی بە خۆی دەناسێت. بۆ هەر تر پێویستی بە ڕێگەیەکە و دوو ڕێگا هەیە بۆ دەستکەوتنی. بە هەموو ڕێگەیەک بە دەست دەنووسێت، وەک لە ڕێگە جێگیرەکاندا. بە کار پێ دەکەن: بە یەکتری دەڵێن کام دەناسن و هەر خۆی باشترین ڕێگە دەدۆزێتەوە.

It is called dynamic because the work never stops. When a link fails or a new network appears, the routers calculate again, so their routing tables keep changing by themselves. A static route stays exactly as it was typed — even when its link is broken.

پێی دەگوترێت بزۆک چونکە ئەم کارە هەرگیز ناوەستێت. کاتێک بەستەرێک دەپچڕێت یان نوێ دەردەکەوێت، دیسان حیساب دەکەنەوە، بۆیە بە خۆیان بەردەوام دەگۆڕێن. وەک خۆی دەمێنێتەوە کە نووسراوە — تەنانەت کاتێک بەستەرەکەی پچڕاوە.

Two panels with the same three routers: R1 on the left, R2 top right with network 10.2.0.0/16 behind it, R3 at the bottom joining them. The link R1–R2 is broken (orange cross). Left panel, static route: an orange arrow from R1 still points at the broken link, and the typed command ip route 10.2.0.0 255.255.0.0 10.0.12.2 is shown; packets are dropped until someone edits the route. Right panel, dynamic routing: a dashed green path goes R1 → R3 → R2 → 10.2.0.0/16; R2 and R3 told R1 about the change and nobody typed anything.دوو بەش بە هەمان سێ ڕێدۆز: R1 لە چەپ، R2 لە سەرەوەی ڕاست و ڕایەڵەی 10.2.0.0/16 لە پشتییەوە، R3 لە خوارەوە کە هەردووکیان دەبەستێتەوە. بەستەری R1–R2 پچڕاوە (خاچی پرتەقاڵی). بەشی چەپ، ڕێگەی جێگیر: تیرێکی پرتەقاڵی لە R1ـەوە هێشتا ئاماژە بۆ بەستەرە پچڕاوەکە دەکات و فەرمانی نووسراوی ip route 10.2.0.0 255.255.0.0 10.0.12.2 دیارە؛ پاکێتەکان فڕێ دەدرێن تا کەسێک ڕێگەکە دەگۆڕێت. بەشی ڕاست، ڕێدۆزیی بزۆک: ڕێگەیەکی سەوزی پچڕپچڕ لە R1ـەوە بۆ R3 و R2 و پاشان 10.2.0.0/16 دەچێت؛ R2 و R3 گۆڕانەکەیان بە R1 وت و کەس هیچی نەنووسی.
When a link breaks, a static route keeps pointing at it; a routing protocol finds the other path by itself.کاتێک بەستەرێک دەپچڕێت، هەر ئاماژەی بۆ دەکات؛ خۆی ڕێگەکەی تر دەدۆزێتەوە.CêIT

What a routing protocol isپرۆتۆکۆڵی ڕێدۆزی چییە

In networking a protocol is a set of rules that two devices agree on so that they understand each other (What is a protocol?). A routing protocol is the set of messages, rules and an algorithm that routers use to learn routes. The messages carry what each router knows. The rules say when to send them, to whom, and which news to believe. The algorithm — a step-by-step method of calculation — picks the best route to every network and puts it into the routing table.

لە کۆمەڵێک یاسایە کە دوو ئامێر لەسەری ڕێک دەکەون بۆ ئەوەی لە یەکتر تێبگەن (پرۆتۆکۆڵ چییە؟). ئەو کۆمەڵە پەیام، یاسا و کە بۆ فێربوونی ڕێگەکان بەکاری دەهێنن. پەیامەکان ئەوە هەڵدەگرن کە هەر دەیزانێت. یاساکان دەڵێن کەی بنێردرێن، بۆ کێ و باوەڕ بە کام هەواڵ بکرێت. — ڕێگایەکی هەنگاو بە هەنگاوی حیسابکردن — باشترین ڕێگە بۆ هەر هەڵدەبژێرێت و دەیخاتە ناو .

Definitionپێناسە

A protocol by which routers share what they know about networks, choose the best route to each with an algorithm and a metric, and adapt when links change: RIP, OSPF, EIGRP and BGP.

کە بەهۆیەوە زانیارییەکانیان لەبارەی ڕایەڵەکان هاوبەش دەکەن، بە و باشترین ڕێگا بۆ هەریەکەیان هەڵدەبژێرن و کاتێک بەستەرەکان دەگۆڕێن خۆیان دەگونجێنن: ، ، و .

Three boxes on the left — Messages (updates, hellos), Rules (when, to whom, whom to trust) and Algorithm (computes the best route) — each with an arrow into one box on the right: the routing table, showing the line R 10.2.0.0/16 [120/1] via 10.0.12.2, the best route to each network. Below: a routing protocol = messages + rules + an algorithm.سێ چوارچێوە لە چەپ — پەیامەکان (نوێکردنەوە و سڵاو)، یاساکان (کەی، بۆ کێ، باوەڕ بە کێ) و ئەلگۆریزم (باشترین ڕێگە دەدۆزێتەوە) — هەریەکەیان تیرێکی هەیە بۆ یەک چوارچێوە لە ڕاست: خشتەی ڕێدۆزی بە دێڕی R 10.2.0.0/16 [120/1] via 10.0.12.2، باشترین ڕێگە بۆ هەر ڕایەڵەیەک. لە خوارەوە: پرۆتۆکۆڵی ڕێدۆزی = پەیام + یاسا + ئەلگۆریزم.
Messages, rules and an algorithm work together to fill the routing table.پەیام، یاسا و پێکەوە پڕ دەکەنەوە.CêIT

The best-known routing protocols are RIP, OSPF, EIGRP and BGP; IS-IS is also widely used inside large Internet providers. This chapter teaches each of them.

ناسراوترین ، ، و ـن؛ ⁦IS-IS⁩ـیش لە ناو گەورەدا زۆر بەکار دێت. ئەم بەشە هەریەکەیان فێر دەکات.

The four jobs of a routing protocolچوار ئەرکەکەی پرۆتۆکۆڵی ڕێدۆزی

Whatever its name, every routing protocol does the same four jobs:

هەر ناوێکی هەبێت، هەموو هەمان چوار ئەرک دەکات:

  1. Learn routing information about networks from neighbouring routers.
  2. Advertise what it knows to neighbouring routers.
  3. Choose the best route to each network when there is more than one, by comparing a metric, and put it into the routing table.
  4. React to changes: when the topology changes — for example a link fails — tell the others that some routes have failed and choose new best routes. Reaching agreement again is called convergence.
  1. فێربوون: زانیاریی لەبارەی لە وەردەگرێت.
  2. ڕاگەیاندن: ئەوەی دەیزانێت بە دەڵێت.
  3. هەڵبژاردنی باشترین ڕێگە: کاتێک زیاتر لە یەک ڕێگە بۆ هەیە، بە بەراوردکردنی باشترینیان هەڵدەبژێرێت و دەیخاتە ناو .
  4. وەڵامدانەوەی گۆڕان: کاتێک دەگۆڕێت — بۆ نموونە بەستەرێک دەپچڕێت — بە ئەوانی تر دەڵێت هەندێک ڕێگە نەماون و باشترین ڕێگەی نوێ هەڵدەبژێرێت. گەیشتنەوە بە ڕێککەوتن پێی دەگوترێت .
Four panels. 1 Learn: R1 and R2 joined by 192.168.12.0; R2 has 192.168.10.0 and 192.168.11.0; a green arrow from R2 to R1 carries those two networks — R1 learns the networks behind R2. 2 Advertise: a blue arrow from R1 to R2 carries 192.168.13.0 — R1 tells R2 about its own networks. 3 Choose: R1 has two paths to the same router, metric 2 (green, ticked) and metric 5 (grey) — it installs the lower metric. 4 Converge: the metric-2 path is broken (orange cross, 'route failed'); the news spreads and R1 now uses the other path (green).چوار بەش. 1 فێربوون: R1 و R2 بە 192.168.12.0 بەستراون؛ R2 ڕایەڵەکانی 192.168.10.0 و 192.168.11.0ی هەیە؛ تیرێکی سەوز لە R2ـەوە بۆ R1 ئەو دوو ڕایەڵەیە دەبات — R1 فێری ڕایەڵەکانی پشت R2 دەبێت. 2 ڕاگەیاندن: تیرێکی شین 192.168.13.0 لە R1ـەوە بۆ R2 دەبات — R1 باسی ڕایەڵەکانی خۆی بۆ R2 دەکات. 3 هەڵبژاردن: R1 دوو ڕێگەی بۆ هەمان ڕێدۆز هەیە، پێوانە 2 (سەوز، نیشانەی ڕاست) و پێوانە 5 (خۆڵەمێشی) — پێوانە کەمترەکە دادەنێت. 4 پێکگەیشتن: ڕێگەی پێوانە 2 پچڕاوە (خاچی پرتەقاڵی، «ڕێگەکە نەما»)؛ هەواڵەکە بڵاو دەبێتەوە و R1 ئێستا ڕێگەکەی تر (سەوز) بەکار دەهێنێت.
Learn, advertise, choose, converge. In the first two panels .13.0 means 192.168.13.0/24, and so on.فێربوون، ڕاگەیاندن، هەڵبژاردن، . لە دوو بەشی یەکەمدا .13.0 واتە ⁦192.168.13.0/24⁩ و هەروەها بۆ ئەوانی تر.CêIT

Convergenceپێکگەیشتن

After a change, the routers do not all hear about it at the same moment: the news spreads router by router. The network has converged when every router again has the same, correct picture of the network and a working route to every network. The time this takes is the convergence time. While a network is converging, some packets are lost or take a wrong turn, so a fast protocol matters: OSPF and EIGRP usually converge within seconds, while RIP can need minutes.

دوای گۆڕانێک، هەموو لە هەمان ساتدا پێی نازانن: هەواڵەکە بە بڵاو دەبێتەوە. کاتێک دەگاتە کە هەموو دیسان هەمان وێنەی دروستی هەبێت و ڕێگەیەکی کارای بۆ هەموو هەبێت. ئەو کاتەی ئەمە دەیخایەنێت کاتی . لە کاتی ، هەندێک ون دەبن یان ڕێی هەڵە دەگرن، بۆیە خێرا گرنگە: و زۆرجار لە چەند چرکەیەکدا پێکدەگەن، بەڵام لەوانەیە چەند خولەکێکی پێویست بێت.

Animation, five routers. R1 on the left reaches network N (10.4.0.0/16, behind R4) through R2 in 2 hops; a longer path goes R1–R3–R5–R4. Frame 2: the link R2–R4 fails and R2 marks N unreachable (16). Frame 3: R2 tells R1 'N: 16' and R1 removes its route. Frame 4: R3 tells R1 'N: 2', so R1 now reaches N via R3 in 3 hops and R2 via R1 in 4 hops. Frame 5: converged again — all routers agree; this takes seconds with OSPF or EIGRP and up to minutes with RIP.
Animation, five routers. R1 on the left reaches network N (10.4.0.0/16, behind R4) through R2 in 2 hops; a longer path goes R1–R3–R5–R4. Frame 2: the link R2–R4 fails and R2 marks N unreachable (16). Frame 3: R2 tells R1 'N: 16' and R1 removes its route. Frame 4: R3 tells R1 'N: 2', so R1 now reaches N via R3 in 3 hops and R2 via R1 in 4 hops. Frame 5: converged again — all routers agree; this takes seconds with OSPF or EIGRP and up to minutes with RIP.
A link fails, the news spreads, the routers agree again: convergence.بەستەرێک دەپچڕێت، هەواڵەکە بڵاو دەبێتەوە، دیسان ڕێک دەکەون: .CêIT

Metrics: how a protocol measures a pathپێوانەکان: پرۆتۆکۆڵێک چۆن ڕێگایەک دەپێوێت

Everything that is compared needs a measure, just as a road can be measured in kilometres or in minutes. To choose between two paths, a router uses a metric: a rule, or a few rules, that gives each path a number. The path with the lowest metric wins. Every routing protocol has its own metric:

هەر شتێک کە بەراورد دەکرێت پێوەرێکی پێویستە، وەک چۆن ڕێگایەک بە کیلۆمەتر یان بە خولەک دەپێورێت. بۆ هەڵبژاردن لە نێوان دوو ڕێگادا، بەکار دەهێنێت: یاسایەک یان چەند یاسایەک کە ژمارەیەک دەدات بە هەر ڕێگایەک. ڕێگای خاوەن کەمترین دەباتەوە. هەر خۆی هەیە:

  • RIP — hop count: how many routers lie on the way.
  • OSPF — cost: worked out from each link’s bandwidth. On Cisco routers the cost is 100 Mb/s divided by the interface bandwidth, so a 10 Mb/s link costs 10 and a 100 Mb/s link costs 1. The cost is fixed by the link speed; it does not measure the traffic of the moment (OSPF cost).
  • EIGRP — bandwidth and delay: by default it combines the lowest bandwidth on the path with the total delay of the path — not the delay alone.
  • — ژمارەی : چەند لەسەر ڕێگاکەیە.
  • — تێچوو: لە هەر بەستەرێکەوە حیساب دەکرێت. لەسەر Cisco تێچوو بریتییە لە ⁦100 Mb/s⁩ دابەش بەسەر ، بۆیە بەستەری ⁦10 Mb/s⁩ تێچووی ⁦10⁩ـە و بەستەری ⁦100 Mb/s⁩ تێچووی 1. تێچوو بە خێراییی بەستەرەکە دیاری دەکرێت؛ هاتوچۆی ئەو ساتە ناپێوێت (تێچووی OSPF).
  • — و : بە بنەڕەت کەمترین لە ڕێگاکەدا لەگەڵ کۆی ڕێگاکە تێکەڵ دەکات — نەک تەنیا .
Three cards. RIP — hop count: three routers numbered 1, 2, 3; how many routers lie on the way? OSPF — cost: cost = 100 Mb/s ÷ bandwidth; a 10 Mb/s link costs 10, a 100 Mb/s link costs 1; fast link = low cost. EIGRP — bandwidth + delay: lowest bandwidth on the path plus total delay of the path, the default formula. Below: each protocol measures in its own way; the lowest metric wins. Never compare a RIP metric with an OSPF metric — that is the job of administrative distance.سێ کارت. RIP — ژمارەی بازەکان: سێ ڕێدۆز بە ژمارەی 1، 2، 3؛ چەند ڕێدۆز لەسەر ڕێگاکەیە؟ OSPF — تێچوو: تێچوو = 100 Mb/s ÷ پانایی باند؛ بەستەری 10 Mb/s تێچووی 10ـە، بەستەری 100 Mb/s تێچووی 1؛ بەستەری خێرا = تێچووی کەم. EIGRP — پانایی باند + دواکەوتن: کەمترین پانایی باند لە ڕێگاکەدا لەگەڵ کۆی دواکەوتنی ڕێگاکە، هاوکێشە بنەڕەتییەکە. لە خوارەوە: هەر پرۆتۆکۆڵێک بە شێوەی خۆی دەپێوێت؛ پێوانە کەمتر دەباتەوە. هەرگیز پێوانەی RIP و OSPF بەراورد مەکە — ئەوە کاری مەودای بەڕێوەبەرییە.
Three protocols, three ways to measure a path.سێ ، سێ ڕێگا بۆ پێوانی ڕێگایەک.CêIT

A metric is compared only inside one protocol. When two different protocols offer routes to the same network, the router decides with administrative distance instead — see AD or metric?.

تەنیا لە ناو یەک بەراورد دەکرێت. کاتێک دوو جیاواز ڕێگە بۆ هەمان پێشکەش دەکەن، لە جیاتی ئەوە بە بڕیار دەدات — بڕوانە AD یان پێوانە؟.

Metrics: how a protocol measures a pathپێوانەکان: پرۆتۆکۆڵێک چۆن ڕێگایەک دەپێوێت

Hop countژمارەی بازەکان

A hop is one jump of a packet from one router to the next (Hop and next hop). The hop count of a path is the number of hops a packet makes between sender and receiver. It ignores how crowded or how fast each link is. In the picture R1 has three paths to R4: through R2 and R3 (3 hops), through R5 (2 hops) and through R6, R7 and R8 (4 hops). A protocol that counts hops, such as RIP, chooses the middle path through R5, because 2 is the smallest count.

یەک بازدانی لە بۆ دواتر (باز و بازی دواتر). ژمارەی ڕێگایەک ئەو ژمارە بازەیە کە لە نێوان نێرەر و وەرگردا دەیدات. گوێ نادات بەوەی هەر بەستەرێک چەند قەرەباڵغ یان خێرایە. لە وێنەکەدا ⁦R1⁩ سێ ڕێگەی بۆ ⁦R4⁩ هەیە: بە ⁦R2⁩ و ⁦R3⁩دا (⁦3⁩ )، بە ⁦R5⁩دا (⁦2⁩ ) و بە ⁦R6⁩، ⁦R7⁩ و ⁦R8⁩دا (⁦4⁩ ). کە دەژمێرێت، وەک ، ڕێگای ناوەڕاست لە ڕێی ⁦R5⁩ـەوە هەڵدەبژێرێت، چونکە 2 بچووکترین ژمارەیە.

R1 on the left and R4 on the right are joined by three paths. Top: R1–R2–R3–R4, hops numbered 1, 2, 3 — 3 hops. Middle, highlighted green: R1–R5–R4, hops 1 and 2 — 2 hops, RIP chooses this. Bottom: R1–R6–R7–R8–R4 — 4 hops.R1 لە چەپ و R4 لە ڕاست بە سێ ڕێگە بەستراون. سەرەوە: R1–R2–R3–R4، بازەکان ژمارە 1، 2، 3 — 3 باز. ناوەڕاست، بە سەوز: R1–R5–R4، بازەکان 1 و 2 — 2 باز، RIP ئەمە هەڵدەبژێرێت. خوارەوە: R1–R6–R7–R8–R4 — 4 باز.
Count the hops on each path: the middle one wins with 2. هەر ڕێگایەک بژمێرە: ناوەڕاستەکە بە 2 دەباتەوە.CêIT

Metrics: how a protocol measures a pathپێوانەکان: پرۆتۆکۆڵێک چۆن ڕێگایەک دەپێوێت

Two roads to the city centreدوو ڕێ بۆ ناوەڕاستی شار

Two roads to the city centreدوو ڕێ بۆ ناوەڕاستی شار

You want to drive to the city centre and there are two ways. Road A is made of four roads joined one after another, and none of them is crowded. Road B goes straight to the centre in one road, but it is crowded. If you judge only by the number of roads, you pick B — and that is exactly what hop count does. A driver who also knows how fast each road moves might pick A: more roads, but a quicker trip.

دەتەوێت بەرەو ناوەڕاستی شار لێبخوڕیت و دوو ڕێگات هەیە. ڕێی (ئ) لە چوار ڕێ پێکهاتووە کە یەک لە دوای یەک بەستراون و هیچیان قەرەباڵغ نین. ڕێی (ب) بە یەک ڕێ ڕاستەوخۆ دەچێتە ناوەڕاستی شار، بەڵام قەرەباڵغە. ئەگەر تەنیا بە ژمارەی ڕێکان حوکم بدەیت، (ب) هەڵدەبژێریت — و ئەمە ڕێک ئەو کارەیە کە ژمارەی دەیکات. شۆفێرێک کە خێراییی هەر ڕێیەکیش بزانێت، لەوانەیە (ئ) هەڵبژێرێت: ڕێی زیاتر، بەڵام گەشتێکی خێراتر.

Where the analogy stops workingسنووری ئەم نموونەیە

In a network, a 'crowded road' is a link with low bandwidth — a narrow road that is always slow. OSPF and EIGRP read that fixed speed from the interface; they do not watch how busy the link is at this moment.

لە ، «ڕێی قەرەباڵغ» بەستەرێکە کە کەمە — ڕێیەکی تەسک کە هەمیشە خاوە. و ئەو خێرایییە جێگیرە لە دەخوێننەوە؛ چاودێریی ئەوە ناکەن کە بەستەرەکە لەم ساتەدا چەند قەرەباڵغە.

A house ('You') on the left and the city centre on the right. Road B runs straight between them and is full of cars: one road, direct but crowded. Road A rises above it through three junctions: four roads, longer but empty, with one car. Below: hop count counts only the roads and chooses B; a metric that knows how fast each road is, such as OSPF cost or EIGRP, can choose A — more steps, but faster.خانوویەک («تۆ») لە چەپ و ناوەڕاستی شار لە ڕاست. ڕێی (ب) ڕاستەوخۆ لە نێوانیاندایە و پڕە لە ئۆتۆمبێل: یەک ڕێ، ڕاستەوخۆ بەڵام قەرەباڵغ. ڕێی (ئ) لە سەرەوە بە سێ چواڕیاندا دەڕوات: چوار ڕێ، درێژتر بەڵام چۆڵ، تەنیا یەک ئۆتۆمبێل. لە خوارەوە: ژمارەی بازەکان تەنیا ڕێکان دەژمێرێت و (ب) هەڵدەبژێرێت؛ پێوانەیەک کە خێراییی هەر ڕێیەک دەزانێت، وەک تێچووی OSPF و EIGRP، دەتوانێت (ئ) هەڵبژێرێت — هەنگاوی زیاتر، بەڵام خێراتر.
The owner’s two-roads story: hop count picks the crowded short road.چیرۆکی دوو ڕێکە: ژمارەی ڕێ کورتە قەرەباڵغەکە هەڵدەبژێرێت.CêIT

Inside and between autonomous systems: IGP and EGPلە ناو و لە نێوان سیستەمە سەربەخۆکاندا: IGP و EGP

An autonomous system (AS) is a group of networks run by one organisation with one routing policy — a company, a university or an Internet provider. Each AS has a number, its ASN. The Internet is tens of thousands of autonomous systems joined together. So routing protocols fall into two groups. Interior Gateway Protocols (IGPs) work inside one AS: RIP, OSPF, IS-IS and EIGRP. Exterior Gateway Protocols (EGPs) carry routes between autonomous systems, and today there is only one in use: BGP. (“EGP” was also the name of one old protocol, RFC 904, which BGP replaced.)

⁦(AS)⁩ کۆمەڵێک کە یەک دامەزراوە بە یەک سیاسەتی بەڕێوەیان دەبات — کۆمپانیایەک، زانکۆیەک یان . هەر ASـێک ژمارەیەکی هەیە بە ناوی ASN. دەیان هەزار کە پێکەوە بەستراون. بۆیە دەبنە دوو گرووپ. ⁦(Interior Gateway Protocol)⁩ لە ناو یەک ASـدا کار دەکات: ، ، ⁦IS-IS⁩ و . ⁦(Exterior Gateway Protocol)⁩ ڕێگەکان لە نێوان دەگوازێتەوە و ئەمڕۆ تەنیا یەکێکیان بەکار دێت: . («EGP» ناوی کۆنیش بوو، ⁦RFC 904⁩، کە جێی گرتەوە.)

Five clouds, each an autonomous system with a documentation AS number: Company A (AS 64500, inside: EIGRP), ISP 1 (AS 64501, OSPF), ISP 2 (AS 64502, IS-IS), ISP 3 (AS 64503, OSPF) and Company B (AS 64504, OSPF). Every link between two clouds is a dashed orange line labelled BGP. Note: inside one AS an IGP, each AS picks its own; between ASes BGP, the EGP of the Internet.پێنج هەور، هەریەکەیان سیستەمێکی سەربەخۆیە بە ژمارەیەکی AS لە ژمارە تایبەتەکانی بەڵگەنامەدا: کۆمپانیای A (AS 64500، لە ناوەوە: EIGRP)، ISP 1 (AS 64501، OSPF)، ISP 2 (AS 64502، IS-IS)، ISP 3 (AS 64503، OSPF) و کۆمپانیای B (AS 64504، OSPF). هەموو بەستەرێکی نێوان دوو هەور هێڵێکی پرتەقاڵیی پچڕپچڕە بە ناوی BGP. تێبینی: لە ناو یەک ASـدا IGP، هەر ASـێک هی خۆی هەڵدەبژێرێت؛ لە نێوان ASـەکاندا BGP، کە EGPـە.
Each AS runs its own IGP inside; BGP joins them all.هەر ASـێک خۆی لە ناوەوە کار پێ دەکات؛ هەموویان پێکەوە دەبەستێت.CêIT

Nobody outside an AS sees which IGP it runs; at the borders everyone speaks BGP. BGP is taught in BGP and autonomous systems.

کەس لە دەرەوەی AS نابینێت کام لە ناویدا کار دەکات؛ لە سنوورەکاندا هەمووان بە قسە دەکەن. لە BGP و سیستەمە سەربەخۆکاندا فێر دەبیت.

The family tree of routing protocolsداری بنەماڵەی پرۆتۆکۆڵەکانی ڕێدۆزی

Routing protocols are also grouped by how they find routes:

بەپێی چۆنیەتیی دۆزینەوەی ڕێگەکانیش پۆلێن دەکرێن:

  • Distance vector — RIP. For every network a router knows only a distance and a direction (the next hop), told by its neighbours. The name says it: the direction (vector) is chosen by the distance, and the way with the fewest hops wins.
  • Link state — OSPF and IS-IS. Every router learns the state of every link in its area, builds a full map and calculates its own shortest paths. The metric is a cost.
  • Advanced distance vector — EIGRP. It still learns routes from its neighbours, like distance vector, but with a smarter algorithm (DUAL), backup routes kept ready, and a metric of bandwidth and delay. Older Cisco material called it “hybrid”; it is not a link-state protocol (what EIGRP is).
  • Path vector — BGP. Every route carries the list of autonomous systems it has passed through, and each network chooses by its own policy (path vector).
  • — . بۆ هەر تەنیا دوورییەک و ئاڕاستەیەک () دەزانێت کە دراوسێکانی پێیان وتووە. ناوەکە خۆی دەیڵێت: ئاڕاستە (vector) بە مەودا ⁦(distance)⁩ هەڵدەبژێردرێت و ئەو ڕێگەیەی کەمترین هەیە دەباتەوە.
  • — و ⁦IS-IS⁩. هەموو بارودۆخی هەموو بەستەرێکی ناوچەکەی دەزانێت، نەخشەیەکی تەواو دروست دەکات و خۆی خۆی حیساب دەکات. تێچوویە.
  • — . هێشتا وەک ڕێگەکان لە دراوسێکانییەوە فێر دەبێت، بەڵام بە زیرەکتر ⁦(DUAL)⁩، ڕێگەی یەدەگی ئامادە و لە و . سەرچاوە کۆنەکانی Cisco پێیان دەوت «hybrid» (تێکەڵ)؛ نییە (EIGRP چییە).
  • — . هەر ڕێگەیەک لیستی سەر ڕێگاکەی هەڵدەگرێت و هەر بەپێی سیاسەتی خۆی هەڵدەبژێرێت (ڕێڕەوی ئاڕاستە).
A tree. Routing splits into static routes (typed by hand) and dynamic routing (routing protocols). Dynamic routing splits into IGP (inside one autonomous system) and EGP (between ASes). Under IGP: distance vector — RIP, hop count; link state — OSPF and IS-IS, cost from bandwidth; advanced distance vector — EIGRP, bandwidth + delay, once called 'hybrid'. Under EGP: path vector — BGP, AS path + policy. Notes: every protocol in the tree is classless today; RIPv1 and IGRP were classful and IGRP was removed from Cisco IOS long ago.دارێک. ڕێدۆزی دەبێتە ڕێگە جێگیرەکان (بە دەست دەنووسرێن) و ڕێدۆزیی بزۆک (پرۆتۆکۆڵەکانی ڕێدۆزی). ڕێدۆزیی بزۆک دەبێتە IGP (لە ناو یەک سیستەمی سەربەخۆ) و EGP (لە نێوان ASـەکاندا). لە ژێر IGP: مەودای ئاڕاستە — RIP، ژمارەی بازەکان؛ بارودۆخی بەستەر — OSPF و IS-IS، تێچوو لە پانایی باندەوە؛ مەودای ئاڕاستەی پێشکەوتوو — EIGRP، پانایی باند + دواکەوتن، پێشتر پێی دەگوترا «hybrid». لە ژێر EGP: ڕێڕەوی ئاڕاستە — BGP، ڕێڕەوی AS + سیاسەت. تێبینی: هەموو پرۆتۆکۆڵێکی ناو دارەکە ئەمڕۆ بێپۆلە؛ RIPv1 و IGRP پۆلدار بوون و IGRP لە مێژە لە Cisco IOS لابراوە.
Where each protocol belongs, and the metric it uses.هەر سەر بە کوێیە و چ بەکار دەهێنێت.CêIT

How distance vector and link state really work, with their two algorithms, is the next lesson: Distance vector and link state.

و بە ڕاستی چۆن کار دەکەن، لەگەڵ دوو ، وانەی داهاتووە: مەودای ئاڕاستە و بارودۆخی بەستەر.

The family tree of routing protocolsداری بنەماڵەی پرۆتۆکۆڵەکانی ڕێدۆزی

Classful and classless routing protocolsپرۆتۆکۆڵەکانی ڕێدۆزیی پۆلدار و بێپۆل

One more difference matters in every lab. A classful routing protocol sends each network address without its mask, so the receiver guesses the mask from the address class: /8, /16 or /24 (Classful vs classless). That fails as soon as a network is divided into subnets. A classless protocol sends the mask with every route, so VLSM and CIDR work. RIPv1 and Cisco’s old IGRP were classful. RIPv2, OSPF, IS-IS, EIGRP and BGP are classless. IGRP was removed from Cisco IOS in release 12.2(13)T, and EIGRP took its place. Classful behaviour also explains why automatic summarization breaks discontiguous networks.

جیاوازییەکی تر لە هەموو تاقیکردنەوەیەکدا گرنگە. پۆلدار هەر بەبێ ماسکەکەی دەنێرێت، بۆیە وەرگر ماسکەکە لە پۆلی ناونیشانەکەوە مەزەندە دەکات: /8، /16 یان /24 (ناونیشانکردنی پۆلدار و بێپۆل). ئەمە هەر کە بۆ دابەش بکرێت تێکدەچێت. بێپۆل ماسکەکە لەگەڵ هەر ڕێگەیەک دەنێرێت، بۆیە و کار دەکەن. ⁦RIPv1⁩ و IGRPـی کۆنی Cisco پۆلدار بوون. ⁦RIPv2⁩، ، ⁦IS-IS⁩، و بێپۆلن. IGRP لە وەشانی ⁦12.2(13)T⁩ـی Cisco IOSـدا لابرا و جێی گرتەوە. هەر ئەم ڕەفتارە پۆلدارە ڕوونی دەکاتەوە بۆچی خۆکار ڕایەڵەکانی پچڕاو تێکدەدات.

Two panels. Left, classful update (RIPv1): the entry says network 172.16.64.0 with no mask in the message; the receiver guesses from the class, 172.16.0.0/16?, and VLSM and CIDR break. Right, classless update (RIPv2, OSPF, EIGRP …): the entry says 172.16.64.0/18, the mask 255.255.192.0 travels with it; the receiver knows the exact subnet 172.16.64.0/18, and VLSM and CIDR work.دوو بەش. چەپ، نوێکردنەوەی پۆلدار (RIPv1): تۆمارەکە دەڵێت ڕایەڵە 172.16.64.0 و هیچ ماسکێک لە پەیامەکەدا نییە؛ وەرگر لە پۆلەکەوە مەزەندە دەکات، 172.16.0.0/16؟ — بۆیە VLSM و CIDR تێکدەچن. ڕاست، نوێکردنەوەی بێپۆل (RIPv2، OSPF، EIGRP …): تۆمارەکە دەڵێت 172.16.64.0/18، ماسکی 255.255.192.0 لەگەڵیدا دەڕوات؛ وەرگر ژێرڕایەڵەکە دروست دەزانێت، 172.16.64.0/18 — بۆیە VLSM و CIDR کار دەکەن.
Without the mask, the receiver can only guess.بەبێ ماسک، وەرگر تەنیا دەتوانێت مەزەندە بکات.CêIT

Routing loops: the village storyئەڵقەکانی ڕێدۆزی: چیرۆکی گوندەکە

Lost on the way to a villageونبوون لە ڕێی گوندێکدا

You are driving to a village you have never visited, with no GPS and no directions. You stop and ask a man by the road, but his directions are not clear and you lose your way. You ask a second person, then a third — each answer is just as unclear, and each one sends you back along a road you have already driven. You keep stopping, asking and driving from one end to the other, round and round, and you never reach the village.

بەرەو گوندێک لێدەخوڕیت کە هەرگیز نەتدیوە، بەبێ GPS و بەبێ ڕێنمایی. ئۆتۆمبێلەکە ڕادەگریت و لە پیاوێکی سەر ڕێگا دەپرسیت، بەڵام ڕێنماییەکانی ڕوون نین و ڕێگە ون دەکەیت. لە کەسی دووەم دەپرسیت، پاشان لە کەسی سێیەم — هەر وەڵامێک هێندەی پێشوو ناڕوونە و هەریەکەیان بە ڕێگایەکدا دەتگەڕێنێتەوە کە پێشتر پێیدا تێپەڕیویت. بەردەوام ڕادەوەستیت، دەپرسیت و لەمسەرەوە بۆ ئەوسەر لێدەخوڕیت، دەسووڕێیتەوە و هەرگیز ناگەیتە گوندەکە.

Where the analogy stops workingسنووری ئەم نموونەیە

Routers do not ask anybody: each one simply trusts the table it already has. And a packet, unlike a driver, carries a limit — its TTL — that finally ends its journey.

لە کەس ناپرسن: هەریەکەیان تەنیا متمانە بەو خشتەیە دەکات کە هەیەتی. ، بە پێچەوانەی شۆفێرەوە، سنوورێکی پێیە — — کە لە کۆتاییدا گەشتەکەی کۆتایی پێ دەهێنێت.

A car on an oval loop road. Three people stand beside the loop: person 1 says 'That way, I think', person 2 says 'Go back that way', person 3 says 'Not here — over there'. The village sits on a hill outside the loop, reached by a faint road you never find. In the middle: ask, drive, ask again … round and round, never arriving.ئۆتۆمبێلێک لەسەر ڕێیەکی بازنەیی. سێ کەس لە تەنیشت بازنەکە وەستاون: کەسی 1 دەڵێت «بەو لادا، وا دەزانم»، کەسی 2 دەڵێت «بەو لادا بگەڕێوە»، کەسی 3 دەڵێت «لێرە نا — ئەوێ». گوندەکە لەسەر گردێکە لە دەرەوەی بازنەکە، بە ڕێیەکی کاڵ کە هەرگیز نایدۆزیتەوە. لە ناوەڕاستدا: پرسیار، لێخوڕین، دیسان پرسیار … دەسووڕێیتەوە و هەرگیز ناگەیت.
Each answer sends you round the same circle — like packets in a routing loop.هەر وەڵامێک بە هەمان بازنەدا دەتسووڕێنێتەوە — وەک لە .CêIT

Routing loops: the village storyئەڵقەکانی ڕێدۆزی: چیرۆکی گوندەکە

What a routing loop isئەڵقەی ڕێدۆزی چییە

A routing loop is a fault in which packets go round and round between routers and never arrive, because the routers’ tables point at each other. For example, R1 thinks the way to network N is through R2, but R2 thinks it is back through R1. Each router forwards correctly by its own table — the tables themselves are wrong.

هەڵەیەکە کە تێیدا لە نێوان دەسووڕێنەوە و هەرگیز ناگەن، چونکە ئاماژە بۆ یەکتر دەکەن. بۆ نموونە، ⁦R1⁩ وا دەزانێت ڕێگای N بە ⁦R2⁩ـدایە، بەڵام ⁦R2⁩ وا دەزانێت ڕێگاکە بە ⁦R1⁩ـدا دەگەڕێتەوە. هەر بەپێی خشتەکەی خۆی بە دروستی دەینێرێت — خودی خشتەکان هەڵەن.

Loops come from routing tables that are wrong or out of step: most often a link or router fails and the news has not reached every router yet, or a route is misconfigured. Heavy traffic does not create a loop by itself — but a loop creates heavy traffic. The looping packets waste bandwidth and router CPU, crowd out other traffic and can bring the network down.

لە هەڵە یان ناڕێکەوە دێن: زۆرجار بەستەرێک یان دەپچڕێت و هەواڵەکە هێشتا نەگەیشتووەتە هەموو ، یان ڕێگەیەک بە هەڵە ڕێکخراوە. هاتوچۆی زۆر بە تەنیا دروست ناکات — بەڵام هاتوچۆی زۆر دروست دەکات. ئەو دەسووڕێنەوە و CPUـی بە فیڕۆ دەدەن، جێ لە هاتوچۆی تر تەسک دەکەنەوە و دەتوانن بخەنە کار.

Animation. R1, R2 and R3 in a line, network N behind R3. Frame 1: R1 sends to R2, R2 to R3, R3 is connected to N. Frame 2: R3 loses N; R2 hears old news from R1 and now points back at R1 (wrong). Frames 3 to 5: a packet for N goes R1 → R2 → R1 → R2, its TTL falling 63, 62, 61 — a routing loop wasting bandwidth and CPU. Frame 6: when the TTL reaches 0 the packet is dropped and an ICMP 'time exceeded' message goes back, but the loop itself stays until the routers fix their tables.
Animation. R1, R2 and R3 in a line, network N behind R3. Frame 1: R1 sends to R2, R2 to R3, R3 is connected to N. Frame 2: R3 loses N; R2 hears old news from R1 and now points back at R1 (wrong). Frames 3 to 5: a packet for N goes R1 → R2 → R1 → R2, its TTL falling 63, 62, 61 — a routing loop wasting bandwidth and CPU. Frame 6: when the TTL reaches 0 the packet is dropped and an ICMP 'time exceeded' message goes back, but the loop itself stays until the routers fix their tables.
A routing loop: the packet bounces until its TTL runs out.: دێت و دەچێت تا تەواو دەبێت.CêIT

Each router lowers the packet’s TTL by 1, and at 0 the packet is dropped (TTL). The TTL ends the journey of one packet, but it does not repair the tables: the next packet loops too.

هەر ـی یەک کەم دەکاتەوە و لە 0دا فڕێ دەدرێت (TTL). گەشتی یەک کۆتایی پێ دەهێنێت، بەڵام خشتەکان چاک ناکاتەوە: دواتریش دەسووڕێتەوە.

Routing loops: the village storyئەڵقەکانی ڕێدۆزی: چیرۆکی گوندەکە

Counting to infinityژماردن تا بێسنوور

Distance-vector routers can build a loop all by themselves. Take three routers in a line, A – B – C, with network N behind C. Before the failure, C reaches N directly, B in 1 hop through C and A in 2 hops through B. Then C’s link to N fails. Before C can tell anyone, B’s regular update arrives: “N in 1 hop”. C believes it and now thinks N is 2 hops away through B — but B’s own route goes through C. From now on every update makes the number bigger:

دەتوانن بە تەنیا خۆیان دروست بکەن. سێ لە یەک هێڵدا وەربگرە: ⁦A – B – C⁩. N لە پشت Cـە. پێش پچڕان، C ڕاستەوخۆ دەگاتە N، B بە 1 لە ڕێی Cـەوە و A بە 2 لە ڕێی Bـەوە. پاشان بەستەری C بۆ N دەپچڕێت. پێش ئەوەی C بە کەس بڵێت، نوێکردنەوە ئاساییەکەی B دەگات: «N بە 1 ». C باوەڕی پێ دەکات و ئێستا وا دەزانێت N بە 2 لە ڕێی Bـەوەیە — بەڵام ڕێگەکەی خودی B بە Cدا دەڕوات. لەمەودوا هەر نوێکردنەوەیەک ژمارەکە گەورەتر دەکات:

Hops to N in each router’s table (computed step by step)ژمارەی بۆ N لە خشتەی هەر (هەنگاو بە هەنگاو حیسابکراوە)
What happensچی ڕوو دەداتABC
Before the failureپێش پچڕان210 (connected)0 (بەستراو)
C loses NC N لەدەست دەدات2116
C hears B: “N in 1 hop”C لە Bـەوە دەبیستێت: «N بە 1 »212
B hears C: “N in 2 hops” (then A hears B)B لە Cـەوە دەبیستێت: «N بە 2 » (پاشان A لە Bـەوە)432
C hears B: “N in 3 hops”C لە Bـەوە دەبیستێت: «N بە 3 »434
… each exchange adds 2 …… هەر ئاڵوگۆڕێک 2 زیاد دەکات …………
B hears C: “N in 14 hops” (then A hears B)B لە Cـەوە دەبیستێت: «N بە ⁦14⁩ » (پاشان A لە Bـەوە)161514
C hears B: “N in 15 hops”C لە Bـەوە دەبیستێت: «N بە ⁦15⁩ »161516
B hears C: “N in 16 hops” = unreachable; A followsB لە Cـەوە دەبیستێت: «N بە ⁦16⁩ » = ناگەیەنرێت؛ A بەدوایدا دێت161616

The routers are counting to infinity. With updates every 30 seconds this can take minutes, and all that time packets for N go round between B and C. RIP stops the count at 16, its “infinity”; the next screens show the tools that stop the loop much sooner.

تا دەژمێرن. بە نوێکردنەوە لە هەر ⁦30⁩ چرکەیەکدا ئەمە دەتوانێت چەند خولەکێک بخایەنێت و لە هەموو ئەو کاتەدا N لە نێوان B و Cدا دەسووڕێنەوە. ژماردنەکە لە ⁦16⁩دا دەوەستێنێت، کە «»ـی ئەوە؛ لاپەڕەکانی داهاتوو ئەو ئامرازانە پیشان دەدەن کە زۆر زووتر دەوەستێنن.

Cures 1 and 2: a maximum hop count and split horizonچارەسەری 1 و 2: زۆرترین ژمارەی بازەکان و ئاسۆی لەتکراو

A maximum hop count. RIP’s metric can only be 1 to 15, and 16 means infinity: the network is unreachable. So counting to infinity ends after at most 16 steps. The price is size: RIP cannot serve a network in which a path crosses more than 15 routers. People often say “RIP stops working after 16 hops”; more exactly, a network 15 hops away is still reachable, and one 16 hops away is not.

زۆرترین ژمارەی . تەنیا دەتوانێت 1 تا ⁦15⁩ بێت و ⁦16⁩ واتە : ناگەیەنرێت. بۆیە ژماردن تا لە زۆرترین ⁦16⁩ هەنگاودا کۆتایی دێت. نرخەکەی قەبارەیە: ناتوانێت خزمەتی بکات کە ڕێگایەکی تێیدا بە زیاتر لە ⁦15⁩ تێپەڕێت. زۆرجار دەگوترێت « دوای ⁦16⁩ لە کار دەکەوێت»؛ وردتر بڵێین، کە ⁦15⁩ دوورە هێشتا دەگەیەنرێت و ئەوەی ⁦16⁩ دوورە ناگەیەنرێت.

Split horizon. It stops the commonest loop, the one between two neighbours: a router never advertises a route back out of the interface through which it learned that route — “never tell a neighbour what it told you”. In the example B learned N from C on G0/1, so B never sends N back to C, and C cannot be fooled by its own old news. RFC 2453 makes split horizon compulsory for RIP, and Cisco routers switch it on by default on almost every interface.

. باوترین دەوەستێنێت، ئەوەی نێوان دوو دراوسێ: هەرگیز ڕێگەیەک لەو ڕاناگەیەنێتەوە کە لێیەوە فێری بووە — «هەرگیز ئەوەی دراوسێ پێی وتوویت بە خۆی مەڵێرەوە». لە نموونەکەدا B لەسەر ⁦G0/1⁩ لە Cـەوە فێری N بوو، بۆیە B هەرگیز N بۆ C ناگەڕێنێتەوە و C بە هەواڵی کۆنی خۆی فریو ناخوات. ⁦RFC 2453⁩ بۆ ناچاری دەکات و Cisco بە بنەڕەت لەسەر نزیکەی هەموو هەڵی دەکەن.

Two rows with A, B and C in a line and network N behind C (its link broken). Top row, without split horizon: C told B 'N, 0 hops'; B sends 'N in 1 hop' back to C, and C believes it after N fails. Bottom row, with split horizon: the same news arrives from C, but B never sends N back out of G0/1, where it learned N — 'never tell a neighbour what it told you'.دوو ڕیز بە A، B و C لە یەک هێڵدا و ڕایەڵەی N لە پشت C (بەستەرەکەی پچڕاوە). ڕیزی سەرەوە، بەبێ ئاسۆی لەتکراو: C بە Bـی وت «N بە 0 باز»؛ B «N بە 1 باز» بۆ C دەگەڕێنێتەوە و C دوای پچڕانی N باوەڕی پێ دەکات. ڕیزی خوارەوە، بە ئاسۆی لەتکراو: هەمان هەواڵ لە Cـەوە دێت، بەڵام B هەرگیز N لە G0/1ـەوە ناگەڕێنێتەوە، کە لەوێوە فێری N بوو — «هەرگیز ئەوەی دراوسێ پێی وتوویت بە خۆی مەڵێرەوە».
Split horizon removes the route that would come straight back. ئەو ڕێگەیە لادەبات کە ڕاستەوخۆ دەگەڕایەوە.CêIT

Cures 3 and 4: route poisoning, poison reverse and triggered updatesچارەسەری 3 و 4: ژەهراویکردنی ڕێگە، ژەهراویکردنی پێچەوانە و نوێکردنەوەی دەستبەجێ

Split horizon alone is slow, and it cannot stop loops among three or more routers. So a router that loses a network does not simply go quiet: it poisons the route — it advertises the network with metric 16 (unreachable), and every router that hears it removes the route. It sends this as a triggered update, at once, instead of waiting for the next 30-second update. Poison reverse is the strong form of split horizon: instead of saying nothing about N to C, B sends N back to C with metric 16, so C can never use B to reach N. RFC 2453 recommends split horizon with poisoned reverse.

بە تەنیا خاوە و ناتوانێت لە نێوان سێ یان زیاتردا بوەستێنێت. بۆیە کە لەدەست دەدات تەنیا بێدەنگ نابێت: ڕێگەکە ژەهراوی دەکات — بە ⁦16⁩ (ناگەیەنرێت) ڕادەگەیەنێت و هەر کە دەیبیستێت ڕێگەکە لادەبات. ئەمە وەک دەنێرێت، یەکسەر، لە جیاتی چاوەڕوانیی نوێکردنەوەی ⁦30⁩ چرکەیی داهاتوو. ژەهراویکردنی پێچەوانە ⁦(poison reverse)⁩ شێوە بەهێزەکەی : لە جیاتی بێدەنگی لەبارەی N بۆ C، B ڕێگەی N بە ⁦16⁩ بۆ C دەگەڕێنێتەوە، بۆیە C هەرگیز ناتوانێت B بۆ گەیشتن بە N بەکار بهێنێت. ⁦RFC 2453⁩ لەگەڵ ژەهراویکردنی پێچەوانە پێشنیار دەکات.

A, B and C in a line; C’s link to network N is broken. 1 (orange): C sends 'N: 16' to B — route poisoning, the network advertised with metric 16, unreachable. 2 (orange): B passes 'N: 16' on to A at once — a triggered update, not waiting for the next 30-second update. 3 (blue): B sends 'N: 16' back to C — poison reverse, so C never trusts B for N. Title: bad news travels fast; the poisoned route reaches every router before old good news can come back.A، B و C لە یەک هێڵدا؛ بەستەری C بۆ ڕایەڵەی N پچڕاوە. 1 (پرتەقاڵی): C «N: 16» بۆ B دەنێرێت — ژەهراویکردنی ڕێگە، ڕایەڵەکە بە پێوانەی 16 ڕادەگەیەنرێت، ناگەیەنرێت. 2 (پرتەقاڵی): B یەکسەر «N: 16» بۆ A دەنێرێت — نوێکردنەوەی دەستبەجێ، بێ چاوەڕوانیی نوێکردنەوەی 30 چرکەیی داهاتوو. 3 (شین): B «N: 16» بۆ C دەگەڕێنێتەوە — ژەهراویکردنی پێچەوانە، بۆ ئەوەی C هەرگیز بۆ N باوەڕ بە B نەکات. سەردێڕ: هەواڵی خراپ بە خێرایی دەڕوات؛ ڕێگە ژەهراویکراوەکە پێش گەڕانەوەی هەواڵی باشی کۆن دەگاتە هەموو ڕێدۆزێک.
Poison the dead route, tell everyone at once, and poison it back towards its source.ڕێگە مردووەکە ژەهراوی بکە، یەکسەر بە هەمووان بڵێ و بەرەو سەرچاوەکەی ژەهراوی بکەرەوە.CêIT

Cure 5: hold-down timersچارەسەری 5: تایمەرەکانی ڕاگرتن

Old good news can still be travelling round the network after a route fails. A hold-down timer protects against it: when a route goes down, the router starts the timer and, until it ends, does not accept other routers’ news of a path to that network — that news might be old. Cisco’s RIP waits 180 seconds by default; the full timer set is timers basic 30 180 180 240 (update, invalid, hold-down, flush), explained in RIP. When the timer ends, every router has heard the true news.

دوای پچڕانی ڕێگەیەک، لەوانەیە هەواڵی باشی کۆن هێشتا لە بگەڕێت. لەمە دەمانپارێزێت: کاتێک ڕێگەیەک دەپچڕێت، دەست پێ دەکات و تا کۆتایی دێت، هەواڵی ڕێگایەک بۆ ئەو لە ترەوە وەرناگرێت — لەوانەیە ئەو هەواڵە کۆن بێت. Cisco بە بنەڕەت ⁦180⁩ چرکە چاوەڕێ دەکات؛ هەموو timers basic 30 180 180 240ـن (نوێکردنەوە، نادروست، ڕاگرتن، سڕینەوە)، کە لە RIPدا ڕوون کراونەتەوە. کاتێک کۆتایی دێت، هەموو هەواڵە ڕاستەکەی بیستووە.

A time line. At the start B marks N 'possibly down' and a 180-second hold-down bar begins (Cisco default). During the bar a message from A, 'N in 3 hops', is ignored — maybe old news. After the bar ends, a message from C, 'N in 1 hop', is accepted: B accepts routes to N again. By the time the timer ends, every router has heard the true news.هێڵی کات. لە سەرەتادا B ڕایەڵەی N وەک «ڕەنگە پچڕابێت» نیشان دەکات و شریتی 180 چرکەی تایمەری ڕاگرتن دەست پێ دەکات (بنەڕەتی Cisco). بە درێژایی شریتەکە هەواڵێک لە Aـەوە، «N بە 3 باز»، پشتگوێ دەخرێت — ڕەنگە هەواڵی کۆن بێت. دوای کۆتاییهاتنی شریتەکە، هەواڵێک لە Cـەوە، «N بە 1 باز»، وەردەگیرێت: B دیسان ڕێگە بۆ N وەردەگرێت. تا کاتی کۆتاییهاتنی تایمەرەکە، هەموو ڕێدۆزێک هەواڵە ڕاستەکەی بیستووە.
During hold-down the router ignores rumours about the failed route.تا تەواو دەبێت، دەنگۆکانی ڕێگە پچڕاوەکە پشتگوێ دەخات.CêIT
The five distance-vector curesپێنج چارەسەرەکەی
CureچارەسەرWhat it doesچی دەکات
Maximum hop count (16)زۆرترین ⁦(16)⁩ends counting to infinity at 16ژماردن تا لە ⁦16⁩دا دەوەستێنێت
Split horizonnever sends a route back where it came fromهەرگیز ڕێگەیەک بۆ ئەو شوێنە ناگەڕێنێتەوە کە لێوەی هاتووە
Route poisoning / poison reverse / ژەهراویکردنی پێچەوانەadvertises a dead route as 16ڕێگەی مردوو وەک ⁦16⁩ ڕادەگەیەنێت
Triggered updatesends bad news at onceهەواڵی خراپ یەکسەر دەنێرێت
Hold-down timerignores rumours for a whileبۆ کاتێک دەنگۆکان پشتگوێ دەخات

Link-state protocols do not count to infinity, because every router calculates from the same full map. BGP stops loops differently: it refuses any route whose AS path already contains its own AS number.

تا ناژمێرن، چونکە هەموو لە هەمان نەخشەی تەواوەوە حیساب دەکات. بە شێوەیەکی تر دەوەستێنێت: هەر ڕێگەیەک ڕەت دەکاتەوە کە ڕێڕەوی ASـەکەی ژمارەی ASـی خۆی تێدا بێت.

Common mistakesهەڵە باوەکان

Exercisesڕاهێنانەکان

ExerciseڕاهێنانCount the hopsبازەکان بژمێرە

Look again at the hop-count picture (R1 to R4). (a) Give the hop count of each of the three paths. (b) Which path does RIP use? (c) The link R1–R5 fails: which path does RIP use after it converges?

دیسان سەیری وێنەی ژمارەی بکە (⁦R1⁩ بۆ ⁦R4⁩). (ئ) ژمارەی هەر سێ ڕێگاکە بڵێ. (ب) کام ڕێگا بەکار دەهێنێت؟ (ج) بەستەری ⁦R1–R5⁩ دەپچڕێت: دوای کام ڕێگا بەکار دەهێنێت؟

Show answerوەڵامەکە پیشان بدە

(a) R1–R2–R3–R4: 3 hops; R1–R5–R4: 2 hops; R1–R6–R7–R8–R4: 4 hops. (b) The middle path through R5, the lowest count. (c) R1–R2–R3–R4 with 3 hops — the next lowest.

(ئ) ⁦R1–R2–R3–R4: 3⁩ ؛ ⁦R1–R5–R4: 2⁩ ؛ ⁦R1–R6–R7–R8–R4: 4⁩ . (ب) ڕێگای ناوەڕاست لە ڕێی ⁦R5⁩ـەوە، کەمترین ژمارە. (ج) ⁦R1–R2–R3–R4⁩ بە 3 — کەمترینی دوای ئەو.

ExerciseڕاهێنانRIP or OSPF?RIP یان OSPF؟

Path X crosses 2 links of 10 Mb/s. Path Y crosses 3 links of 1 Gb/s. Which path does RIP choose, and which does OSPF choose with Cisco’s default reference bandwidth of 100 Mb/s? Show the numbers.

ڕێگای X بە 2 بەستەری ⁦10 Mb/s⁩ـدا تێدەپەڕێت. ڕێگای Y بە 3 بەستەری ⁦1 Gb/s⁩ـدا. کام ڕێگا هەڵدەبژێرێت و بە پێوەری بنەڕەتیی Cisco، ⁦100 Mb/s⁩، کامیان؟ ژمارەکان پیشان بدە.

Show answerوەڵامەکە پیشان بدە

RIP: X has 2 hops and Y has 3, so RIP chooses X. OSPF: each 10 Mb/s link costs 100 ÷ 10 = 10, so X costs 20; each 1 Gb/s link would cost 100 ÷ 1000 = 0.1, but a cost is never below 1, so Y costs 3. OSPF chooses Y. (With the default reference, 100 Mb/s and 1 Gb/s links both cost 1 — the OSPF lesson shows how to fix that.)

: ڕێگای X دوو هەیە و ⁦Y 3⁩، بۆیە ڕێگای X هەڵدەبژێرێت. : هەر بەستەرێکی ⁦10 Mb/s⁩ تێچووی ⁦100 ÷ 10 = 10⁩ـە، بۆیە X تێچووی ⁦20⁩ـە؛ هەر بەستەرێکی ⁦1 Gb/s⁩ دەبوو تێچووی ⁦100 ÷ 1000 = 0.1⁩ بێت، بەڵام تێچوو هەرگیز لە 1 کەمتر نییە، بۆیە Y تێچووی 3ـە. ڕێگای Y هەڵدەبژێرێت. (بە پێوەری بنەڕەتی، بەستەری ⁦100 Mb/s⁩ و ⁦1 Gb/s⁩ هەردووکیان تێچووی 1ـیان هەیە — وانەی پیشانی دەدات چۆن چاک دەکرێت.)

ExerciseڕاهێنانSort the protocolsپرۆتۆکۆڵەکان پۆلێن بکە

Sort RIPv1, RIPv2, OSPF, IS-IS, EIGRP and BGP: (a) IGP or EGP; (b) distance vector, link state, advanced distance vector or path vector; (c) classful or classless.

⁦RIPv1⁩، ⁦RIPv2⁩، ، ⁦IS-IS⁩، و پۆلێن بکە: (ئ) یان ؛ (ب) ، ، یان ؛ (ج) پۆلدار یان بێپۆل.

Show answerوەڵامەکە پیشان بدە
ProtocolIGP / EGPFamilyبنەماڵەMasksماسک
RIPv1IGPdistance vectorclassfulپۆلدار
RIPv2IGPdistance vectorclasslessبێپۆل
OSPFIGPlink stateclasslessبێپۆل
IS-ISIGPlink stateclasslessبێپۆل
EIGRPIGPadvanced distance vectorclasslessبێپۆل
BGPEGPpath vectorclasslessبێپۆل
ExerciseڕاهێنانStop the countژماردنەکە بوەستێنە

Routers A – B – C run RIP and network N hangs off C. C’s link to N fails. (a) With no loop prevention at all, explain what happens to the hop counts. (b) Which cure would have stopped B from ever telling C “N in 1 hop”? (c) Which cure makes C tell B about the failure at once?

⁦A – B – C⁩ کار پێ دەکەن و N بە Cـەوە بەستراوە. بەستەری C بۆ N دەپچڕێت. (ئ) بەبێ هیچ ڕێگرییەک لە ، ڕوونی بکەرەوە چی بەسەر ژمارەی دێت. (ب) کام چارەسەر ڕێگری لە B دەکرد کە هەرگیز بە C نەڵێت «N بە 1 »؟ (ج) کام چارەسەر وا لە C دەکات یەکسەر پچڕانەکە بە B بڵێت؟

Show answerوەڵامەکە پیشان بدە

(a) C hears B’s old “N in 1 hop” and believes N is 2 hops away through B; B then hears 2 from C and sets 3; C sets 4 … the numbers climb by 2 each exchange until they reach 16 — counting to infinity — while packets loop between B and C. (b) Split horizon (or poison reverse): B learned N from C, so it never advertises N back to C. (c) Route poisoning sent as a triggered update: C advertises N with metric 16 at once.

(ئ) C هەواڵە کۆنەکەی B دەبیستێت («N بە 1 ») و باوەڕ دەکات N بە 2 لە ڕێی Bـەوەیە؛ پاشان B ژمارە 2 لە Cـەوە دەبیستێت و 3 دادەنێت؛ C ژمارە 4 دادەنێت … ژمارەکان لە هەر ئاڵوگۆڕێکدا 2 بەرز دەبنەوە تا دەگەنە ⁦16⁩ — ژماردن تا — و لەو کاتەدا لە نێوان B و Cدا دەسووڕێنەوە. (ب) (یان ژەهراویکردنی پێچەوانە): B لە Cـەوە فێری N بوو، بۆیە هەرگیز N بۆ C ڕاناگەیەنێتەوە. (ج) کە وەک دەنێردرێت: C یەکسەر N بە ⁦16⁩ ڕادەگەیەنێت.

ExerciseڕاهێنانExplain convergenceپێکگەیشتن ڕوون بکەرەوە

In your own words, define convergence. Then list, in order, what happened in the five-router animation after the link R2–R4 failed, and say why a slow convergence is a problem.

بە وشەی خۆت پێناسە بکە. پاشان بە ڕیز بنووسە لە ئەنیمەیشنی پێنج دوای پچڕانی بەستەری ⁦R2–R4⁩ چی ڕوویدا و بڵێ بۆچی خاو کێشەیە.

Show answerوەڵامەکە پیشان بدە

Convergence is the state in which every router again has the same, correct routes after a change (and the time to reach it is the convergence time). In the animation: R2 lost its route to N; R2 told R1 that N was unreachable; R3 told R1 about its own path; R1 switched to R3 (3 hops) and R2 to R1 (4 hops); all routers agreed again. While the network converges, packets can be lost or loop, so slow convergence means a longer outage.

ئەو بارەیە کە تێیدا هەموو دوای گۆڕانێک دیسان هەمان ڕێگە دروستەکانی هەیە (و ئەو کاتەی بۆی پێویستە کاتی ). لە ئەنیمەیشنەکەدا: ⁦R2⁩ ڕێگەکەی بۆ N لەدەست دا؛ ⁦R2⁩ بە ⁦R1⁩ـی وت N ناگەیەنرێت؛ ⁦R3⁩ ڕێگەکەی خۆی بە ⁦R1⁩ وت؛ ⁦R1⁩ گۆڕا بۆ ⁦R3 (3⁩ ) و ⁦R2⁩ بۆ ⁦R1 (4⁩ )؛ هەموو دیسان ڕێککەوتن. لە کاتی دەتوانن ون ببن یان بسووڕێنەوە، بۆیە خاو واتە پچڕانێکی درێژتر.

Summaryکورتە

  • Dynamic routing: routers run a routing protocol — messages, rules and an algorithm — to learn, advertise and choose routes, and to converge after a change.
  • A metric measures a path; the lowest wins: RIP hop count, OSPF cost from bandwidth, EIGRP bandwidth + delay. Different protocols are compared by administrative distance.
  • IGPs (RIP, OSPF, IS-IS, EIGRP) work inside one autonomous system; the EGP between ASes is BGP.
  • Families: distance vector (RIP), link state (OSPF, IS-IS), advanced distance vector (EIGRP), path vector (BGP). Today’s protocols are classless.
  • A routing loop sends packets round until the TTL runs out; distance vector can count to infinity. Cures: maximum hop count (16), split horizon, route poisoning and poison reverse, triggered updates, hold-down timers.
  • : کار پێ دەکەن — پەیام، یاسا و — بۆ فێربوون، ڕاگەیاندن و هەڵبژاردنی ڕێگەکان و بۆ دوای گۆڕان.
  • ڕێگایەک دەپێوێت؛ کەمترین دەباتەوە: ژمارەی ، تێچوو لە ، + . جیاواز بە بەراورد دەکرێن.
  • (، ، ⁦IS-IS⁩، ) لە ناو یەک کار دەکەن؛ ـی نێوان ASـەکان .
  • بنەماڵەکان: ()، (، ⁦IS-IS⁩)، ()، (). ئەمڕۆ بێپۆلن.
  • دەسووڕێنێتەوە تا تەواو دەبێت؛ دەتوانێت تا بژمێرێت. چارەسەرەکان: زۆرترین ⁦(16)⁩، ، و ژەهراویکردنی پێچەوانە، ، .

Next: how the two big families really work, with Bellman-Ford and Dijkstra — Distance vector and link state.

دواتر: دوو بنەماڵە گەورەکە بە ڕاستی چۆن کار دەکەن، لەگەڵ بێڵمان-فۆرد و دایکسترا — مەودای ئاڕاستە و بارودۆخی بەستەر.

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Distance Vector and Link State: Bellman-Ford and Dijkstraمەودای ئاڕاستە و بارودۆخی بەستەر: بێڵمان-فۆرد و دایکسترا

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.

Appearanceڕووکار

Modeدۆخ
Styleشێواز
Coloursڕەنگەکان

Saved on this device only.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.