1

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.

2
  • Technically, yes, but you won't like it. (see also: bridging, "BVI") If you need a switch, buy a switch.
    – Ricky
    Commented 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 Drake
    Commented Apr 6, 2021 at 19:22

1 Answer 1

2

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.
6
  • 2
    Perhaps 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.
    – Ice Drake
    Commented Apr 6, 2021 at 19:06
  • Yes, that's correct.
    – Zac67
    Commented Apr 6, 2021 at 19:09
  • 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.
    – Ice Drake
    Commented Apr 6, 2021 at 19:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.