In which occasion router-->SwitchL3 does not need switchport?

Unanswered Question
Jun 7th, 2007

Imagine I have a Router(fa0/0)--connected to--->SwitchFa1/0/20 port.

I thought that I needed to do 'no switchport' in order to make the switchport work as a layer 3 interface and make my switch port communicate and forward traffic with the router. However, someone told me that the below would make this work without 'no switchport' and without an ip address.

Does the below make sense?

!

interface FastEthernet1/0/20

description switch port is connected to MYBACKUPROUTERWAN (VPN 1841 router)

switchport mode dynamic desirable

speed 100

duplex full

switchport access vlan 2

!

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jon Marshall Thu, 06/07/2007 - 10:26

Hi

The config you supplied means the switchport is working at layer 2. Does the fa0/0 interface of the router have an IP address out of vlan 2 ?

Jon

Jon Marshall Thu, 06/07/2007 - 10:36

Yes, but is it out of the subnet range used for vlan 2 ?.

Basically if you use no switchport as you say it becomes a layer 3 port and you can allocate an IP address to it. In your config it is acting purely as a layer 2 port.

Jon

news2010a Thu, 06/07/2007 - 10:50

Router fa0/0 IP address is in the same network OK as vlan2.

Jon Marshall Thu, 06/07/2007 - 10:53

Hi

Then that makes sense. If you have clients on the switch in vlan 2 they will be able to communicate with the router. If you have clients on the switch in any other vlan then you would need to route them on a different interface.

HTH

Jon

Actions

This Discussion