Step1 . Switch# vlan database Enters VLAN database mode. Step 2 . Switch(vlan)# vlan vlan_ID: Adds an Ethernet VLAN. Note You cannot delete the default VLANs for these media types: Ethernet VLAN 1 and FDDI or Token Ring VLANs 1002 to 1005. When you delete a VLAN, any LAN interfaces configured as access ports assigned to that VLAN become inactive.
There are a couple of problems with your idea. You cannot get traffic from one VLAN to another VLAN without routing. Either you have a dedicated router, or a layer-3 switch, which is really a router, too. A layer-2 switch with separate VLANs and SVIs still cannot let hosts on one VLAN communicate with hosts on a different VLAN. Frames can be switched at layer-2 on the same VLAN, but you need to strip the frames to get to the packets to route them between VLANs. Switches are mostly limited to ethernet. Routers are used to connect different physical and data-link protocols, too. Some translating bridges can do some of that at layer-2. For example, WAPs translate layer-2 frames between ethernet and Wi-Fi, but only if they are on the same layer-2 LAN. Even layer-3 switches usually have fewer resources RAM, CPU, etc. than dedicated routers do, and dedicated routers often have special hardware that you do not normally find in switches.

Switchlayer 3 merupakan salah satu perangkat Cisco yang dapat bekerja layaknya sebuah router. Switch layer 3 bekerja pada lapisan network pada model OSI (Open System Interconnection). Switch layer 3 menggabungkan fungsi switch dan router. Salah satu fungsinya adalah menghubungkan host yang berbeda VLAN seperti yang akan dijelaskan pada materi ini.

Estou configurando a rede em um prédio onde funcionará alguns departamentos da Alura Financeiro e colocar os dois departamentos na mesma rede, porém com isso teríamos alguns problemasComo todos os computadores estariam se comunicando pela mesma via, ao mesmo tempo, a rede poderia ficar mais lenta;Um computador conseguiria "ver" o outro. Isso poderia fazer com que um usuário malicioso direcionasse algum tipo de ataque;Caso ocorresse algum tipo de problema em alguma parte da rede, ambos departamentos seriam temos que configurar duas redes diferentes, cada uma relacionada a um uma primeira abordagem, podemos configurar essas redes fisicamente separadas. Isto é, com um switch para cada departamento, assim como uma interface no roteador. Porém o custo disso seria mais elevado, já que precisaríamos de mais switches e de um roteador com mais maneira seria separar logicamente o switch e o roteador, pois dessa forma, além de separarmos a rede entre os departamentos, estamos economizando também. Esse tipo de configuração é conhecida como as VLansAs VLans, nada mais são do que redes locais Lan virtuais. Ou seja, são redes lógicas configuradas em um mesmo ativo de rede roteadores e switches, por exemplo. Com ela é possível dividir nossa rede em quantas partes precisarmos para o da divisão e economia da rede, temos as seguintes vantagens ao implantar esse tipo de redeMais desempenho, já que o domínio de broadcast fica dividido entre as redes;Mais segurança, apenas os computadores pertencentes a VLan podem "ver" um ao outro;Conseguimos isolar melhor os problemas, como as redes estão separadas, o problema de uma não afeta a agora que sabemos o que é uma VLan e como ela pode nos ajudar, como podemos implementá-la na nossa rede?Para isso vamos dar uma olhada na nossa rede e ver como ela está distribuída Como vimos, nossa rede tem dez máquinas, cinco do departamento Financeiro e cinco de Vendas. Temos também um switch que concentra nossa rede em um único ponto, seguido de um podiamos dividir a rede para que cada departamento faça parte de uma VLan diferente Tanto o nosso switch quanto o nosso roteador são da marca Cisco, em outras palavras, veremos como configurar VLans em dispositivos Cisco. Mas por onde vamos começar?Configurando o switchBem, como é nosso switch que ligará as máquinas, começaremos por nosso switch tem 24 portas e precisamos decidir a qual rede elas vão pertencer. Como são dez máquinas, podemos usar as cinco primeiras portas para uma rede e as cinco seguinte para outra. Deixando as outras livres no caso do números de computadores Uma boa prática é usar a última porta do switch para se conectar ao roteador, e deixar uma margem entre uma porta e outra para o caso da rede crescer. Por exemplo, deixar das portas 1 à 10 para uma VLan e da 11 à 20 para temos que conectar o switch ao roteador. Podemos usar uma das portas que sobraram, a onze, por primeiro passo para configurar o switch é acessar o modo de usuário privilegiado. Para isso temos que digitar, no terminal, o comando enable. Viram que o símbolo > mudou para ? Isso indica que estamos como usuário falar agora que ele será configurado configure via terminal terminal. Portanto configure terminal Notaram que antes da hashtag apareceu escrito config? Os switches e roteadores Cisco nos mostram em que modo estão. Neste caso no modo de podemos configurar nossas VLans, mas como identificá-las?Para isto, cada VLan deve possuir um número de identificação única. Esse número pode estar entre 2 à 1005. Já que nossos dois setores estão no térreo, vamos deixar os ids das VLans terminados em 0, assim saberemos o andar que elas estão. Assim nossa primeira VLan será 1, seguido do 0, ficando dizer ao switch que queremos criar uma vlan que tem o id igual a 10config vlan 10. Perceba que ao criar a VLan 10, o modo do switch mudou para o config-vlan. Ou seja, toda a configuração que fizermos servirá apenas para essa VLan. Sendo assim, para criarmos a outra VLan, precisamos sair do modo de configuração dessa que criamos. Para isso basta digitar exit e já saímos desse modo. Assim podemos criar nossa outra VLan. O comando é similar, basta substituir o número de identificaçãoconfig vlan 20. Maravilha! Criamos nossas duas VLans! Mas como podemos ter certeza que elas foram mesmo criadas?Podemos ver suas configurações com o comando show vlan no modo de usuário privilegiado. Para isso ou digitamos exit até voltarmos a esse ponto, ou então, utilizamos o atalho Ctrl+C, que retorna automaticamente a esse isso, conseguimos listar nossas VLans show vlan Viram? Nossas VLans foram criadas com os ids que informamos, mas que nomes são esses que foram atribuídos as VLans?Quando não informamos nenhum nome para as VLans, esses são atribuídos de maneira automática pelo sistema, neste o sistema nomeou VLAN seguido do id da esses nomes não possuem nenhum significado para nós, ou seja, seria mais intuitivo se fossem nomeados de acordo com o departamento, como Financeiro ou Vendas... Como podemos alterá-los?Alterando o nome das VLansPara alterar os nomes das VLans, temos que ir até seu modo de configuração. Como estamos no modo de usuário privilegiado, temos que digitar configure terminal. Em seguida, digitamos a VLan que queremos configurar, no caso vlan 10config vlan 10Neste modo, falamos que esta VLan terá o nome name, neste caso, FinanceiroSwitchconfig-vlanname Financeiro Para renomear a outra VLan, podemos fazer da mesma forma como fizemos anteriormente, a diferença é que entraremos no modo de configuração da vlan de id 20 Vamos listar as VLans novamente e ver se a alteração funcionou Nossas VLans já estão criadas e com um nome que nos mostra o lugar a que elas e essas outras VLans que estão aparecendo, para que são?Essas são outras VLans padrões usadas pelos roteadores e switches Cisco, sendo a VLan 1 a padrão. Como podemos ver, todas as portas do switch pertencem a para nossa configuração funcionar, as porta precisam estar pertencendo as nossas VLans, logo precisamos atribuir algumas dessas portas a nossa VLan… Como vamos fazer isso?Atribuindo as VLans às portas do switchPara isso, no modo de configuração, temos que acessar a porta que queremos configurar. Ou seja, vamos ter que acessar a interface de rede e atribuir uma VLan a queremos acessar uma interface do switch, digitamos interface seguido do seu tipo Ethernet, Fast Ethernet, no nosso caso é uma fastEthernet e a porta que queremos acessar, 0/1. Precisamos falar que essa porta está conectada a um computador. Isto é, que essa porta do switch switchport ficará no modo mode de acesso access a um dispositivo final computador, notebook, servidor....config-if switchport mode accessE também que essa porta switchport estará acessando a VLan 10 Com isso a porta 1 já está acessando a VLan 10, podemos configurar as outras da mesma maneira. Mas você pode se perguntar"Temos que configurar porta por porta?"Além do modo manual, conseguimos informar para o switch uma variação. Ou seja, um range de portas que terão a mesma dizer que as interfaces dentro da variação range, do tipo fastEthernet de 0/2 até - a porta fastEthernet 0/5config interface range fastEthernet 0/2 - fastEthernet 0/5Agora informamos que essas portas estão conectadas a um dispositivo final e que acessarão a VLan 10 Temos que fazer o mesmo com as portas que pertencerão a outra VLan Atribuímos nossas portas as suas respectivas VLans. Podemos conferir usando aquele comando já conhecido show vlan A configuração do switch foi finalizada. Agora precisamos configurar o roteador para permitir a comunicação da nossa o RoteadorAssim como no switch, temos que acessar o modo de usuário privilegiado enable, para começar nossa configuração. Em seguida digitamos configure terminal para dizer que ele será configurado Os roteadores Cisco vem com suas portas desabilitadas. Ou seja, para utilizá-las precisamos antes habilitá-las. Para isso, temos que acessar essa porta. Podemos fazer isso da mesma maneira que acessamos a porta do que desejamos acessar a interface do tipo fastEthernet, cada roteador tem uma forma de nomear suas porta, no nosso caso essa porta é a 0/0, mas poderia ser outro valor, como 2/1, por exemplo.config interface fastEthernet 0/0Já que queremos ligar essa interface, temos que falar para ela não no ficar desligada shutdown. Com isso nossa porta já está habilitada.config-if no shutdown Para que exista a comunicação entre os computadores da nossa rede, precisamos informar um endereço IP. Um para cada rede."Mas o switch só se conecta a uma porta no roteador, como vamos configurar dois endereços diferentes em um mesmo lugar?"Dividindo a interface do roteadorDa mesma forma que conseguimos dividir o switch, conseguimos dividir a interface do roteador em partes menores, criando subinterfaces que responderão a redes acessar essa subinterface, temos que informar a interface que queremos acessar config interface fastEthernet 0/0. E, para informar a subinterface, digitamos . ponto e o seu número, 10 por exemplo.config interface fastEthernet 0/ Precisamos informar que a subinterface 0/ neste caso está associada a uma VLan. Logo, precisamos dizer que ela está encapsulada encapsulation em uma VLan dot1Q seguido do id da VLan.config-subif encapsulation dot1Q 10 O próximo passo é informar o endereço IP dessa subinterface. Podemos informar qualquer endereço IP privado, no nosso caso, vamos utilizar para uma rede e para o que queremos informar é um endereço IP basta digitarmos ip address seguido do número e da máscaraconfig-subif ip address Vamos fazer o mesmo para a outra subinterface. Vamos acessá-la config interface fastEthernet 0/ que ela está associada a VLan 20 config-subif encapsulation dot1Q 10E terá como endereço IP config-subif ip address Endereços atribuídos. Como podemos ver se nossa configuração está funcionando? Testando! Vamos abrir o terminal em um computador de um setor e tentar pingar a máquina de um outro setor Hum… por quê não funcionou?Lembra do nosso switch? Nós atribuímos a cada porta uma rede distinta, certo? Logo as interfaces só se comunicam com a rede da qual fazem parte. Ou seja, a porta que conecta o switch ao roteador precisa transmitir os dados das duas VLans para ocorrer a comunicação. Como podemos fazer isso?Configurando uma porta trunk no switchUma interface que transmite os dados de todas as VLans é chamada de trunk. Para conseguirmos configurá-la temos que acessar o modo de configuração do switch. Precisamos acessar a interface que conecta ao roteador. No nosso caso essa é a interface 0/11config interface fastEthernet 0/11 Agora vamos falar que essa porta do switch switchport não está no modo mode de conexão a um dispositivo final, e sim em um modo em que junta todas as VLans trunk.config-if switchport mode trunk Vamos testar novamente e ver se nossas duas máquinas conseguem conversar entre si Sucesso! Agora temos duas redes separadas logicamente que conseguem se saber maisVeja que neste caso foi interessante juntar todas as VLans na porta trunk, porém existem casos em que nós precisamos isolar essas VLans escolhendo quais passarão pela porta trunk. Apesar de esse não ser a proposta desse post, você pode conferir aqui essa configuração..ConclusãoVimos nesse post o problema que tínhamos ao conectar duas redes distintas e como as VLans seriam uma solução. Vimos como configurá-las nos switches e nos roteadores fazendo existir comunicação entre de redes? Essa é só uma pequena parte de muitas outras. Aqui na Alura temos uma formação em redes de computadores onde você aprenderá sobre VLans, protocolos, como configurar listas de acesso, segurança e muito mais!
OnRouter1, you can use a static route: ip route 255.255.255. 192.168.1.1. On the wireless router, you will need to configure routes to 192.168.2./24 and 192.168.3./24 through 192.168.1.254. The wireless router already knows how to reach the 192.168.1./24` network because it is directly connected to it.
Hi there. Im trying to set up 2 VLANS on a topology, that consists of 4 PCs, 2 Switches and 1 Router. Task is , that 2 PCs that go to 1 switch run on separate Vlans, VLAN 10 and VLAN 20, and than on another Switch situation is the same. I have configured encapsulation on router for desired subinterfaces, ports from switch to router are set to trunk. Ports on switch are assigned to relevant VLAN. Still nothing is working. Could anyone advice the right way to go? Inour scenario, we reserved IP address for VLAN 10 and 20.0.0.1 for VLAN 20. With the default configuration, we need two physical interfaces on the router to make this intra VLAN communication. Due to the price of the router, it's not a cost-effective solution to use a physical interface of the router for each VLAN. We wrote an article which covers Virtual Local Area Networks VLANs as a concept, and another article on configuring VLANs on Cisco switches. The remaining subjects to cover are the different options that exist for routing between VLANs. This will let us illustrate the concepts of inter-vlan routing, Router on a Stick RoaS, and Layer 3 Switches occasionally called MultiLayer Switches. Why do we need Routing Between VLANs? As we learned in a prior article, VLANs create a logical separation between Switch ports. Essentially, each VLAN behaves like a separate physical switch. To illustrate this, below are two topology pictures of the same environment – one Physical and one Logical. The Physical topology depicts a switch and four hosts in two different VLANs – Host A and Host B are in VLAN 20 and Host C and Host D are in VLAN 30. The logical topology reflects how the physical topology operates – the two VLANs essentially create two separate physical switches. Despite all four hosts being connected to the same physical switch, the logical topology makes it clear that the hosts in VLAN 20 are unable to speak with the hosts in VLAN 30. Notice since there is nothing connecting the two “virtual” switches, there is no way for Host A to speak to Host C. Since Host A and Host C are in different VLANs, it is also implied that they are in different Networks. Each VLAN will typically correspond to its own IP Network. In this diagram, VLAN 20 contains the network, and VLAN 30 contains the network. The purpose of a Switch is to facilitate communication within networks. This works great for Host A trying to speak to Host B. However, if Host A is trying to speak to Host C, we will need to use another device – one whose purpose is to facilitate communication between networks. If you’ve read the Packet Traveling series, then you know that the device which facilitates communication between networks is a Router. A router will perform the routing function necessary for two hosts on different networks to speak to one another. In the same way, a Router is what we will need in order for hosts in different VLANs to communicate with one another. There are three options available in order to enable routing between the VLANs Router with a Separate Physical Interface in each VLAN Router with a Sub-Interface in each VLAN Utilizing a Layer 3 Switch The remainder of this article will explore these three options and their configuration. Router with Separate Physical Interfaces The simplest way to enable routing between the two VLANs to simply connect an additional port from each VLAN into a Router. The Router doesn’t know that it has two connections to the same switch — nor does it need to. The Router operates like normal when routing packets between two networks. In fact, the process of a packet moving from Host A to Host D in this topology will work exactly as it does in this video. The only difference is since there is only one physical switch, there will only be one MAC address table – each entry includes the mapping of switchport to MAC address, as well as the VLAN ID number that port belongs to. Each switch port in this diagram is configured as an Access port, we can use the range command to configure multiple ports as once Switchconfig interface range eth2/0 - 2 Switchconfig-if-range switchport mode access Switchconfig-if-range switchport access vlan 20 Switchconfig interface range eth3/0 - 2 Switchconfig-if-range switchport mode access Switchconfig-if-range switchport access vlan 30 Of course, before assigning the switchport to a VLAN, it is a good idea to create the VLAN in the VLAN Database. The Router interfaces also use a standard configuration — configuring an IP address and enabling the interface Routerconfig interface eth0/2 Routerconfig-if ip address Routerconfig-if no shutdown Routerconfig interface eth0/3 Routerconfig-if ip address Routerconfig-if no shutdown Below you will find various show commands for the Router and the Switch, these can be used to understand and validate how the environment is functioning. Router Show Commands show runip int briefip routearpcdp neighbor Router show running-config ... interface Ethernet0/2 ip address ! interface Ethernet0/3 ip address Router show ip interface brief Interface IP-Address OK? Method Status Protocol ... Ethernet0/2 YES manual up up Ethernet0/3 YES manual up up ... Router show ip route Codes L - local, C - connected, ... Gateway of last resort is not set is variably subnetted, 4 subnets, 2 masks C is directly connected, Ethernet0/2 L is directly connected, Ethernet0/2 C is directly connected, Ethernet0/3 L is directly connected, Ethernet0/3 Router show arp Protocol Address Age min Hardware Addr Type Interface Internet - ARPA Ethernet0/2 Internet 2 ARPA Ethernet0/2 Internet 5 ARPA Ethernet0/2 Internet - ARPA Ethernet0/3 Internet 4 ARPA Ethernet0/3 Internet 4 ARPA Ethernet0/3 Router show cdp neighbors Capability Codes R - Router, S - Switch, I - IGMP, B - Source Route Bridge ... Device ID Local Intrfce Holdtme Capability Platform Port ID Switch Eth 0/3 126 R S I Linux Uni Eth 3/0 Switch Eth 0/2 126 R S I Linux Uni Eth 2/0 Switch Show Commands show runmac tablevlan briefcdp neighbor Switch show running-config ... vlan 20 name RED ! vlan 30 name BLUE ... interface Ethernet2/0 switchport access vlan 20 switchport mode access ! interface Ethernet2/1 switchport access vlan 20 switchport mode access ! interface Ethernet2/2 switchport access vlan 20 switchport mode access ! interface Ethernet3/0 switchport access vlan 30 switchport mode access ! interface Ethernet3/1 switchport access vlan 30 switchport mode access ! interface Ethernet3/2 switchport access vlan 30 switchport mode access Switch show mac address-table Mac Address Table - Vlan Mac Address Type Ports - - - - 20 DYNAMIC Et2/1 20 DYNAMIC Et2/2 20 DYNAMIC Et2/0 30 DYNAMIC Et3/1 30 DYNAMIC Et3/2 30 DYNAMIC Et3/0 Total Mac Addresses for this criterion 6 Switch show vlan brief VLAN Name Status Ports - - - - ... 20 RED active Et2/0, Et2/1, Et2/2 30 BLUE active Et3/0, Et3/1, Et3/2 ... Switch show cdp neighbors Capability Codes R - Router, S - Switch, I - IGMP, B - Source Route Bridge ... Device ID Local Intrfce Holdtme Capability Platform Port ID Router Eth 3/0 152 R B Linux Uni Eth 0/3 Router Eth 2/0 166 R B Linux Uni Eth 0/2 Router with Sub-Interfaces The previously described method is functional, but scales poorly. If there were five VLANs on the switch, then we would need five switchports and five router ports to enable routing between all five VLANs Instead, there exists a way for multiple VLANs to terminate on a single router interface. That method is to create a Sub-Interface. A Sub-Interface allows a single Physical interface to be split up into multiple virtual sub-interfaces, each of which terminate their own VLAN. Sub-interfaces to a Router are similar to what Trunk ports are to a Switch – one link carrying traffic for multiple VLANs. Hence, each router Sub-interface must also add a VLAN tag to all traffic leaving said interface. The logical operation of the Sub-interface topology works exactly as the separate physical interface topology in the section before it. The only difference is with Sub-interfaces, only one Router interface is required to terminate all VLANs. Keep in mind, however, that the drawback with all VLANs terminating on a single Router interface is an increased risk of congestion on the link. The Sub-interface feature is sometimes referred to as Router on a Stick or One-armed Router. This is in reference to the single router terminating the traffic from each VLAN. The Switch’s port facing the router is configured as a standard Trunk Switchconfig interface eth1/1 Switchconfig-if switchport trunk encapsulation dot1q Switchconfig-if switchport mode trunk The Router’s configuration of Sub-interfaces is fairly straight forward. First, we enable the physical interface Routerconfig interface eth1/1 Routerconfig-if no shutdown Next, we create and configure the first Sub-interface Routerconfig interface eth1/ Routerconfig-subif encapsulation dot1Q 20 Routerconfig-subif ip address Apart from using the Sub-interface distinguisher eth1/ and using the encapsulation dot1q command, the rest of the interface configuration is exactly the same as any other regular physical interface. Similarly, we will also configure the Sub-interface for VLAN 30 Routerconfig interface eth1/ Routerconfig-subif encapsulation dot1Q 30 Routerconfig-subif ip address A point of clarity regarding the Sub-interface syntax. The number after the physical interface fa0/ and fa0/ simply serves the purpose of splitting up the physical interfaces into Sub-interfaces. The number specified in the encapsulation dot1q vlan command is what actually specifies what VLAN ID the traffic belongs to. These two values do not have to match, but often they do for the purpose of technician sanity. Below you will find various show commands for the Router and the Switch. These can be used to understand and validate how the environment is functioning. Router Sub-Interface Show Commands show runip int briefip routearpcdp neighbor Router show running-config ... interface Ethernet1/1 no ip address ! interface Ethernet1/ encapsulation dot1Q 20 ip address ! interface Ethernet1/ encapsulation dot1Q 30 ip address Router show ip interface brief Interface IP-Address OK? Method Status Protocol ... Ethernet1/1 unassigned YES NVRAM up up Ethernet1/ YES manual up up Ethernet1/ YES manual up up ... Router show ip route Codes L - local, C - connected, ... Gateway of last resort is not set is variably subnetted, 4 subnets, 2 masks C is directly connected, Ethernet1/ L is directly connected, Ethernet1/ C is directly connected, Ethernet1/ L is directly connected, Ethernet1/ Router show arp Protocol Address Age min Hardware Addr Type Interface Internet - ARPA Ethernet1/ Internet 0 ARPA Ethernet1/ Internet 0 ARPA Ethernet1/ Internet - ARPA Ethernet1/ Internet 0 ARPA Ethernet1/ Internet 0 ARPA Ethernet1/ Router show cdp neighbors Capability Codes R - Router, S - Switch, I - IGMP, B - Source Route Bridge ... Device ID Local Intrfce Holdtme Capability Platform Port ID Switch Eth 1/1 150 R S I Linux Uni Eth 1/1 Switch Trunk Show Commands show runmac tablevlan briefint trunkcdp Switch show running-config ... vlan 20 name RED ! vlan 30 name BLUE ... interface Ethernet1/1 switchport trunk encapsulation dot1q switchport mode trunk ! interface Ethernet2/1 switchport access vlan 20 switchport mode access ! interface Ethernet2/2 switchport access vlan 20 switchport mode access ! interface Ethernet3/1 switchport access vlan 30 switchport mode access ! interface Ethernet3/2 switchport access vlan 30 switchport mode access Switch show mac address-table Mac Address Table - Vlan Mac Address Type Ports - - - - 1 DYNAMIC Et1/1 20 DYNAMIC Et1/1 30 DYNAMIC Et1/1 20 DYNAMIC Et2/1 20 DYNAMIC Et2/2 30 DYNAMIC Et3/1 30 DYNAMIC Et3/2 Total Mac Addresses for this criterion 7 Switch show vlan brief VLAN Name Status Ports - - - - ... 20 RED active Et2/1, Et2/2 30 BLUE active Et3/1, Et3/2 ... Switch show interfaces trunk Port Mode Encapsulation Status Native vlan Et1/1 on trunking 1 Port Vlans allowed on trunk Et1/1 1-4094 Port Vlans allowed and active in management domain Et1/1 1,20,30 Port Vlans in spanning tree forwarding state and not pruned Et1/1 1,20,30 Switch show cdp neighbors Capability Codes R - Router, S - Switch, I - IGMP, B - Source Route Bridge ... Device ID Local Intrfce Holdtme Capability Platform Port ID Router Eth 1/1 136 R B Linux Uni Eth 1/1 Layer 3 Switch The last option for routing between VLANs does not involve a router at all. Nor does it involve using a traditional switch. Instead, a different device entirely can be used. This device is known as a Layer 3 Switch or sometimes also as a Multilayer switch. But exactly what is a Layer 3 switch? A Layer 3 Switch is different from a traditional Layer 2 Switch in that it has the functionality for routing between VLANs intrinsically. In fact, when considering how a L3 Switch operates, you can safely imagine that a Layer 3 Switch is a traditional switch with a built in Router. With regard to VLANs the Multilayer switch is configured mostly the same way as a regular L2 switch MultilayerSwitchconfig vlan 20 MultilayerSwitchconfig-vlan name RED MultilayerSwitchconfig vlan 30 MultilayerSwitchconfig-vlan name BLUE MultilayerSwitchconfig interface range eth2/0 - 2 MultilayerSwitchconfig-if-range switchport mode access MultilayerSwitchconfig-if-range switchport access vlan 20 MultilayerSwitchconfig interface range eth3/0 - 2 MultilayerSwitchconfig-if-range switchport mode access MultilayerSwitchconfig-if-range switchport access vlan 30 Then, for each VLAN that you want the Multilayer switch to route for, you have the option of configuring an IP address within what is known as an SVI, or a Switched Virtual Interface. An SVI serves as the L3 termination point for each VLAN – aka, the way in or out of each VLAN. Another way of looking at it is that the SVI serves as the interface on the built-in Router of the Multilayer switch, allowing traffic from one VLAN to reach the built-in Router and be routed to another VLAN as necessary. The configuration for an SVI involves two parts. First, enabling IP Routing; and Second, applying an IP address to the VLAN. To enable IP Routing, use the following command MultilayerSwitchconfig ip routing IP Routing only needs to be enabled once. Some L3 switches come with it enabled by default. Applying the command while it is already enabled will not cause any harm, so if in doubt as to whether it is already enabled or not, simply applying it again is safe. To apply an IP address to the VLANs, configure the SVI as follows MultilayerSwitchconfig interface vlan 20 MultilayerSwitchconfig-if ip address MultilayerSwitchconfig-if no shutdown MultilayerSwitchconfig interface vlan 30 MultilayerSwitchconfig-if ip address MultilayerSwitchconfig-if no shutdown The two configurations above will enable routing between VLAN 20 and VLAN 30. The hosts in each VLAN can use the IP addresses and as their default gateway respectively. When Host A sends a packet to Host B, the packet will be switched within the same VLAN – no L3 processing will occur. When Host A sends a packet to Host C, the packet will be sent to the SVI to be routed to the other VLAN – all regular L3 processing will occur the TTL will be decremented and the L2 header will be rewritten. Multilayer Switch Configuration show runmac address-tablevlan brief MultilayerSwitch show running-config ... ip routing ... interface Vlan20 ip address ! interface Vlan30 ip address MultilayerSwitch show mac address-table Mac Address Table - Vlan Mac Address Type Ports - - - - 20 DYNAMIC Et2/1 20 DYNAMIC Et2/2 30 DYNAMIC Et3/2 30 DYNAMIC Et3/1 Total Mac Addresses for this criterion 4 MultilayerSwitch show vlan brief VLAN Name Status Ports - - - - ... 20 RED active Et2/1, Et2/2 30 BLUE active Et3/1, Et3/2 ip routearpip int brief MultilayerSwitch show ip route Codes L - local, C – connected, ... Gateway of last resort is not set is variably subnetted, 4 subnets, 2 masks C is directly connected, Vlan20 L is directly connected, Vlan20 C is directly connected, Vlan30 L is directly connected, Vlan30 MultilayerSwitch show arp Protocol Address Age min Hardware Addr Type Interface Internet - ARPA Vlan20 Internet 0 ARPA Vlan20 Internet 0 ARPA Vlan20 Internet - ARPA Vlan30 Internet 0 ARPA Vlan30 Internet 0 ARPA Vlan30 MultilayerSwitch show ip interface brief Interface IP-Address OK? Method Status Protocol ... Ethernet2/1 unassigned YES unset up up Ethernet2/2 unassigned YES unset up up ... Ethernet3/1 unassigned YES unset up up Ethernet3/2 unassigned YES unset up up ... Vlan20 YES manual up up Vlan30 YES manual up up Note both sets of tabs and configuration above are from the same device. For the sake of organization, one set of tabs refer to the L3 functions and the other refers to the L2 functions. Summary This article discussed the three different options for Routing between VLANs. In each case, the hosts in communication behave exactly the same. In fact, the hosts have no visibility into how and what they are connected to. Each strategy above has its own benefits and limitations. Hopefully at this point you have a good idea of the options available to enable communication between hosts on different VLANs. 10 Enter into interface configuration mode for the fourth interface connecting to R1. SW1 (config-vlan)# interface fastethernet0/3. 11. Configure the access VLAN for the interface. SW1 (config-if)# switchport access vlan 40. For option 2, the router must become aware of the VLANs being used and route accordingly.

Because port 2 belongs to the first VLAN and other ports that belong to the first VLAN are 1, 3, and 4. Since ports 5, 6, 7, and 8 don't belong to the first VLAN, the switch will not forward the incoming broadcast message from these ports.

s1TuIGC.
  • s3tv0un1v9.pages.dev/351
  • s3tv0un1v9.pages.dev/93
  • s3tv0un1v9.pages.dev/67
  • s3tv0un1v9.pages.dev/550
  • s3tv0un1v9.pages.dev/192
  • s3tv0un1v9.pages.dev/350
  • s3tv0un1v9.pages.dev/339
  • s3tv0un1v9.pages.dev/487
  • vlan 2 switch 1 router