Is a router always necessary? Even if only networking 2 machines?

4

As title says, I have 2 machines, well I actually have a PLC and a windows computer. I need the PLC to be able to reach the PC, so I need them on the same network.

I've proven the set-up when they're on the same network, that's no problem. Now I'm to take the PLC and the computer out of the network and want just those 2 connected in isolation. My first port of call is to buy a small router and just connect them via that, but that seems excessive - can the ethernet cable just go from one to the other?

JᴀʏMᴇᴇ

Posted 2019-02-26T20:37:26.743

Reputation: 237

3can the ethernet cable just go from one to the other? - Yes. – joeqwerty – 2019-02-26T20:49:16.430

Answers

9

A router is used for connecting two separate networks together. Or in the case of the internet, millions of separate networks.

No, you do not need a router to join two machines together. You need a router to join two networks together. Additionally, what you think of when you say "router" is not actually a router. It is:

  • A router
  • A switch
  • A wireless access point
  • A DHCP server
  • A UPnP host
  • A remote exploit
  • A firewall (maybe)

all rolled into a single piece of plastic. The piece that lets two computers on the same network talk to each other is the "switch" part of the "router", not the router itself.

For two machines only, then yes you can just use a single cable between them. However you will need to configure static IP addresses for the computers to be able to do anything useful with them. And, obviously, there is not going to be any internet access (although for a PLC no internet access is almost certainly what you want to do).

Mark Henderson

Posted 2019-02-26T20:37:26.743

Reputation: 5 956

2

And you may need a crossover cable for cards that do not support Auto-MDIX (automatic medium-dependent interface crossover). This technology detects whether you need a crossover cable or a straight-through cable, and it automatically configures the network interface card accordingly. Do you need a crossover cable? | Network World

– DavidPostill – 2019-02-26T21:21:01.240

3It's very unlikely to encounter any modern combination of machines that require a crossover cable. I don't think I've used one in nearly a decade. – David Schwartz – 2019-02-26T21:31:03.400

However you will need to configure static IP addresses - Well, I mean you could probably work with APIPA / link-local addressing (fe80::/10,169.254.0.0/16) with one of the broadcast based name-resolution methods Windows or other systems enable. – Zoredache – 2019-02-26T21:32:56.330