Chapterبەش 2 · Lectureوانە 2.4

Inter-VLAN Routing with a Layer-3 Switchڕێدۆزیی نێوان VLANـەکان بە سویچی چینی 3

Multilayer switches that route between VLANs in hardware: SVIs as the VLANs’ gateways, ip routing, a one-switch lab and a core-plus-access lab with a trunk, what happens inside the switch, routed ports with no switchport, why an SVI stays down, the three inter-VLAN routing methods compared, and the common mistakes.

کە لە لە نێوان دەکەن: SVI وەک ، ip routing، تاقیکردنەوەیەکی یەک و تاقیکردنەوەیەکی ناوەند و دەستڕاگەیشتن بە ، لە ناو چی ڕوو دەدات، بە no switchport، بۆچی SVI down دەمێنێتەوە، بەراوردی سێ ڕێگەی و هەڵە باوەکان.

17 min read17 خولەک خوێندنەوە · 15 stepsهەنگاو

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

  • Explain what a layer 3 (multilayer) switch adds to a layer 2 switch.
  • Configure SVIs as VLAN gateways and enable ip routing.
  • Join a layer 2 access switch to a layer 3 core with a trunk, and configure a routed port.
  • Explain why an SVI stays down and fix it.
  • Compare legacy routing, router-on-a-stick and layer 3 switching and choose one for a network.
  • ڕوون بکەیتەوە (فرەچین) چی زیاد دەکات بۆ چینی 2.
  • SVI وەک ڕێک بخەیت و ip routing هەڵبکەیت.
  • چینی 2ی دەستڕاگەیشتن بە بە ناوەندی چینی 3ـەوە ببەستیت و ڕێک بخەیت.
  • ڕوون بکەیتەوە بۆچی SVI down دەمێنێتەوە و چاکی بکەیتەوە.
  • کۆن، و چینی 3 بەراورد بکەیت و یەکێکیان بۆ هەڵبژێریت.

A switch that can also routeسویچێک کە دەتوانێت ڕێدۆزیش بکات

A layer 3 switch (also multilayer switch) is a switch that can perform routing functions in addition to switching. It forwards frames inside a VLAN like any switch, and it routes packets between VLANs by their IP addresses — in hardware, so it is much faster than a router’s software. Packet Tracer offers the Catalyst 3560-24PS and 3650-24PS; a 2960 is a layer 2 switch and cannot do this (unmanaged, managed and layer 3 switches).

کە جگە لە دەتوانێت کاری بکات. وەک هەر لە ناو دەگوازێتەوە و لە نێوان بە دەکات — لە ، بۆیە زۆر لە خێراترە. ⁦Packet Tracer Catalyst 3560-24PS⁩ و ⁦3650-24PS⁩ پێشکەش دەکات؛ ⁦2960⁩ چینی 2ـیە و ناتوانێت ئەمە بکات (سویچەکان: نەبەڕێوەبراو، بەڕێوەبراو و چینی 3).

Definitionپێناسە

A multilayer switch that can also route between VLANs and subnets in its hardware, using SVIs or routed ports; inside a campus it is faster than .

فرەچینە کە دەتوانێت لە هاردوێری خۆیدا لە نێوان و ڕێدۆزی بکات، بە یان دەرچەی ڕێدۆزی؛ لەناو کەمپەسێکدا لە خێراترە.

Two panels. Layer 2 switch (for example 2960): forwards frames by MAC address, inside one VLAN only, an SVI only for management, and cannot route between VLANs. Layer 3 switch (for example 3560, 3650), drawn with a small router badge: everything a layer 2 switch does, plus routing by IP address, SVIs as the VLANs’ gateways, in hardware and very fast.دوو بەش. سویچی چینی 2، بۆ نموونە 2960: فرەیمەکان بە ناونیشانی MAC دەنێرێت، تەنیا لە ناو یەک VLANـدا، SVI تەنیا بۆ بەڕێوەبردن و ناتوانێت لە نێوان VLANـەکاندا ڕێدۆزی بکات. سویچی چینی 3 (بۆ نموونە 3560، 3650)، بە نیشانەیەکی بچووکی ڕێدۆز: هەموو کارێکی سویچی چینی 2، لەگەڵ ڕێدۆزی بە ناونیشانی IP، SVI وەک دەروازەی بنەڕەتیی VLANـەکان، لە ڕەقەواڵەدا و زۆر خێرا.
A layer 3 switch = a switch with a router inside. = کە لە ناودایە.CêIT

SVIs become the VLANs’ gatewaysSVIـەکان دەبن بە دەروازەی بنەڕەتیی VLANـەکان

On a layer 2 switch an SVI (interface vlan 99) is only a management address (a switch needs an address). On a layer 3 switch you make one SVI per VLAN, give it an address in that VLAN’s subnet and switch it on with no shutdown. That address is the default gateway of the VLAN’s PCs. The SVIs are the switch’s internal router interfaces, one into each VLAN — like the subinterfaces of router-on-a-stick, but inside the switch. If the VLANs’ DHCP server is elsewhere, each SVI also gets ip helper-address (Relaying between VLANs).

لەسەر چینی 2، SVI (interface vlan 99) تەنیا ناونیشانی بەڕێوەبردنە (سویچ ناونیشانێکی پێویستە). لەسەر بۆ هەر یەک SVI دروست دەکەیت، ناونیشانێکی لە ئەو دەدەیتێ و بە no shutdown هەڵی دەکەیت. ئەو ناونیشانە PCـەکانی ئەو . SVIـەکان ناوەوەی ، یەکێک بۆ ناو هەر — وەک ، بەڵام لە ناو . ئەگەر VLANـەکان لە شوێنێکی تر بێت، هەر SVIـیەک ip helper-addressـیش وەردەگرێت (گواستنەوە لە نێوان VLANـەکاندا).

Definitionپێناسە

A virtual interface of a switch for one VLAN (interface vlan 10). An SVI gives a layer 2 switch an IP address for remote management; on a layer 3 switch it is the default gateway of the VLAN.

گریمانەیی بۆ یەک VLAN (interface vlan 10). SVI ناونیشانێکی IP دەدات بە سویچێکی چینی 2 بۆ بەڕێوەبردنی لە دوورەوە؛ لەسەر VLANـەکەیە.

Inside a layer 3 switch SW1: a router disc labelled ip routing joins two boxes, interface vlan 10 with 192.168.10.1/24 (green) and interface vlan 20 with 192.168.20.1/24 (orange). Ports Fa0/1 and Fa0/2 (green) belong to VLAN 10, Fa0/3 and Fa0/4 (orange) to VLAN 20; a PC hangs on each port, with the gateway 192.168.10.1 or 192.168.20.1 under it. Each PC’s default gateway is its VLAN’s SVI address, inside the switch.لە ناو سویچی چینی 3ـی SW1: بازنەیەکی ڕێدۆز بە ناوی ip routing دوو سندووق پێکەوە دەبەستێت، interface vlan 10 بە 192.168.10.1/24 (سەوز) و interface vlan 20 بە 192.168.20.1/24 (پرتەقاڵی). دەرچەکان Fa0/1 و Fa0/2 (سەوز) سەر بە VLAN 10ن، Fa0/3 و Fa0/4 (پرتەقاڵی) سەر بە VLAN 20؛ لەسەر هەر دەرچەیەک PCـێک هەیە و دەروازە بنەڕەتییەکەی 192.168.10.1 یان 192.168.20.1 لە ژێریدایە. دەروازەی بنەڕەتیی هەر PCـێک ناونیشانی SVIـی VLANـەکەیەتی، لە ناو سویچەکەدا.
One SVI per VLAN, joined by routing.بۆ هەر SVIـێک، بە پێکەوە بەستراون.CêIT

ip routing: turn the router inside onip routing: ڕێدۆزی ناوەوە هەڵبکە

Catalyst multilayer switches start in layer 2 mode with IP routing off. The SVIs answer pings from their own VLAN, but nothing is routed between VLANs until you type ip routing once, in global configuration mode. Routers are the other way round: routing is on by default. For the routing to work, every host needs a default gateway set to its VLAN’s SVI address, and each VLAN needs its own subnet.

Catalyst لە باری چینی 2دا و بە IPـی کوژاوە دەست پێ دەکەن. SVIـەکان وەڵامی خۆیان دەدەنەوە، بەڵام تا یەک جار ip routing لە نەنووسیت هیچ شتێک لە نێوان ناکرێت. پێچەوانەن: بە بنەڕەت هەڵکراوە. بۆ ئەوەی کار بکات، هەموو پێویستە کە ناونیشانی SVIـی بێت و هەر خۆی پێویستە.

Two panels with the same layer 3 switch and two PCs, VLAN 10 and VLAN 20. Left: IP routing off (the default) — a cross between the PCs, no traffic between VLAN 10 and VLAN 20. Right: ip routing — an arrow from the VLAN 10 PC through the switch to the VLAN 20 PC, with a tick. Text: Catalyst multilayer switches start with IP routing off; routers have it on; type it once, in global configuration mode.دوو بەش بە هەمان سویچی چینی 3 و دوو PC، VLAN 10 و VLAN 20. چەپ: ڕێدۆزی کوژاوە (بنەڕەت) — ✗ لە نێوان PCـەکان، هیچ هاتوچۆیەک لە نێوان VLAN 10 و VLAN 20. ڕاست: ip routing — تیرێک لە PCـی VLAN 10ـەوە بە سویچەکەدا بۆ PCـی VLAN 20، بە ✓. دەق: سویچە فرەچینەکانی Catalyst بە ڕێدۆزیی IPـی کوژاوە دەست پێ دەکەن؛ ڕێدۆزەکان هەڵکراویان هەیە؛ یەک جار بینووسە، لە باری ڕێکخستنی گشتیدا.
No ip routing, no inter-VLAN routing.بێ ip routing، نییە.CêIT

Lab 1: one layer 3 switch, two VLANsتاقیکردنەوەی 1: یەک سویچی چینی 3، دوو VLAN

Build this in Packet Tracer: one 3560-24PS switch and four PCs. PC0 (192.168.10.2) and PC2 (192.168.10.3) on Fa0/1–2 are in VLAN 10; PC1 (192.168.20.2) and PC3 (192.168.20.3) on Fa0/3–4 are in VLAN 20. The PCs of VLAN 10 use the gateway 192.168.10.1, those of VLAN 20 use 192.168.20.1. Then configure the switch in four steps: VLANs, access ports, SVIs, ip routing — and save.

ئەمە لە Packet Tracer دروست بکە: یەک ⁦3560-24PS⁩ و چوار ⁦PC. PC0 (192.168.10.2)⁩ و ⁦PC2 (192.168.10.3)⁩ لەسەر ⁦Fa0/1–2⁩ لە ⁦VLAN 10⁩دان؛ ⁦PC1 (192.168.20.2)⁩ و ⁦PC3 (192.168.20.3)⁩ لەسەر ⁦Fa0/3–4⁩ لە ⁦VLAN 20⁩دان. PCـەکانی ⁦VLAN 10⁩ ⁦192.168.10.1⁩ بەکار دەهێنن و هی ⁦VLAN 20 192.168.20.1⁩. پاشان بە چوار هەنگاو ڕێک بخە: ، ، SVI، ip routing — و پاشەکەوتی بکە.

Lab 1: SW1, a 3560-24PS layer 3 switch, with four PCs: PC0 Fa0/1 192.168.10.2 and PC2 Fa0/2 192.168.10.3 in VLAN 10; PC1 Fa0/3 192.168.20.2 and PC3 Fa0/4 192.168.20.3 in VLAN 20. SVIs: Vlan10 = 192.168.10.1/24, Vlan20 = 192.168.20.1/24; PCs in VLAN 10 use gateway 192.168.10.1 and PCs in VLAN 20 use 192.168.20.1.تاقیکردنەوەی 1: SW1، سویچی چینی 3ـی 3560-24PS، بە چوار PC: PC0 Fa0/1 192.168.10.2 و PC2 Fa0/2 192.168.10.3 لە VLAN 10؛ PC1 Fa0/3 192.168.20.2 و PC3 Fa0/4 192.168.20.3 لە VLAN 20. SVIـەکان: Vlan10 = 192.168.10.1/24، Vlan20 = 192.168.20.1/24؛ PCـەکانی VLAN 10 دەروازەی بنەڕەتیی 192.168.10.1 و هی VLAN 20 192.168.20.1 بەکار دەهێنن.
Four PCs, two VLANs, one switch that routes.چوار PC، دوو ، یەک کە دەکات.CêIT
SW1 (3560-24PS)سویچی ⁦SW1 (3560-24PS)⁩TEXT
Switch>enable
Switch#configure terminal
Switch(config)#hostname SW1
SW1(config)#vlan 10
SW1(config-vlan)#name IT
SW1(config-vlan)#vlan 20
SW1(config-vlan)#name Marketing
SW1(config-vlan)#exit
SW1(config)#interface range fastEthernet 0/1 - 2
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 10
SW1(config-if-range)#interface range fastEthernet 0/3 - 4
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 20
SW1(config-if-range)#exit
SW1(config)#interface vlan 10
SW1(config-if)#ip address 192.168.10.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#interface vlan 20
SW1(config-if)#ip address 192.168.20.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip routing
SW1(config)#end
SW1#copy running-config startup-config
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 4-8

Create the VLANs first. Assigning a port to a missing VLAN also creates it (“% Access VLAN does not exist. Creating vlan 20”), but creating an SVI does not.

سەرەتا دروست بکە. خستنی بۆ نەبوو دروستی دەکات («% ⁦Access VLAN does not exist. Creating vlan 20⁩»)، بەڵام دروستکردنی SVI نا.

Lineدێڕی 16-21

One SVI per VLAN, each in its own subnet, switched on with no shutdown.

بۆ هەر SVIـێک، هەریەکە لە خۆیدا، بە no shutdown هەڵکراوە.

Lineدێڕی 23

Routing between the SVIs starts here.

لە نێوان SVIـەکاندا لێرەوە دەست پێ دەکات.

What happens inside the switchلە ناو سویچەکەدا چی ڕوو دەدات

PC0 (VLAN 10) pings PC1 (VLAN 20). PC0 sends the frame to its gateway, 192.168.10.1 — the switch’s own SVI. The switch looks up 192.168.20.2 in its routing table, finds 192.168.20.0/24 connected on Vlan20, and sends the packet out of an access port of VLAN 20. The packet never leaves the switch: no external link, no U-turn on a stick.

⁦PC0 (VLAN 10)⁩ بۆ ⁦PC1 (VLAN 20)⁩ دەکات. ⁦PC0⁩ دەنێرێت بۆ ، ⁦192.168.10.1 — SVI⁩ـی خودی . لە بەدوای ⁦192.168.20.2⁩دا دەگەڕێت، دەبینێت ⁦192.168.20.0/24⁩ بە ⁦Vlan20⁩ـەوە بەستراوە و لە ⁦VLAN 20⁩ـەوە دەنێرێتە دەرەوە. هەرگیز لە دەرناچێت: هیچ بەستەرێکی دەرەکی، هیچ سووڕانەوەیەک لەسەر قۆڵ.

Animation in six frames: a layer 3 switch SW1 with SVI Vlan10 (192.168.10.1, green) and SVI Vlan20 (192.168.20.1, orange) joined by a router disc; PC0 192.168.10.2 on Fa0/1 and PC1 192.168.20.2 on Fa0/3. 1: 192.168.20.2 is in another subnet, so PC0 sends to its gateway 192.168.10.1. 2: the frame enters on Fa0/1, an access port of VLAN 10. 3: it is addressed to the SVI Vlan10, the switch’s own router. 4: the routing table says 192.168.20.0/24 is connected on Vlan20. 5: out of SVI Vlan20, down to Fa0/3, an access port of VLAN 20. 6: the packet never left the switch — no external link, no stick.
Animation in six frames: a layer 3 switch SW1 with SVI Vlan10 (192.168.10.1, green) and SVI Vlan20 (192.168.20.1, orange) joined by a router disc; PC0 192.168.10.2 on Fa0/1 and PC1 192.168.20.2 on Fa0/3. 1: 192.168.20.2 is in another subnet, so PC0 sends to its gateway 192.168.10.1. 2: the frame enters on Fa0/1, an access port of VLAN 10. 3: it is addressed to the SVI Vlan10, the switch’s own router. 4: the routing table says 192.168.20.0/24 is connected on Vlan20. 5: out of SVI Vlan20, down to Fa0/3, an access port of VLAN 20. 6: the packet never left the switch — no external link, no stick.
Routed between two SVIs, inside one box.لە نێوان دوو SVIـدا کراوە، لە ناو یەک ئامێردا.CêIT

Check Lab 1تاقیکردنەوەی 1 بپشکنە

show ip interface brief must show Vlan10 and Vlan20 up / up with their addresses. show ip route must show the two VLAN subnets as connected (C) routes. A ping from PC0 to PC1 then gets replies with TTL=127: one routing hop, inside the switch. The first request may time out while ARP runs: PC0 asks for the SVI’s MAC address, and the switch asks for PC1’s.

show ip interface brief دەبێت ⁦Vlan10⁩ و ⁦Vlan20⁩ بە ⁦up / up⁩ و ناونیشانەکانیانەوە پیشان بدات. show ip route دەبێت هەردوو VLANـەکان وەک ⁦(C)⁩ پیشان بدات. پاشان لە ⁦PC0⁩ـەوە بۆ ⁦PC1⁩ وەڵام بە ⁦TTL=127⁩ وەردەگرێت: یەک ، لە ناو . لەوانەیە یەکەم داواکاری کاتی بەسەر بچێت، چونکە هێشتا کار دەکات: ⁦PC0⁩ بەدوای SVIـەکەدا دەگەڕێت و بەدوای هی ⁦PC1⁩دا.

SW1: the lines that matter⁦SW1⁩: ئەو دێڕانەی گرنگنTEXT
SW1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/1        unassigned      YES unset  up                    up
FastEthernet0/2        unassigned      YES unset  up                    up
FastEthernet0/3        unassigned      YES unset  up                    up
FastEthernet0/4        unassigned      YES unset  up                    up
Vlan1                  unassigned      YES unset  administratively down down
Vlan10                 192.168.10.1    YES manual up                    up
Vlan20                 192.168.20.1    YES manual up                    up
SW1 (3560): the routes (code list at the top left out)⁦SW1 (3560)⁩: ڕێگەکان (لیستی کۆدەکانی سەرەوە لابراوە)TEXT
SW1#show ip route
Gateway of last resort is not set

C    192.168.10.0/24 is directly connected, Vlan10
C    192.168.20.0/24 is directly connected, Vlan20

The 3560 in Packet Tracer runs an older IOS 12.2, which lists only the C routes. On IOS 15 and IOS XE switches such as the 3650, each SVI also adds an L (local) route for its own address, exactly as on a router (connected and local routes).

⁦3560⁩ لە Packet Tracerـدا ⁦IOS 12.2⁩ـی کۆنتر کار پێ دەکات کە تەنیا ڕێگەکانی C ڕیز دەکات. لەسەر ⁦IOS 15⁩ و IOS XE وەک ⁦3650⁩، هەر SVIـێک ڕێگەیەکی L (ناوخۆیی)ـش بۆ ناونیشانی خۆی زیاد دەکات، ڕێک وەک (ڕێگە بەستراو و ناوخۆییەکان).

PC0 (VLAN 10) pings PC1 (VLAN 20)⁦PC0 (VLAN 10)⁩ پینگ بۆ ⁦PC1 (VLAN 20)⁩ دەکاتTEXT
C:\>ping 192.168.20.2

Pinging 192.168.20.2 with 32 bytes of data:

Request timed out.
Reply from 192.168.20.2: bytes=32 time<1ms TTL=127
Reply from 192.168.20.2: bytes=32 time<1ms TTL=127
Reply from 192.168.20.2: bytes=32 time<1ms TTL=127

Ping statistics for 192.168.20.2:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Routed ports: no switchportدەرچە ڕێدۆزییەکان: no switchport

A layer 3 switch can also turn one physical port into a routed port, a port that works like a router interface: it belongs to no VLAN and has its own IP address. no switchport does the change. Routed ports join the layer 3 switch to an edge router or to another layer 3 switch. A default route then sends traffic for other networks to the router (default routes); the router needs routes back to the VLAN subnets (static routes).

دەتوانێت یەک فیزیکیش بکات بە ، کە وەک کار دەکات: سەر بە هیچ نییە و خۆی هەیە. no switchport ئەم گۆڕانکارییە دەکات. بە لێوار یان بە ترەوە دەبەستن. پاشان هاتوچۆی تر دەنێرێت بۆ (ڕێگەی بنەڕەتی)؛ ڕێگەی گەڕانەوەی بۆ VLANـەکان پێویستە (ڕێگە جێگیرەکان).

A routed port towards the edge router R2 (10.0.0.2)دەرچەیەکی ڕێدۆزی بەرەو ڕێدۆزی لێواری ⁦R2 (10.0.0.2)⁩TEXT
SW1(config)#interface gigabitEthernet 0/1
SW1(config-if)#no switchport
SW1(config-if)#ip address 10.0.0.1 255.255.255.252
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2
SW1(config)#end
SW1#copy running-config startup-config
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 2

From here G0/1 is a layer 3 port: switchport commands no longer apply to it.

لێرەوە ⁦G0/1⁩ چینی 3ـە: switchport ئیتر لەسەری کار ناکەن.

Lineدێڕی 6

Everything not in the routing table goes to R2.

هەموو شتێک کە لە نییە دەچێت بۆ ⁦R2⁩.

Edge router R2 (towards the Internet) with G0/0 10.0.0.2/30, joined to layer 3 switch SW1 G0/1 10.0.0.1/30; VLAN 10 and VLAN 20 hang below SW1. Two boxes: switch port (switchport) — belongs to a VLAN, no IP of its own; routed port (no switchport) — no VLAN, its own IP address.ڕێدۆزی لێواری R2 (بەرەو ئینتەرنێت) بە G0/0 10.0.0.2/30، بە SW1 G0/1 10.0.0.1/30ـی سویچی چینی 3ـەوە بەستراوە؛ VLAN 10 و VLAN 20 لە ژێر SW1ـن. دوو سندووق: دەرچەی سویچ (switchport) — سەر بە VLANـێکە، ناونیشانی IPـی خۆی نییە؛ دەرچەی ڕێدۆزی (no switchport) — بێ VLAN، ناونیشانی IPـی خۆی هەیە.
A routed port is a router interface on a switch. لەسەر .CêIT

Lab 2: a layer 3 core and a layer 2 access switchتاقیکردنەوەی 2: سویچی چینی 3 لە ناوەند و سویچێکی چینی 2ی دەستڕاگەیشتن

Layer 3 switches are expensive, so a typical design has one layer 3 switch in the middle and cheaper layer 2 switches for the PCs, joined by trunks. The VLANs exist on every switch, the SVIs and ip routing only on the layer 3 switch. Here is a practice lab: SW1 is a 3560 and SW2 a 2960, joined on Fa0/24 by a trunk. On both switches VLAN 10 uses Fa0/1–8 and Fa0/10, VLAN 20 uses Fa0/11–15 and Fa0/17. Each switch has one PC per VLAN, and every PC uses its VLAN’s SVI on SW1 as gateway.

گرانن، بۆیە نەخشەیەکی ئاسایی یەک لە ناوەڕاستدا و چینی 2ی هەرزانتر بۆ PCـەکان هەیە، کە بە پێکەوە بەستراون. لەسەر هەموو هەن، SVI و ip routing تەنیا لەسەر . ئەمە تاقیکردنەوەیەکی ڕاهێنانە: ⁦SW1 3560⁩ و ⁦SW2 2960⁩ـە، لەسەر ⁦Fa0/24⁩ بە بەستراون. لەسەر هەردوو ⁦VLAN 10 Fa0/1–8⁩ و ⁦Fa0/10⁩ بەکار دەهێنێت و ⁦VLAN 20 Fa0/11–15⁩ و ⁦Fa0/17⁩. هەر بۆ هەر PCـێکی هەیە و هەموو PCـێک SVIـی لەسەر ⁦SW1⁩ وەک بەکار دەهێنێت.

Lab 2: SW1 (3560, layer 3) and SW2 (2960) joined by a trunk between their Fa0/24 ports. On SW1: PC2 Fa0/1 192.168.10.2 VLAN 10 and PC3 Fa0/11 192.168.20.2 VLAN 20. On SW2: PC0 Fa0/1 192.168.10.3 VLAN 10 and PC1 Fa0/11 192.168.20.3 VLAN 20. Notes: SW1 — VLANs 10 and 20, SVIs 192.168.10.1 and 192.168.20.1, ip routing, Fa0/24 trunk with dot1q first and native VLAN 999; SW2 — VLANs 10 and 20, access ports, Fa0/24 trunk with native VLAN 999, no SVIs, no routing; every PC uses its VLAN’s SVI on SW1 as gateway (192.168.10.1 or 192.168.20.1).تاقیکردنەوەی 2: SW1 (3560، چینی 3) و SW2 (2960) بە ترەنک لە نێوان دەرچەکانی Fa0/24یاندا بەستراون. لەسەر SW1: PC2 Fa0/1 192.168.10.2 VLAN 10 و PC3 Fa0/11 192.168.20.2 VLAN 20. لەسەر SW2: PC0 Fa0/1 192.168.10.3 VLAN 10 و PC1 Fa0/11 192.168.20.3 VLAN 20. تێبینی: SW1 — VLAN 10 و 20، SVI 192.168.10.1 و 192.168.20.1، ip routing، Fa0/24 ترەنک بە dot1q سەرەتا و VLANـی ڕەسەن 999؛ SW2 — VLAN 10 و 20، دەرچەکانی دەستڕاگەیشتن، Fa0/24 ترەنک بە VLANـی ڕەسەن 999، بێ SVI، بێ ڕێدۆزی؛ هەموو PCـێک SVIـی VLANـەکەی لەسەر SW1 وەک دەروازەی بنەڕەتی بەکار دەهێنێت (192.168.10.1 یان 192.168.20.1).
Routing in the core, switching at the edge. لە ناوەند، لە لێوار.CêIT

The same core-plus-access idea, with DHCP from a router added, is the first exam task of the campus project.

هەمان بیرۆکەی ناوەند و دەستڕاگەیشتن، لەگەڵ DHCP لە ، یەکەم ئەرکی تاقیکردنەوەی پرۆژەی کەمپەسـە.

Step 1: the layer 2 access switchهەنگاوی 1: سویچی چینی 2ی دەستڕاگەیشتن

SW2 needs only VLANs, access ports and the trunk. interface range takes lists with commas, so the lab’s port plan fits in two commands. SW2 needs no SVIs for VLAN 10 and VLAN 20 — the gateways are on SW1.

⁦SW2⁩ تەنیا ، و پێویستە. interface range لیستی بە کۆما وەردەگرێت، بۆیە نەخشەی تاقیکردنەوەکە لە دوو جێی دەبێتەوە. ⁦SW2⁩ بۆ ⁦VLAN 10⁩ و ⁦VLAN 20⁩ هیچ SVIـێکی ناوێت — ناونیشانەکانی لەسەر ⁦SW1⁩ـن.

SW2 (2960)سویچی ⁦SW2 (2960)⁩TEXT
SW2(config)#vlan 10
SW2(config-vlan)#name IT
SW2(config-vlan)#vlan 20
SW2(config-vlan)#name Marketing
SW2(config-vlan)#vlan 999
SW2(config-vlan)#name Native
SW2(config-vlan)#exit
SW2(config)#interface range fastEthernet 0/1 - 8, fastEthernet 0/10
SW2(config-if-range)#switchport mode access
SW2(config-if-range)#switchport access vlan 10
SW2(config-if-range)#exit
SW2(config)#interface range fastEthernet 0/11 - 15, fastEthernet 0/17
SW2(config-if-range)#switchport mode access
SW2(config-if-range)#switchport access vlan 20
SW2(config-if-range)#exit
SW2(config)#interface fastEthernet 0/24
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport trunk native vlan 999
SW2(config-if)#end
SW2#copy running-config startup-config
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 8

A range can mix a span and single ports, separated by a comma.

interface range دەتوانێت چەند یەک لە دوای یەک (0/1 - 8) و تاک (0/10) تێکەڵ بکات؛ بە کۆما لە یەک جیا دەکرێنەوە.

Lineدێڕی 16-18

The trunk to SW1; native VLAN 999 (unused) on both ends.

بۆ ⁦SW1⁩؛ ⁦999⁩ (بەکارنەهێنراو) لەسەر هەردوو سەر.

A 24-port strip of the switch: ports 1–8 and 10 green (VLAN 10), 11–15 and 17 orange (VLAN 20), 24 purple (trunk), the rest white. Legend with the commands: VLAN 10, Fa0/1–8 and Fa0/10 — interface range fa0/1 - 8, fa0/10; VLAN 20, Fa0/11–15 and Fa0/17 — interface range fa0/11 - 15, fa0/17; Fa0/24, trunk to the other switch — interface fa0/24. Fa0/9, Fa0/16 and Fa0/18–23 stay in VLAN 1 (better: parked in VLAN 998, Unused, and shut down).شریتی 24 دەرچەی سویچەکە: دەرچەکان 1–8 و 10 سەوز (VLAN 10)، 11–15 و 17 پرتەقاڵی (VLAN 20)، 24 مۆر (ترەنک)، ئەوانی تر سپی. ڕوونکردنەوە بە فەرمانەکان: VLAN 10، Fa0/1–8 و Fa0/10 — interface range fa0/1 - 8, fa0/10؛ VLAN 20، Fa0/11–15 و Fa0/17 — interface range fa0/11 - 15, fa0/17؛ Fa0/24، ترەنک بۆ سویچەکەی تر — interface fa0/24. Fa0/9، Fa0/16 و Fa0/18–23 لە VLAN 1دا دەمێننەوە (باشتر: بخرێنە VLAN 998 «Unused» و shutdown بکرێن).
The lab’s port plan, the same on both switches.نەخشەی تاقیکردنەوەکە، لەسەر هەردوو وەک یەک.CêIT

Step 2: the layer 3 core switchهەنگاوی 2: سویچی چینی 3ـی ناوەند

SW1 gets the same VLANs and access ports, and three more things: the trunk on Fa0/24 — on a 3560 with switchport trunk encapsulation dot1q before switchport mode trunk, on that same port (why) —, one SVI per VLAN, and ip routing. Then ping from PC0 on SW2 to PC3 on SW1: the frame crosses the trunk tagged 10, is routed inside SW1, and reaches PC3 in VLAN 20.

⁦SW1⁩ هەمان و وەردەگرێت و سێ شتی تریش: لەسەر ⁦Fa0/24⁩ — لەسەر ⁦3560⁩ switchport trunk encapsulation dot1q پێش switchport mode trunk، لەسەر هەمان (بۆچی) —، بۆ هەر SVIـێک و ip routing. پاشان لە ⁦PC0⁩ لەسەر ⁦SW2⁩ـەوە بۆ ⁦PC3⁩ لەسەر ⁦SW1⁩ بکە: بە تاگی ⁦10⁩ بە تێدەپەڕێت، لە ناو ⁦SW1⁩ دەکرێت و لە ⁦VLAN 20⁩دا دەگاتە ⁦PC3⁩.

SW1 (3560-24PS, layer 3)⁦SW1 (3560-24PS⁩، چینی ⁦3⁩)TEXT
SW1(config)#vlan 10
SW1(config-vlan)#name IT
SW1(config-vlan)#vlan 20
SW1(config-vlan)#name Marketing
SW1(config-vlan)#vlan 999
SW1(config-vlan)#name Native
SW1(config-vlan)#exit
SW1(config)#interface range fastEthernet 0/1 - 8, fastEthernet 0/10
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 10
SW1(config-if-range)#exit
SW1(config)#interface range fastEthernet 0/11 - 15, fastEthernet 0/17
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 20
SW1(config-if-range)#exit
SW1(config)#interface fastEthernet 0/24
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk native vlan 999
SW1(config-if)#exit
SW1(config)#interface vlan 10
SW1(config-if)#ip address 192.168.10.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#interface vlan 20
SW1(config-if)#ip address 192.168.20.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip routing
SW1(config)#end
SW1#copy running-config startup-config
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 17-18

On the trunk port itself: encapsulation first, then trunk mode.

لەسەر خودی : سەرەتا encapsulation، پاشان باری trunk.

Lineدێڕی 21-26

The gateways of VLAN 10 and VLAN 20.

ناونیشانەکانی ⁦VLAN 10⁩ و ⁦VLAN 20⁩.

Lineدێڕی 28

Typed once. Typing it twice changes nothing.

یەک جار دەنووسرێت. دوو جار نووسینی هیچ ناگۆڕێت.

When an SVI stays downکاتێک SVIـێک down دەمێنێتەوە

An SVI is up/up only when three things are true: the VLAN exists on the switch, the SVI is not shut down, and at least one port of that VLAN is up — an access port with a device on it, or a trunk that carries the VLAN. Cisco puts it simply: an SVI does not become active until it is associated with a physical port. An SVI that is up/down cannot work as a gateway. Typical causes: the VLAN was never created (creating interface vlan 30 does not create VLAN 30), no PC is connected in that VLAN yet, or the trunk does not carry it.

SVI تەنیا کاتێک ⁦up/up⁩ـە کە سێ شت ڕاست بن: لەسەر هەیە، SVIـەکە نەکوژاوەتەوە و لانیکەم یەک ئەو upـە — کە ئامێرێکی پێوەیە، یان کە هەڵدەگرێت. Cisco بە ساکاری دەڵێت: SVI تا بە فیزیکییەوە نەبەسترێتەوە چالاک نابێت. SVIـێکی ⁦up/down⁩ ناتوانێت وەک کار بکات. هۆکارە ئاساییەکان: هەرگیز دروست نەکراوە (دروستکردنی interface vlan 30 ⁦VLAN 30⁩ دروست ناکات)، هێشتا هیچ PCـێک لەو نەبەستراوە، یان هەڵی ناگرێت.

When is an SVI up/up? Three numbered conditions: 1 the VLAN exists on the switch (vlan 30); 2 the SVI is not shut down (no shutdown); 3 at least one port of that VLAN is up — an access port with a device on it, or a trunk that carries the VLAN. Below, show ip interface brief: Vlan10 192.168.10.1 up up; Vlan30 192.168.30.1 up down, marked: no port of VLAN 30 is up. An SVI that is up/down cannot be a gateway.SVI کەی up/upـە؟ سێ مەرجی ژمارەدار: 1 VLANـەکە لەسەر سویچەکە هەیە (vlan 30)؛ 2 SVIـەکە نەکوژاوەتەوە (no shutdown)؛ 3 لانیکەم یەک دەرچەی ئەو VLANـە upـە — دەرچەیەکی دەستڕاگەیشتن کە ئامێرێکی پێوەیە، یان ترەنکێک کە VLANـەکە هەڵدەگرێت. لە خوارەوە show ip interface brief: Vlan10 192.168.10.1 up up؛ Vlan30 192.168.30.1 up down، نیشان کراوە: هیچ دەرچەیەکی VLAN 30 up نییە. SVIـی up/down ناتوانێت دەروازەی بنەڕەتی بێت.
Up/up needs the VLAN, no shutdown and one live port.⁦up/up⁩ پێویستی بە ، no shutdown و یەک زیندوو هەیە.CêIT
The fix: create VLAN 30 and connect a device to a VLAN 30 portچارەسەر: ⁦VLAN 30⁩ دروست بکە و ئامێرێک بە دەرچەیەکی ⁦VLAN 30⁩ـەوە ببەستەTEXT
SW1(config)#vlan 30
SW1(config-vlan)#name Guests
SW1(config-vlan)#exit
SW1(config)#interface fastEthernet 0/20
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 30
SW1(config-if)#end
SW1#copy running-config startup-config

Three ways to route between VLANsسێ ڕێگەی ڕێدۆزیی نێوان VLANـەکان

All three methods route between VLANs; they differ in links, speed and scale. Cisco’s course describes the layer 3 switch as the most scalable choice for medium and large networks — much faster because everything is switched and routed in hardware, with no external link to a router — and its only drawback as cost. Router-on-a-stick suits small and medium networks; the legacy way survives only in textbooks.

هەر سێ ڕێگەکە لە نێوان دەکەن؛ لە بەستەر، خێرایی و فراوانبووندا جیاوازن. کۆرسی CCNAـی Cisco بە فراوانترین هەڵبژاردە بۆ مامناوەند و گەورە دادەنێت — زۆر خێراترە چونکە و هەردووکیان لە دەکرێن، بێ بەستەری دەرەکی بۆ — و تاکە کەموکوڕییەکەی نرخەکەیەتی. بۆ بچووک و مامناوەند گونجاوە؛ ڕێگا کۆنەکە ئەمڕۆ تەنیا لە کتێبەکاندا دەبینرێت.

Inter-VLAN routing methods comparedبەراوردی ڕێگەکانی
MethodڕێگەLegacyکۆنRouter-on-a-stickLayer 3 switch
Links to the routerبەستەر بۆ one per VLANیەکێک بۆ هەر one trunkیەک none — the router is insideهیچ — لە ناوەوەیە
Gateways onناونیشانەکانی لەسەرphysical router interfaces فیزیکیی router subinterfaces SVIsSVIـەکان
Routing done in لەrouter software router software switch hardware
Speedخێراییmediumمامناوەندlowest: one shared link, crossed twiceکەمترین: یەک بەستەری هاوبەش کە دوو جار پێیدا تێدەپەڕێتhighestزۆرترین
Scaleفراوانبوونa few VLANsچەند small/medium; about 50 VLANs at mostبچووک/مامناوەند؛ تا نزیکەی ⁦50⁩ medium to large campusکەمپەسی مامناوەند تا گەورە
Costنرخmany router portsزۆر cheapestهەرزانترینa layer 3 switch costs more گرانترە
Three columns. Legacy: a router with two cables to a switch; links one per VLAN, routes in router software, speed medium, scale a few VLANs, today history. Router-on-a-stick: a router with one thick trunk to a switch; one trunk, router software, lowest speed with one shared link, small or medium networks up to about 50 VLANs, today small sites and labs. Layer 3 switch: a switch with a router badge; no outside link, switch hardware, highest speed, medium to large, today campus LANs.سێ ستوون. کۆن: ڕێدۆزێک بە دوو کێبڵ بۆ سویچێک؛ بەستەر یەکێک بۆ هەر VLAN، ڕێدۆزی لە نەرمەواڵەی ڕێدۆز، خێرایی مامناوەند، فراوانبوون چەند VLANـێک، ئەمڕۆ مێژوو. ڕێدۆزی تاکقۆڵ: ڕێدۆزێک بە یەک ترەنکی ئەستوور بۆ سویچێک؛ یەک ترەنک، نەرمەواڵەی ڕێدۆز، کەمترین خێرایی بە یەک بەستەری هاوبەش، ڕایەڵەی بچووک یان مامناوەند تا نزیکەی 50 VLAN، ئەمڕۆ شوێنی بچووک و تاقیگە. سویچی چینی 3: سویچێک بە نیشانەی ڕێدۆز؛ هیچ بەستەرێکی دەرەکی، ڕەقەواڵەی سویچ، زۆرترین خێرایی، مامناوەند تا گەورە، ئەمڕۆ کەمپەسەکان.
Same job, three tools.هەمان کار، سێ ئامراز.CêIT

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

A checklist of eight lines with ticks: create the VLANs on the layer 3 switch too (vlan 10, vlan 20); one SVI per VLAN, each in its own subnet, then no shutdown; ip routing in global configuration mode; access ports in the right VLANs, at least one up per VLAN; trunk to the access switch with encapsulation dot1q, then mode trunk; PCs with an address in the VLAN’s subnet and the SVI as gateway; check with show ip interface brief, show ip route and ping; save with copy running-config startup-config.لیستی پشکنینی هەشت دێڕ بە ✓: VLANـەکان هەروەها لەسەر سویچی چینی 3ـەکە دروست بکە (vlan 10، vlan 20)؛ بۆ هەر VLANـێک SVIـێک، هەریەکە لە ژێرڕایەڵەی خۆیدا، پاشان no shutdown؛ ip routing لە باری ڕێکخستنی گشتیدا؛ دەرچەکانی دەستڕاگەیشتن لە VLANـی دروستدا، بۆ هەر VLANـێک لانیکەم یەکێکی up؛ ترەنک بۆ سویچی دەستڕاگەیشتن بە encapsulation dot1q، پاشان mode trunk؛ PCـەکان بە ناونیشانێک لە ژێرڕایەڵەی VLANـەکەدا و SVI وەک دەروازەی بنەڕەتی؛ بە show ip interface brief، show ip route و ping بیپشکنە؛ بە copy running-config startup-config پاشەکەوتی بکە.
Eight checks for a routing switch.هەشت پشکنین بۆ کە دەکات.CêIT

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

ExerciseڕاهێنانThree VLANs through a layer 3 switchسێ VLAN لە ڕێگەی سویچی چینی 3ـەوە

A 3560 (SW1) is joined on Fa0/1 to Fa0/1 of a 2960 (SW2). On SW2 a PC on Fa0/2 is in VLAN 10 (192.168.10.2), one on Fa0/3 in VLAN 20 (192.168.20.2) and one on Fa0/4 in VLAN 30 (192.168.30.2). Make every PC able to ping the others. Write both configurations and each PC’s gateway.

⁦3560 (SW1)⁩ لەسەر ⁦Fa0/1⁩ بە ⁦Fa0/1⁩ـی ⁦2960 (SW2)⁩ـەوە بەستراوە. لەسەر ⁦SW2 PC⁩ـێک لەسەر ⁦Fa0/2⁩ لە ⁦VLAN 10 (192.168.10.2)⁩، یەکێک لەسەر ⁦Fa0/3⁩ لە ⁦VLAN 20 (192.168.20.2)⁩ و یەکێک لەسەر ⁦Fa0/4⁩ لە ⁦VLAN 30 (192.168.30.2)⁩دایە. وا بکە هەموو PCـێک بتوانێت بۆ ئەوانی تر بکات. هەردوو و هەر PCـێک بنووسە.

Hintئاماژە

Start from Lab 2 and add VLAN 30 everywhere.

لە تاقیکردنەوەی 2ـەوە دەست پێ بکە و ⁦VLAN 30⁩ لە هەموو شوێنێک زیاد بکە.

Show answerوەڵامەکە پیشان بدە
AnswerوەڵامTEXT
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
SW1(config-vlan)#vlan 30
SW1(config-vlan)#vlan 999
SW1(config-vlan)#name Native
SW1(config-vlan)#exit
SW1(config)#interface fastEthernet 0/1
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk native vlan 999
SW1(config-if)#exit
SW1(config)#interface vlan 10
SW1(config-if)#ip address 192.168.10.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#interface vlan 20
SW1(config-if)#ip address 192.168.20.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#interface vlan 30
SW1(config-if)#ip address 192.168.30.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip routing
SW1(config)#end
SW1#copy running-config startup-config

SW2(config)#vlan 10
SW2(config-vlan)#vlan 20
SW2(config-vlan)#vlan 30
SW2(config-vlan)#vlan 999
SW2(config-vlan)#name Native
SW2(config-vlan)#exit
SW2(config)#interface fastEthernet 0/2
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 10
SW2(config-if)#interface fastEthernet 0/3
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 20
SW2(config-if)#interface fastEthernet 0/4
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 30
SW2(config-if)#interface fastEthernet 0/1
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport trunk native vlan 999
SW2(config-if)#end
SW2#copy running-config startup-config

Gateways: 192.168.10.1, 192.168.20.1 and 192.168.30.1. The VLANs must exist on SW1 too, otherwise its SVIs stay down; on the 3560 the encapsulation comes before trunk mode; native VLAN 999 (unused) on both ends of the trunk, as in Lab 2.

ناونیشانەکانی : ⁦192.168.10.1⁩، ⁦192.168.20.1⁩ و ⁦192.168.30.1⁩. دەبێت لەسەر ⁦SW1⁩ـیش هەبن، ئەگەرنا SVIـەکانی down دەمێننەوە؛ لەسەر ⁦3560 encapsulation⁩ پێش باری trunk دێت؛ ⁦999⁩ (بەکارنەهێنراو) لەسەر هەردوو سەری ، وەک تاقیکردنەوەی 2.

ExerciseڕاهێنانCheck a lab solutionچارەسەری تاقیکردنەوەیەک بپشکنە

A student’s solution of this lab ends with these lines on the 3560. Find three problems and say what the correct lines are.

چارەسەری قوتابییەک بۆ ئەم تاقیکردنەوەیە بەم دێڕانە لەسەر ⁦3560⁩ کۆتایی دێت. سێ کێشە بدۆزەوە و بڵێ دێڕە دروستەکان چین.

Lines from the solution (the VLAN and SVI lines are left out)چەند دێڕێک لە چارەسەرەکە (دێڕەکانی VLAN و SVI لابراون)TEXT
Switch(config)#interface fastEthernet 0/24
Switch(config-if)#switchport mode access
Switch(config-if)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.
Switch(config-if)#exit
Switch(config)#ip routing
Switch(config)#interface range fastEthernet 0/1-11
Switch(config-if-range)#switchport trunk encapsulation dot1q
Switch(config-if-range)#exit
Switch(config)#ip routing
Show answerوەڵامەکە پیشان بدە
  • The encapsulation was put on Fa0/1–11 (access ports) — it belongs on Fa0/24, before switchport mode trunk, which the 3560 had refused.
  • switchport mode access before switchport mode trunk on Fa0/24 is not needed.
  • ip routing is typed twice; once is enough.
  • encapsulation لەسەر ⁦Fa0/1–11⁩ () دانرا — جێگەی لەسەر ⁦Fa0/24⁩ـە، پێش switchport mode trunk، کە ⁦3560⁩ ڕەتی کردبووەوە.
  • switchport mode access پێش switchport mode trunk لەسەر ⁦Fa0/24⁩ پێویست نییە.
  • ip routing دوو جار نووسراوە؛ یەک جار بەسە.
Correct trunk linesدێڕە دروستەکانی ترەنکTEXT
Switch(config)#interface fastEthernet 0/24
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
ExerciseڕاهێنانFix the configurationڕێکخستنەکە چاک بکەرەوە

A student planned these commands for a layer 3 switch: Fa0/1–2 in VLAN 10 (192.168.1.0/24) and Fa0/3–4 in VLAN 20 (192.168.2.0/24). Four lines are wrong. Find them and say what each would do.

قوتابییەک ئەم بۆ ئامادە کردووە: ⁦Fa0/1–2⁩ لە ⁦VLAN 10⁩ (192.168.1.0/24) و ⁦Fa0/3–4⁩ لە ⁦VLAN 20⁩ (192.168.2.0/24). چوار دێڕ هەڵەن. بیاندۆزەوە و بڵێ هەریەکەیان چی دەکات.

The planned commandsفەرمانەکان ئامادەکراوەکانTEXT
interface vlan 20
 ip address 192.168.1.1 255.255.255.0
 no shutdown
 exit
interface fastEthernet 0/1-2
 switchport access vlan 10
 exit
interface vlan 20
 ip address 192.168.2.1 255.255.255.0
 no shutdown
 exit
interface fastEthernet 0/3-4
 switchport access vlan 2
 exit
ip routing
end
Show answerوەڵامەکە پیشان بدە
  • Line 1: the first SVI must be interface vlan 10. As planned, the second interface vlan 20 block only replaces Vlan20’s address with 192.168.2.1, so VLAN 10 is left with no SVI and no gateway.
  • Lines 5 and 12: interface fastEthernet 0/1-2 and 0/3-4 need the word range. Without it IOS rejects the line (“% Invalid input detected”), and the port commands under it never reach the ports.
  • Line 13: switchport access vlan 2 must be switchport access vlan 20; as planned, Fa0/3–4 would land in a new VLAN 2 that has no SVI.
  • دێڕی 1: یەکەم SVI دەبێت interface vlan 10 بێت. وەک ئامادە کراوە، بەشی دووەمی interface vlan 20 تەنیا ناونیشانی ⁦Vlan20⁩ دەگۆڕێت بۆ ⁦192.168.2.1⁩، بۆیە ⁦VLAN 10⁩ بێ SVI و بێ دەمێنێتەوە.
  • دێڕەکانی 5 و ⁦12⁩: interface fastEthernet 0/1-2 و 0/3-4 پێویستیان بە وشەی range هەیە. بەبێ ئەو IOS دێڕەکە ڕەت دەکاتەوە («% Invalid input detected») و ژێرەوەی هەرگیز ناگەنە .
  • دێڕی ⁦13⁩: switchport access vlan 2 دەبێت switchport access vlan 20 بێت؛ وەک ئامادە کراوە، ⁦Fa0/3–4⁩ دەکەونە ناو ⁦VLAN 2⁩ـێکی نوێ کە SVIـی نییە.
The corrected configurationڕێکخستنە چاککراوەکەTEXT
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
SW1(config-vlan)#exit
SW1(config)#interface vlan 10
SW1(config-if)#ip address 192.168.1.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#interface vlan 20
SW1(config-if)#ip address 192.168.2.1 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#interface range fastEthernet 0/1 - 2
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 10
SW1(config-if-range)#interface range fastEthernet 0/3 - 4
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 20
SW1(config-if-range)#exit
SW1(config)#ip routing
SW1(config)#end
SW1#copy running-config startup-config
ExerciseڕاهێنانWhen does ip routing work?ip routing کەی کار دەکات؟

Complete the rule in your own words: ip routing moves packets between VLANs only when …

یاساکە بە وشەی خۆت تەواو بکە: ip routing تەنیا کاتێک لە نێوان دەگوازێتەوە کە …

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

… every VLAN has its own subnet and an SVI that is up/up with an address in that subnet, and every host has that SVI address as its default gateway. The command is typed once, in global configuration mode.

… هەموو خۆی و SVIـێکی ⁦up/up⁩ـی بە ناونیشانێک لەو هەبێت و هەموو ئەو ناونیشانەی SVI وەک هەبێت. یەک جار، لە دەنووسرێت.

ExerciseڕاهێنانChoose the methodڕێگەکە هەڵبژێرە

For each case choose legacy routing, router-on-a-stick or a layer 3 switch, and give one reason: (a) a shop with 2 VLANs and an old router with one free port; (b) a university building with 60 VLANs; (c) a training lab that must show how 802.1Q tags reach a router.

بۆ هەر حاڵەتێک کۆن، یان هەڵبژێرە و هۆکارێک بڵێ: ⁦(a)⁩ دوکانێک بە 2 و کۆن بە یەک بەتاڵ؛ ⁦(b)⁩ بینایەکی زانکۆ بە ⁦60⁩ ؛ ⁦(c)⁩ تاقیگەیەکی ڕاهێنان کە دەبێت پیشان بدات تاگەکانی ⁦802.1Q⁩ چۆن دەگەنە .

Show answerوەڵامەکە پیشان بدە
  • (a) Router-on-a-stick: one free port is enough for both VLANs.
  • (b) A layer 3 switch: many VLANs and much traffic; router-on-a-stick does not scale beyond about 50 VLANs.
  • (c) Router-on-a-stick: the subinterfaces show the tags arriving at the router.
  • ⁦(a)⁩ : یەک بەتاڵ بۆ هەردوو بەسە.
  • ⁦(b)⁩ : زۆر و هاتوچۆی زۆر؛ لە نزیکەی ⁦50⁩ زیاتر گەورە نابێت.
  • ⁦(c)⁩ : پیشان دەدەن تاگەکان چۆن دەگەنە .

Summaryکورتە

  • A layer 3 switch switches inside VLANs and routes between them in hardware (3560/3650 in Packet Tracer).
  • One SVI per VLAN (interface vlan 10, address, no shutdown) is that VLAN’s default gateway; ip routing turns routing on (off by default on Catalyst switches).
  • An SVI is up/up only if its VLAN exists, it is not shut, and a port of that VLAN is up.
  • Routed ports (no switchport + IP) join the switch to routers; access switches join the core with trunks (on a 3560: encapsulation dot1q first).
  • Compared with router-on-a-stick and the legacy way, it is the fastest and most scalable; its drawback is cost.
  • Common mistakes: no ip routing, two SVIs in one subnet, an SVI down, trunk/access mismatches, gateways missing on the PCs.
  • لە ناو دەکات و لە نێوانیاندا لە دەکات (⁦3560/3650⁩ لە Packet Tracer).
  • بۆ هەر یەک SVI (interface vlan 10، ناونیشان، no shutdown) ئەو ؛ ip routing هەڵدەکات (لەسەر Catalyst بە بنەڕەت کوژاوەیە).
  • SVI تەنیا کاتێک ⁦up/up⁩ـە کە هەبێت، نەکوژابێتەوە و ئەو up بێت.
  • (no switchport + IP) بە دەبەستن؛ دەستڕاگەیشتن بە بە ناوەندەوە دەبەسترێن (لەسەر ⁦3560⁩: سەرەتا ⁦encapsulation dot1q⁩).
  • بە بەراورد لەگەڵ و ڕێگا کۆنەکە، خێراترین و فراوانترینە؛ کەموکوڕییەکەی نرخە.
  • هەڵە باوەکان: نەبوونی ip routing، دوو SVI لە یەک ، SVIـی down، نەگونجانی ⁦trunk/access⁩، نەبوونی لەسەر PCـەکان.

Next: keep redundant switch links without loops — Spanning Tree and EtherChannel.

دواتر: بەستەری یەدەگی نێوان بەبێ ئەڵقە ڕابگرە — پرۆتۆکۆڵی داری داپۆشەر و EtherChannel.

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

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

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

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

Redundant Links: Spanning Tree and EtherChannelبەستەری یەدەگ: پرۆتۆکۆڵی داری داپۆشەر و EtherChannel

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