2
\$\begingroup\$

I'm working on a project that involves transmitting data over very long distances (10-25km) where radio communication is unavailable, and I have been looking into the possibility of adding a fiber optic ethernet connection to the board.

The first issue I have run into is trying to figure out what specification I can or should be using. My first thought was to use 100BASE-FX sfp transceivers, and connect the other end to a TRENDnet TFC-110S60i which claims a maximum distance of 60km, however further investigation seems to suggest there is a 2km limit for 100BASE-FX connections. If my objective is to connect over these long distances, what specification should I follow?

The second issue I've run into is actually connecting a fiber optic transceiver, be it SFP or otherwise, to the controller. At this time no decision has been made for what controller will be used on the board, so I'm trying to select as generic an interface as possible. Unfortunately most chips I've found such as the Microchip KSZ8041 are only PHYs, or the Microchip KSZ8441 which uses a host bus that I am unfamiliar with how to implement. I've also found the Microchip LAN7500 which handles MAC and provides an SPI interface, but the documentation doesn't specifically say if 100BASE-FX/BX/LX/etc. is supported. Would I be able to connect this chip to an SPI socket on a circuit board, or do I need something that specifically says it supports a fiber ethernet format?

\$\endgroup\$
14
  • 1
    \$\begingroup\$ Can you just put the TrendNet box on both ends of the long link and use twisted-pair ethernet to connect from your circuits to the TrendNET box on its end? \$\endgroup\$
    – The Photon
    Commented Feb 15, 2019 at 0:31
  • \$\begingroup\$ Are you implying one continuous run of 25km? The power losses would likely be too great; repeaters needed. Also consider the latency at these distances... fiber is about 30% slower. At 3.9µs/km, the round-trip-time would be about 195µs. That ok? \$\endgroup\$
    – rdtsc
    Commented Feb 15, 2019 at 2:21
  • \$\begingroup\$ 1000Base-EX reaches to 40km. \$\endgroup\$
    – DoxyLover
    Commented Feb 15, 2019 at 3:10
  • 1
    \$\begingroup\$ More to the point, are you really going to run 25km of fiber by yourself? If not, isn't this something your network contractor ought to be able to advise on? \$\endgroup\$
    – pjc50
    Commented Feb 18, 2019 at 13:58
  • 1
    \$\begingroup\$ @winny Is interfacing with an SFP module as simple as putting data to the TX+ and TX- pins and reading from the RX+ and RX- pins? \$\endgroup\$ Commented Feb 18, 2019 at 18:41

1 Answer 1

-1
\$\begingroup\$

The 2km limit is imposed by the speed of light. Ethernet works by listening for "quiet ether" and then sending its signal out. It reads back what signal is on the Ethernet. If someone else also decided to send, their transmission will garble your transmission. And your transmission garbles theirs. So they stop, back off, and wait a certain amount of time, and try again. To avoid repeating conflicts, each sender backs off a random amount based on a negative-exponential distribution.

There is a minimum size of an Ethernet packet. If the transmitter and receiver are too far apart, the sender will see a perfect transmission and not bother to retry, because the short packet will have been fully transmitted before the other packet arrives to interfere with it. You can avoid this by using half-duplex trasnsmission, and using a different protocol with timeouts, but then it wouldn't be Ethernet, it would be something else. You are free to implement a "something else" protocol on your fiber network, but you will have to write your own protocol stack. Or ignore the Ethernet entirely and just implement the "something else" protocol directly. Half-duplex will significantly degrade your bandwidth, and you need a way to hand-off transmittership; a two-node "token ring" might work. But if you want Ethernet, it is not going to work, because the low-level protocols critically depend upon the speed of light.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ The 2 km limit is actually due to physical layer link margins. The CSMA/CD limit (only relevant in half-duplex operation) is 412 m. \$\endgroup\$
    – user71659
    Commented Feb 18, 2019 at 6:56
  • \$\begingroup\$ I would look into some simple ETDM protocol for the needs OP is asking for. Token Ring would be highly related here but too specific and obscure at the same time. \$\endgroup\$
    – winny
    Commented Feb 18, 2019 at 7:03
  • 1
    \$\begingroup\$ Hmm. I thought that you can use single mode fiber with a media converter and get 40km or more? Am I wrong? \$\endgroup\$
    – user57037
    Commented Feb 18, 2019 at 8:07
  • \$\begingroup\$ Forgive me for my ignorance, but doesn't most fiber Ethernet only operate in two half-duplex modes? I thought the reason there were two separate fibers was so there could be one for RX and one for TX, eliminating the risk of collisions. \$\endgroup\$ Commented Feb 18, 2019 at 15:20
  • \$\begingroup\$ Literally all fiber Ethernet links I've seen are full-duplex point-to-point, either using separate RX/TX fibers or separate colours (frequencies) within the same fiber. (I believe that's called CWDM?) For example, quite common 1000BASE-BX over a single fiber using 1310nm RX / 1550nm TX on one end, and the opposite 1550nm RX / 1310nm TX on another. No collisions, no CSMA/CD. \$\endgroup\$
    – grawity
    Commented May 29, 2019 at 16:08

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.