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.
بەرامبەر ؛ چییە و چوار ئەرکەکەی (فێربوون، ڕاگەیاندن، هەڵبژاردن، )؛ — ژمارەی ، تێچووی لە ، و — لەگەڵ چیرۆکی دوو ڕێکە؛ ، و ؛ داری بنەماڵەی و پۆلدار بەرامبەر بێپۆل؛ لەگەڵ چیرۆکی گوندەکە، ژماردن تا و پێنج چارەسەرەکە: زۆرترین ، ، و ژەهراویکردنی پێچەوانە، و .
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.
پێی دەگوترێت بزۆک چونکە ئەم کارە هەرگیز ناوەستێت. کاتێک بەستەرێک دەپچڕێت یان نوێ دەردەکەوێت، دیسان حیساب دەکەنەوە، بۆیە بە خۆیان بەردەوام دەگۆڕێن. وەک خۆی دەمێنێتەوە کە نووسراوە — تەنانەت کاتێک بەستەرەکەی پچڕاوە.
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.
لە کۆمەڵێک یاسایە کە دوو ئامێر لەسەری ڕێک دەکەون بۆ ئەوەی لە یەکتر تێبگەن (پرۆتۆکۆڵ چییە؟). ئەو کۆمەڵە پەیام، یاسا و کە بۆ فێربوونی ڕێگەکان بەکاری دەهێنن. پەیامەکان ئەوە هەڵدەگرن کە هەر دەیزانێت. یاساکان دەڵێن کەی بنێردرێن، بۆ کێ و باوەڕ بە کام هەواڵ بکرێت. — ڕێگایەکی هەنگاو بە هەنگاوی حیسابکردن — باشترین ڕێگە بۆ هەر هەڵدەبژێرێت و دەیخاتە ناو .
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.
کە بەهۆیەوە زانیارییەکانیان لەبارەی ڕایەڵەکان هاوبەش دەکەن، بە و باشترین ڕێگا بۆ هەریەکەیان هەڵدەبژێرن و کاتێک بەستەرەکان دەگۆڕێن خۆیان دەگونجێنن: ، ، و .
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:
هەر ناوێکی هەبێت، هەموو هەمان چوار ئەرک دەکات:
- Learn routing information about networks from neighbouring routers.
- Advertise what it knows to neighbouring routers.
- Choose the best route to each network when there is more than one, by comparing a metric, and put it into the routing table.
- 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.
- فێربوون: زانیاریی لەبارەی لە وەردەگرێت.
- ڕاگەیاندن: ئەوەی دەیزانێت بە دەڵێت.
- هەڵبژاردنی باشترین ڕێگە: کاتێک زیاتر لە یەک ڕێگە بۆ هەیە، بە بەراوردکردنی باشترینیان هەڵدەبژێرێت و دەیخاتە ناو .
- وەڵامدانەوەی گۆڕان: کاتێک دەگۆڕێت — بۆ نموونە بەستەرێک دەپچڕێت — بە ئەوانی تر دەڵێت هەندێک ڕێگە نەماون و باشترین ڕێگەی نوێ هەڵدەبژێرێت. گەیشتنەوە بە ڕێککەوتن پێی دەگوترێت .
.13.0 means 192.168.13.0/24, and so on.فێربوون، ڕاگەیاندن، هەڵبژاردن، . لە دوو بەشی یەکەمدا .13.0 واتە 192.168.13.0/24 و هەروەها بۆ ئەوانی تر.CêITConvergenceپێکگەیشتن
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.
دوای گۆڕانێک، هەموو لە هەمان ساتدا پێی نازانن: هەواڵەکە بە بڵاو دەبێتەوە. کاتێک دەگاتە کە هەموو دیسان هەمان وێنەی دروستی هەبێت و ڕێگەیەکی کارای بۆ هەموو هەبێت. ئەو کاتەی ئەمە دەیخایەنێت کاتی . لە کاتی ، هەندێک ون دەبن یان ڕێی هەڵە دەگرن، بۆیە خێرا گرنگە: و زۆرجار لە چەند چرکەیەکدا پێکدەگەن، بەڵام لەوانەیە چەند خولەکێکی پێویست بێت.


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).
- — و : بە بنەڕەت کەمترین لە ڕێگاکەدا لەگەڵ کۆی ڕێگاکە تێکەڵ دەکات — نەک تەنیا .
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 بچووکترین ژمارەیە.
Metrics: how a protocol measures a pathپێوانەکان: پرۆتۆکۆڵێک چۆن ڕێگایەک دەپێوێت
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.
لە ، «ڕێی قەرەباڵغ» بەستەرێکە کە کەمە — ڕێیەکی تەسک کە هەمیشە خاوە. و ئەو خێرایییە جێگیرە لە دەخوێننەوە؛ چاودێریی ئەوە ناکەن کە بەستەرەکە لەم ساتەدا چەند قەرەباڵغە.
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، کە جێی گرتەوە.)
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 چییە).
- — . هەر ڕێگەیەک لیستی سەر ڕێگاکەی هەڵدەگرێت و هەر بەپێی سیاسەتی خۆی هەڵدەبژێرێت (ڕێڕەوی ئاڕاستە).
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ـدا لابرا و جێی گرتەوە. هەر ئەم ڕەفتارە پۆلدارە ڕوونی دەکاتەوە بۆچی خۆکار ڕایەڵەکانی پچڕاو تێکدەدات.
Routing loops: the village storyئەڵقەکانی ڕێدۆزی: چیرۆکی گوندەکە
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.
لە کەس ناپرسن: هەریەکەیان تەنیا متمانە بەو خشتەیە دەکات کە هەیەتی. ، بە پێچەوانەی شۆفێرەوە، سنوورێکی پێیە — — کە لە کۆتاییدا گەشتەکەی کۆتایی پێ دەهێنێت.
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ـی بە فیڕۆ دەدەن، جێ لە هاتوچۆی تر تەسک دەکەنەوە و دەتوانن بخەنە کار.


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دا دەڕوات. لەمەودوا هەر نوێکردنەوەیەک ژمارەکە گەورەتر دەکات:
| What happensچی ڕوو دەدات | A | B | C |
|---|---|---|---|
| Before the failureپێش پچڕان | 2 | 1 | 0 (connected)0 (بەستراو) |
| C loses NC N لەدەست دەدات | 2 | 1 | 16 |
| C hears B: “N in 1 hop”C لە Bـەوە دەبیستێت: «N بە 1 » | 2 | 1 | 2 |
| B hears C: “N in 2 hops” (then A hears B)B لە Cـەوە دەبیستێت: «N بە 2 » (پاشان A لە Bـەوە) | 4 | 3 | 2 |
| C hears B: “N in 3 hops”C لە Bـەوە دەبیستێت: «N بە 3 » | 4 | 3 | 4 |
| … each exchange adds 2 …… هەر ئاڵوگۆڕێک 2 زیاد دەکات … | … | … | … |
| B hears C: “N in 14 hops” (then A hears B)B لە Cـەوە دەبیستێت: «N بە 14 » (پاشان A لە Bـەوە) | 16 | 15 | 14 |
| C hears B: “N in 15 hops”C لە Bـەوە دەبیستێت: «N بە 15 » | 16 | 15 | 16 |
| B hears C: “N in 16 hops” = unreachable; A followsB لە Cـەوە دەبیستێت: «N بە 16 » = ناگەیەنرێت؛ A بەدوایدا دێت | 16 | 16 | 16 |
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 بە بنەڕەت لەسەر نزیکەی هەموو هەڵی دەکەن.
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 لەگەڵ ژەهراویکردنی پێچەوانە پێشنیار دەکات.
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دا ڕوون کراونەتەوە. کاتێک کۆتایی دێت، هەموو هەواڵە ڕاستەکەی بیستووە.
| Cureچارەسەر | What it doesچی دەکات |
|---|---|
| Maximum hop count (16)زۆرترین (16) | ends counting to infinity at 16ژماردن تا لە 16دا دەوەستێنێت |
| Split horizon | never sends a route back where it came fromهەرگیز ڕێگەیەک بۆ ئەو شوێنە ناگەڕێنێتەوە کە لێوەی هاتووە |
| Route poisoning / poison reverse / ژەهراویکردنی پێچەوانە | advertises a dead route as 16ڕێگەی مردوو وەک 16 ڕادەگەیەنێت |
| Triggered update | sends bad news at onceهەواڵی خراپ یەکسەر دەنێرێت |
| Hold-down timer | ignores 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ڕاهێنانەکان
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 — کەمترینی دوای ئەو.
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ـیان هەیە — وانەی پیشانی دەدات چۆن چاک دەکرێت.)
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وەڵامەکە پیشان بدە
| Protocol | IGP / EGP | Familyبنەماڵە | Masksماسک |
|---|---|---|---|
| RIPv1 | IGP | distance vector | classfulپۆلدار |
| RIPv2 | IGP | distance vector | classlessبێپۆل |
| OSPF | IGP | link state | classlessبێپۆل |
| IS-IS | IGP | link state | classlessبێپۆل |
| EIGRP | IGP | advanced distance vector | classlessبێپۆل |
| BGP | EGP | path vector | classlessبێپۆل |
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 ڕادەگەیەنێت.
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زاراوە سەرەکییەکان
Distance Vector and Link State: Bellman-Ford and Dijkstraمەودای ئاڕاستە و بارودۆخی بەستەر: بێڵمان-فۆرد و دایکسترا
Related lecturesوانە پەیوەندیدارەکان
- Distance Vector and Link State: Bellman-Ford and Dijkstraمەودای ئاڕاستە و بارودۆخی بەستەر: بێڵمان-فۆرد و دایکسترا
- RIP: The Simplest Routing ProtocolRIP: سادەترین پرۆتۆکۆڵی ڕێدۆزی
- OSPF: Cost, Router IDs and Link-State AdvertisementsOSPF: تێچوو، ناسێنەرەکانی ڕێدۆز و LSAـەکان
- EIGRP: Cisco’s Advanced Distance-Vector ProtocolEIGRP: مەودای ئاڕاستەی پێشکەوتووی Cisco
- BGP: Routing Between Autonomous SystemsBGP: ڕێدۆزی لە نێوان سیستەمە سەربەخۆکاندا
- Static Routesڕێگە جێگیرەکان
- The Network Layer and the IPv4 Packetچینی ڕایەڵە و پاکێتی IPv4
- Address Classes, and Why CIDR Replaced Themپۆلەکانی ناونیشانی IP و بۆچی CIDR جێگەیانی گرتەوە
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
- RFC 2453: RIP Version 2 — metric 1–15 and 16 = infinity, 30-second updates, counting to infinity (§3.4.1–3.4.2), split horizon and poisoned reverse (§3.4.3), triggered updates (§3.4.4)
- UC Berkeley CS 168, Intro to the Internet, Fall 2026 — routing lectures: principles, distance-vector, link-state, BGP
- CS 168 textbook: Distance-Vector Protocols (Bellman-Ford updates, poisoning, split horizon, poison reverse, count to infinity)
- Cisco IOS IP Routing: RIP Command Reference — timers basic (update 30, invalid 180, holddown 180, flush 240), ip split-horizon default
- Cisco IOS Software Feature Removal — IGRP removed as of Release 12.2(13)T
- RFC 7868: Cisco's Enhanced Interior Gateway Routing Protocol (EIGRP) — advanced distance vector, composite metric
- RFC 4271: A Border Gateway Protocol 4 (BGP-4) — inter-AS routing, AS_PATH
- RFC 5398: Autonomous System (AS) Number Reservation for Documentation Use (64496–64511)
- Kurose & Ross, Computer Networking: A Top-Down Approach, 9th ed. (Pearson) — the control plane: routing algorithms
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.