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ـی بنەڕەتی، فێڵێکی لەبەرکردن و نموونەی کارپێکراو.

20 min read21 خولەک خوێندنەوە · 18 stepsهەنگاو

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

  • Name the three sources of routes and read every code of show ip route used 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 دەیاننووسێت. ڕێگە بزۆکەکان کاتێک فێر دەبن کە کارپێدەکەن و هەر کە دەیناسن بە یەکتری دەڵێن.

Three sources feed one routing table. Left, top: an interface with ip address and no shutdown → C and L routes (connected and local). Middle: an administrator typing ip route → S routes (static, S* for the default route). Bottom: two routers exchanging routing updates with a routing protocol → R, O, D, B, i routes (dynamic). All three arrows end in R1’s routing table on the right.سێ سەرچاوە یەک خشتەی ڕێدۆزی پڕ دەکەنەوە. لە چەپ، لە سەرەوە: نێوبەستەیەک بە ip address و no shutdown ← ڕێگەی C و L (ڕێگەی بەستراو و ناوخۆیی). لە ناوەڕاست: بەڕێوەبەرێکی ڕایەڵە کە ip route دەنووسێت ← ڕێگەی S (ڕێگەی جێگیر، S* بۆ ڕێگەی بنەڕەتی). لە خوارەوە: دوو ڕێدۆز کە بە پرۆتۆکۆڵێکی ڕێدۆزی زانیاریی ڕێگە ئاڵوگۆڕ دەکەن ← ڕێگەی R، O، D، B، i (ڕێدۆزیی بزۆک). هەر سێ تیرەکە لە خشتەی ڕێدۆزیی R1 لە لای ڕاست کۆتایی دێن.
Connected, static, dynamic: the code letter at the start of each line tells you which source a route came from.بەستراو، جێگیر، بزۆک: پیتی کۆدی سەرەتای هەر دێڕێک پێت دەڵێت ڕێگەکە لە کام سەرچاوەوە هاتووە.CêIT

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’s whole routing table (IOS 15 format)هەموو خشتەی ڕێدۆزیی ⁦R1⁩ (شێوەی ⁦IOS 15⁩)TEXT
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/2
Explain 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.

ڕێگەیەک کە لە فێر بووە، لەگەڵ کاتژمێرێک.

The network behind the table. R1 in the middle. Left: LAN 192.168.10.0/24 with PC1 on G0/0 (192.168.10.1), marked C and L. Right: link 10.1.1.0/30 on G0/1 to R2 (10.1.1.2), marked C and L; behind R2 the network 192.168.20.0/24 (learned by OSPF, marked O) and the branch 172.16.5.0/24 (typed by hand, marked S). Top: link 203.0.113.0/30 on G0/2 to the ISP router 203.0.113.1 and the Internet, marked S* — everything else.ڕایەڵەکەی پشت خشتەکە. R1 لە ناوەڕاستدا. چەپ: ڕایەڵەی ناوچەیی 192.168.10.0/24 بە PC1 لەسەر G0/0 (192.168.10.1)، نیشانەی C و L. ڕاست: بەستەری 10.1.1.0/30 لەسەر G0/1 بۆ R2 (10.1.1.2)، نیشانەی C و L؛ لە پشت R2 ڕایەڵەکە 192.168.20.0/24 (بە OSPF فێربووە، نیشانەی O) و لقەکە 172.16.5.0/24 (بە دەست نووسراوە، نیشانەی S). سەرەوە: بەستەری 203.0.113.0/30 لەسەر G0/2 بۆ ڕێدۆزی دابینکەری ئینتەرنێت 203.0.113.1 و ئینتەرنێت، نیشانەی S* — هەموو شتێکی تر.
Every network in the picture has one line in R1’s table; the letter shows how R1 learned it.هەر ناو وێنەکە دێڕێکی لە خشتەی ⁦R1⁩ـدا هەیە؛ پیتەکە پیشان دەدات ⁦R1⁩ چۆن فێری بووە.CêIT

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 line O 192.168.20.0/24 [110/2] via 10.1.1.2, 00:12:41, GigabitEthernet0/1 with six labelled parts. 1 O: the code — the source, here OSPF. 2 192.168.20.0/24: the destination network and its prefix length. 3 [110/2]: administrative distance 110 / metric 2. 4 via 10.1.1.2: the next hop, the neighbour router’s address. 5 00:12:41: how long ago the route was learned or refreshed (dynamic routes only). 6 GigabitEthernet0/1: the exit interface of this router.دێڕی O 192.168.20.0/24 [110/2] via 10.1.1.2, 00:12:41, GigabitEthernet0/1 بە شەش بەشی ناونراو. 1 O: کۆد — سەرچاوەکە، لێرەدا OSPF. 2 192.168.20.0/24: ڕایەڵەی مەبەست و درێژیی پێشگرەکەی. 3 [110/2]: مەودای بەڕێوەبەری 110 / پێوانە 2. 4 via 10.1.1.2: بازە دواترەکە، ناونیشانی ڕێدۆزی دراوسێ. 5 00:12:41: چەند لەمەوبەر ڕێگەکە فێر بووە یان نوێ کراوەتەوە (تەنیا بۆ ڕێگە بزۆکەکان). 6 GigabitEthernet0/1: نێوبەستەی دەرچوونی ئەم ڕێدۆزە.
Code, network, [AD/metric], next hop, age, exit interface.کۆد، ، ⁦[AD/metric]⁩، ، تەمەن، .CêIT

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دا دەگەڕێنەوە.

The codes of show ip route used in this course (IOS 15 and IOS XE use the same letters)کۆدەکانی show ip route کە لەم کۆرسەدا بەکار دێن (⁦IOS 15⁩ و IOS XE هەمان پیت بەکار دەهێنن)
CodeکۆدMeaningواتاWhere it comes fromلە کوێوە دێت
Cconnected — a network on one of this router’s up/up interfacesبەستراو — لەسەر یەکێک لە ⁦up/up⁩ـەکانی ئەم ip address + no shutdown
Llocal — the interface’s own address as a /32 host routeناوخۆیی — ناونیشانی خودی وەک ڕێگەیەکی /32automatic, with every C lineخۆکار، لەگەڵ هەموو دێڕێکی C
Sstatic — typed by an administratorجێگیر — نووسیویەتیip route …
S*static default route — the candidate default (*) بنەڕەتی — بەربژێری بنەڕەتی ⁦(*)⁩ip route 0.0.0.0 0.0.0.0 …
Rrouter rip
O, O IA, O E2OSPF: inside the area, from another area, from outside OSPF (external type 2): لە ناو ناوچەکەدا، لە ناوچەیەکی ترەوە، لە دەرەوەی ⁦(external type 2)⁩router ospf 1
D, D EXEIGRP: internal, external: ناوخۆیی، دەرەکیrouter eigrp 10
Brouter bgp 65001
i L1, i L2IS-IS level 1, level 2⁦IS-IS⁩ ئاستی 1، ئاستی 2router isis
The route codes grouped by source. Green group, the router itself: C connected, L local. Orange group, typed by hand: S static, S* static default. Blue group, learned from routing protocols: R RIP, O OSPF, D EIGRP, B BGP, i IS-IS. A star means candidate default.کۆدەکانی ڕێگە بەپێی سەرچاوە گرووپ کراون. گرووپی سەوز، خودی ڕێدۆزەکە: C بەستراو، L ناوخۆیی. گرووپی پرتەقاڵی، بە دەست نووسراو: S جێگیر، S* جێگیری بنەڕەتی. گرووپی شین، فێربوو لە پرۆتۆکۆڵەکانی ڕێدۆزییەوە: R RIP، O OSPF، D EIGRP، B BGP، i IS-IS. ئەستێرە واتە بەربژێری بنەڕەتی.
Three groups of letters for the three sources of routes.سێ گرووپ پیت بۆ سێ سەرچاوەکەی ڕێگە.CêIT

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 — بۆیە هەر منداڵێک هی خۆی پیشان دەدات.

Two heading groups from R1’s table. Group 1: the heading 172.16.0.0/24 is subnetted, 1 subnets — one mask for all — with the child S 172.16.5.0 [1/0] via 10.1.1.2 (no mask shown, it is /24). Group 2: the heading 192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks, with the children C 192.168.10.0/24 and L 192.168.10.1/32, each with its own mask. Note: a heading is not a route; packets are never matched against it.دوو گرووپی سەردێڕ لە خشتەی R1. گرووپی 1: سەردێڕی 172.16.0.0/24 is subnetted, 1 subnets — یەک ماسک بۆ هەمووان — لەگەڵ منداڵی S 172.16.5.0 [1/0] via 10.1.1.2 (ماسک پیشان نەدراوە، /24ـە). گرووپی 2: سەردێڕی 192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks، لەگەڵ منداڵەکانی C 192.168.10.0/24 و L 192.168.10.1/32، هەریەکەیان بە ماسکی خۆی. تێبینی: سەردێڕ ڕێگە نییە؛ پاکێتەکان هەرگیز لەگەڵیدا بەراورد ناکرێن.
Headings group subnets; the routes are the indented lines with a code.سەردێڕەکان کۆ دەکەنەوە؛ ڕێگەکان ئەو دێڕە ناوخراوانەن کە کۆدیان هەیە.CêIT

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⁩ـدا:

R1: the default route and the gateway it creates⁦R1⁩: ڕێگەی بنەڕەتی و ئەو gatewayـەی دروستی دەکاتTEXT
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
Explain 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⁩.

Two states of the same line. Top, red: Gateway of last resort is not set — a packet for an unknown network (192.0.2.50) is dropped and an ICMP Destination Unreachable goes back. Bottom, green: Gateway of last resort is 203.0.113.1 to network 0.0.0.0 — the same packet leaves through G0/2 towards the ISP.دوو باری هەمان دێڕ. سەرەوە، سوور: Gateway of last resort is not set — پاکێتێک بۆ ڕایەڵەیەکی نەناسراو (192.0.2.50) فڕێ دەدرێت و Destination Unreachableـی ICMP دەگەڕێتەوە. خوارەوە، سەوز: Gateway of last resort is 203.0.113.1 to network 0.0.0.0 — هەمان پاکێت لە G0/2ـەوە بەرەو دابینکەری ئینتەرنێت دەڕوات.
“Not set” = unknown destinations are dropped; an address = they go to that next hop.«Not set» = مەبەستە نەناسراوەکان فڕێ دەدرێن؛ ناونیشانێک = بۆ ئەو دەچن.CêIT

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’s MAC address table (excerpt, three entries)خشتەی ناونیشانی MACـی ⁦SW1⁩ (بەشێک، سێ تۆمار)TEXT
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/1
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 1

Two words after mac: mac address-table. Very old switches used show mac-address-table with a hyphen.

دوو وشە لە دوای mac: mac address-table. زۆر کۆنەکان show mac-address-tableـیان بە خەتی ناوەڕاست بەکار دەهێنا.

Side by side. Left, the switch SW1, layer 2: show mac address-table — rows map a MAC address to a port (0001.6422.a101 → Fa0/1, 0060.5c3b.2e02 → Fa0/2), learned from the source MAC of frames, used inside one LAN. Right, the router R1, layer 3: show ip route — rows map a network to a next hop and exit interface (192.168.20.0/24 → 10.1.1.2, G0/1; 0.0.0.0/0 → 203.0.113.1), learned from interfaces, administrators and routing protocols, used between networks.لە تەنیشت یەک. چەپ، سویچەکە SW1، چینی 2: show mac address-table — هەر ڕیزێک ناونیشانێکی MAC بە دەرچەیەک دەبەستێتەوە (0001.6422.a101 ← Fa0/1، 0060.5c3b.2e02 ← Fa0/2)، لە ناونیشانی MACـی سەرچاوەی فرەیمەکانەوە فێر دەبێت، لە ناو یەک ڕایەڵەی ناوچەییدا بەکار دێت. ڕاست، ڕێدۆزەکە R1، چینی 3: show ip route — هەر ڕیزێک ڕایەڵەیەک بە بازی دواتر و نێوبەستەی دەرچوونەوە دەبەستێتەوە (192.168.20.0/24 ← 10.1.1.2، G0/1؛ 0.0.0.0/0 ← 203.0.113.1)، لە نێوبەستەکان، بەڕێوەبەرانی ڕایەڵە و پرۆتۆکۆڵەکانی ڕێدۆزییەوە فێر دەبێت، لە نێوان ڕایەڵەکاندا بەکار دێت.
MAC → port inside a LAN; network → next hop between networks.MAC ← لە ناو ؛ ← لە نێوان .CêIT

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.
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.
Longest match first, then AD, then metric.سەرەتا درێژترین گونجان، پاشان AD، پاشان .CêIT

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/0static, [1/0]جێگیر، ⁦[1/0]⁩192.0.2.1yes (only source for /0)بەڵێ (تاکە سەرچاوەی /0)
10.5.0.0/16OSPF, [110/3]، ⁦[110/3]⁩10.1.1.2yes (only source for /16)بەڵێ (تاکە سەرچاوەی /16)
10.5.1.0/24RIP, [120/2]، ⁦[120/2]⁩10.2.2.2no — loses on ADنەخێر — لە AD دەدۆڕێت
10.5.1.0/24EIGRP, [90/3072]، ⁦[90/3072]⁩10.3.3.2yes — 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)⁩: ئەو سەرچاوەیە لەسەر ئەم چەند باوەڕپێکراوە. ژمارەکە هەتا کەمتر بێت، زیاتر متمانەی پێی هەیە.

Definitionپێناسە

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⁩ واتە 'هەرگیز بەکاری مەهێنە'.

A vertical trust scale from 0 to 255. At the top, most trusted: 0 connected, 1 static. Then 20 eBGP, 90 EIGRP, 110 OSPF, 115 IS-IS, 120 RIP, 170 external EIGRP, 200 iBGP. At the bottom: 255 — never trusted, never installed. An arrow says: lower number = more trusted. A note: AD is set on each router and is never sent to other routers.پێوەرێکی ستوونیی متمانە لە 0 تا 255. لە سەرەوە، زۆرترین متمانە: 0 بەستراو، 1 جێگیر. پاشان 20 eBGP، 90 EIGRP، 110 OSPF، 115 IS-IS، 120 RIP، 170 EIGRPـی دەرەکی، 200 iBGP. لە خوارەوە: 255 — هەرگیز متمانەی پێ ناکرێت، هەرگیز دانانرێت. تیرێک دەڵێت: ژمارەی کەمتر = متمانەی زیاتر. تێبینییەک: AD لەسەر هەر ڕێدۆزێک دادەنرێت و هەرگیز بۆ ڕێدۆزەکانی تر نانێردرێت.
The ladder of trust: 0 is believed most, 255 never.پەیژەی متمانە: 0 زۆرترین باوەڕی پێ دەکرێت، ⁦255⁩ هەرگیز.CêIT
Directions in the bazaarڕێنوێنی لە بازاڕدا

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 چییە دەست پێ دەکات.

Cisco default administrative distances (lower = preferred) بنەڕەتییەکانی Cisco (کەمتر = باشتر)
Route sourceسەرچاوەی ڕێگەDefault ADADـی بنەڕەتیNoteتێبینی
Connected interface بەستراو0—
1—
EIGRP summary routeڕێگەی کورتکراوەی 5a summary made by EIGRP itself (route summarization)کورتکراوەیەک کە خۆی دروستی دەکات (ڕاپوختکردن)
External BGP (eBGP) دەرەکی ⁦(eBGP)⁩20routes from another autonomous systemڕێگەکان لە ترەوە
Internal EIGRP ناوخۆیی90—
IGRP100history: removed from Cisco IOS in release 12.2(13)T; EIGRP replaced itمێژوو: لە وەشانی ⁦12.2(13)T⁩ـی Cisco IOS لابرا؛ جێگەی گرتەوە
110—
IS-IS115—
120—
EGP140history: the protocol before BGPمێژوو: ئەو پێش
ODR (On Demand Routing)160rare, for hub-and-spoke networksدەگمەن، بۆ ناوەند و لق
External EIGRP دەرەکی170routes brought into EIGRP from outside (D EX)ئەو ڕێگانەی لە دەرەوە هێنراونەتە ناو ⁦(D EX)⁩
Internal BGP (iBGP) ناوخۆیی ⁦(iBGP)⁩200—
Default route from DHCP لە 254installed by ip address dhcp on an interfaceبە ip address dhcp لەسەر دادەنرێت
Unknown / unusableنەناسراو / بەکارنەهاتوو255never 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: 0→+11→+1920→+7090→+10100→+10110→+5115→+5120  ⋯  254, 2550 \xrightarrow{+1} 1 \xrightarrow{+19} 20 \xrightarrow{+70} 90 \xrightarrow{+10} 100 \xrightarrow{+10} 110 \xrightarrow{+5} 115 \xrightarrow{+5} 120 \;\cdots\; 254,\ 255

پاشان بازدانەکانی نێوان ژمارەکان فێر ببە: 0→+11→+1920→+7090→+10100→+10110→+5115→+5120  ⋯  254, 2550 \xrightarrow{+1} 1 \xrightarrow{+19} 20 \xrightarrow{+70} 90 \xrightarrow{+10} 100 \xrightarrow{+10} 110 \xrightarrow{+5} 115 \xrightarrow{+5} 120 \;\cdots\; 254,\ 255

A memory card. The sentence Cats Stepped by Eight Intelligent Owls in Row, Done Uselessly, each word above its source and number: Cats C connected 0; Stepped S static 1; by B eBGP 20; Eight E EIGRP 90; Intelligent I IGRP 100; Owls O OSPF 110; in I IS-IS 115; Row R RIP 120; Done D DHCP default route 254; Uselessly U unusable 255. Under the numbers the jumps +1, +19, +70, +10, +10, +5, +5. A side note: not in the sentence — EIGRP summary 5, external EIGRP 170, iBGP 200.کارتێکی لەبەرکردن. ڕستەی Cats Stepped by Eight Intelligent Owls in Row, Done Uselessly، هەر وشەیەک لە سەرووی سەرچاوە و ژمارەکەیەوە: Cats C بەستراو 0؛ Stepped S جێگیر 1؛ by B eBGP 20؛ Eight E EIGRP 90؛ Intelligent I IGRP 100؛ Owls O OSPF 110؛ in I IS-IS 115؛ Row R RIP 120؛ Done D ڕێگەی بنەڕەتیی DHCP 254؛ Uselessly U بەکارنەهاتوو 255. لە ژێر ژمارەکاندا بازدانەکان +1، +19، +70، +10، +10، +5، +5. تێبینییەکی لاتەنیشت: لە ڕستەکەدا نین — کورتکراوەی EIGRP 5، EIGRPـی دەرەکی 170، iBGP 200.
One word per source, in order; three values to add by hand.یەک وشە بۆ هەر سەرچاوەیەک، بە ڕیز؛ سێ بەها کە خۆت زیادیان دەکەیت.CêIT

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.

Two panels. Left, example 1: routers A and B joined by two links, the upper labelled OSPF AD 110 (green, chosen) and the lower RIP AD 120 (grey, standby). Right, example 2: R1 on the left connected to R2 (top) and R3 (bottom); both connect to the network 10.0.0.0/24 with a switch and a PC. R2’s advertisement says RIP: 10.0.0.0/24, AD 120; R3’s says EIGRP: 10.0.0.0/24, AD 90. R1’s table holds D 10.0.0.0/24 via R3; the green arrow shows packets going through R3.دوو بەش. چەپ، نموونەی 1: ڕێدۆزەکانی A و B بە دوو بەستەر بەستراونەتەوە، سەرەوە OSPF AD 110 (سەوز، هەڵبژێردراو) و خوارەوە RIP AD 120 (خۆڵەمێشی، چاوەڕوان). ڕاست، نموونەی 2: R1 لە چەپ بە R2 (سەرەوە) و R3 (خوارەوە)ـەوە بەستراوە؛ هەردووکیان بە ڕایەڵەکە 10.0.0.0/24ـەوە بەستراون کە سویچێک و PCـیەکی تێدایە. ڕاگەیاندنی R2 دەڵێت RIP: 10.0.0.0/24، AD 120؛ هی R3 دەڵێت EIGRP: 10.0.0.0/24، AD 90. خشتەی R1 D 10.0.0.0/24 via R3 هەڵدەگرێت؛ تیرە سەوزەکە پیشان دەدات پاکێتەکان لە ڕێی R3ـەوە دەڕۆن.
Same network, two sources: the lower AD decides.هەمان ، دوو سەرچاوە: ADـی کەمتر بڕیار دەدات.CêIT

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]⁩
Two questions in two boxes. Left box, AD — which source do I believe? Two different protocols, OSPF 110 and RIP 120, offer the same network; OSPF wins. Right box, metric — which road of this source is best? OSPF offers two paths to the same network, cost 2 and cost 30; cost 2 wins. Bottom: never compare a RIP hop count with an OSPF cost.دوو پرسیار لە دوو چوارچێوەدا. چوارچێوەی چەپ، AD — باوەڕ بە کام سەرچاوە بکەم؟ دوو پرۆتۆکۆڵی جیاواز، OSPF 110 و RIP 120، هەمان ڕایەڵە پێشکەش دەکەن؛ OSPF دەباتەوە. چوارچێوەی ڕاست، پێوانە — کام ڕێگای ئەم سەرچاوەیە باشترە؟ OSPF دوو ڕێگا بۆ هەمان ڕایەڵە پێشکەش دەکات، تێچووی 2 و تێچووی 30؛ تێچووی 2 دەباتەوە. خوارەوە: هەرگیز ژمارەی بازی RIP لەگەڵ تێچووی OSPF بەراورد مەکە.
AD chooses the source; the metric chooses the path inside that source.AD سەرچاوەکە هەڵدەبژێرێت؛ ڕێگاکە لە ناو ئەو سەرچاوەیەدا هەڵدەبژێرێت.CêIT

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⁩ — هەمان دوو ژمارەی ناو کەوانەکە.

One route in detailیەک ڕێگە بە وردیTEXT
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 1

AD 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 لە باری ڕێکخستنەکەیدا بەکار بهێنە:

OSPF routes on R1 now get AD 85 (R1 only)ڕێگەکانی OSPF لەسەر ⁦R1⁩ ئێستا ⁦AD 85⁩ وەردەگرن (تەنیا ⁦R1⁩)TEXT
R1(config)#router ospf 1
R1(config-router)#distance 85
R1(config-router)#end
R1#copy running-config startup-config
Explain 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ڕاهێنانەکان

ExerciseڕاهێنانRead R1’s tableخشتەی ⁦R1⁩ بخوێنەرەوە

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 matches O 192.168.20.0/24 via 10.1.1.2, out of G0/1. 192.0.2.10 matches nothing else, so it takes S* 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)⁩.
ExerciseڕاهێنانPut the sources in orderسەرچاوەکان ڕیز بکە

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وەڵامەکە پیشان بدە
  1. connected — 0
  2. static — 1
  3. eBGP — 20
  4. internal EIGRP — 90
  5. OSPF — 110
  6. IS-IS — 115
  7. RIP — 120
  8. external EIGRP — 170
  9. iBGP — 200
  1. بەستراو بە ADـی 0
  2. جێگیر بە ADـی 1
  3. eBGP بە ADـی ⁦20⁩
  4. ناوخۆیی بە ADـی ⁦90⁩
  5. بە ADـی ⁦110⁩
  6. ⁦IS-IS⁩ بە ADـی ⁦115⁩
  7. بە ADـی ⁦120⁩
  8. دەرەکی بە ADـی ⁦170⁩
  9. iBGP بە ADـی ⁦200⁩
ExerciseڕاهێنانWhich route carries the packet?کام ڕێگە پاکێتەکە هەڵدەگرێت؟

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⁩ـدایە، کەواتە .
ExerciseڕاهێنانSpot the mistakeهەڵەکە بدۆزەوە

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 بەراورد دەکات و ڕێگا هەرزانترەکە دادەنێت؛ تێچووی یەکسان هەردووکیان دادەنرێن و هاتوچۆ دابەش دەکەن.

ExerciseڕاهێنانSwitch or router?سویچ یان ڕێدۆز؟

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 (or show 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زاراوە سەرەکییەکان

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

Static Routesڕێگە جێگیرەکان

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.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.