I just bought a SoC computer with 4 eth ports which I plan to convert into a router with Linux. I connected a CAT5 cable to both one of the eths and to my notebook, but I don't seen link on either side. My faulty memory (I'm talking about the brain here) seems to remember that NB were good at negotiating transmission including whether to use the cable straight or crossover. Is this close to reality? Can I force the NB's eth port to use it as crossover? or should I buy a crossover cable?
Just about any device built in the last decade should support Auto MDI-X. If you don't have a link, I would suspect the cable first (maybe try to connect to a switch to see if you have a connection there).
Anyway, you can force MDI-X with
ethtool. From the manpage:
mdix auto|on|off Selects MDI-X mode for port. May be used to override the automatic detection feature of most adapters. An argument of auto means automatic detection of MDI status, on forces MDI-X (crossover) mode, while off means MDI (straight through) mode. The driver should guarantee that this command takes effect immediately, and if necessary may reset the link to cause the change to take effect.
Answering myself, as I just found the issue: it was just a matter of running
ip link <dev> up. I would feel stupid for forgetting this, but I really didn't know one has control at that level, and that if you didn't configure the interface, it doesn't try to establish link.