Live data from Hacker News

Falsehoods programmers believe about networks

blog.erratasec.com

31–32 of 32 posts

Re: Falsehoods programmers believe about networks

#31
post #23

Also: - MAC addresses are unique. - LANs won't be bridged. - Spanning tree will converge quickly. - Quickly enough that it will beat BIOS getting to DHCP for netbooting. - There will only be one circuit in the network so you can disable spanning tree. - The path MTU will be at least 1500 (or 9000, or x). - Path MTU discovery will work. - Packets with DF bit set won't be fragmented. - ICMP won't be dropped. - Network…

> MAC addresses are unique Or at least they're unique on a single machine... except for the various OSes and hardware platforms that have deliberately made all MAC addresses the same for a given machine.

Way back in the land before time, I acquired a number of old 486s and ISA NICs. Being a good Slashdot nerd, I of course thought "lets make a Beowulf cluster of these!"

So I've got the cluster set up, and it's mostly working. There's two nodes though that behave funny. Imagine my surprise when I try pinging one of them and get two responses per ping! Sure enough, two ISA NICs pulled randomly out of a box of garbage indeed had identical MACs. I learned a lot about IP and the MAC layer from that project!

Re: Falsehoods programmers believe about networks

#32

Why is this listed under falsehood? "Bytes must be "swapped" from the network byte-order to the host CPU byte-order." Don't PowerPC and Sparc hardware require byte swapping(depending on what endian mode they are in)? Or am I misreading this?

Well, NBO is big endian and PPC/Sparc/MIPS were usually BE in servers, now in routers and TVs, and LE in printers... Though POWER8 switched to LE.

So you can (and I have) write programs for these BE systems that completely neglect to use swizzling. You will also see code that doesn't use the swizzling macros (htons, ntohs, etc) because they 'know' the packets need to be swizzled and they do it always, when they shouldn't on some architectures.

Post reply on HN