Thursday, July 2, 2009

Made it


Wednesday, June 24, 2009

CCNA Test

Passed. 825 required, I scored an 874.

I was weak exactly where I thought Iwould be weak - WLAN and switching (VTP to be exact).

Either way, I'm glad to have that over and get on with the summer!

Wednesday, June 17, 2009

Etherchannel

I nearly failed to add Etherchannel to the discussion of STP. The essence of fast etherchannel is that, when you have multiple links between switches STP will set all but one in a blocking state. This is a waste of bandwidth as the blocked ports simply wait for a failure. Fast etherchannel allows you to bind all links between switches together to load-balance across the available connections and combine their bandwidth into a virtual interface that you administer as a single physical link. If one of the links in an etherchannel group fails, the rest of the group continues to work together.

That's cool, I think.

STP and RSTP

Because of the limitations of Spanning-tree Protocol, Cisco added a few options to make it work better - and more "Cisco-like."

When an access port becomes connected to a workstation, it will take up to 50 seconds while it goes through the transition from blocking to listening to learning to forwarding. While it is transitioning, network services are unavailable. This can be a problem if you are in a Windows network where your authentication and DHCP services require a connection and may time out before they complete. To get around this, Cisco added portfast to STP. Portfast essentially tells the switch port to go straight to skip the process and go straight to forwarding. This could be dangerous if the new device is changed out to be a switch, so Cisco added BPDU-guard. BPDU-guard says that, should a switch port receive a BPDU, it sets the port immediately into a blocking state until re-enabled by an administrator.

Two other optional parameters Cisco added to STP are Uplink Fast and Backbone Fast. Uplink Fast sets a port in the access-layer of infrastructure ready to become the root port should it's existing port fail. It has ready knowledge of the alternate path and bypasses the listening and learning states in the event of a failure. Backbone Fast is similar, but it has no direct knowledge of a link to the root. When the backbone link fails, the non-root bridge starts sending BPDU's that it is the new root. The access-layer switch essentially bypasses the listening state, disregards the false BPDU from the non-root bridge and sends a BPDU to the non-root that it has a path to the actual root bridge.

Because these are Cisco-proprietary, the IEEE developed 802.1w, or Rapid Spanning Tree Protocol. RSTP incorporates these features by changing some of the port states and shortening the timers. It changes "blocking" ports to be called "discarding" ports, but because "listening" ports in STP are essentially discarding packets, it lumps that state into discarding. Discarding ports are listening for and forwarding BPDU's but do not forward frames or learn MAC addresses. Learning and forwarding remain the same.

RSTP also adds two port roles. It adds "Alternate" and "Backup" roles to the root and designated port roles. Backup ports are set to assume the role of designated port should the designated port link fail and there are multiple links to that segment (not necessarily to the root). Alternate ports are set to assume the role of root port should the root port link fail.

RSTP also defines a distinction between connections to switches and edge devices differently. Any 100 Mb, full-duplex connection to a switch is defined as a point-to-point link, where half-duplex connections are link-type "shared." Shared link types would take place to a hub, but these are not common any longer so there is no need to worry about them. It then defines access ports as "edge" ports. Edge ports are connected to end devices, and you define them as such by issuing the "switchport portfast" command. If an edge link receives a BPDU, it immediately transitions to point-to-point.

RSTP uses BPDU's as keep-alives, and to aid in rapid convergence, if 3 BPDU's are missed, the switch is considered dead and it floods the BPDU out to all switches (compared to STP sending that TCN to the root and letting the root alert the others) and all switches then age-out any MAC addresses associated with the failed switch. That is quite a lot faster than STP's 50 second wait time.

Lastly, there is a proposal process that neighboring switches go through. When two switches are connected, the send BPDU hello messages to each other. As soon as one decides it is the designated port for that segment, it sends a proposal to forward to the other switch. The receiving switch puts all other non-edge-type ports into a discarding state to avoid loops, and responds that it will accept frames from the sender and becomes the root port. If a switch receives a BPDU from a switch but its path is not optimal to the root, it never sends an agreement so the sender will age out its proposal and become the alternate port and continues to discard.

My understanding is that RSTP configuration is beyond the scope of the CCNA, but it's good to have understanding of how it works to speed up convergence and to know the terms. There you have it folks...

Tuesday, June 16, 2009

Spanning-tree

Spanning-tree protocol is described by the IEEE 802.1d protocol. (I've never, in a real-world situation needed to know that, but it seems like the sort of thing Cisco would put on their test to see if you were paying attention). It is a layer 2 protocol that prevents loops in traffic by figuring out what is the fastest path to the root bridge (or root switch).

STP bases all its calculation on cost, which it figures by default by the speed of the link. STP costs are assigned as follows:

10 Gb - Cost 2
1 GB - Cost 4
100 Mb - Cost 19
10 Mb - Cost 100

When a switch comes online, it sends out a Bridge Protocol Data Unit (BPDU) that carries its bridge ID, which is a combination of the switches priority (32768 by default, but configurable in multiples of 4096) combined with the MAC address of the switch. Lowest Bridge ID becomes the root bridge. It then sends out BPDU's every 2 seconds, and as long as it doesn't receive a response that another switch on the network has a lower ID, it will continue happily as the root bridge.

Once the root bridge is elected, it defines root ports and designated ports throughout the network. Root ports are simply the ports that have the lowest cost back to the root, and designated ports are the ports that connect to other switches. The cost is calculated by adding all cost values for the entire path back to the root. So if you have 3 switches, and there is a 1Gb link between switch A and switch B, and a 100 Mb link between switch B and switch C, the cost for the path is 23 (4 + 19).

If there are multiple paths to the root, the switch will use the following means of deciding which port will forward and which will block. It looks first at cost, with the lowest cost going into a forwarding state and the higher cost blocking. If there are multiple paths with the same cost, the switch will look at bridge ID, with the lowest going to forwarding state. If there are identical bridge ID's it will look at port priority, which is an arbitrarily assigned number that defaults to 128 but can be configured to choose one path over another. If there continues to be a tie, the switch will then look at port number, with the lowest interface ID going to forward packets.

Spanning-tree ports go through transitions, where each port ends either in a forwarding or blocking state. There are timers assigned to each state, and each state has a different function. They are:

Disabled - the port is obviously not forwarding
Blocking - the portaccepts BPDu's but does not send other user data
Listening - port is accepting traffic and accerpts and sends BPDU's
Learning - port is accepting traffic and entering MAC addresses into memory
Forwarding - the port is forwarding user data as well as BPDU's

To transition from blocking to listening takes 20 seconds, from listening to learning takes 15 seconds and from learning to forwarding takes another 15 seconds. When there is a topology change, STP will take 50 seconds to transition and resume network connectivity. PVSTP+ can converge in 2 seconds, but that is another topic... These timers are dictated by the root bridge, so to modify them in your network you only need to change them on the root and they will propagate throughout the network via BPDU's.

Later, VLAN's.

Monday, June 15, 2009

The date is set

June 24th, 2009 at 8:00 AM.

I was glad to see that SCSU has a testing center now. Now I can test without having to drive a couple hours beforehand.

I'm about to do some cramming, more updates later. I feel pretty good right now that I'll be prepared. I'll be going over switching and ACL's, while continuing to blast through subnetting and facts and figures. I wish I had gone over the facts and figures more, but at this point I will just need to make the most of it.

Anyway, less blogging. More studying. Opening up the labs as we speak...

Friday, June 12, 2009

IPSec and VPN - overview

Secure network communication is of utmost importance in today's business world. Having worked in network security for the past several years, I find that the only thing that seems to trump security is cost. If something costs too much, companies are usually willing to take a risk. That's why things like HIPPA and SOX come into play, and while they sometimes make life difficult, I'm glad they are there to keep our information safe.

At any rate, IPSec is a layer 3 protocol framework that encrypts everything from layer 4 up to layer 7. I call it a framework, because it actually is a protocol that you configure other protocols to fit into to work together. This way, as encryption protocols become out-dated and compromised, IPSec can simply plug in the latest and greatest protocol and off you go!

IPSec handles encryption, which is securing your data from anyone else being able to read it. Protocols used for encryption are (ordering from weakest to strongest): DES, 3DES, AES. DES uses a 56-bit key, 3DES runs DES 3 times and AES uses 128, 192 or 256-bit encryption. These are all examples of symmetric encryption, where the key that is used to encrypt data is also used to decrypt data. Assymmetric encryption, such as PKI, uses a public/private key pair. Anything encrypted with the public key can only be decrypted with the private key and vice versa.

To solve the problem of having to configure symmetric encryption keys on all parties attempting to secure data between themselves, Diffie-Hellman Key Exchange (or DH) is used. DH works by having both clients exchange the results of a complex mathematical equation and use the results to create a secure shared key.

SSL is an encryption method that is assymmetric, using a public and private key to secure transmission of a shared secret key. Essentially, once the SSL connection is initiated, the sending party uses the receiving party's public key to encrypt a shared secret key that it generated. Only the receiver can decrypt it, because only they will have their private key.

Authentication and data integrity are handled by the older MD5 and the newer, more secure SHA-1. These protocols run a mathematical algorithm on the data to be sent, creating a "hash" that identifies the data to be sent. When the receiving party runs the algorithm against the same data, it will come up with the same hash. If the hash is different, the data has been corrupted or modified in transit and the receiving party can discard it.

Lastly, the IPSec protocol itself consists of the AH(Authentication Header) and ESP(Encapsulating Security Protocol). AH was developed first and only provided authentication and data integrity, and ESP was developed to provide encryption, which AH lacked.

VPN technologies are available in most modern versions of Cisco IOS, making them what Cisco calls "ISR" or "Integrated Security Routers." VPN technology is also included in the ASA (Adaptive Security Appliance). The 3 main benefits of using VPN technology are that: 1) it costs less to use an Internet connection to secure communication between remote sites than point-to-point leased lines, 2) provides higher speed connectivity to remote users by means of broadband and DSL connections in remote sites, compared to the old dial-up lines companies used to use, and 3) scalability is enhanced because new remote sites can be brought online without significant infrastructure enhancements. The down side to VPN technology is that the Internet is not typically as reliable as a point-to-point line, and there is increased overhead on routers and firewalls as they handle the encryption and decryption of data.

There are two types of VPNs: Site-to-site and remote-access.

Site-to-site VPN's create a secure "tunnel" through the Internet from one site to another. The users in one site have no idea what type of equipment their data passes through. As far as they are concerned, it is a direct connection. The Internet doesn't see any of the user's data, because it is encrypted before it traverses the line. These are configured to be either "permanent" or "semi-permanent" where the permanent VPN is always up, offering speed but greater overhead because the tunnel is up whether you are using it or not. Semi-permanent VPN's are brought up by the sending device when data needs to go to the remote site, and torn down wehn they are no longer in use. This takes a load off the router or firewall, but there will be some latency in the initial connection.

Remote-access VPN's are always semi-permanent. They are brought online when a user establishes a connection to the firewall or router by use of a client. Historically, they would load up a VPN client application that was configured for use by the administrator, enter their username and password (or token if 3-factor authentication is being used) and they would have network connectivity as if on the LAN. The latest and greatest method of remote-access VPN for Cisco is the SSL VPN, or WebVPN or Clientless VPN (they are all names for the same thing).

The WebVPn has a user access a secure website (watch for the https:// in the url). Once engaged in the secure web communication, they enter authentication by means of a username and password. At that point, as long as the web connection stays open they are securely connected to the LAN. In a true clientless situation,m they are presented with a directory listing in the web browser of resources to which they have access. In thin-client situations, an Active-X or java client is dlownloaded and run on the remote user, giving them the ability to use any tcp-based application on their computer. The clientless connection does not allow a user to run programs on their computer.

There is much, much, much more involved in these technologies, but from what I gather all we need for the CCNA is the broad overview and familiarity with the terms and protocols. I'll leave the in-depth analysis for my future certification blog...