Using SwitchPort on Router

Created: Jan 22, 2020 12:01:47Latest reply: Jan 23, 2020 00:51:57 84 5 0 0
  Rewarded Hi-coins: 0 (problem resolved)
We've to swap an access switch having a lot of Vlanif interfaces with a router, now we've two choices,

1) Use dot1Q sub-interfaces for each vlan used.
2) Make router's port a switch port and then make vlanif interface and pass vlans same as a switch.
What are the pros and cons for these approaches.
  • x
  • convention:

Featured Answers
LuizPuppin
MVE Created Jan 22, 2020 13:05:20 Helpful(0) Helpful(0)

Some functions on router only are available if you use a sub-interface. Functions like BAS and MPLS VPN´s. I don't like to use vlanif on routers, cause we need to "downgrade" to L2 interface. I think that is not usual on a router.
  • x
  • convention:

HaseebAkhtar
HaseebAkhtar Created Jan 23, 2020 07:35:57
Those are the limitations i wanted to see.. thanks.  
I%20have%2020%20years%20working%20with%20telecom%20market.%20On%20all%20this%20time%20I%20worked%20always%20in%20great%20projects.%20The%20biggest%20was%20the%202014%20World%20Cup%20Command%20and%20Control%20Centre%2C%20where%20I%20was%20the%20Soluction%20Architect%20and%20Implementation%20Manager%20of%20Network%20and%20security%20Solution.%0AI%20work%20with%20Huawei%20s%20products%20to%20ISP%20Market%20since%202015%20and%20in%202017%20started%20to%20present%20trainnings%20customized%20to%20this%20market%2C%20focused%20in%20BGP%20and%20MPLS%20solution.%20I%20had%20more%20than%20400%20students%20and%20more%20than%20100%20ISP%20on%20my%20classes%20on%20last%2018%20mounths.
chenhui
Admin Created Jan 23, 2020 00:51:57 Helpful(0) Helpful(0)

Hi @HaseebAkhtar
swap an access switch with a router? if you mean replace the access switch with a router, I would like suggest you to buy another access switch.
First of all, access switch usually gets at least 24 interfaces, while router doesn't, so a lot of terminals might not be able to access to the router if you replace the switch with a router.
Then, switch gets a specialized forwarding chip which could help forwarding packets in layer 2 quickly. Though some router get that kind of chip, but you know, it might be not professional than switch does.

Anyway, if you just replace the access switch with a router for a short time, sub-interface or vlan interface, which to be adopted depends on your real situation.
For example, if you have a lot a devices needs to connect to the same vlan, then switch the layer 3 interface to a layer 2 interface would be convenient. If only one or two terminals for each vlan, the I would suggest you enable sub-interface, because sub-interface could save the physical interface resource, so that you can connect more devices than switch these interfaces into layer 2.
  • x
  • convention:

All Answers
ster
ster Created Jan 22, 2020 12:43:33 Helpful(0) Helpful(0)

Hi@HaseebAkhtar,

The link between the switch and the router is a trunk link. The interface connecting the switch to the router is configured as a trunk port to allow multiple VLAN data frames to pass. The default encapsulation format is 802.1Q. Only sub-interfaces are also encapsulated as 802.1Q to ensure that VLAN-tagged data frames can be distinguished by the switch to achieve cross-VLAN communication. Because the PCs in different VLANs refer to the gateway as the IP address of the sub-interface, the PC sends data packets to the gateway, that is, the sub-interface, and then the router looks up the routing table and forwards it through the relay link. If the sub-interface is not encapsulated as 802.1Q, the switch will not be able to distinguish which VLAN the data frame came from, so it will not be able to forward the data frame from one VLAN to another VLAN.


  • x
  • convention:

HaseebAkhtar
HaseebAkhtar Created Jan 22, 2020 12:50:50 Helpful(0) Helpful(0)

Posted by ster at 2020-01-22 12:43 Hi@HaseebAkhtar,The link between the switch and the router is a trunk link. The interface connecting ...
That was not the question :)
the question was what to use between a sub-interface with dot1Q encapsulation or vlanif interface after setting router's enterface as switchport.
  • x
  • convention:

An%20enthusiastic%20network%20Engineer%20who%20also%20wants%20to%20be%20a%20programmer
LuizPuppin
LuizPuppin MVE Created Jan 22, 2020 13:05:20 Helpful(0) Helpful(0)

Some functions on router only are available if you use a sub-interface. Functions like BAS and MPLS VPN´s. I don't like to use vlanif on routers, cause we need to "downgrade" to L2 interface. I think that is not usual on a router.
  • x
  • convention:

HaseebAkhtar
HaseebAkhtar Created Jan 23, 2020 07:35:57
Those are the limitations i wanted to see.. thanks.  
I%20have%2020%20years%20working%20with%20telecom%20market.%20On%20all%20this%20time%20I%20worked%20always%20in%20great%20projects.%20The%20biggest%20was%20the%202014%20World%20Cup%20Command%20and%20Control%20Centre%2C%20where%20I%20was%20the%20Soluction%20Architect%20and%20Implementation%20Manager%20of%20Network%20and%20security%20Solution.%0AI%20work%20with%20Huawei%20s%20products%20to%20ISP%20Market%20since%202015%20and%20in%202017%20started%20to%20present%20trainnings%20customized%20to%20this%20market%2C%20focused%20in%20BGP%20and%20MPLS%20solution.%20I%20had%20more%20than%20400%20students%20and%20more%20than%20100%20ISP%20on%20my%20classes%20on%20last%2018%20mounths.
chenhui
chenhui Admin Created Jan 23, 2020 00:51:57 Helpful(0) Helpful(0)

Hi @HaseebAkhtar
swap an access switch with a router? if you mean replace the access switch with a router, I would like suggest you to buy another access switch.
First of all, access switch usually gets at least 24 interfaces, while router doesn't, so a lot of terminals might not be able to access to the router if you replace the switch with a router.
Then, switch gets a specialized forwarding chip which could help forwarding packets in layer 2 quickly. Though some router get that kind of chip, but you know, it might be not professional than switch does.

Anyway, if you just replace the access switch with a router for a short time, sub-interface or vlan interface, which to be adopted depends on your real situation.
For example, if you have a lot a devices needs to connect to the same vlan, then switch the layer 3 interface to a layer 2 interface would be convenient. If only one or two terminals for each vlan, the I would suggest you enable sub-interface, because sub-interface could save the physical interface resource, so that you can connect more devices than switch these interfaces into layer 2.
  • x
  • convention:

Comment

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login