8
\$\begingroup\$

How do you wire up Ethernet electrically without a switch? An approximately equivalent phrasing of this question would be what is going on electrically inside an Ethernet Hub?

To clarify, I'm not trying to connect two computers here. I'm thinking specifically of creating a small network of microcontrollers on a single board. Can it be done without a switch or a hub through just electrical connections. This would be for 10BaseT or at most 100BaseT.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ A switch and a hub are actually two different things. \$\endgroup\$ Commented Dec 19, 2012 at 19:48
  • 3
    \$\begingroup\$ Here's a schematic of a hub. My advice about this is: Don't. \$\endgroup\$
    – AndrejaKo
    Commented Dec 19, 2012 at 19:48
  • \$\begingroup\$ 10, 100, or 1000? Since 1000 uses all 4 pairs bidirectionally, it will be difficult. \$\endgroup\$ Commented Dec 19, 2012 at 20:34
  • 2
    \$\begingroup\$ Use 10Base2, thin coax, bus topology. If you can find part for this ancient networking infra. \$\endgroup\$
    – jippie
    Commented Dec 19, 2012 at 21:03
  • 1
    \$\begingroup\$ There are better approaches than using Ethernet just to interconnect microcontrollers. \$\endgroup\$
    – Renan
    Commented Dec 19, 2012 at 22:38

4 Answers 4

2
\$\begingroup\$

Ethernet 10baseT can work with a pure hub: just connecting all the wires together suitably, with very minimal electronics. This often also requires disabling cable autodetection and things on the communicating device side for modern cards.

Ethernet 100baseT and anything even relatively modern requires an actual switch even for "hubs" - a microcontroller and each port controlled separately.

\$\endgroup\$
4
\$\begingroup\$

Proper hubs are active devices. They decode the physical layer and listen for incoming frames. When data is detected on one of the ports it's repeated to all of the other ports. When a collision is detected a "jam signal" is output from all of the ports to ensure the whole network sees the collision. There can be a mixture of port types (older hubs often had an AUI port and/or a 10BASE2 port in addition to the 10BASE-T ports.

A pure hub can only operate at a single speed at a time. A device that wants to support multiple speeds needs at least some level of bridge functionality. Some hubs had a physical switch to select between 10 and 100 megabit. Some hubs were essentially two independent hubs, one for each speed, possiblly with a two port bridge to connect them.

Note that 802.3 doesn't use the term "hub". What the market commonly calls a hub is regarded by the standard as a multiport repeater. Similarly what the market calls a switch is a "mutiport bridge" per the standards.

You can read further details of what a repeater is required to do in IEE 802.3 . Bridges are covered in IEEE 802.1D

You can get the 802 series standards free of charge from http://standards.ieee.org/about/get/802/802.3.html . Note however there is a 6 month time lag so if you REALLY need the latest version you may have to pay.

Someone did hack together a 3 port passive hub for 10base-T and apparently got it to work. http://www.zen22142.zen.co.uk/Circuits/Interface/pethhub.htm It's definitely not a method approved by the standard though and I don't think there is any reasonable way to extend it beyond 3 devices.

If your devices have Mii ports it may be possible to program a CPLD to act as a hub. I don't know how much behaviour you would have to simulate to make that work though.

\$\endgroup\$
2
\$\begingroup\$

Use a cross-cable if it is only two devices and if it doesn't work with a straight cable. It basically swaps transmit and receive pairs, but many modern interfaces are auto-cross.

\$\endgroup\$
2
  • \$\begingroup\$ see update... I want to set up a small network on a board without cables... \$\endgroup\$
    – vicatcu
    Commented Dec 19, 2012 at 21:00
  • 3
    \$\begingroup\$ That's called WiFi or 802.11 b/g/n \$\endgroup\$
    – jippie
    Commented Dec 19, 2012 at 21:01
1
\$\begingroup\$

For a small network on a single board, the easiest solution IMO is a switch ic. At 10/100 these are easy to use, and often let one device be the MAC of a microcontroller, with the others being full ethernet devices. Micrel is an obvious choice of manufacturer.

You tend to be able to pin-strap these devices to wake up as an ordinary unmanaged switch, which will work exactly like a cheap office switch. If you want more control or diagnostics then you can talk to them from a micro.

\$\endgroup\$

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.