I have a problem with understanding networking. Can you help me to understand if i'm right or not and what's the best solution, please?

I'm trying to extend L2 network to the cloud and use current subnet ( there.

Cloud provider gave physical connection with vlan(vlan 45) to my switch. I've configured tagged interface(port 24) with vlan 45 on my switch SW1 and if i configure an ip address from my subnet on the vlan interface on the SW1 - i can reach vm in the cloud from SW1 and from cloud VM i can reach SW1, but not servers that are onsite from both.

So i would like to know

  • Can i use different vlans(vlan 45 from provider and vlan 1 onsite) for same subnet( or should i use single vlan?

  • Can i use provider vlan 45 as a transport vlan only without routing? If i can, how would i do that?

  • Should i configure vlan subinterface on the router with different subnet for cloud and route traffic from cloud to site?

Here is my current topology:

My switches are HP ProCurve 2910, the cloud provider use Cisco Nexus(do not know what model).

  • First, it is a really bad idea to extend a VLAN (layer-2 domain) across a WAN. We live in a layer-3 world, so you can simply route. It takes a router to move traffic between VLANs, and router must have different networks on each interface because routers route traffic between networks. Have the same network on two different router interfaces will not work, and cannot even be configured on most routers.
    – Ron Maupin
    May 18, 2020 at 15:30
  • It's not L3 link, it's L2 link that provider physically connected to my switch with vlan inside this link.
    – Marv
    May 18, 2020 at 15:36
  • @RonMaupin so should i configure separate subnet for the cloud? for example: is my current subnet, on my router i add subinterface with providers vlan tag and new subnet, then add similar config on cloud router with this new subnet, add route to my subnet on via new subnet? Is this better solution? Thanks!
    – Marv
    May 18, 2020 at 15:54

1 Answer 1


Here's one way to solve this:

  1. You need to trunk vlan 45 to your router. This means you will use VLAN tagging on your the link between your router and switch.
  2. Allocate a new subnet for VLAN 45. It can be any private address that fits into your scheme. As an example, you can use This a much larger address space than you actually need, but it will keep things simple to understand.
  3. The Vlan Interface on your router will
  4. Ideally, you will have another router in your cloud. This router will also have an interface on vlan 45 (
  5. You cloud devices can be in another subnet, for example Your cloud router will have an interface in that subnet ( That address will be the default gateway for your cloud devices.
  6. You need to add a static route to each of your routers. On the main router, add a route for, next hop On the cloud router, add, next hop
  • I've thought about this way. So I can't use same subnet with different vlans in the cloud and on site, right?
    – Marv
    May 18, 2020 at 17:10
  • Generally speaking, each vlan has a separate subnet and vice versa
    – Ron Trunk
    May 18, 2020 at 17:59

Your Answer

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

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