I have been fiddling with a Cisco ASR901 for a while now, but I can't wrap my head around configuring it as a layer 2 VLAN switch. Is it not possible to configure one of its Gigabit Ethernet ports as a trunk? I can't use switchport trunk
configuration or create a VLAN
. I noticed that I can configure an interface vlan
, but I, later on, found out that isn't the same thing. I can't even figure out how to designate a port for a particular VLAN.
-
Technically, yes, but you won't like it. (see also: bridging, "BVI") If you need a switch, buy a switch.– RickyCommented Apr 6, 2021 at 18:57
-
@Ricky My friend happens to give me this router to use and I thought I can configure it as a VLAN switch since I was able to configure for it on my Cisco E3000 router after flashing it with Tomato, of course. I never work with networking configuration on Cisco commercial routers before, so I assume it should be possible, but I have to learn it the hard way.– Ice DrakeCommented Apr 6, 2021 at 19:22
Add a comment
|
1 Answer
No, those are routers, not switches. You can use subinterfactes on a router interface to have layer-3 interfaces into separate networks (VLANs) as a trunk to an external switch:
interface GigabitEthernet0/0/0
no shutdown
!
interface GigabitEthernet0/0/0.10
encapsulation dot1Q 10 ! Tag traffic for VLAN 10
ip address 10.0.10.0 255.255.255.0 ! Gateway for VLAN 10
no shutdown
!
interface GigabitEthernet0/0/0.20
encapsulation dot1Q 20 ! Tag traffic for VLAN 20
ip address 10.0.20.0 255.255.255.0 ! Gateway for VLAN 20
no shutdown
!
! etc.
-
2Perhaps not obivous to everyone: if you configure multiple ports with the same VLAN ID, there's no switching between them on those routed ports.– Zac67 ♦Commented Apr 6, 2021 at 10:53
-
Let me get my understanding straight. What Ron Maupin said about setting up subinterfaces is similar to setting up a layer 3 VLAN interface except it is designated to a particular port rather than to all the ports. Even if I can setup a VLAN subinterface on two different ports with the same VLAN tag, there is no switching involved between the two ports as mentioned by @Zac67. Thus, the answer to my original question remains as a solid "No", correct? It is not possible to configure Cisco ASR901 to handle VLAN switching. Commented Apr 6, 2021 at 19:06
-
-
Right, that is not a switch, it is a router, and routers route between networks, not switch on the same network. Some routers can set up a virtual bridge. See this question and answer.– Ron Maupin ♦Commented Apr 6, 2021 at 19:14
-
It is getting more complicated than it has to be. Getting a VLAN switch or a Tomato- or OpenWRT-compatible router is more preferred choice. Thanks all. Commented Apr 6, 2021 at 19:32