Jeremy’s IT Lab lecture video:
Commands
Commands List
VLAN Show Commands
4. VLANs
Link to original
- show vlan
- show vlan brief
-->Shows a brief list of VLANs and the access ports that are using themVLAN Interface Commands
Switchport
1. General
- switchport mode type { access
/trunk/dynamic auto/dynamic desirable }-->Configures the switchport type for VLANs- switchport nonegotiate
-->Disables Dynamic Trunking Protocol (DTP) requests between switches (setting the switch to access mode does the same thing)2. Access Ports
- switchport access vlan vlan-id
-->Changes the access port’s VLAN to the specified VLAN ID- switchport voice vlan vlan-id
-->Assigns VOIP (Voice over IP) traffic to be tagged with a specific VLAN ID (Done while the switchport is in access mode)3. Trunk Ports
Link to original
- switchport trunk encapsulation mode {auto
/negotiate/dot1q/isl}- switchport trunk allowed vlan argument {vlan-id
/add vlan-id/remove vlan-id/all/none/except vlan-id}
(Multiple VLANs can be used inadd,removeandexceptby putting a comma in between the vlan-IDs)- switchport trunk native vlan vlan-id
ROAS Commands
Sub-interface / ROAS
Link to original
- interface interface/id.sub-interface-id
-->Initialize a sub-interface
- Ex: interface G0/0.10
- encapsulation dot1q vlan-id
-->Set the sub-interface’s VLAN- encapsulation dot1q vlan-id native
-->Sets the native VLAN for the sub-interface- ip address ip-address netmask
-->Sets the IP address on the virtual sub-interfaceSVI Commands
Multilayer Switch and SVI
Link to original
- ip routing
-->Enables Layer 3 routing on a Multilayer switch- no switchport
-->Configures the interface as a Layer 3/routed port (Not a Layer 2/switchport)- interface vlan id
-->Creates an switch virtual interface (SVI)
Native VLAN on a Router (ROAS)
There are 2 methods of configuring the native VLAN on a router:
- Use the command ‘encapsulation dot1q vlan-id native’ on the router sub-interface.
- Configure the IP address for the native VLAN on the router’s physical interface (the encapsulation command is not necessary).
- In short, configure the actual physical port’s IP address, and any devices using it as their Default Gateway will send untagged traffic to that port, because the router will assume the traffic is in the native VLAN.
Layer 3 (Multilayer) Switches
Multilayer switches are capable of switching and routing
- Being able to route means it is Layer 3 aware.
- You can assign IP addresses to its virtual interfaces and also create virtual interfaces for each VLAN, and assign IP addresses to those interfaces.
- Considering that it has routing capabilities, that means it also has routing tables, and you can configure routes on it, just like a router.
Switch Virtual Interfaces (SVI) and Inter-VLAN Routing
Switch Virtual Interfaces (SVIs) are the virtual interfaces you can assign IP addresses to in a multilayer switch.
- Configure end hosts to use the SVI as their Default Gateway instead of the router. This step is done so the switch could do inter-VLAN routing.
- To send traffic to different subnets/VLANs, the end hosts will send the traffic to the switch, and the switch will route the traffic.
Important setting for multilayer switches to work
You must use the
ip routingcommand in order to enable Layer 3 features on the Multilayer switch, or else the SVIs and routed ports will NOT work.
SVI configuration
To create an SVI use this command:
Link to original
- interface vlan id
-->Creates an switch virtual interface (SVI)Then make sure to run
no shutdownto enable the interface.
Things to Watch out for to Make Sure SVIs Work
- The VLAN must exist on the switch
- The VLAN must not be shutdown
- The SVI must not be shutdown
- The switch MUST have at least one access port in the VLAN in an up/up state, AND/OR at least one trunk port that allows the VLAN that is in an up/up state.
Jeremy’s IT Lab előadásvideó:
Parancsok
Parancslista
VLAN Show Parancsok
4. VLAN-ok
Eredeti hivatkozása
- show vlan
- show vlan brief
-->Megjeleníti a VLAN-ok rövid listáját és a hozzájuk rendelt access portokatVLAN Interfész Parancsok
Switchport
1. Általános
- switchport mode type { access
/trunk/dynamic auto/dynamic desirable }-->Beállítja a switchport típusát a VLAN-okhoz- switchport nonegotiate
-->Letiltja a Dynamic Trunking Protocol (DTP) kéréseket a switchek között (az access módba állítás ugyanezt eredményezi)2. Access Portok
- switchport access vlan vlan-id
-->Módosítja az access port VLAN-ját a megadott VLAN ID-ra- switchport voice vlan vlan-id
-->Beállítja, hogy a VoIP (Voice over IP) forgalom adott VLAN ID-val legyen felcímkézve (access módban lévő switchporton végzendő)3. Trunk Portok
Eredeti hivatkozása
- switchport trunk encapsulation mode {auto
/negotiate/dot1q/isl}- switchport trunk allowed vlan argument {vlan-id
/add vlan-id/remove vlan-id/all/none/except vlan-id}
(Több VLAN is megadható azadd,removeésexceptkulcsszavaknál vesszővel elválasztva)- switchport trunk native vlan vlan-id
ROAS Parancsok
Sub-interface / ROAS
Eredeti hivatkozása
- interface interface/id.sub-interface-id
-->Inicializál egy sub-interface-t
- Példa: interface G0/0.10
- encapsulation dot1q vlan-id
-->Beállítja a sub-interface VLAN-ját- encapsulation dot1q vlan-id native
-->Beállítja a native VLAN-t a sub-interface számára- ip address ip-address netmask
-->Beállítja az IP-címet a virtuális sub-interface-enSVI Parancsok
Multilayer Switch és SVI
Eredeti hivatkozása
- ip routing
-->Engedélyezi a Layer 3 routingot egy Multilayer switchen- no switchport
-->Konfigurálja az interfészt Layer 3 / routed portként (nem Layer 2 / switchportként)- interface vlan id
-->Létrehoz egy switch virtual interface-t (SVI)
Native VLAN Routeren (ROAS)
2 módszer létezik a native VLAN konfigurálására routeren:
- Használja az ‘encapsulation dot1q vlan-id native’ parancsot a router sub-interface-én.
- Konfigurálja a native VLAN IP-címét a router fizikai interfészén (az encapsulation parancs nem szükséges).
- Röviden: konfigurálja a tényleges fizikai port IP-címét, és minden olyan eszköz, amely ezt használja Default Gateway-ként, címkézetlen (untagged) forgalmat küld erre a portra, mert a router feltételezi, hogy a forgalom a native VLAN-ban van.
Layer 3 (Multilayer) Switchek
A Multilayer switchek képesek switchingre és routingra is
- A routing képesség azt jelenti, hogy Layer 3 tudatos (Layer 3 aware).
- Hozzárendelhet IP-címeket a virtuális interfészeihez, létrehozhat virtuális interfészeket minden egyes VLAN-hoz, és IP-címeket rendelhet azokhoz az interfészekhez.
- Figyelembe véve a routing képességeit, ez azt jelenti, hogy routing táblákkal is rendelkezik, és útvonalakat konfigurálhat rajta, akárcsak egy routeren.
Switch Virtual Interfaces (SVI) és Inter-VLAN Routing
A Switch Virtual Interfaces (SVI-k) olyan virtuális interfészek, amelyekhez IP-címeket rendelhet egy multilayer switchben.
- Konfigurálja úgy a végfelhasználói eszközöket (end hosts), hogy az SVI-t használják Default Gateway-ként a router helyett. Ez a lépés azért szükséges, hogy a switch végezhesse az inter-VLAN routingot.
- A különböző alhálózatokba/VLAN-okba irányuló forgalmat a végfelhasználói eszközök a switchnek küldik, és a switch fogja azt elirányítani (route-olni).
Fontos beállítás a multilayer switchek működéséhez
Használnia kell az
ip routingparancsot a Layer 3 funkciók engedélyezéséhez a Multilayer switchen, különben az SVI-k és a routed portok NEM fognak működni.
SVI konfiguráció
SVI létrehozásához használja ezt a parancsot:
Eredeti hivatkozása
- interface vlan id
-->Létrehoz egy switch virtual interface-t (SVI)Ezután feltétlenül adja ki a
no shutdownparancsot az interfész engedélyezéséhez.
Mire kell figyelni az SVI-k megfelelő működéséhez
- A VLAN-nak léteznie kell a switchen
- A VLAN nem lehet leállítva (shutdown)
- Az SVI nem lehet leállítva (shutdown)
- A switchnek RENDELKEZNIE KELL legalább egy olyan access porttal az adott VLAN-ban, amely up/up állapotban van, ÉS/VAGY legalább egy olyan trunk porttal, amely engedélyezi a VLAN-t és up/up állapotban van.