2

When using multiple VLANs, what is the best practice for connecting a router to a switch?

For example, I can use one single port (and one cable) between the switch and router and set it up as a VLAN trunk so all traffic uses this cable.

Pros: Only one port is required. Cons: All VLAN traffic shares 1 Gb link.

The second option is to connect multiple cables between the router and the switch and setup each port/cable to pass individual VLANs/networks between the router and the switch.

Pros: Each VLAN/network has dedicated 1 Gb link. Cons: Uses multiple ports on switch and router.

Is there a best practice regarding this situation? The router I'm using (EdgeRouter) doesn't support link aggregation (as far as I know) and the fiber ports are only SFP so every port is only 1 Gb.

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 31, 2020 at 20:57

5 Answers 5

5

At the risk of expressing an opinion here, there is no such thing as "best practice." There are good practices, there are bad practices, and there are a lot in between. There is no best practice because there are many factors which make each situation different.

In the choice you present, you might consider the ease of maintenance/modification, the likelihood that you will exceed the port bandwidth, the ease/cost of cabling, etc. Each of these will affect your decision. There is no right answer because only you can determine how much these factors matter in your environment. What's "best" for me may not be best for you.

4

To add to the answer by @Ron Trunk. The good , best or bad practises depend largely on your network​ and cannot be generalised as one common solution .

Case1

What if the number of Vlans in the network are around 10. The data is in mostly in the form of bursts and no vlan requires high link utilization continuously. Sharing a link makes sense here .

Case 2

On the contrary consider a data center topology where these vlans are used to isolate server traffic . Considering the high volume of S-N traffic, there are chances of over subscribing the link. In this case, even a single vlan may be provided with dedicated links to reduce latency and questing delays.

The best practises are generally at the discretion of the network Administrator and the scenerio at hand .

2

While echoing Ron and John's comments that there is no universal "best practice" here and there's only what's best for you, I'd like to propose an alternative solution that you haven't mentioned yet.

EdgeRouter does support bonding/link aggregation using 802.3ad Link Aggregation Control Protocol (LACP). However, in older EdgeRouters, this traffic was not eligible for offloading, which meant bonding (for example) 4 gigabit ports wouldn't result in 4Gbps of bandwidth. It would produce redundancy, but some bandwidth less than 4Gbps, possibly simply 1Gbps. However, according to this page, newer ER-X, ER-X-SFP, and EP-R6 EdgeRouters support offloading, so aggregating 4 gigabit ports should result in 4Gbps (or very near it, allowing for some losses).

So, in theory, if you had one of the newer EdgeRouters, and you didn't need certain mutually-exclusive protocols, and your network topology supported it, you could do the following:

  • Bond X ports on the router to support XGbps of bandwidth (and also redundancy)
  • Bond X ports on the switch in the same way
  • Connect X ethernet cables between the bonded router ports and the bonded switch ports
  • Configure your VLANs on the single bonded interface on the router and switch (I say this in a rather nebulous way; there are a lot of steps to this, clearly)

Through this configuration, all the VLANs would be able to take advantage of up to XGbps of bandwidth between the VLANs (for allowed traffic), so that you wouldn't have saturated links using all 1Gbps and bottlenecked while other links used only a few Mbps and remained essentially unitized.

0

Even if you aggregate links (recommended!) you will still not exceed 1Gb per session. I have tried this for Video editing. For file transfer however you can get the aggregate speed by breaking up the file before transfer. In other words a zip file may take 5 hours to transfer but if you have 4 links configured correctly and transfer the files unzipped you will achieve significant speed-up.

0

The optimised option is connect router and switch with single cable .

In switch

Configure trunk port allowing all Vlans in switch link connecting router and switch

In router

Create Vlans and Configure inter-Vlan routing among VLANs by creating subinterface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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