Chapterبەش 3 · Lectureوانە 3.1
Reading the Routing Table: Route Sources, Metrics and ADخوێندنەوەی خشتەی ڕێدۆزی: سەرچاوەکانی ڕێگە، پێوانە و مەودای بەڕێوەبەری
Read every part of Cisco’s show ip route: the three sources of routes and their codes (C, L, S, S*, R, O, D, B, i), the [AD/metric] brackets, heading lines and the gateway of last resort; compare a switch’s MAC address table with a router’s routing table; and learn how a router chooses — longest prefix match first, then administrative distance between sources, then the metric inside one protocol — with the full default AD table, a memory trick and worked examples.
هەموو بەشێکی show ip routeـی Cisco بخوێنەرەوە: سێ سەرچاوەکەی ڕێگە و کۆدەکانیان (C، L، S، S*، R، O، D، B، i)، کەوانەکانی [AD/metric]، دێڕە سەردێڕەکان و gateway of last resort؛ لەگەڵ بەراورد بکە؛ و فێر ببە چۆن هەڵدەبژێرێت — سەرەتا ، پاشان لە نێوان سەرچاوەکاندا، پاشان لە ناو یەک — لەگەڵ خشتەی تەواوی ADـی بنەڕەتی، فێڵێکی لەبەرکردن و نموونەی کارپێکراو.
What you will learnچی فێر دەبیت
- Name the three sources of routes and read every code of
show ip routeused in the course. - Read a route line part by part, including the [AD/metric] brackets, heading lines and the gateway of last resort.
- Tell a switch’s MAC address table from a router’s routing table and use the right command for each.
- Apply the order longest prefix match → administrative distance → metric to choose a route.
- Recall the default AD values and explain the difference between AD and metric.
- سێ سەرچاوەکەی ڕێگە ناو ببەیت و هەموو کۆدێکی
show ip routeکە لە کۆرسەکەدا بەکار دێت بخوێنیتەوە. - دێڕێکی ڕێگە بەش بە بەش بخوێنیتەوە، لەگەڵ کەوانەکانی [AD/metric]، دێڕە سەردێڕەکان و gateway of last resort.
- لە جیا بکەیتەوە و دروست بۆ هەریەکەیان بەکار بهێنیت.
- ڕیزبەندیی ← ← بۆ هەڵبژاردنی ڕێگە جێبەجێ بکەیت.
- بەها بنەڕەتییەکانی AD لەبیر بێت و جیاوازیی نێوان AD و ڕوون بکەیتەوە.
Where a router’s routes come fromڕێگەکانی ڕێدۆزێک لە کوێوە دێن
A router forwards a packet by looking up the packet’s destination in its routing table: a list of networks, each with the way to reach it. How that lookup works is taught in How packets are routed. This lesson is about reading the table on a Cisco router, and about the rules that decide which routes are allowed into it.
دەنێرێت بەوەی ناونیشانی مەبەستی لە خۆیدا دەدۆزێتەوە: لیستێک لە ، هەریەکەیان لەگەڵ ڕێگەی گەیشتن پێی. ئەم گەڕانە چۆن کار دەکات لە پاکێتەکان چۆن ڕێیان دەدۆزرێتەوەدا فێر بوویت. ئەم وانەیە لەبارەی خوێندنەوەی خشتەکەیە لەسەر Cisco و ئەو یاسایانەی بڕیار دەدەن کام ڕێگە دەچێتە ناو خشتەکەوە.
Every route in the table comes from one of three sources. Connected routes appear by themselves when you give an interface an address with ip address and it comes up. Static routes are typed by an administrator with the global command ip route. Dynamic routes are learned when the routers run a routing protocol and tell each other the networks they know.
هەموو ڕێگەیەکی ناو خشتەکە لە یەکێک لە سێ سەرچاوە دێت. خۆیان دەردەکەون کاتێک بە ip address ناونیشانێک دەدەیت بە و ئەو هەڵدەکرێت. بە گشتیی ip route دەیاننووسێت. ڕێگە بزۆکەکان کاتێک فێر دەبن کە کارپێدەکەن و هەر کە دەیناسن بە یەکتری دەڵێن.
A full routing tableخشتەیەکی ڕێدۆزیی تەواو
Here is the table of R1, a company router (a 2911 in Packet Tracer). Its LAN is on G0/0, a link to R2 on G0/1 and a link to the Internet provider on G0/2. R2 tells R1 about one network with OSPF; a branch network behind R2 and the way to the Internet were typed as static routes. Every kind of line you will meet in this course is in it.
ئەمە خشتەی R1ـە، کۆمپانیایەک (2911 لە Packet Tracer). لەسەر G0/0ـە، بەستەرێک بۆ R2 لەسەر G0/1 و بەستەرێک بۆ لەسەر G0/2. R2 بە باسی بۆ R1 دەکات؛ لقێک لە پشت R2 و ڕێگەی وەک نووسراون. هەموو جۆرە دێڕێک کە لەم کۆرسەدا دەیبینیت لێرەدایە.
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 203.0.113.1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/30 is directly connected, GigabitEthernet0/1
L 10.1.1.1/32 is directly connected, GigabitEthernet0/1
172.16.0.0/24 is subnetted, 1 subnets
S 172.16.5.0 [1/0] via 10.1.1.2
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
O 192.168.20.0/24 [110/2] via 10.1.1.2, 00:12:41, GigabitEthernet0/1
203.0.113.0/24 is variably subnetted, 2 subnets, 2 masks
C 203.0.113.0/30 is directly connected, GigabitEthernet0/2
L 203.0.113.2/32 is directly connected, GigabitEthernet0/2Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2-10
The Codes legend: what each letter at the start of a line means. It is printed every time.
ڕوونکردنەوەی Codes: هەر پیتێکی سەرەتای دێڕ واتای چییە. هەموو جارێک چاپ دەکرێت.
- Lineدێڕی 12
The gateway of last resort: where packets go when nothing else matches.
gateway of last resort: ئەو شوێنەی بۆی دەچن کاتێک هیچی تر ناگونجێت.
- Lineدێڕی 14
A static default route (S*).
بنەڕەتی (S*).
- Lineدێڕی 19
A static route to the branch network.
بۆ لقەکە.
- Lineدێڕی 23
A route learned from OSPF, with a timer.
ڕێگەیەک کە لە فێر بووە، لەگەڵ کاتژمێرێک.
Reading one line, part by partخوێندنەوەی یەک دێڕ، بەش بە بەش
You already know the idea of a route line from A router’s table: show ip route. Look closely at the O line now. It has six parts, always in the same order; static and connected lines leave some of them out.
بیرۆکەی دێڕی ڕێگەت لە خشتەی ڕێدۆزێک: show ip routeـەوە دەزانیت. ئێستا بە وردی سەیری دێڕی O بکە. شەش بەشی هەیە، هەمیشە بە هەمان ڕیز؛ دێڕە جێگیر و بەستراوەکان هەندێکیان نانووسن.
The two numbers in brackets are the heart of this lesson: the first is the administrative distance (how much R1 trusts the source), the second the metric (how good the path is, measured by that source). A static route shows [1/0]: distance 1, metric 0. Connected and local lines show no brackets at all.
دوو ژمارەکەی ناو کەوانەکە دڵی ئەم وانەیەن: یەکەم ـە (R1 چەند متمانەی بە سەرچاوەکە هەیە)، دووەم ـە (ڕێگاکە چەند باشە، بەو پێوانەیەی سەرچاوەکە دەیپێوێت). [1/0] پیشان دەدات: AD 1، 0. دێڕە بەستراو و ناوخۆییەکان هیچ کەوانەیەکیان نییە.
The route codesکۆدەکانی ڕێگە
The letter at the start of a line is the route’s code. The legend has more than thirty, but these are the ones you will see in this course. A * after a code marks a candidate default route — a route the router may use as its gateway of last resort; you will usually see it as S* (static) and sometimes on routes learned from a protocol, such as O*E2. The OSPF codes O IA and O E2 come back in OSPF areas.
پیتی سەرەتای دێڕێک کۆدی ڕێگەکەیە. ڕوونکردنەوەکە زیاتر لە سی کۆدی تێدایە، بەڵام ئەمانە ئەوانەن کە لەم کۆرسەدا دەیانبینیت. * لە دوای کۆدێکەوە ڕێگەیەکی بەربژێری بنەڕەتی نیشان دەکات — ڕێگەیەک کە دەتوانێت وەک gateway of last resort بەکاری بهێنێت؛ زۆرجار وەک S* (جێگیر) دەیبینیت و هەندێک جار لەسەر ڕێگەی فێربوو لە ، وەک O*E2. کۆدەکانی O IA و O E2ـی لە ناوچەکانی OSPFدا دەگەڕێنەوە.
| Codeکۆد | Meaningواتا | Where it comes fromلە کوێوە دێت |
|---|---|---|
C | connected — a network on one of this router’s up/up interfacesبەستراو — لەسەر یەکێک لە up/upـەکانی ئەم | ip address + no shutdown |
L | local — the interface’s own address as a /32 host routeناوخۆیی — ناونیشانی خودی وەک ڕێگەیەکی /32 | automatic, with every C lineخۆکار، لەگەڵ هەموو دێڕێکی C |
S | static — typed by an administratorجێگیر — نووسیویەتی | ip route … |
S* | static default route — the candidate default (*) بنەڕەتی — بەربژێری بنەڕەتی (*) | ip route 0.0.0.0 0.0.0.0 … |
R | router rip | |
O, O IA, O E2 | OSPF: inside the area, from another area, from outside OSPF (external type 2): لە ناو ناوچەکەدا، لە ناوچەیەکی ترەوە، لە دەرەوەی (external type 2) | router ospf 1 |
D, D EX | EIGRP: internal, external: ناوخۆیی، دەرەکی | router eigrp 10 |
B | router bgp 65001 | |
i L1, i L2 | IS-IS level 1, level 2IS-IS ئاستی 1، ئاستی 2 | router isis |
Heading lines: subnetted and variably subnettedدێڕە سەردێڕەکان: subnetted و variably subnetted
Some lines have no code and are pushed to the left. They are headings, not routes: IOS groups subnets under their old classful network (10.0.0.0/8, 172.16.0.0/16, 192.168.10.0/24 …) to keep the table readable. “is subnetted, 1 subnets” means all the subnets below share one mask, so the child lines leave the mask out (172.16.5.0 is a /24). “is variably subnetted, 2 subnets, 2 masks” means the children have different masks — a /24 and a /32, for example — so each child shows its own.
هەندێک دێڕ هیچ کۆدێکیان نییە و بەرەو چەپ چوون. ئەمانە سەردێڕن، نەک ڕێگە: IOS لە ژێر پۆلدارە کۆنەکەیاندا (10.0.0.0/8، 172.16.0.0/16، 192.168.10.0/24 …) کۆ دەکاتەوە تا خشتەکە ئاسان بخوێنرێتەوە. «is subnetted, 1 subnets» واتە هەموو خوارەوە یەک ماسکیان هەیە، بۆیە دێڕە منداڵەکان ماسکەکە نانووسن (172.16.5.0 /24ـە). «is variably subnetted, 2 subnets, 2 masks» واتە منداڵەکان ماسکی جیاوازیان هەیە — بۆ نموونە /24 و /32 — بۆیە هەر منداڵێک هی خۆی پیشان دەدات.
192.168.20.0/24 has no heading: it is a whole classful network with its natural /24 mask, so IOS prints it on one line. The classful grouping is only a display habit; routers have used classless addressing since 1993 (CIDR).
192.168.20.0/24 سەردێڕی نییە: پۆلداری تەواوە بە ماسکی سروشتیی /24ـی خۆی، بۆیە IOS لە یەک دێڕدا چاپی دەکات. کۆکردنەوەی پۆلدار تەنیا خووی پیشاندانە؛ لە 1993ـەوە ناونیشانکردنی بێپۆل بەکار دەهێنن (CIDR).
The gateway of last resortدێڕی gateway of last resort
The line above the routes answers one question: where do packets go when no route matches? “Gateway of last resort is not set” means nowhere — they are dropped and the sender gets an ICMP Destination Unreachable (match, default route, or drop). When a default route exists, the line names its next hop, as in R1’s table:
ئەو دێڕەی سەرووی ڕێگەکان وەڵامی یەک پرسیار دەداتەوە: کاتێک هیچ ڕێگەیەک ناگونجێت، بۆ کوێ دەچن؟ «Gateway of last resort is not set» واتە بۆ هیچ شوێنێک — فڕێ دەدرێن و نێرەر Destination Unreachableـی وەردەگرێت (گونجان، ڕێگەی بنەڕەتی، یان فڕێدان). کاتێک هەبێت، دێڕەکە ناو دەبات، وەک لە خشتەی R1ـدا:
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 203.0.113.1Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 1
203.0.113.1 is the ISP router’s address — the next hop of the default route 0.0.0.0/0.
203.0.113.1 ناونیشانی — 0.0.0.0/0.
Configuring default routes, and backup ones, is the subject of Default routes and floating static routes.
ڕێکخستنی و یەدەگەکانیان بابەتی ڕێگە بنەڕەتییەکان و ڕێگە جێگیرە یەدەگەکانـە.
A switch’s table and a router’s tableخشتەی سویچێک و خشتەی ڕێدۆزێک
Both devices keep a table, but not the same one. A switch keeps a MAC address table: which MAC address was last seen on which port, learned from the source address of frames (how a switch learns). A router keeps a routing table: which network is reached through which next hop or interface. On Cisco IOS the switch command is show mac address-table; the router command is show ip route.
هەردوو ئامێرەکە خشتەیەکیان هەیە، بەڵام هەمان خشتە نییە. هەڵدەگرێت: کام دوایین جار لەسەر کام بینراوە، لە ناونیشانی سەرچاوەی فێر دەبێت (سویچ چۆن فێر دەبێت). هەڵدەگرێت: کام لە ڕێی کام یان پێی دەگەیت. لە Cisco IOSـدا show mac address-tableـە؛ show ip routeـە.
SW1#show mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
1 0001.6422.a101 DYNAMIC Fa0/1
1 0060.5c3b.2e02 DYNAMIC Fa0/2
1 00d0.97a1.8c03 DYNAMIC Gi0/1Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 1
Two words after
mac:mac address-table. Very old switches usedshow mac-address-tablewith a hyphen.دوو وشە لە دوای
mac:mac address-table. زۆر کۆنەکانshow mac-address-tableـیان بە خەتی ناوەڕاست بەکار دەهێنا.
How a router chooses: three questions in orderڕێدۆز چۆن هەڵدەبژێرێت: سێ پرسیار بە ڕیز
A router often knows several routes that could fit one packet. It decides with three questions, always in this order. 1 — Longest prefix match: of all routes that contain the destination, the one with the longest prefix wins (when several routes match). 2 — Administrative distance: if several sources offer that same prefix, the source with the lowest AD wins. 3 — Metric: if one source offers several paths to that prefix, the lowest metric wins. If two paths are still equal, the router shares the traffic between them.
زۆرجار چەند ڕێگەیەک دەزانێت کە دەکرێت بۆ یەک بگونجێن. بە سێ پرسیار بڕیار دەدات، هەمیشە بەم ڕیزە. 1 — : لەناو هەموو ئەو ڕێگانەی ناونیشانی مەبەستیان تێدایە، ئەوەی درێژترین هەیە دەباتەوە (کاتێک چەند ڕێگەیەک دەگونجێن). 2 — : ئەگەر چەند سەرچاوەیەک هەمان پێشکەش بکەن، ئەو سەرچاوەیەی کەمترین ADـی هەیە دەباتەوە. 3 — : ئەگەر یەک سەرچاوە چەند ڕێگایەک بۆ ئەو پێشکەش بکات، کەمترین دەباتەوە. ئەگەر دوو ڕێگا هێشتا یەکسان بن، هاتوچۆکە لە نێوانیاندا دابەش دەکات.
![Animation, five frames. A funnel with three filters. Frame 1: a packet for 10.5.1.9 and four candidate routes: S* 0.0.0.0/0 [1/0], O 10.5.0.0/16 [110/3], R 10.5.1.0/24 [120/2], D 10.5.1.0/24 [90/3072]. Frame 2, filter 1 longest prefix: the /0 and /16 routes drop out; the two /24 routes stay. Frame 3, filter 2 administrative distance: EIGRP 90 beats RIP 120. Frame 4, filter 3 metric: only one route is left, nothing to compare. Frame 5: the winner D 10.5.1.0/24 via 10.3.3.2 — the packet leaves on that path.](/_astro/net-routing-table-and-route-sources-funnel.en.ZavwHOby.gif)
![Animation, five frames. A funnel with three filters. Frame 1: a packet for 10.5.1.9 and four candidate routes: S* 0.0.0.0/0 [1/0], O 10.5.0.0/16 [110/3], R 10.5.1.0/24 [120/2], D 10.5.1.0/24 [90/3072]. Frame 2, filter 1 longest prefix: the /0 and /16 routes drop out; the two /24 routes stay. Frame 3, filter 2 administrative distance: EIGRP 90 beats RIP 120. Frame 4, filter 3 metric: only one route is left, nothing to compare. Frame 5: the winner D 10.5.1.0/24 via 10.3.3.2 — the packet leaves on that path.](/_astro/net-routing-table-and-route-sources-funnel.ckb.CY5qWGdv.gif)
How a router chooses: three questions in orderڕێدۆز چۆن هەڵدەبژێرێت: سێ پرسیار بە ڕیز
Worked example: four offers for one packetنموونەی کارپێکراو: چوار پێشنیار بۆ یەک پاکێت
A router has these four routes on offer (the next hops are its three neighbours). Follow the questions for three packets.
ئەم چوار ڕێگەیەی بۆ پێشکەش کراوە ( سێ دراوسێکەین). پرسیارەکان بۆ سێ بەدوا بگرە.
| Offered routeڕێگەی پێشکەشکراو | Source, [AD/metric]سەرچاوە، [AD/metric] | Installed?دانرا؟ | |
|---|---|---|---|
0.0.0.0/0 | static, [1/0]جێگیر، [1/0] | 192.0.2.1 | yes (only source for /0)بەڵێ (تاکە سەرچاوەی /0) |
10.5.0.0/16 | OSPF, [110/3]، [110/3] | 10.1.1.2 | yes (only source for /16)بەڵێ (تاکە سەرچاوەی /16) |
10.5.1.0/24 | RIP, [120/2]، [120/2] | 10.2.2.2 | no — loses on ADنەخێر — لە AD دەدۆڕێت |
10.5.1.0/24 | EIGRP, [90/3072]، [90/3072] | 10.3.3.2 | yes — AD 90 < 120بەڵێ — AD 90 < 120 |
- 10.5.1.9 matches /0, /16 and /24. Longest: /24 → the EIGRP route → next hop 10.3.3.2.
- 10.5.7.7 matches /0 and /16 only (it is outside 10.5.1.0/24). Longest: /16 → OSPF → 10.1.1.2.
- 192.0.2.80 matches only /0 → the default route → 192.0.2.1.
- 10.5.1.9 لەگەڵ
/0،/16و/24دەگونجێت. درێژترین:/24← ڕێگەی ← 10.3.3.2. - 10.5.7.7 تەنیا لەگەڵ
/0و/16دەگونجێت (لە دەرەوەی 10.5.1.0/24ـە). درێژترین:/16← ← 10.1.1.2. - 192.0.2.80 تەنیا لەگەڵ
/0دەگونجێت ← ← 192.0.2.1.
Administrative distance: how much the router trusts a sourceمەودای بەڕێوەبەری: ڕێدۆزەکە چەند متمانەی بە سەرچاوەیەک هەیە
Routers support several routing protocols — RIP, OSPF, EIGRP, IS-IS, BGP — and one network can run more than one, so a router can hear about the same network from several sources. Their metrics cannot be compared: RIP counts hops, OSPF adds up costs. So each source gets a number, the administrative distance (AD): how believable that source is on this router. The lower the number, the more the router trusts it.
پشتگیری چەند دەکەن — ، ، ، IS-IS، — و یەک دەتوانێت زیاتر لە یەکێکیان کارپێبکات، بۆیە دەتوانێت لەبارەی هەمان لە چەند سەرچاوەیەکەوە ببیستێت. بەراورد ناکرێن: دەژمێرێت، تێچووەکان کۆ دەکاتەوە. بۆیە هەر سەرچاوەیەک ژمارەیەک وەردەگرێت، (AD): ئەو سەرچاوەیە لەسەر ئەم چەند باوەڕپێکراوە. ژمارەکە هەتا کەمتر بێت، زیاتر متمانەی پێی هەیە.
A number from 0 to 255 that says how much a router trusts a source of routes; when two sources offer the same network, the lower AD wins: connected 0, static 1, EIGRP 90, OSPF 110, RIP 120, iBGP 200; 255 means 'never use'.
ژمارەیەکە لە 0 تا 255 کە دەڵێت چەند متمانەی بە سەرچاوەیەکی ڕێگاکان هەیە؛ کاتێک دوو سەرچاوە هەمان ڕایەڵە پێشکەش دەکەن، کەمترەکە دەباتەوە: بەستراو 0، جێگیر 1، EIGRP 90، OSPF 110، RIP 120، iBGP 200؛ 255 واتە 'هەرگیز بەکاری مەهێنە'.
You are looking for a shop in the Sulaimani bazaar. You see its sign yourself — you believe it completely (connected, 0). Your own note from yesterday says “third lane on the left” — almost as good (static, 1). Then two people give directions: a shopkeeper who has worked there for years, and a visitor who walked through once. You follow the shopkeeper (lower AD), even if the visitor’s way sounds shorter.
بەدوای دوکانێکدا دەگەڕێیت لە بازاڕی سلێمانی. تابلۆکەی خۆت دەبینیت — تەواو باوەڕی پێ دەکەیت (بەستراو، 0). تێبینییەکی خۆت لە دوێنێوە دەڵێت «کۆڵانی سێیەم لە چەپ» — نزیکەی هێندە باشە (جێگیر، 1). پاشان دوو کەس ڕێنوێنیت دەکەن: دوکاندارێک کە ساڵانێکە لەوێ کار دەکات و میوانێک کە یەک جار بەوێدا تێپەڕیوە. بەدوای دوکاندارەکەدا دەڕۆیت (ADـی کەمتر)، تەنانەت ئەگەر ڕێگاکەی میوانەکە کورتتر دەربکەوێت.
Where the analogy stops workingسنووری ئەم نموونەیە
A router does not learn whom to trust from experience: the AD values are fixed defaults (an administrator can change them), and they are compared only when two sources describe exactly the same network.
لە ئەزموونەوە فێر نابێت متمانە بە کێ بکات: بەهاکانی AD بنەڕەتی و جێگیرن ( دەتوانێت بیانگۆڕێت) و تەنیا کاتێک بەراورد دەکرێن کە دوو سەرچاوە ڕێک باسی هەمان بکەن.
The default AD valuesبەها بنەڕەتییەکانی AD
These are Cisco’s default values (Cisco’s AD page, updated July 2026). You must know connected, static, eBGP, EIGRP, OSPF, IS-IS, RIP, external EIGRP and iBGP by heart; the others complete the picture. A static route keeps AD 1 in all its forms, even when it names only an exit interface (Next hop, exit interface, or both). Each protocol gets its own lesson later, starting with what OSPF is.
ئەمانە بەها بنەڕەتییەکانی Ciscoـن (لاپەڕەی ADـی Cisco، نوێکراوە لە تەممووزی 2026). دەبێت بەستراو، جێگیر، eBGP، ، ، IS-IS، ، دەرەکی و iBGP لەبەر بکەیت؛ ئەوانی تر وێنەکە تەواو دەکەن. بە هەموو شێوەکانی ADـی 1 دەمێنێتەوە، تەنانەت کاتێک تەنیا ناو دەبات (بازی دواتر، نێوبەستەی دەرچوون یان هەردووکیان). هەر دواتر وانەی خۆی هەیە، بە OSPF چییە دەست پێ دەکات.
| Route sourceسەرچاوەی ڕێگە | Default ADADـی بنەڕەتی | Noteتێبینی |
|---|---|---|
| Connected interface بەستراو | 0 | — |
| 1 | — | |
| EIGRP summary routeڕێگەی کورتکراوەی | 5 | a summary made by EIGRP itself (route summarization)کورتکراوەیەک کە خۆی دروستی دەکات (ڕاپوختکردن) |
| External BGP (eBGP) دەرەکی (eBGP) | 20 | routes from another autonomous systemڕێگەکان لە ترەوە |
| Internal EIGRP ناوخۆیی | 90 | — |
| IGRP | 100 | history: removed from Cisco IOS in release 12.2(13)T; EIGRP replaced itمێژوو: لە وەشانی 12.2(13)Tـی Cisco IOS لابرا؛ جێگەی گرتەوە |
| 110 | — | |
| IS-IS | 115 | — |
| 120 | — | |
| EGP | 140 | history: the protocol before BGPمێژوو: ئەو پێش |
| ODR (On Demand Routing) | 160 | rare, for hub-and-spoke networksدەگمەن، بۆ ناوەند و لق |
| External EIGRP دەرەکی | 170 | routes brought into EIGRP from outside (D EX)ئەو ڕێگانەی لە دەرەوە هێنراونەتە ناو (D EX) |
| Internal BGP (iBGP) ناوخۆیی (iBGP) | 200 | — |
| Default route from DHCP لە | 254 | installed by ip address dhcp on an interfaceبە ip address dhcp لەسەر دادەنرێت |
| Unknown / unusableنەناسراو / بەکارنەهاتوو | 255 | never installed in the tableهەرگیز لە خشتەکەدا دانانرێت |
A memory trick for the AD tableفێڵێکی لەبەرکردن بۆ خشتەی AD
A sentence whose words start with the same letters as the sources, in order of AD: “Cats Stepped by Eight Intelligent Owls in Row, Done Uselessly.” Cats = Connected 0, Stepped = Static 1, by = (e)BGP 20, Eight = EIGRP 90, Intelligent = IGRP 100, Owls = OSPF 110, in = IS-IS 115, Row = RIP 120, Done = DHCP default route 254, Uselessly = unusable 255.
ڕستەیەک کە وشەکانی بە هەمان پیتی سەرچاوەکان دەست پێ دەکەن، بە ڕیزی AD: «Cats Stepped by Eight Intelligent Owls in Row, Done Uselessly.» Cats = Connected 0، Stepped = Static 1، by = (e)BGP 20، Eight = EIGRP 90، Intelligent = IGRP 100، Owls = OSPF 110، in = IS-IS 115، Row = RIP 120، Done = 254، Uselessly = بەکارنەهاتوو 255.
Then learn the jumps between the numbers:
پاشان بازدانەکانی نێوان ژمارەکان فێر ببە:
In Kurdish the sentence means «پشیلەکان لەلایەن ٨ کونەپەپووی زیرەکەوە لە ڕیزێکدا پێیان پێدا نرا، بەبێمانایی ئەنجامدرا.» The picture helps you remember the order, but the first letters work only in English, because the sources keep their English names (Connected, Static, BGP …) on the router.
لە کوردیدا ڕستەکە واتای ئەمەیە: «پشیلەکان لەلایەن ٨ کونەپەپووی زیرەکەوە لە ڕیزێکدا پێیان پێدا نرا، بەبێمانایی ئەنجامدرا.» وێنەکە یارمەتیت دەدات ڕیزەکە لەبیر بێت، بەڵام پیتە سەرەتاییەکان تەنیا بە ئینگلیزی کار دەکەن، چونکە سەرچاوەکان لەسەر ناوە ئینگلیزییەکانیان دەمێنێتەوە (Connected، Static، BGP …).
Two examples: the lower AD winsدوو نموونە: ADـی کەمتر دەباتەوە
Example 1. Router A is joined to router B by two cables. One link runs OSPF, the other RIP, and both tell A how to reach B’s networks. OSPF’s AD is 110 and RIP’s is 120, so A installs the OSPF route and sends its data to B over the OSPF link. The RIP route stays out of the table — but if the OSPF link fails, it moves in.
نموونەی 1. A بە دوو کێبڵ بە B بەستراوە. بەستەرێکیان کارپێدەکات و ئەوی تر ، هەردووکیان بە A دەڵێن چۆن بگاتە B. 110ـە و هی 120، بۆیە A ڕێگەی دادەنێت و لە ڕێی بەستەری بۆ B دەنێرێت. ڕێگەی لە دەرەوەی خشتەکە دەمێنێتەوە — بەڵام ئەگەر بەستەری بپچڕێت، دێتە ناوەوە.
Example 2. Network 10.0.0.0/24 is connected to both R2 and R3. R2 advertises it to R1 with RIP, R3 with EIGRP. EIGRP’s AD (90) is lower than RIP’s (120), so R1 installs the route via R3 and sends every packet for 10.0.0.0/24 to R3: D 10.0.0.0/24 [90/…] via R3.
نموونەی 2. 10.0.0.0/24 بە هەردوو R2 و R3ـەوە بەستراوە. R2 بە بۆ R1ـی ڕادەگەیەنێت، R3 بە . ADـی (90) لە هی (120) کەمترە، بۆیە R1 ڕێگەکە لە ڕێی R3ـەوە دادەنێت و هەموو بۆ 10.0.0.0/24 دەنێرێت بۆ R3: D 10.0.0.0/24 [90/…] via R3.
AD or metric?AD یان پێوانە؟
The two numbers answer different questions. AD compares sources: “which protocol do I believe?” The metric compares paths inside one source: “of the roads this protocol knows, which is best?” So when one router hears 192.168.1.0/24 from two OSPF neighbours, both offers have the same AD — 110, because AD belongs to OSPF, not to the neighbour — and the router compares the OSPF cost. The path with the lower cost wins. What each protocol’s metric measures is explained in Metrics.
دوو ژمارەکە وەڵامی دوو پرسیاری جیاواز دەدەنەوە. AD سەرچاوەکان بەراورد دەکات: «باوەڕ بە کام بکەم؟» ڕێگاکانی ناو یەک سەرچاوە بەراورد دەکات: «لەو ڕێگایانەی ئەم دەیانزانێت، کامیان باشترینە؟» بۆیە کاتێک 192.168.1.0/24 لە دوو دراوسێی دەبیستێت، هەردوو پێشنیارەکە هەمان ADـیان هەیە — 110، چونکە AD هی ، نەک هی دراوسێکە — و بەراورد دەکات. ڕێگای تێچوو کەمتر دەباتەوە. ئەوەی هەر دەیپێوێت لە پێوانەکاندا ڕوون کراوەتەوە.
| Questionپرسیار | ||
|---|---|---|
| Comparesبەراورد دەکات | different sources of the same prefixسەرچاوە جیاوازەکانی هەمان | different paths from one sourceڕێگا جیاوازەکانی یەک سەرچاوە |
| Set byدیاری دەکرێت لەلایەن | Cisco defaults, changeable on the routerبنەڕەتەکانی Cisco، لەسەر دەگۆڕدرێت | the protocol: hops (RIP), cost (OSPF), bandwidth + delay (EIGRP): ()، تێچوو ()، + () |
| Sent to neighbours?بۆ دراوسێکان دەنێردرێت؟ | never — local onlyهەرگیز — تەنیا ناوخۆیی | yes, inside routing updatesبەڵێ، لە ناو نوێکردنەوەکانی |
| In bracketsلە کەوانەدا | first number: [110/2]ژمارەی یەکەم: [110/2] | second number: [110/2]ژمارەی دووەم: [110/2] |
Seeing one route’s details, and changing ADبینینی وردەکاریی یەک ڕێگە و گۆڕینی AD
Add a network address to show ip route and IOS prints that one route in full words: Known via “static”, distance 1, metric 0 — the same two numbers as in the brackets.
ناونیشانی بخە دوای show ip route و IOS تەنیا ئەو ڕێگەیە بە وشەی تەواو چاپ دەکات: Known via “static”, distance 1, metric 0 — هەمان دوو ژمارەی ناو کەوانەکە.
R1#show ip route 172.16.5.0
Routing entry for 172.16.5.0/24
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 10.1.1.2
Route metric is 0, traffic share count is 1AD can be changed, but only on the router where you type it, and it is never sent to neighbours. For a static route, add the distance at the end of ip route — a static route with a higher AD becomes a backup, a floating static route (next-but-one lesson). For a whole protocol, use distance in its configuration mode:
AD دەگۆڕدرێت، بەڵام تەنیا لەسەر ئەو لێی دەنووسیت و هەرگیز بۆ دراوسێکان نانێردرێت. بۆ ، ژمارەی AD بخە کۆتایی ip route — بە ADـی بەرزتر دەبێتە یەدەگ، (دوو وانە دواتر). بۆ هەموو ، distance لە باری ڕێکخستنەکەیدا بەکار بهێنە:
R1(config)#router ospf 1
R1(config-router)#distance 85
R1(config-router)#end
R1#copy running-config startup-configExplain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2
Local only: R2 keeps 110 for its OSPF routes. Change defaults only with a reason, and the same way on every router that needs it.
تەنیا ناوخۆیی: R2 بۆ ڕێگەکانی خۆی 110 دەهێڵێتەوە. بەهای بنەڕەتی تەنیا بە هۆیەک بگۆڕە و لەسەر هەموو ئەو پێویستیانە بە هەمان شێوە.
Common mistakesهەڵە باوەکان
Exercisesڕاهێنانەکان
Use R1’s full table from the beginning of the lesson. (a) Which routes did R1 add by itself? (b) Where does R1 send packets for 172.16.5.20, 192.168.20.77 and 192.0.2.10? (c) Which route was learned from a routing protocol, and how old is it?
خشتە تەواوەکەی R1 لە سەرەتای وانەکەوە بەکار بهێنە. (ئ) R1 خۆی کام ڕێگانەی زیاد کردووە؟ (ب) R1 بۆ 172.16.5.20، 192.168.20.77 و 192.0.2.10 بۆ کوێ دەنێرێت؟ (ج) کام ڕێگە لە فێر بووە و تەمەنی چەندە؟
Show answerوەڵامەکە پیشان بدە
- (a) The six C and L lines: 10.1.1.0/30 and 10.1.1.1/32, 192.168.10.0/24 and 192.168.10.1/32, 203.0.113.0/30 and 203.0.113.2/32.
- (b) 172.16.5.20 matches
S 172.16.5.0/24 via 10.1.1.2. 192.168.20.77 matchesO 192.168.20.0/24 via 10.1.1.2, out of G0/1. 192.0.2.10 matches nothing else, so it takesS* 0.0.0.0/0 via 203.0.113.1. - (c) O 192.168.20.0/24, from OSPF; it was learned or refreshed 12 minutes 41 seconds ago (00:12:41).
- (ئ) شەش دێڕەکەی C و L: 10.1.1.0/30 و 10.1.1.1/32، 192.168.10.0/24 و 192.168.10.1/32، 203.0.113.0/30 و 203.0.113.2/32.
- (ب) 172.16.5.20 لەگەڵ
S 172.16.5.0/24 via 10.1.1.2دەگونجێت. 192.168.20.77 لەگەڵO 192.168.20.0/24 via 10.1.1.2دەگونجێت و لە G0/1ـەوە دەڕوات. 192.0.2.10 لەگەڵ هیچی تر ناگونجێت، بۆیەS* 0.0.0.0/0 via 203.0.113.1دەیبات. - (ج) O 192.168.20.0/24، لە ؛ 12 خولەک و 41 چرکە لەمەوبەر فێر بووە یان نوێ کراوەتەوە (00:12:41).
Order from most to least trusted, with each default AD: RIP, iBGP, connected, OSPF, static, eBGP, internal EIGRP, external EIGRP, IS-IS.
لە زۆرترین متمانەوە بۆ کەمترین ڕیزیان بکە، لەگەڵ ADـی بنەڕەتیی هەریەکەیان: ، iBGP، بەستراو، ، جێگیر، eBGP، ناوخۆیی، دەرەکی، IS-IS.
Hintئاماژە
Use the sentence about the cats and the owls.
ڕستەکەی پشیلە و کونەپەپووەکان بەکار بهێنە.
Show answerوەڵامەکە پیشان بدە
- connected — 0
- static — 1
- eBGP — 20
- internal EIGRP — 90
- OSPF — 110
- IS-IS — 115
- RIP — 120
- external EIGRP — 170
- iBGP — 200
- بەستراو بە ADـی 0
- جێگیر بە ADـی 1
- eBGP بە ADـی 20
- ناوخۆیی بە ADـی 90
- بە ADـی 110
- IS-IS بە ADـی 115
- بە ADـی 120
- دەرەکی بە ADـی 170
- iBGP بە ADـی 200
R5 is offered 10.0.0.0/24 by RIP [120/1], by OSPF [110/20] and by eBGP [20/0]. It also has a static route 10.0.0.0/16 [1/0]. (a) Which 10.0.0.0/24 route is installed? (b) Which route carries a packet for 10.0.0.5? (c) And for 10.0.9.5?
10.0.0.0/24 لەلایەن [120/1]، [110/20] و eBGP [20/0]ـەوە بۆ R5 پێشکەش کراوە. هەروەها 10.0.0.0/16 [1/0]ـی هەیە. (ئ) کام ڕێگەی 10.0.0.0/24 دادەنرێت؟ (ب) کام ڕێگە بۆ 10.0.0.5 هەڵدەگرێت؟ (ج) بۆ 10.0.9.5ـیش؟
Show answerوەڵامەکە پیشان بدە
- (a) The eBGP route: AD 20 is the lowest of the three sources of this /24.
- (b) 10.0.0.5 is inside both the /24 and the /16: the longer /24 wins, so the eBGP route — even though the static route has AD 1.
- (c) 10.0.9.5 is outside 10.0.0.0/24 (which ends at 10.0.0.255) but inside 10.0.0.0/16, so the static route.
- (ئ) ڕێگەی eBGP: AD 20 کەمترینی سێ سەرچاوەکەی ئەم
/24ـەیە. - (ب) 10.0.0.5 لە ناو هەردوو
/24و/16ـدایە:/24ـی درێژتر دەباتەوە، کەواتە ڕێگەی eBGP — هەرچەندە AD 1ـی هەیە. - (ج) 10.0.9.5 لە دەرەوەی 10.0.0.0/24ـە (کە بە 10.0.0.255 کۆتایی دێت) بەڵام لە ناو 10.0.0.0/16ـدایە، کەواتە .
A student writes: “Router A hears 192.168.1.0/24 from two OSPF routers with different AD values, 110 and 120, and picks the one with 110.” What is wrong, and what really happens?
قوتابییەک دەنووسێت: « A 192.168.1.0/24 لە دوو دەبیستێت بە دوو بەهای ADـی جیاواز (110 و 120) و ئەوەی 110 هەڵدەبژێرێت.» چی هەڵەیە و لە ڕاستیدا چی ڕوو دەدات؟
Show answerوەڵامەکە پیشان بدە
AD belongs to the source, not to the neighbour: every OSPF route has AD 110 (120 is RIP’s value). With two OSPF offers for one prefix, router A compares the OSPF cost and installs the cheaper path; equal costs would both be installed and share the traffic.
AD هی سەرچاوەکەیە، نەک هی دراوسێکە: هەموو ڕێگەیەکی AD 110ـی هەیە (120 بەهای ). بە دوو پێشنیاری بۆ یەک ، A بەراورد دەکات و ڕێگا هەرزانترەکە دادەنێت؛ تێچووی یەکسان هەردووکیان دادەنرێن و هاتوچۆ دابەش دەکەن.
For each question, name the device and the command: (a) Which port leads to the PC with MAC 0001.6422.a101? (b) Which next hop leads to 172.16.5.0/24? (c) Is there a gateway of last resort?
بۆ هەر پرسیارێک ئامێرەکە و ناو ببە: (ئ) کام دەچێت بۆ ئەو PCـەی 0001.6422.a101ـە؟ (ب) کام دەچێت بۆ 172.16.5.0/24؟ (ج) gateway of last resort هەیە؟
Show answerوەڵامەکە پیشان بدە
- (a) The switch:
show mac address-table(Fa0/1 in SW1’s table). - (b) The router:
show ip route(orshow ip route 172.16.5.0) — via 10.1.1.2. - (c) The router: the line above the routes in
show ip route— 203.0.113.1.
- (ئ) :
show mac address-table(Fa0/1 لە خشتەی SW1ـدا). - (ب) :
show ip route(یانshow ip route 172.16.5.0) — via 10.1.1.2. - (ج) : ئەو دێڕەی سەرووی ڕێگەکان لە
show ip routeـدا — 203.0.113.1.
Summaryکورتە
- Routes come from three sources: connected (C, with L for the interface’s own /32), static (S, S* for the default) and dynamic (R, O, D, B, i).
- A route line reads: code, network/prefix, [AD/metric], via next hop, age, exit interface. Lines without a code are headings.
- “Gateway of last resort” names the default route’s next hop, or says “not set”.
- A switch maps MAC → port (
show mac address-table); a router maps network → next hop (show ip route). - A router chooses by longest prefix match first, then AD between sources of the same prefix, then the metric inside one protocol.
- Default AD: connected 0, static 1, EIGRP summary 5, eBGP 20, EIGRP 90, IGRP 100 (history), OSPF 110, IS-IS 115, RIP 120, external EIGRP 170, iBGP 200, DHCP default 254, 255 never. Lower wins; AD is local.
- ڕێگەکان لە سێ سەرچاوەوە دێن: بەستراو (C، لەگەڵ L بۆ
/32ـی خودی )، جێگیر (S، S* بۆ بنەڕەت) و بزۆک (R، O، D، B، i). - دێڕێکی ڕێگە بەم شێوەیە دەخوێنرێتەوە: کۆد، /، [AD/metric]، via ، تەمەن، . دێڕی بێکۆد سەردێڕن.
- «Gateway of last resort» ناو دەبات، یان دەڵێت «not set».
- MAC ← دەبەستێتەوە (
show mac address-table)؛ ← (show ip route). - سەرەتا بە هەڵدەبژێرێت، پاشان بە AD لە نێوان سەرچاوەکانی هەمان ، پاشان بە لە ناو یەک .
- ADـی بنەڕەتی: بەستراو 0، جێگیر 1، کورتکراوەی 5، eBGP 20، 90، IGRP 100 (مێژوو)، 110، IS-IS 115، 120، دەرەکی 170، iBGP 200، بنەڕەتیی 254، 255 هەرگیز. کەمتر دەباتەوە؛ AD ناوخۆییە.
Next: type your own routes — Static routes.
دواتر: ڕێگەکانی خۆت بنووسە — ڕێگە جێگیرەکان.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Static Routesڕێگە جێگیرەکان
Related lecturesوانە پەیوەندیدارەکان
- Static Routesڕێگە جێگیرەکان
- Default Routes and Floating Static Routesڕێگە بنەڕەتییەکان و ڕێگە جێگیرە یەدەگەکان
- How Routers Learn Routes: Routing Protocols, Metrics and Loopsڕێدۆزەکان چۆن ڕێگەکان فێر دەبن: پرۆتۆکۆڵەکانی ڕێدۆزی، پێوانەکان و ئەڵقەکانی ڕێدۆزی
- Bridges and Switchesپردەکانی ڕایەڵە و سویچەکان
- 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: ڕێدۆزی لە نێوان سیستەمە سەربەخۆکاندا
- Route Summarizationڕاپوختکردن
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
- Cisco: What Is Administrative Distance? (default AD table; lower values preferred; AD is local and not advertised; updated 20 July 2026)
- Cisco: Configure a Gateway of Last Resort Using IP Commands (IOS 15 show ip route legend, S* and “Gateway of last resort” lines; updated 24 April 2025)
- Cisco: Configure Administrative Distance for DHCP Default Route (default AD 254)
- Cisco IOS: Removal of legacy features in 12.2(13)T (IGRP)
- RFC 4632: Classless Inter-domain Routing (CIDR) — longest-match forwarding
- Cisco Press: Switching, Routing, and Wireless Essentials Companion Guide (CCNAv7) — routing concepts
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.