logo elektroda
logo elektroda
X
logo elektroda

Lan networks - Connecting two LANs into one over the Internet

piterek1403 10038 12
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16296375
    piterek1403
    Level 9  
    Hello, I have a question about connecting two lan networks about 10 km apart and having Internet access. The first at the local supplier and the second via the neostrade fixed external IP address. Is it possible for all devices connected to Lan 1 and Lan 2 networks to see each other in a network environment as if they were in the same lan network?

    Thank you in advance for your response
    Regards
  • ADVERTISEMENT
  • #2 16296385
    bogiebog
    Level 43  
    piterek1403 wrote:
    distant from each other about 10 km

    If you do not plan a direct connection because you write "over the internet" then the distance does not matter

    Google VPN site-to-site

    Routers with VPN support (server + client)

    piterek1403 wrote:
    as if they were in one and the same lan?

    I do not recommend how much traffic is broadcast, it is not efficient, it is better to connect two networks with different addresses via VPN.
  • #3 16304151
    piterek1403
    Level 9  
    Heavy traffic will not want only one device to assign permissions to another. And they must see each other as if they were in one network
  • #4 16304170
    bogiebog
    Level 43  
    How do you solve the allocation of IP / gateways for computers?
    Everything on static IP? because if you set two DHCP servers (one per network), they will sow to the other network. Well, unless all DHCP static allocations. '

    This is not done on WAN links,

    but good luck
  • ADVERTISEMENT
  • #5 16304184
    piterek1403
    Level 9  
    I have a TP-Link Archer C2 router in my LAN1 and in LAN2 some modecom but the internet provider will be changed there and I don't know if the internet will be mobile from the cellular network or by radio at the same service provider as I have in LAN 1

    Added after 46 [minutes]:

    static allocations
  • #6 17672904
    piterek1403
    Level 9  
    Hello, I'm refreshing the topic. I have 3 Mikrotik Routers and I want to connect 3 LANs via VPN for Multiroom Nc +. Put the VPN server - Mikrotik Router with a fixed public IP address on 1-LAN and there will be an NC + main decoder in this network. On 2-LAN access to the Internet via modem (router) Huawei B315s from the plus network and connect to it mikrotika and to Mikrotik decoder. In 3-LAN access to the Internet is via a modem (router) Huawei B525s from T-mobile, also connect to it a Mikrotik router and a mikrotik decoder. Can you help me set it up? I would be very grateful for any help. Regards
  • #7 17673204
    IC_Current
    Network and Internet specialist
    The solution to your problem is called "Mikrotik L2TP IPsec". Put the password in Google, it's full of guides.
    DHCP will also work properly, all you need to do in MT is to configure filters to block DHCP packets on interfaces other than the local LAN interface.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #8 17675372
    piterek1403
    Level 9  
    Each of the Mikrotików should allocate addresses from their dhcp server for the decoder? Should it allocate addresses from the pool specified on the VPN server?
  • #9 17676098
    IC_Current
    Network and Internet specialist
    Decoders, just addresses you can enter "from hand". As long as they were all in one broadcast domain and addresses were from one subnet.

    Configure DHCP for other devices as needed.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #10 17815475
    sebiq12
    Level 10  
    Hello
    Will it work on openvpn? I have 2 asus and I thought to make a tunnel on openvpn?
  • #11 17815519
    IC_Current
    Network and Internet specialist
    sebiq12 wrote:
    Hello
    Will it work on openvpn? I have 2 asus and I thought to make a tunnel on openvpn?


    No. The entire Ethernet frame must be encapsulated and tunneled, not just the IP protocol packets.
    Helpful post? Buy me a coffee.
  • #12 17815626
    sebiq12
    Level 10  
    IC_Current wrote:
    sebiq12 wrote:
    Hello
    Will it work on openvpn? I have 2 asus and I thought to make a tunnel on openvpn?


    No. The entire Ethernet frame must be encapsulated and tunneled, not just the IP protocol packets.


    So I have to understand that only mikrototik remains?

Topic summary

Connecting two LANs over the Internet can be achieved using VPN technology, specifically site-to-site VPN configurations. Users discussed the importance of ensuring that devices on both LANs can communicate as if they are on the same network. Recommendations included using routers with VPN support, such as Mikrotik routers, and configuring L2TP/IPsec for effective tunneling. Concerns were raised about DHCP server configurations to avoid conflicts and ensure proper IP allocation. The discussion also touched on the use of OpenVPN, but it was noted that it may not support the necessary encapsulation for Ethernet frames. Overall, the focus was on maintaining a single broadcast domain and managing IP addresses effectively across the connected networks.
Summary generated by the language model.
ADVERTISEMENT