ciphergoth: (Default)
Paul Crowley ([personal profile] ciphergoth) wrote2004-06-14 08:18 pm
Entry tags:

Geek question

About network switches. Can you join two cheapo (Dabs Value) 100BASE-T switches with a crossover cable?

One friend argues "no" on the grounds that before any switch will send a packet to the other, it would have to know of an address at the other end, but neither switch will know of any addresses on the other switch until some packets have been exchanged. (Is that right?) This makes sense, but it occurs to me that if switches broadcast any packets they don't know how to route then all will be well. I don't know if they do though.

I also have no idea what to do if I can't connect them this way! Possibly buy another PCMCIA Ethernet card for the laptop that's also the gateway, but they are costly.

Advice gratefully received...

[identity profile] hughe.livejournal.com 2004-06-14 12:40 pm (UTC)(link)
a fuller answer would be:

as far as switch1 is concerned, switch2 /is/ all the mac addresses connected to it.

there might be greater confusion if they are expensive managed switches (web/telnet interfaces etc), but i've been using daisychained cheapos for ever :)

(i use the dlink 1024/1016 series, just bog standard unmanaged switches)

[identity profile] mr-purpleduck.livejournal.com 2004-06-14 04:00 pm (UTC)(link)
there might be greater confusion if they are expensive managed switches

This is only really an issue if the switch limits each port to having a single MAC/IP address pair. I know that the Cisco switches do have this option.

[identity profile] hughe.livejournal.com 2004-06-14 04:10 pm (UTC)(link)
yeh the only managed switches i've used were cisco catalyst 2940 switches, but even they dont have that option enabled out of the box.

Re: Yeah...

[identity profile] kingginger.livejournal.com 2004-06-14 12:39 pm (UTC)(link)
... my two cheapo switches can...

Has yours got an MDI/X port on it? (I.e. mine is an 8 port switch, but with 9 ports, one for patching, or, if required, the 8th port is made redundant by plugging in a crossover to another switch).

But yeah, shouldn't be a problem (probably).

[identity profile] rataxis.livejournal.com 2004-06-14 01:01 pm (UTC)(link)
Yes, you can. Switches can only act as switches once they've learned where a certain MAC address lives. The first SYN packet to an unknown MAC will be sent [hub-fashion] to each port, and the switch will take note of which port the ACK packet comes from.

Or some such mechanism. I don't know for sure if it's looking at the IP packet types.

In any case, a switch will send a packet to an unknown destination to every switchport in order to ascertain where the destination is in relation to the switch, and remember that information.

[identity profile] -cheiron-.livejournal.com 2004-06-14 01:16 pm (UTC)(link)
No probs, yes you can.

Some 4/8-ports have a 5/9th uplink port that's shared with the 4/8th port. A little switch enables it. Using the uplink port you don't need a crossover cable [already crossed over internally.]

(Anonymous) 2004-06-14 01:54 pm (UTC)(link)
Hiya,

You should have no problems doing what you suggest with a pair
of those Dabs value switches. I've just had a look at their
specs and two things are in your favour - i) there's specific
mention of using them with hubs and other switches, and ii)
there are no "red flags" in the specs suggesting they won't do
what you want. And the prices are truly amazing. I cannot
believe an 8-port 10/100 switch goes for 12 quid, VAT included,
these days - what value!

In the very early days of switches - and I'm talking maybe 8 or
9 years ago here .. - what you generally found was that most
ports on the switch could only learn one MAC address. Only a
single ethernet device, e.g. one server, could be plugged into
these ports. You then had a limited number - maybe just two -
of ports which could handle multiple MAC addresses. These were
the only ones that hubs or switches could plug into, as multiple
MAC addresses would come from them.

Soon after this, switches evolved so that any port could learn
multiple MAC addresses, meaning hubs and other switches could
just be hung off any port that was convenient.

And that's what every switch seems to do these days, even the
very very cheapest.


The link below is to a set of web pages that have a very clear
explanation of ethernet technology and devices. Starting from
the basics of how LANs and ethernet bridges work, they explain
how switches are really just multiple port bridges. And they do
this with lots of clear pictures and handy hyperlinks.

http://www.erg.abdn.ac.uk/users/gorry/course/lan-pages/bridge.html

Good luck with your networking!

[identity profile] ciphergoth.livejournal.com 2004-06-15 09:51 am (UTC)(link)
Thank you, o anonymous person (?), this is very useful information. The link is very nice and confirms the way I suspected switches might work.

Now all I have to do is diagnose and solved this weird packet loss problem - which might be the subject of yet another LJ post...

[identity profile] http://users.livejournal.com/_nicolai_/ 2004-06-14 02:37 pm (UTC)(link)
Yes, should work fine.
Don't get too creative with hanging many switches off many switches and don't go over a few tens of hosts and it should be fine.
Oh, and don't create any loops in your network, or it'll all go to ratshit really fast.

(in detail: each switch will learn what is on each port of it when it sees a packet from that host. If it sees packets from more than one host it'll just think more than one host is connected to that port.
Ditto for the other switch, so each switch thinks there's one port with a whole lot of hosts on it and doesn't see the other switch.
There's a table in the switch of which host is on which port, which limits how many hosts can be on the ethernet that the switch is in. It's at least tens, and is thousands on any decent switch. However the switches do assume that each host is only reachable by one port - if you make a loop, the switches can forward packets to each other ad infinitum and there's enough delay in the network that you do get feedback. So Don't Do That.
Also don't make the chain of switches between any host too long, or the delay can be too long for collision detection to work right. You need several switches in a chain for that to happen so as long as you haven't got delusions of grandeur you'll be fine.)

[identity profile] conflux.livejournal.com 2004-06-15 06:25 am (UTC)(link)
What they all said. Don't put any loops in. Don't chain too many and if you are going to put a really long cable between the two (up some stairs for instance) check the maximum cable length supported by your switches driver circuits if they are cheap ones or you may only get 10mbs. Also avoid too many kinks (in the cable) for the same reason. Some of the posh switches (like my Netgear one) have a swap over port labeled MDI/X with a reversing switch so you don't need to use a swap over cable.

[identity profile] ciphergoth.livejournal.com 2004-06-16 03:26 am (UTC)(link)
Finally found the spec online as a PDF. Unfortunately I can only read the first page because the second page contains Traditional Chinese characters that acroread barfs on, but it says that all ports are MDI/X so I didn't need to get a crossover cable. I slightly wish I'd realised that before I got it but my network access has been erratic :-)

Anyway, the network is now completely working, so I'm happy. And I have discovered that all my remaining spare cables in the flat are somewhat fucked, so off to get more cables I go...

[identity profile] darkain.livejournal.com 2004-06-15 03:38 pm (UTC)(link)
i would recomend searching for a network switch that auto-senses cross-over connections, as to not have to worry about if it should be cross over or straite. i have a switch like this with 8 ports, and every port can be either cross over or not, and it autodetects on every single port, so there is no configuration at all. we usually use it alot at lan parties as our main switch in a star like configuration where it is the central switch, and then we have 5 and 8 port switches hooked up to it, and also usually the game server itself. i dont remember the brand name of my switch, it was a really cheapo generic non-main stream brand, but it just uses a standard realtek chipset inside. the switch is painted blue now, so i cant simply look at it and tell you model numbers or anything like that either. :P