01-16-2017 07:09 AM - edited 03-05-2019 07:51 AM
Good evening all together,
I have a question. I saw a configuration of a router.
When I send the command "show ip int br"
I get a vlan with an Ip-address
I never seen that before. I know that you "normally" use subinterfaces to do the intervlan-routing. Why I need a vlan on a router?
My know-how is that we use vlans at a switch to have networkboarders on Layer 2 and than we need intervlan-routing to allow a communication between different vlans (I can realize it on a L3 Switch or with an router with subinterfaces). (sry my English is not the best, that the reason why I can't explain it better)..
And when I have the vlan on a Router how does it work? I mean on a switch I configurate all interfaces to a vlan, so the switch knows where is vlan x and where is vlan y... but on that router I haven't a mapping from interface to vlan...
thank you.
Your Jenni
01-16-2017 07:25 AM
Hello
Yes, it's possible to have vlans on a router.
I have a router with a 4-ports L2 card (Cisco HWIC-4ESW). These ports are pure L2 ports. I can't assign IPs to them. If I go under the interface and I issue "no switchport", it's not accepted.
However, what I do for each interface is the following:
switchport access vlan <number>
The vlan <number> is created and the interface added to it. Then I give an IP to the vlan (I can't give an IP to the interface). Then I connect this interface to a switch and use it as a router interface.
When I go home later today, I will drop you a show run and a show ip int br from that router so you can see how it is configured.
01-17-2017 03:06 AM
Thank you.
Now I have a next question. Can I use this L2 interface like every L2 interface on a switch? I mean, can I use it as trunk interface too?
And can you explain me, what is exactly the benefit to bye this L2 card and use it?
At the moment I think I don't need it, but maybe I haven't enough background...
Thanks
01-16-2017 08:16 AM
Here is the output from my Router and you see it has vlans:
Main#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.100.254 YES NVRAM up down
FastEthernet0/1 unassigned YES NVRAM administratively down down
Serial0/2/0 unassigned YES unset administratively down down
Serial0/2/1 unassigned YES unset administratively down down
FastEthernet0/1/0 unassigned YES unset up down
FastEthernet0/1/1 unassigned YES unset up down
FastEthernet0/1/2 unassigned YES unset up down
FastEthernet0/1/3 unassigned YES unset up down
Vlan1 unassigned YES unset up down
Vlan101 172.16.0.1 YES NVRAM up down
Vlan102 172.17.0.1 YES NVRAM up down
These vlans contain each 1 L2 interface of the Router. From the sh run you see my L2 interfaces added to vlans. This is how the vlans were created:
clock rate 2000000
!
interface FastEthernet0/1/0
switchport access vlan 101
no ip address
speed 100
!
interface FastEthernet0/1/1
switchport access vlan 102
no ip address
speed 10
!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide