Thursday, December 18, 2014

Configuring RIP v2 (Exam Topic 4-G)

Configuring RIP v2 can be completed in a 3 easy steps
RIP just works its not the best protocol to use. I can see RIP being used in a very small environment. Even then why not use OSPFv2?
RIP will create a lot of noise advertising its outing table over and over again every 30 seconds.
RIP also uses hops as its only metric when determining routes.

Now that I've pointed out RIP flaws lets configure RIP v2
First to prove a point of hop only metric I will set the serial connection bandwidth between R2 and R1 to 1 KB






We'll start on R1 and work our way down. Now lets enable router RIP



Next will will specify that we're using version 2

 


Finally we will specify which network we would like to advertise




I will apply the same config and advertise the networks on each router
Now lets take a look at R1 to verify it has learned all of the networks advertised







Now lets do a traceroute from R1 to R4s0/0 interface







We see the route used is R2 fas 0/0 through its s0/0 interface to R4 s0/0 interface

RIP is extremely easy to setup, but I would recommend avoiding RIP in a WAN setup.



Tuesday, December 16, 2014

Configuring NAT (Exam topic 5-E)


Lets start with the basics.

What is NAT? 
NAT stands for network address translation. It is used by everyone that connects to the internet. Translates private address to public address

What is it used for?
Since IPv4 address are available in limited quantities and dropping rapidly the more users connect to the internet in addition private address can not be used on the internet.

Types of NAT
Static-allow you to create a 1to1 mapping of your private to public address, normally used for web servers or mail servers. allows inbound connection to your server based on your public address.
Dynamic-allows you to use a dynamic pool of public address, your router will dynamically map private to public address
PAT (NAT overload)-based on port numbers Router generates a port number for your private address and a port number for your public address.
Your router keeps a table to track public:port to private:port
PAT is used by almost everyone in the world including your home router

Configuring NAT
Configuring NAT is pretty straight forward, I will only configure dynamic in this example since this is the most common used.




First lets make sure we connect to internet. Since I don't have a static address I'll set my S0/0 interface to DHCP. 
Now lets verify we received an address via DHCP



Success! Now lets set up DHCP for our clients.
First we will began with our exclude range
Note: Remember you must always set your DHCP exclude rage first, There is no easy way of going in and making modification to this exclude range. 




Now lets create our pool name




Next we'll set our network




Next we will set our DNS



Finally we will set our default router (gateway)



Now I'm quickly going to bring fas 0/1 up, give it an IP address of 192.168.9.1




I've already configured my switch so lets jump into finally setting up NAT
Steps required for NAT

Identify interface (Inside Outside) Since we want to NAT our inside address and we know our inside interface is S0/1 we will set int fas 0/1 to NAT inside, it does take a few to complete the fist time.





We also need to identify our outside interface ans det it to IP NAT outside, it will be S0/0 since this is the interface we have connected to the internet





Next we need to identify our inside IP address via standard ACL, ours will be 192.168.9.0 /24






Next we will use IP NAT connection (Source destination) Our source will be a list the ACL we just created. Our destination would be out int fas 0/0
IP NAT inside source list NAT_Inside interface fas 0/0 overload
Note: overload enables PAT



Now I'm going to do a few dns ping from my switch and verify my NAT translations







Success! I see my request from my switch going through NAT translation

We can break basic NAT down into 3 simple steps 
Identify Inside outside
Create ACL to permit IP address range
Finaly use IP NAT inside source list (ACL) interface (int) overload

Sunday, November 30, 2014

Working with IPv6 address Part 1(Exam topic 3-E)

IPv6 may seem bit and scary. I know  that I wasn't too thrilled about IPv6 at first, in fact i hated it. That was until I understood its simplicity.
I will try to simplify and explain IPv6 as best as I can. I will try to brake down structure, and rules with close comparison to IPv4. Understanding IPv6 will require a understanding of submitting, binary and hexadecimal.

First lest start with the basics. 

  • IPv6 is written out in  hexadecimal format 
  • An IPv6 address is 128 bits long 
  • An IPv6 address is broken into 8 16 bit groups (IPv4 uses 4 8 bit groups, a group in IPv4 world is called an octet
  • IPv6 uses only CIDR for the network bits 
Now Lets review the foundation Base 2, base 10 and base 16 numeral system 

Base 10 (decimal)
The very first numeral system we learn as a child. which is based on the powers of 10. In the below screenshot you see 255 written out in base 10.






As you can see 10 to the power of 0 equals 1, and 10^1 = 10, and so forth. 
Now we need to add up to 255, to we need 2 100, 5 10, and 5 1. I know this seems too fundamental but we need to take a steep back and take a look back so its easier to understand binary and hex.

Base 2 (Binary) 
Base 2 is introduced when you learn binary. Base 2 is based on the powers.....of you guessed it 2. Based 2 only use a 1 or an 0 to represent which bit is on or off to equal a decimal number. The max for in 8 digit binary (which is all we are concerned with) is 255. In the screenshot below we will write out 158 in binary. 






We see that in binary 158 is written out as 10011110. If you do the math we simply subtract 128 from 158 and turned that bit on we did did not need 64 so we left that bit off. You continue down until you get you reach 0. The best way to learn binary numeral system is to practice, practice converting decimal numbers to binary, you can convert 201, 75, and 103, and post your answers. 

Base 16 (Hexadecimal)
Base 16 is what MAC addresses and IPv6 uses, IPv6 relays heavily on your MAC address you will see why I made that statement when you dive deeper into IPv6. Base 16 is based on the power of 16, and is written out as 0123456789ABCDF where A=10, B=11, C=12, and so fort. Since were using this numeral system for IPv6 we will only go up to 4 places. Each place contains 8 bits. in this example we will write out 179 in hexadecimal. 







We see that we need (11x16)+(3x1) to get 179 which is written out in hex as 0xB3 (B=11)
Seems simple enough, we applied the same concept used from decimal and binary. 

Conversion (Hex to Binary)
Finally we will convert hexadecimal to binary. We will jump straight to the shortcut on how to convert. Each hexadecimal character is represented by 4 bits which is also called a nibble. In the example I will be converting 0xB3 to binary. 











Since we know each hex is 4 bit long we can split our 8 bit binary conversion chart to 4 bits, or we can solve for the entire binary number. does not matter in the end it is the same amount of bits. This trick however will save you tons of time without the need to convert hex to decimal first. I the example above we know that B=11 so we turn on the necessary bits for 11 and then the second hex character we are converting would be 3 so we turn on the bits necessary for 3.
So in binary B=1011 and 3=0011 so 0xB3 = 179 in dec and 10110011 in binary. 

Below is a chart that you an draw up to help you convert quickly 


Now that we have the foundation down lets take a look at some of the rules.   

What do we know so far
So far we know that IPv6 is 128 bits long separated into 8 groups 4 hex characters each with each character equaling 4 bits each 

Rules of IPv6
There are a few rules that will make your live a lot easier when handling IPv6, because lets face there is no way we can remember all IPv6 address the same way we did with IPv4. We are talking about 24 characters below is the IPv6 address we will apply some of the basic rules to 
2014:00B0:0000:0000:0000:B4A0:F63C:00AB

First rule - consecutive 0s can be represented by "::" keep in mind this can only be done once IOS is smart enough to know your writing a shorthand version of an IPv6 address. See example below.
2014:00B0::B4A0:F63C:00AB 
Now that's a lot easier to read and its the same exact address as previously mentioned. Again this can only be done once per address. 

Second rule- All leading 0s can be omitted. As you ca see below I've omitted all leading 0s from our example IPv6 address
2014:B0::B4A0:F63C:AB
Now that we've brought our IPv6 address down to size it doesn't look so scary 

Link Local
Link local is enabled by default when IPv6 is enabled. Link local is similar to Microsoft's automatic addressing. In which network communication is enabled without any administrative interference. You can ping local devices within your link local network. You can not set a gateway to a link local address, so you can not reach outside of your link local network (which means no internet) The prefix for a link local address will always be an FE80 prefix 


Working with network bits
Rather than using the familiar 255.x.x.x format IPv6 uses CIDR notation which counts the bits used for a network. The most common network you will come across is /64 
Here is a link to an article that covers IPv6 subnetting

Types of traffic  
In the chart below we see the types of traffic available in IPv6





Broadcast no longer exist instead we use multicast 
Multicast is used by services such as DHCP to receive a multicast you must be in listening mode 
Unicast is commonly used for 1 to 1 communication 
Anycast is useful in a globally dispersed environment where you will have multiple servers configured with the same IP and the client will connect to the serve with the lowest cost. 

Types of addresses 

Global
Gloabal addresses are provided by ISP to each subscriber. Usually this address will begin with 2000: 
each provider as their global prefix which is 16 bits then they would add the additional 48 bits when given to the customer 

Site local 
Site local is similar to the common unique address or an internal address for example 192.168.10.0/24 

Link local 
Automatic address or loopback address 



Saturday, November 29, 2014

Working with and Configuring IPV6 address Part 2(OSPF)(Exam topic 3-E)

Setting up your IPV6 on a router that is compatible can be fairly easy. In this example I will be setting up a few router with IPV6 and OSPF for IPV6 then I will verify connectivity. On a few of these interfaces I will use the eui-64 command to generate the unique local address.
eui-64 generates the host id  simple formula using your interface MAC address, it flips the 7th bit and insets FEEE in the middle of your MAC address.

Below is the network that I will be setting up.




















Lets start with router 1, we will configure fa0/0 and s1/0 as shown.
First we will enable IPV6 




Next we will assign IPV6 address to each interface using eui-64
We can verify that an host ID was generated based on the routers MAC address.
You can also see i forgot to do a no shut on the interfaces.

 Now lets configure OSPF using the command ipv6 router ospf 1 (where 1 is the process id of your choosing)
Note:Immediately after using this command it shoots out an error of no router-id. This was not an issue with OSPF for IPV4 since it generated a router id based on the IPV4 address.




Next we will assign a random router ID, this must be unique on each router using the x.x.x.x format




In OSPF for IPV4 you would use the network command to identify networks that it would use for OSPF hello packets and which networks to advertise. In OSPF for IPV6 you simply enable OSPF on each interface you would like to make routable using the following command ipv6 ospf 1 area 0 
That's all it takes to apply IPV6 to your router an make it routable, now we will all the same configs to the other router and do a test ping
Note: Don't forget to save your config!!!

First on R1 I'll do a sh ipv6 route to show learned routs via OSPF
















Now from R1 I'll ping R3 an R4 and we see both are successful
 Thats it, we've enabled IPv6 and configured routing with OSPF , IPv6 is not as scarry as it sounds.
I'll do a few sh cdp neighbor just for fun .