networking - Joining two ethernet cables: strip and solder or buy an adapter?

06
2014-04
  • 0xFE

    I need to connect two Ethernet together. Right now, neither end is terminated. I think my two choices are to terminate both ends and then use something like this. Or to just strip each wire and join them either by twisting together or by soldering. Is either way clearly better than the other?

  • Answers
  • Mike Pennington

    CAT5e/6 junction boxes are available for splicing cables without needing to terminate, twist, or soldier.

    Junction boxes are better for permanent cabling, as they're more secure than terminated ends paired with a coupler, or twisted/soldiered. Cables with these junction boxes won't be pulled apart at the splice point, unlike with other splice methods.

    Examples:

    Note: I've never actually purchased from any of these particular storefronts. I'm simply linking to them to show examples of junction boxes.

  • jak138

    In a pinch I've been known to strip it, twist the inner wires together together, and wrap with electrical tape. Its a ghetto soluton, but effective if you do not move the cable around to much. That being said that coupler is like $2 so it seems like you have several good options.


  • Related Question

    networking - How can I join two simple home networks together using an ethernet cable?
  • Ilia Jerebtsov

    I want to join two different home networks together like so:

    PC A1      PC A2                              PC B1      PC B2
      \         /                                   \         /
       Gateway A      <----- ethr. cable ----->      Gateway B
           |                                             |
      ADSL modem A                                  ADSL modem B
    

    Both networks are of the basic residential type with identical configuration, with all PCs running Vista/7. The point is to temporarily join two apartments in a building for gaming and file sharing, and the holy grail would be:

    1. PCs on network A can access PCs on network B and vice-versa (file shares and gaming).
    2. Each network uses its own internet connection.
    3. Data between networks shouldn't take a trip through the internet (broadband upload speeds are severely capped)
    4. A network's internet access should continue working if the joining cable is disconnected with minimal configuration changes.

    How closely can this be achieved?


  • Related Answers
  • David Mackintosh

    Since you don't want to go through the Internet, you don't want a VPN.

    You need:

    • networks A and B to be different, non-overlapping IP scopes;
    • a router between the two networks; and
    • gateways that let you add additional routs.

    The router needs to have two separate ethernet connecters on it. The reason for this is because if you are using DHCP on either network, you need to be able to isolate the DHCP traffic to the appropriate network. If you just glue the two networks together with an ethernet wire, there's no way to guarantee that PCs on network A wouldn't get DHCP from network B, and then use network B's internet.

    So your network diagram would look like this:

    PC A1      PC A2                              PC B1      PC B2
      \         /                                   \         /
       Gateway A         ------ Router -----         Gateway B
       |                                             |
      ADSL modem A                                  ADSL modem B
    

    Then, Gateway A would have a route on it telling it that Network "B" was reachable via the A address on the router; Gateway B would have a route on it telling it that network "A" was reachable via the B address on the router.

    Now if you have a Linux-based firewall as either Gateway, then you can probably just put another ethernet card in it and have that Gateway act as the router as well, but that's left as an exercise for the reader.

    If one of the PCs involved is stronger than consumer-grade Windows and has multiple ports, I believe that it could act as the router too. I don't think XP or Vista can act as a router, though.

    Also, if you have a more "business" level firewall as either gateway, you may be able to mark some ports as a different "security zone" and use that box as the router.

    Note that the Linksys or D/Link "DMZ" functionality is NOT what I am talking about here.

    But my guess is we are talking $50 cheapie firewalls here, so you are probably looking at scrounging another box to do this job.

    As a short term fix, you could replace one of the Gateways with a small switch, disconnect the DSL from that side of the network, and run a long cable to the other apartment. Then reboot the computers on the now-disconnected side. That would make those computers join the other network, which means that for the duration of the game they'd be using the Internet from the other apartment, but it would at least let you play. ie:

    PC A1      PC A2                              PC B1      PC B2
      \         /                                   \         /
       Gateway A         ------ cable  -----           switch
       |                                       
      ADSL modem A
    
  • Dave Drager

    This is pretty much how the internet works.

    You would need to make sure your 2 Apartment building networks are using 2 different private networks. For example, one is using 192.168.0.x and the other 192.168.1.x.

    The "Gateway" you are using needs to be a router - and I don't think the generic linksys will do. I haven't fooled around with the custom routing on there though; so it is possible you may be able to do it. If not then updated firmware such as Tomato or DD-WRT would work.

    What needs to be set up is routing on either one, so that if the destination address matches the other network, it uses the interface that goes to the other network, rather than the ISP's interface. The other gateway would need to be set up the same way, vis-versa.

    I think that is as simple as I can explain it, but let me know if you have any questions.

    Using a VPN such as Hamachi would work, but data would go out over the ISP connection.

  • James

    How about doing it in layer 2? No fancy router software required.

    • Have both networks be the same IP scope
    • Have each apartment's gateway use a different address in that scope
    • Have the DHCP servers allocate different host addresses within that scope
    • Use your dual-NIC machines as bridges (or see update below)

    So you set Gateway A to 192.168.0.1, Gateway B to 192.168.0.128 (but each still using .255 netmasks). PC A1, A2, ... get

    • address 192.168.0.2, .3, ...
    • LAN netmask 192.168.0.255
    • default route 192.168.0.1
    • DNS servers for modem A

    PC B1, B2, ... get

    • address 192.168.0.129, .130 etc.
    • LAN netmask 192.168.0.255
    • default route 192.1.0.128
    • DNS servers for modem B

    Then PC A1 has all the settings to use modem A for internet access, but sees PC B1 on it's local network. It doesn't know that B1 has a different default gateway and DNS servers and it doesn't care.

    The bit I'm not 100% sure about is using DHCP like this. I think that if you list each apartment's PCs' MAC addresses in each DHCP server then each PC will be happy to be served by the local gateway and won't worry that it is rejected by the other apartment's DHCP server. But if you can't, it's not hard to configure all the PCs' IP addresses manually.

    Update: Actually there's no need for dual-NIC PCs and software bridges, just join one switch in each network together. Run your long cable from a spare LAN port on Gateway A to a spare LAN port on Gateway B. If your $50 gateways don't auto-sense crossover, use a crossover cable.

  • Bart Silverstrim

    You either: configure a VPN connection with two systems configured to create a tunnel between networks

    Take a network cable and two machines with dual NICS and have it act as a router on both networks to route all traffic for each of the networks to the appropriate network (either internet or other network).

    I'd look first at setting up a VPN solution.

  • user5195

    This is totally doable. You could config a VPN using Smoothwall or you could simply share files using Hamachi.

  • MDMarra

    If you want to bridge the networks without a cable (not sure of the distance between then) you can always go get a wireless router that has wireless bridging functionality. You can have one apartment broadcast a wireless signal, and the bridge grab it and act as a relay to the other apartment's network.

  • Dennis Williamson

    Or use a crossover cable, makes life much easier, but you lose a lan port in the router, since it doesn't use the internet port on either side.

  • Ta Coen

    VPN would be great, you even doesn't need the cable.

    You had two different router rights? well try this:

    PCA1 - 192.168.A.1
    PCA2 - 192.168.A.2
    GWA0 - 192.168.A.254 --> the lan ip on your router A
    

    Change the B Network:

    PCB1 - 192.168.A.3
    PCB2 - 192.168.A.4
    GWB0 - 192.168.A.253  --> the lan ip on your router B
    

    The cable will connect GWA0 and GWB0

    Then...

    • Disable DHCP on GWA0 and GWB0, or use static ip assigment to each pc on each physical network, so PCB2 will recieve 192.168.A.253 as his gateway, and so PCA2 will use 192.168.A.254
    • Filter out(Firewall) PCB2, PCB1 IP on GWA0, vice-versa on GWB0
    • The L2 broadcast between GWA and GWB will be locals