B1C3 – LANs…Lost Around Networking


So! are you bored yet? Do you want to jam a screwdriver into your head yet? I Do! But I can’t find the fucking Screwdriver. (Grrrr!!)

So now are getting into LANs or Local Area Network, in a section called “The fundamentals of LANs”

I wait to see the fun part.

We will basically be going deeper into the Layers 1 and 2 with this. We will be going even more deeper later on. (I know, you can’t wait right? I can.)

Ethernet is the king of LANs today. In the past there were different kinds (Token Ring, Fiber Distributed Data Interface FDDI and Asynchronous Transfer Mode ATM). Some of which are actually still in use today. (You kiddies with your DSL are connecting with ATM and didn’t even know it).

But when you are wiring up all your PS3’s, xboxes, laptops and desktops, you are using ethernet. This does not include wireless as this is something separate. (and yes, we unfortunately cover that later).

Most of Ethernet is connected with UTP – Unshielded Twisted Pair. If you ever have ran over your Ethernet cable with your chair, you would see this.

We connect everything with this cable to Ethernet Cards also referred to as NICs (Network Interface Cards) that are using speeds of 10/100 or even Gigabit (1000) speeds.

Speaking of speeds, we reference the different speeds with the following:

Ethernet – 10 Mbps (That’s bits per second. People confuse this because hard drives and USB ports use Bytes per second. Big B vs small b. It will byte you in the ass at some point)
FastEthernet – 100 Mbps
GigabitEthernet – 1000 Mbps or 1Gbps

In the past, we have also referred to it as 10BASE-T, 100BASE-TX and etc. Some routers and switches you can buy off the shelf will use this annotation. But lately they have been dumbing it down for us common folk.

Not going to get into the “history” of this shit. But know that at some point everybody agreed to rally around use of of the Ethernet standards and using MAC addresses (Media Access Control) for the datalink layer (aka layer 2) and uniform physical wiring standards. If you remember from the last chapter we talked about the fact that the Ethernet standard originally just had the Network Access layer. So the MAC address was part of what they called the LLC sub-layer of the “Logical Link Control” Sub-layer.

We had 10BASE2 and 10BASE5, with the only real difference being in the way they were wired. This was using the coaxial cable I referred to in the last blog.

There was no switches or hubs. Because we don’t like you. There was just this bus cable with pickoffs and everybody was (in a sense) wired to one cable.

It didn’t take too long to realize this was a bad idea as data collision and traffic congestion became ridiculous. This was how we got started into CSMA/CD

CSMA/CD – Carrier Sense Multiple Access / Collision Detection was a way to keep the conversation going without people trying to scream over each other. To simplify, a person would wait till the conversation dies down to speak. If someone else decides to start talking at the same time, each person waits a random amount of time to start talking again. Reducing the possibilty that they talk at the same time again. A little more on that later.

Since there was could be the chance that a really long cable would be used in early LAN setups, sometimes a repeater would need to be added to boost the signal.

Didn’t take long to figure out that this wasn’t going to work out. So then the 10BASE-T system came about which is what we are basically using today.

This used the Ethernet cables we use now and allowed for the use of hubs to connect crap together.

The problem with hubs is that it didn’t do anything special other than acting similar to the bus lines of the past. It just put everybody on the same wiring setup. The difference is that a hub was a box that multiple computers could be connected into. This created what is referred to as a *star configuration. I think you can figure out why if you have a bunch of computers connected to a single point. As opposed to computers connected in a line.

So with this, we had to have a wiring standard, sooooo….

Wiring! –
Now most of this section is going to talk about the exciting world of Ethernet cabling. We in the network community will refer to this as just a “copper” connection in comparison to fiber.

The wire of choice has be rj-45 which has 4 sets of twisted pair cables in it. Thus the name “Unshielded Twisted Pair – UTP”. The book goes into some specifics as to how these work but it is not very important. If you just have to know more about it, you can google the shit out of it.

It important to note however that both RFC and IEEE (Institute of Electrical and Electronic Engineers) do not set the standard for how these cables are wired. It is actually set by the TIA (Telecommunications Industry Association). The book doesn’t go into it, but I’ll bet that this is due to the fact that the TIA had already been using this cabling scheme for multi-line office phones and we just incorporated it since it was “off-the-shelf” technology. I appreciate it when someone grows a brain and doesn’t try to re-invent the wheel.

As the book doesn’t go into it too much, we currently use either Cat 5e or Cat 6 Ethernet cable. The cat is for category and the different categories pertain the the specifics as to how the “geometry” of the cabling or basically how the twisted pairs are twisted. The thing to remember is Cat 5e does up to 100MHz and cat 6 can do up to 200 MHz. There are other spec’ed out cables but for the most part we will use either cat 5e or cat 6.

So, there are 8 tiny little cables bundled together. They are twisted together into 4 separate sets (note the twists are “tuned”). When putting a plug on the end of these, there is a very specific way that they are wired.

See, to save on brain usage in the past and increase the capacity of the cable, certain contacts inside the plug of the Ethernet card are designated as send and receive. To make life super easy, they are the same on every card.

But with this being the case, we can’t have the cable connect the same pin on the Network card to the same pin on the other network card. This would put the “send” or output of both cards on the same line, and the “recieve” or input on the same line.

Simple solution? Swap the lines in the cable!

So, what we end up with is two “types” of cable…a “Straight Through” and a “Cross Over”

Keep that in mind as my story gets better! 😉

Now, the actual wiring is goofy as all get the fuck out. And I blame the TIA as they set the standard. (Silly monkeys). The 4 sets have a color coding system. 4 basic colors (Green, Orange, Blue and Brown). Each side of the pair was distinguished with being solid or mixed with white (like balls on a pool table).

Now here is where it gets kind of stupid.

You would think that on one side we would just have it be Green/GW, Orange/OW, Blue/BW, and Brown/BrW right?

No! Fuck you, try again.

See, the send is on pins 1 and 2. (Seems legit). But the receive is pins 3 and “6”.

Yeah. Eat a dick. So on one side, p1 is O/W, p2 is Orange, p3 is G/W and p6 is Green. Then…on the other side, p1 is G/W, p2 is Green, p3 is O/W and p6 is Orange.

so the rest (Since they are not really being used) stay the same:

p4 – Blue
p5 – B/W
p7 – Brown
p8 – Br/W

If you can remember this one mind fuck aspect of cabling, then it is easy and you don’t have to dick around with remembering some phonetic memorization thingy.

Those never worked well for me anyway. If I couldn’t remember the thing in the first place, what makes you think that I am going to remember this Phonetic thingy?

Anyway…

Now when we get into Gigabit, it gets a little stranger. (Cause it ain’t strange enough!) Since all 4 twisted pairs are now being used and they are also doing send AND receive. Fun right?

Well this gets simple now because now we just do the same thing as before. Swap the 4,5 pins and the 7,8 pins.

But (and this is a big butt)

I love that my techie brethren are as lazy as me (and cheap). On Cisco equipment they developed “auto-mdix” which recognizes that the connections are wrong and can adjust electronically. Brilliant! Even better, most of the network gigabit cards today can also do this.

Now… for straight through, you just keep the wires on the same ports on both ends.

Checking through the standards, there is no set rule as to which should be on pins 1 and 2 on the straight through. It can be either the orange set or the green set. As long as it is the same on the other end.

Now, if we are swapping the send and receive, why would we need to have a straight through cable?

Damn good question!

(Note, here is where I lost just about everything and got pissed off. So I changed to a different CMS and re-posted everything. lol)

When the idea of hubs came out, someone thought it would be a good idea (and it was) to have the hub automatically switch the pinning around so that straight through cables could be use. Since rarely would we be doing computer to computer connections, we could just use straight through for everything. And for the tech savvy that were going computer to computer? Well, hopefully they knew enough to use a crossover.

But, also the development of Routers and switches came about. From a cabling standpoint switches were just glorified hubs so we just used the same cables. As for routers though, we need to think of them as another computer instead of another type of switch.

The easiest guide for figuring out what cable to use with which type of connection, I came up with the idea of just following what pin 1 of the device is set to use. For example:

PC – Transmit
Router – Transmit
Hub – Receive
Switch – Receive

So now, when you are connecting any of the two devices together, you just have to remember what is happening on pin 1.

In the case of PC to Router, both have transmit on pin 1. So we would need to crossover. But in the case of Router to switch, this is Transmit to Receive, so we can use straight through.

Now that we know how we are connecting all this crap together and what cables to use, now how do we figure out what devices we are going to use? I will start by saying we are not going to get into Routers till later (that’s some layer 3 shit yo!)

But we are going to answer the age old question, Hub or Switch.

Many a Best Buy employee has had to deal with this agonizing questions. “Why is this one box cost more than the other box? What’s the difference? Do I need to spend the extra cash?”

These days, you would probably get an answer like “cause its better! It does cooler stuff.”

But trust me, there actually is a reason.

Let’s, for a moment go back to the CSMA/CD protocol.

This is the protocol that’s makes rude computers be polite. (Wish they made this for people).

Here’s how it goes:

A device with a frame to send, listens until the Ethernet is not busy (waits for a lul in the conversation)
When not busy, the sender (or senders) begin sending their frames.
The sender(s) then listen to make sure that no collision occurred.
If a collision occurs, the devices that had been sending a frame each send a jamming signal to ensure that all station recognize the collision. (basically everyone starts apologizing for being rude)
After the jamming is complete, each sender randomizes a time and waits that amount of time
before attempting to send again. (politely waiting their turn).
Then, the process starts over again.

This works in human conversation too. Try talking at the same time as another person and see what happens. It’s kinda fun! (Just be careful that you don’t get punched in the face for being an ass)

Since hubs don’t bring much to the party except being able to connect everybody together much like the bus did in the earlier 10BASE2 and 5 setups, collisions were still an issue. In fact, hubs really didn’t do much except have a little light on them to indicate a collision was taking place and act as a repeater for when trying to use really long cables for stretching over a long distance.

So all the computers and devices connected to a single hub create a “Collision Domain”. Which is just a fancy way of saying a group of devices that have the potential to have their data collide. Much like a group of people part of one conversation.

So we needed something to do a little more. So that’s where the switch comes into play.

Switches (like hubs) swap the transmit and receive pins for us. But the the big thing that they do is not create a single bus that everyone is attached to. Instead, they receive the frames and determine where they are supposed to go. So the frames only go in one port and out one port. They act like a switching station on a railroad line. Moving the train only to the next set of tracks it needs to run on. (Thus the term switch).

If a switch has to output multiple frames out the same port, it can actually buffer them so that frame collision can be avoided. (NICE!)

Because of the limitations of hubs and CSMA/CD, hubs are referred to run in half-duplex. Since they have to wait so much for quiet time to transmit. Switches, on the other hand, can actually do full duplex due to the switching. So you can get faster data speeds from a switch and less potential for collisions. Because hubs put all the connections together, the bandwidth is shared aka “Shared Ethernet”. Since the switch can connect two devices together and create a separate (in a sense) private connection. This is a “Switched Ethernet”

Finally, an advantage of switches is that some of the more expensive managed switches come with swappable ports. These are basically slots that you can buy separate ports to plug into the slots to change the type of connection. So you can run “Copper”, Fiber or other alternative style connections. There are basically two types we see these days:

Gigabit Interface Converters – GBIC
and
Small-Form Pluggables – SFP

You can search the internet to see the different types that can be purchased for different configurations.

So we know what cables to use, what switches or hubs to use, and how to connect them together. This pretty much clears up the Physical – Layer 1 for now (trust me, we will get more in depth into switches later on).

Now to finish up with talking about Layer 2 or the Data Link layer.

Because with the switch we can virtually connect one port directly to another port, we need a way to identify which ports to connect together. So, that means that each device plugged into the switch needs a unique identifier.

This is where Ethernet Addressing comes in!

But, alas. I have lost my mojo on this. I will have to close this blog out and write a part two. It’s getting late and I can’t push it any more.

So next time… MOAR Ethernet!


Leave a Reply

Your email address will not be published. Required fields are marked *