Posts

Showing posts from February, 2022

SNMPv3

The InfoSec team at our organization has been pushing for the use of SNMPv3 over the older variants. This brought me an opportunity to learn more about this topic and here I share some of my learnings. First, thing -> SNMP = Simple Network Management Protocol.  There are three famous version -> SNMPv1, SNMPv2c (these 2 have little to no security), & SNMPv3 which is very secure. So, why SNMP?  Say, we're starting a new company, this company requires 50 servers, 20 switches, & 10 routers to keep its internet services up & running. To find the health about individual devices would involves logging into the console of each device which in this case is about 80 devices which would take a few days. Wouldn't it be nicer if we could have each device send health metrics to a centralized server location? A h-ha! That's where SNMP comes in to our rescue. SNMP is an Application level protocol that uses UDP port 161 to send device diagnostics information to a server, t

NAT - Inside Outside Local Global

Image
One of the reasons that we're still able to use IPv4 addressing it down to NAT which stands for Network Address translation. There are 3 types of NAT: 1) NAT overload a.k.a PAT (Port Address Translation) 2) Static NAT 3) Dynamic NAT Let's take a look at the nomenclature before we discuss the difference types of NAT. We need to understand the following terminology ( link to cisco site explanation ): 1) Inside 2) Outside 3) Local  4) Global In the image above, the 10.0.0.10 IP address is our 'Inside Local' IP address.  The 174.6.69.123 IP address is our 'Inside Global' IP address.  The 123.124.125.126 is the 'Outside Global' IP address. The Outside Local address is hard to explain so let's just state what's on the Cisco website -> "The IP address of the outside host as it appears to the inside network." --- Cisco commands: Say on interface gig0/0 you have the internal IP of 10.15.0.10/24 and on interface gig1/0 you have access to a web

FHRP

Image
First Hop Redundancy Protocol is a redundancy protocol for the default gateway.  Say you have a simple network as follows: In this network, you have a default gateway of 10.1.1.1 on your server(10.1.1.10). What if 10.1.1.1 goes down? The network experience of your server's user is impacted and there needs to be a manual change to 10.1.1.2. FHRP technologies help us alleviate this issue by letting the 2 routers work in High Availability mode.   There are 2 Cisco proprietary FHRP technologies: 1) HSRP - Hot Standby Routing Protocol  2) GLBP - Gateway Load Balancing Protocol Open source:  3) VRRP - Virtual Router Redundancy Protocol With all of the three technologies, you setup a virtual IP, e.g. 10.1.1.3 on both the routers and let the two routers know that they are in a group with the third IP, this way if one of the routers go down, the other takes up the default gateway job and the network in not impacted.   ---   Cisco commands to setup HSRP on a Cisco switch: ---> First find

Spanning Tree Protocol - STP

Image
The old adage 2 is 1 and 1 is none holds true to the networking field in which redundancy is always good to avoid waking up in the middle of the night.  So, say we have 3 switches in a network as below. In case SW1 goes down or SW2 goes down, both of our servers go down. In order to make this redundant, very simply, we can connect SW1 to SW2. But this brings about an issue, in case one of the virtual machines on our servers sends out a broadcast message, this creates a 'broadcast storm' in our network effectively bringing our entire network down. So the smarty pants at Cisco invented a way to prevent this from happening by giving the Cisco devices smarts to shutdown one of its ports. But how does the Cisco device know about the loops? It figures it out through BPDUs (Bridge Protocol Data Units) which are transmitted every 2 seconds. Based on this, it does the following calculations to figure out which port to block.

Cisco IOS

 Let's start out by discussing some of the base CISCO devices configuration commands: To configure a CISCO device, connect to the CONSOLE port using a ROLLOVER cable. If you're on a Windows system, on PuTTY, select Serial, set baud rate to 9600 from Device manager of the computer, figure out which COM port is connected. You would be presented with a user-mode with a command line display as follows: Switch> The first thing to know is that you can type enter without any text without any consequences on the command line. Second, if you'd like to get a list of commands that you can enter at any screen or if you're unsure of how to proceed further with any command, use the '?' to get a list of successive commands. Command 1 -> Switch> enable The above 'enable' command takes you to the privileged-mode from the user-mode. Command 2 -> Switch# configure terminal You can use tab to complete the command or view a list of commands starting with what you