Thursday, September 3, 2020

Starting Out as a Computer Tech (part 3)

 For this part, I would like to focus on basic networking. In IT lines are often blurred and one thing I noticed with a lot of new techs is they know little to nothing about networking and yet are expected to be almost entry-level network specialists. Luckily for myself, networking is something I actually really love working with (and due to some past things revolves around a potential Techs from the Crypt story). So let me shine some light on networking, terms, and basic troubleshooting.


First, let's go over some terms you absolutely need to know.

IP Address - Internet Protocol Address

Subnet - A block of IP addresses

IPv4 - IP version 4, has four octets (8 bits) that are shown in decimal between 0 and 255

IPv6 - IP version 6, 128 bit address broken down into 8 groups of 16 (called hextets or hexadectets) shown in hexadecimal (0 through 9 and A through F), more often than not you'll just be turning it off

OSI (model) - Open Source Interconnection model, has 7 layers

Layer 2 - Layer 2 of the OSI model, information is called frames, commonly what switches use, what the MAC address is for

Layer 3 - Layer 3 of the OSI model, routing level, information is called packets, uses IP addresses and subnets

MAC address - Also called a hardware address, given to the network device on the chip itself, written in 6 octets in hexadecimal (0 through 9, A through F)

Protocol - A term to explain a standard being used

TCP - Stateful communication that makes sure all information is delivered like viewing a website

UDP - Stateless communication that does not verify information completed its journey, used for things like phones and DHCP

DHCP - Dynamic Host Control Protocol uses a server to assign an IP address to a device

DNS/Name Server - Domain Name Service used to turn something like www.google.com to an IP address for routing traffic

Gateway - IP address of the device you use to get to the Internet

APIPA - Automatic Private IP Addressing is a default IP you get when no IP is set or DHCP server reachable

Static IP - An IP you manually set for a device

WAP or AP - Wireless Access Point or Access Point used for wireless internet connection

Private IP - An IP address made to be used within an organization

Public IP - Live on the Internet IP addresses

NIC - Network Interface Card

Ethernet - standard copper cable to plug into your network

2.4G - 2.4 Gigahertz wireless band for wifi, it's old

5G - 5 Gigahertz wireless band for wifi


You should be able to recognize those terms even if you are not clear on how they work, just know what they are and hopefully we can fill in enough blanks to make something coherent. There are a few more terms, but those will be introduced in context since they can technically mean different things. So let's start piecing this together.


You have a computer with a NIC for network access. You plug an Ethernet cord into the NIC (they have different standards like Cat5, Cat5e, Cat6, Cat6e, Cat7, you get the idea) and the other end goes into a connection on the wall. The plug on the computer is an Ethernet port, the plug on the wall is a jack, probably a keystone jack or may be called a wall port (really depends on who you're talking to). From that wall, it will go to something called an IDF (Intermediate Distribution Frame) or MDF (Main Distribution Frame), also called a Networking Closet. In that closet will contain things like switches and/or routers. Hubs are old and I would hope you are not using them.


So now that the computer is hooked up, it can try to communicate with the network to get information it needs to properly use it. The computer will send out a DHCP Broadcast to find a DHCP server. If one cannot be found or one is and cannot provide an IP address, the computer will assume an  APIPA address and that ends it. You can tell an APIPA because the address will start with 169 (more on how to see that later). If a DHCP server responds, they communicate and an IP address, along with DNS and Gateway info, will be passed to the computer.  To communicate the DHCP information, the MAC address is used.

 

Let's make a scenario. You are in a meeting and people are talking about putting a computer lab into a subnet. On the notes you see 172.16.3.0/24. What does this mean?

The 172.16.3.0 is the network and the /24 is the subnet. The subnet may also be written as 255.255.255.0. Information we can extract from this would be that there are 256 IP address available within that block, but technically only 254, or 253 if you exclude a gateway. We can get to this conclusion easiest with the / notation and a calculator:

2^(32-n) where n=subnet


This is because an IPv4 address is made of 32 bits broken into 4 octets. Each octet can be 0-255 for a total of 256 values or 2^8. The reason for the other subnet notation is that is the representative value it gets ANDed to. At this point we are pretty far above and beyond what you need to know, so here's the simple conversions:

/8 = 255.0.0.0

/16 = 255.255.0.0

/24 = 255.255.255.0

So if we need to take an add subnet like 18 and want to show it in the other notation, we can start with the first two octets, or the /16:

255.255.0.0

Now we can see that we have two left over (18-16). So let's look at that octet in binary real quick...

11000000

We know this because there are 8 bits in an octet, we have two bits, so we replace the 0s starting on the front end. So two ones, means we have six zeroes left over. Now we can break out a calculator to do some conversions. So convert binary to decimal, you need to count to what place the 1 is in, so we have a 1 in the eighth spot and a 1 in the seventh spot. Binary is base 2, so we use the number base 2. Out equation therefore is:

2^7 + 2^6 = 192

I know what you're saying, wouldn't it be 2^8 + 2^7? No, this is computers. We start counting at 0. Here's the proof why:

00000001 = 1 = 2^0

If you are completely lost, it's okay. You shouldn't need to do this, but I really wanted a reason to do some complicated looking math. The end result is your subnet would be as shown:

255.255.192.0


If you want to practice or figure these things out faster you can do two possible things. Pick a number between 0 and 32 and convert so you can get the actual math down AND/OR memorize the values of each binary bit along a line of 8 and add them or learn them already added. I'm personally a fan of learning the math because then you just have that to remember and apply to many things rather than single purpose memorization... 1, 2, 4, 8, 16, 32, 64, 128. In interviews I have been asked to do these things in my head, and personally I always get away with rattling off the math and some explanations of what to exclude and it gets me by.


I suppose I should mention why we get rid of 2 addresses off the bat. We get rid of the binary all 0s, like 172.16.3.0 because that's the network address and we get rid of the all 1s because it is the "broadcast" address. Then often there is an implied gateway, but do not assume that is always the case. You can have a network with no gateway, it is not a requirement. The gateway is often the first binary 1, so in the example's case it would be 172.16.3.1, 172.16.3.0 is the network, and 172.16.3.255 is the broadcast.


With that headache out of the way, let's talk about the easy stuff, how to view your network settings. There are a few ways to view your IP information, both GUI and CLI. Starting with GUI you can go to the start menu cog Settings, Network category, and click on the "Change connection properties." This should give you the IP, DNS servers, and MAC. This is good in a pinch, but the CLI options give more information. So first, the Powershell commands. The Get-NetIPConfiguration is a good way to get a lot of information. There is also Get-NetIPAddress, which gives information on some other interfaces you may not see that use the network stack. There is also Get-NetAdapter that will give you the MAC address, just compare it to Get-NetIPConfiguration. Finally there is the CMD command ipconfig /all. Pick whichever method is your favorite.


After you view your network settings, you should have all the information available to set a static IP. When setting a static IP, you can optionally set a gateway and DNS server(s). As usual, there is a GUI and a CLI way to do this. For the GUI we go to the start menu cog Settings, then the Network and Internet category. On the left-hand side you click on Ethernet, then Change Adapter Options. On the interface you want to set the IP, right-click it and hit properties. In the middle of that window you will see Internet Protocol version 4, select that then hit the properties button. With the first radio button, select Use the following IP and enter in the necessary information. Often times I end up just using the same gateway and DNS that DHCP had set and put in a static IP and subnet.


To set a static IP using powershell, you first want to get your interface index from either Get-NetIPConfiguration or Get-NetIPAddress. Get any other information you may need from those results as well. Then we can set every option necessary with the New-IPAddress command and Set-DNSClientServerAddress command. So it could look something like this:

New-NetIPAddress -InterfaceIndex 20 -IPAddress 192.168.1.30 -DefaultGateway 192.168.1.1 -AddressFamily IPv4 -PrefixLength 24

Set-DnsClientServerAddress -InterfaceIndex 20 -ServerAddresses 192.168.1.5,8.8.8.8 


I should take a moment to mention that if you need DNS on the Internet should a DNS server drop, Google has two you can use that are easy to remember. They are 8.8.8.8 and 4.4.4.4. It will not help with your intranet, but it is a good fallback for general Internet stuff.


Now let's talk about wireless, the wonderful world of wifi. While I doubt I have to tell you how to add a wifi network, I feel I need to mention how to remove a network to then re-add it. It actually can solve a lot of random wifi issues. So go to the start menu cog Settings, Network and Internet category, then Wi-Fi on the left. From there, select "Manage known networks." On the next page, you should be able to just click on any of the networks and hit "Forget" to remove them. On the same topic of Wi-Fi, your 2.4G bands reach farther than 5G, however they are more prone to interference especially from things like microwaves. Walls can also hinder the wifi signal and approaching from an angle means there is more material to go through, slowing it down even more. 2.4G cannot handle as many clients or as high a speed as 5G.


Moving on to the subject of Network hardware, typical topography of a network will be something along the lines of a router connected to switches connected to devices. Switches operate on Layer 2, so they are concerned only with the MAC address of a device. A Layer 3 switch is a switch that can operate on Layer 3 to some degree, like a managed switch with a web interface. A router operates on Layer 3 and is concerned with IP address and subnet. Each jack on a switch or router is called a port, or a physical port. On a device it is also called an interface. Getting any more in depth is a massive topic all on its own.


The problem with "network" trouble is that it can encompass such a wide variety of stuff that there is a lot to consider. Generally as an IT Specialist or the like, it will be your job to determine what the problem is to then see if there is a path of escalation to someone else or if you can deal with it. Problems can include wifi connection trouble, lag, website errors, network share problems, network printer problems, or general web issues. I will try to demonstrate using past experiences.


"A website is blocked or something, I get an error and cannot go past"

This is what I often get when there is a security certificate error. I hear this from the inept to the savvy. This is an easy fix, there will be an "Advanced" option that leads to a "proceed anyway" option.


"I can see the wifi network, but it won't connect"

This is usually as easy as removing the wifi network and re-adding it.


"Everything is laggy and slow"

This is an infamous work order I get all the time. If you run the Get-NetAdapter command on Powershell, you can see what the speed should be currently negotiated. Usually you can pass that information along with what physical port on a network device the device is plugged in to and pass it along to a Networking specialist. There is a chance if the speed is slower than it should be that there is a cabling issue or a port going bad.


"This website I NEED isn't working! HELP!!!111"

Often a lot of drama around work orders like this and it's usually something like a 500 error on a website. If you are getting an error on the website like 500, 502, 503, 404, etc. it means that the network is fine and it's in the hands of whoever controls the server.


The rest are usually wifi issues because it's wifi. Unfortunately, wifi is just not as reliable as a good old fashioned hard line.


That's pretty much way more than you need to usually know about networks starting out as a Computer Tech. Hopefully now you can go in at least able to grasp what veteran techs are trying to say. Unfortunately, most techs forget what it was like starting out when you never really expect to need to know networking because there's a whole job line dedicated to it. Hope this helps!

No comments:

Post a Comment

Tag Cloud

.NET (2) A+ (5) ad ds (1) addon (4) Android (4) anonymous functions (1) application (9) arduino (1) artificial intelligence (1) backup (1) bash (6) camera (2) certifications (3) comptia (5) css (2) customize (11) encryption (3) error (13) exploit (5) ftp (1) funny (4) gadget (4) games (3) GUI (5) hardware (16) haskell (6) help (14) HTML (3) imaging (2) irc (1) it (1) java (2) javascript (13) jobs (1) Linux (19) lua (1) Mac (4) malware (1) math (6) msp (1) network (13) perl (2) php (3) plugin (2) powershell (8) privacy (2) programming (24) python (10) radio (2) regex (3) repair (2) security (16) sound (2) speakers (2) ssh (1) story (5) Techs from the Crypt (5) telnet (1) tools (13) troubleshooting (11) tutorial (9) Ubuntu (4) Unix (2) virtualization (2) web design (6) Windows (16) world of warcraft (1) wow (1) wx (1)