Monday, February 21, 2011

What is PPP and PPPoE?

Point To Point Protocol (PPP) and Point To Point Protocol over Ethernet (PPPoE) are network protocols that allow data communication between two network entities or points. Throughout the documentation for both protocols, points are referred to as nodes, computers, or hosts. The protocols are similar in design with a major difference - PPPoE is encapsulated in Ethernet frames. Both protocols exist at the network access layer (also known as the data link layer) that supports network layer protocols including IPv4 and IPv6.

Point To Point Protocol (PPP)

PPP was first proposed as a standard by the Internet Engineering Task Force (IETF) in 1989 and became a working standard in 1994. The IETF specification for PPP is RFC 1661. PPP is a protocol most widely used by Internet service providers (ISPs) to enable dial up connections to the Internet. PPP facilitates the transmission of data packets between point to point links. Originally designed to work with serial connections, PPP was adopted by ISPs to provide dial up Internet access. PPP can be encapsulated in a number of data link layer protocols, including Ethernet (PPPoE) and Asynchronous Transfer Mode (PPPoA).
PPP uses Link Control Protocol (LCP) to establish a session between a user's computer and an ISP. LCP is responsible for determining if the link is acceptable for data transmission. LCP packets are exchanged between multiple network points to determine link characteristics including device identity, packet size, and configuration errors.
PPP supports three types of user authentication protocols that provide varying levels of security. Password Authentication Protocol (PAP) is an access control protocol used to authenticate a user's password on the network access server. The network access server requests a password from the client machine and sends the retrieved password to an authentication server for verification. As an authentication protocol, PAP is considered the least secure because the password is not encrypted in transmission.
Challenge Handshake Authentication Protocol (CHAP) is similar to PAP with several unique characteristics. Instead of requesting a password, the network access server sends a challenge message to the client machine. The challenge message is a random value. The client machine encrypts the challenge message with a user's password and sends the combination back to the access server. The access server forwards the challenge/password combination to the authentication server. The authentication server encrypts the challenge with the user's password stored in the authentication database. If the user's response is a match, the password is considered authentic. CHAP uses the model of a shared secret (the user password) to authenticate the user. The use of CHAP is considered a moderately secure method of authentication.
Extensible Authentication Protocol (EAP) is considered an authentication framework used by a number of secure authentication protocols. EAP is most commonly used for authentication on wireless networks.

Point To Point Protocol over Ethernet (PPPoE)

The working standard for the PPPoE protocol was published by the IETF in 1999. The IETF specification for PPPoE is RFC 2516. PPPoE expands the original capability of PPP by allowing a virtual point to point connection over a multipoint Ethernet network architecture. PPPoE is a protocol that is widely used by ISPs to provision digital subscriber line (DSL) high speed Internet services, of which the most popular service is ADSL. The similarity between PPPoE and PPP has led to the widespread adoption of PPPoE as the preferred protocol for implementing high speed Internet access. Service providers can use the same authentication server for both PPP and PPPoE sessions, resulting in a cost savings. PPPoE uses standard methods of encryption, authentication, and compression specified by PPP.
PPPoE is configured as a point to point connection between two Ethernet ports. As a tunneling protocol, PPPoE is used as an effective foundation for the transport of IP packets at the network layer. IP is overlaid over a PPP connection and uses PPP as a virtual dial up connection between points on the network. From the user's perspective, a PPPoE session is initiated by using connection software on the client machine or router. PPPoE session initiation involves the identification of the Media Access Control (MAC) address of the remote device. This process, also known as PPPoE discovery, involves the following steps:
  1. Initiation - The client software sends a PPPoE Active Discovery Initiation (PADI) packet to the server to intitiate the session.
  2. Offer - The server responds with a PPPoE Active Discovery Offer (PADO) packet.
  3. Request - Upon receipt of the PADO packet, the client responds by sending a PPPoE Active Discovery Request (PADR) packet to the server.
  4. Confirmation - Upon receipt of the PADR packet, the server responds by generating a unique ID for the PPP session and sends it in a PPPoE Active Discovery Session (PADS) confirmation packet to the client.
When a PPPoE session is initiated, the destination IP address is only used when the session is active. The IP address is released after the session is closed, allowing for efficient re-use of IP addresses.

Sunday, February 20, 2011

Configure Cisco Router toWork With Cable Interner 4

Configuring NAT (Network Address Translation)

Continuing for the tutorial series of configuring Cisco router to work with cable internet, now we'll set the router to do NAT.
When connecting your router to the cable internet through cable modem, your router will receive a dynamic IP address from the ISP DHCP server according to the scenario.
While you only get one IP address from the ISP, you also need to connect more than one computer to the internet.
Plus the public IP address is different network with the private IP addresses in your LAN.
NAT can solve this problem, it stores the requesting private IP addresses in the address translation table of the router, translates every request from your LAN and forward it to the internet using the single public IP address.
Now NAT can be used in different scenario, but I'll save them for future posts, for now the NAT form that we'll use is many-to-one scenario of NAT.
Many private IP addresses translated to be one public IP address, some people call it overloading and/or Port Address Translation (PAT).

NAT Overload will assign a unique logical port number to every request from the LAN to the internet thus PAT.
For example, if you have a public IP address of 202.1.1.1, then for a request from the user of 192.168.1.20 in your LAN will be translated into 192.168.1.20:1720 for the incoming request to the router, and 202.1.1.1:1521.
This is how the router can identify which request goes to which device.

To configure it requires some steps, first lets see again how the network diagram looks like:

The image shows I only use one computer to connect to the internet, for now lets pretend I have a lot of computers in my LAN for internet connection.
You need to remember three basic steps for configuring NAT/PAT:
  1. Create access list to decide which private IP addresses are allowed to be translated by the router.
  2. Issue the NAT command to cooperate NAT with access list that we created and tell the router that we need to overload the requests if you use PAT.
  3. Identify which interface in the router that is connected to the LAN then issue ip nat inside command, and which interface is connected to the internet then issue ip nat outside command.
The steps are not necessarily be in that order, we can start with whichever step first. Here how you do those steps:

Create Access List
router> enable
router# configure terminal
router (config)# access-list 101 permit ip 192.168.1.0 0.0.0.255 any

Issue PAT command
router (config)# ip nat inside source list 101 interface Ethernet0/0 overload
 
Identify interfaces for ip nat inside and outside
router (config)# interface ethernet0/0
router (config-if)# ip nat outside
router (config-if)# interface ethernet0/1
router (config-if)# ip nat inside
 
That's it three easy to remember steps for configuring NAT/PAT, one last thing to do for connecting your router to the cable internet is configuring default route.

Configuring Default Route
I decided to include configuring default route into this post since I only have a simple network topology and we only need one line of command to configure the default route.
Here's how we do it, from the last command we jump back to the global configuration mode:
router (config-if)# exit
router (config)# ip route 0.0.0.0 0.0.0.0 ethernet0/0
 
What the above command does is to route all request that point to any ip address that the router doesn't know (0.0.0.0 0.0.0.0) to the ethernet0/0 interface.
If you have a static public IP address from the ISP then you can replace the ethernet0/0 with the IP address given by the ISP.
That concludes the tutorial series for connecting your router to the internet cable, thank you for following the series, and please give me feedback about my posts.
 
 

Configure Cisco Router toWork With Cable Interner 3

Setting Cisco Router as DHCP Server

This option really is optional if you want to set Cisco router to work with cable internet, but this is a good chance to add your skill in configuring Cisco devices.

From the previous post, you know how to configure your router's interface to accept IP address from DHCP server.
Now it's time to configure your router as DHCP server.

Once again you need to make sure your Router IOS image support the DHCP server feature if not then the command won't be available.
To set a DHCP server, you will configure a pool of network IP addresses that you want to give out to the clients (PC, printer, NAS, etc).
As shown on the image in the previous post, I want to give out the IP addresses from the network 192.168.1.0.
First thing you need to configure is to exclude the IP addresses that you dont want to give out.
For example, I've configured the router interface 0/1 to be 192.168.1.1, then I need to exclude 192.168.1.1 so the router won't give out this address.
You can configure the exclusion in the router's global configuration mode:
router> enable
router# configure terminal
router (config)# ip dhcp excluded-address 192.168.1.1



This command is very useful especially if you need to exclude a range of IP addresses, if you need to exclude say 192.168.1.1 until 192.168.1.10 you can do it like this:

router (config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10




After the ip dhcp excluded-address we give the low IP address and the high IP address, this way your router not give IP addresses from 192.168.1.1 to 192.168.1.10, the router will start giving out address from 192.168.1.11 and so on.

Next thing to do is creating a pool of addresses, when issuing the ip dhcp pool, you'll be taken to the dhcp configuration mode where you can set the additional parameters beside the ip address and subnet mask to the clients.
In this example I want to make a pool with the name of HOME_CLIENTS

router> enable
router# configure terminal
router (config)# ip dhcp pool HOME_CLIENTS
router (dhcp-config)# network 192.168.1.0 255.255.255.0
router (dhcp-config)# default-router 192.168.1.1
router (dhcp-config)# import all



At the third line above you can see the configuration command of a pool with the name HOME_CLIENTS.
Fourth line shows that the pool HOME_CLIENTS will give out the addresses in the network 192.168.1.0, with the exception of the addresses in the ip dhcp excluded-address 192.168.1.1 that I showed you previously.
Fifth line tells the clients should be given a default gateway address of 192.168.1.1 (the router's IP address).
The sixth line is the one important thing for configuring DHCP server in cable internet environment.
The import all command tells the router to give out other configuration received from the ISP cable internet DHCP server to the clients in the LAN.
For example, most ISP will give the DNS servers IP addresses from their DHCP server and this configuration might change depends on the ISP, so you definitely want to give this configuration out to the clients.
If you have your own DNS server in the LAN, you can tell the clients to use this DNS server using the following command:
router (dhcp-config)# dns-server 192.168.1.2 192.168.1.3
 

The above command will send out DNS server address of 192.168.1.2 and 192.168.1.3 to the clients.
You can also configure the router to use the above DNS server using the following command in the global configuration mode:
router (config)# ip name-server 192.168.1.2 192.168.1.3
 
You can get more information on Cisco IOS DHCP and DNS commands in the cisco site, please click here to go there.

Configure Cisco Router toWork With Cable Interner 2

We need to first set the IP address of the router's interfaces to begin configuring Cisco router to work with cable internet.
If you configure the router for the first time, connect to it using the console cable.
WARNING!!!
Not every Cisco IOS image supports the commands below, make sure your router's IOS support the commands, please read here first. If your image doesn't support it, the commands wont work.
Or check the features of your IOS image here.
Make sure your Cisco IOS image supports DHCP features (client/server).
As I said in the last post, the interface ethernet 0/0 is connected to the cable modem and interface ethernet 0/1 connected to my PC like shown below:



Ethernet 0/0 is using configuration got from the ISP so we'll set it to receive IP address from ISP's DHCP server. Always remember to give no shutdown command on the interface:

router> enable
router# configure terminal
router (config) # interface ethernet 0/0
router (config-if)# ip address dhcp
router (config-if)# no shutdown


Now to set the Ethernet 0/1 port as the picture above, we can just jump right to the interface 0/1 configuration mode:
router (config-if)# interface ethernet 0/1
router (config-if)# ip address 192.168.1.1 255.255.255.0
router (config-if)# no shutdown


You have successfully configure IP addresses to your interfaces, you can check it using the following command:

router# show ip interface brief

InterfaceIP-AddressOK?MethodStatusProtocol
Ethernet0xxx.xxx.xxx.xxxYESDHCPupup
Ethernet1192.168.1.1YESNVRAMupup  

The show ip interface brief is a very useful command, you would want to use it to check the status of your interfaces.
The interface column shows you all the interfaces you have, the IP-Address is of course shows the addresses of the respective interfaces.
The Method column shows whether the addresses given by a DHCP server or you configured it yourself (stored in NVRAM) or it can also shows TFTP - configuration from TFTP server.
When the status column is showing down then it indicates there is a problem with OSI Layer 2.
The protocol will show up if the interfaces are physically connected to other devices, if not they will show as down (a problem with the OSI Layer 1).
And there's also another state of the status column -administratively down - it means the interface is shutdown.
This is the most likely question you'd get in the CCNA exam.
You can read further about show ip interface brief command here.
When you finished this configuration, your router will be receiving IP address on interface 0/0 from DHCP server of the ISP, and the interface 0/1 will be ready to communicate with network 192.168.1.0

Configure Cisco Router toWork With Cable Interner 1


If you just bought your first used Cisco router, I bet one thing you want to immediately do is connecting the Cisco router to the cable internet.
I know I did, I have cable internet for my home network. Previously I used Linksys router to get my LAN connected to the internet.
Configuring Cisco router to connect to the cable internet is easy work, even if you know only the basic configuration stuff in Cisco.
I need to warn you that this configuration will be in series or else this configuration will be a very long post. And also this series will be a good chance to learn some aspects in configuring Cisco router.
All you need to do is to set the IP address of the interfaces, set the router as a DHCP server if you want it, configure NAT, and the last thing is routing. Very simple indeed.
I'm only going to show you to get your router up and running, I wont discuss about access list and other fancy stuff - that's for the next posts.
Also the devices involve in this tutorial is only the Cisco 2611 router, Motorola cable modem, and my PC. If you want to use other Cisco devices you might need to do more configuration.
In this Part 1, I'm going to review about the concept of this configuration, please look at the topology image below:

Configure IP Address of the Router's Interfaces
The router will get the ip configuration from DHCP server of the ISP, the Ethernet 0/0 port I use as the exit point to the internet.
The Ethernet 0/1 will be the port where my computer is connected. I'm going to set private IP address as the gateway for the computer.
Setting IP address of the interfaces is definitely a topic in the CCNA exam.
Configure the Router as DHCP Server
In this example I'm using the router as DHCP server, giving IP addresses to the computer along with other configuration such as subnet mask, gateway address, and the dns server ip address.
You won't be tested about setting router as DHCP Server in the CCNA exam, it will show up in the CCNP exam.
Configure NAT (Network Address Translation) in The Router
NAT is a powerful concept, you have one public IP address given by the ISP and also private IP addresses in your LAN.

What NAT will do is translate all your private IP address into the public IP address. If you're using overload - one public IP address used by many private IP address - the private IP address is converted into logical ports.
For example, if you got public IP address of 10.1.1.1, then the form of the translation might be like this 10.1.1.1:3000
NAT is also a topic in the CCNA exam and one of the thoughest that is.

Configure Routing
This example only shows the basic static routing, the router will send all request from the client (from port Ethernet 0/1) to the port Ethernet 0/0.
You surely want to learn about routing for the CCNA exam.

Need other Resources For learning Cisco?

During my vacation I also took my chance browsing all over the internet, I'm surprise to see that in the internet, quite a lot of people claiming that Cisco.com didn't give them enough information about the devices in their home labs.
Sure Cisco did stop supporting some of the older devices, but they still keep the information about them including the configuration examples, etc. But maybe they did stop posting the information.
That's not what I want to post about now, just sharing my opinion. But I do want to post about some resources that provide you with the information about Cisco devices.
Two good resources are the Packet magazine and iQ magazine from Cisco, they're free to download. Too bad they stop issuing on new issues because they said they want to evolve their customer communications to a more interactive, web based model or something. Read here.
I really do prefer to read their magazines, although you can't get new issues now but you can still download them from Cisco.
Sure they're maybe outdated reviews, for me, I can still learn a lot from them. For example I found this article about connected home from Packet magazine, making all devices in your home connected.


I actually took advantage of the article and start running my business by offering people this connected home network, turns out to be quite good.
There are many interesting articles like IPTV, VoIP, etc.
If you're aiming for cisco exams, joining in forums is important to get more information from people experienced with the exam.
Some forums that I recommend are from proprofs, sadikhov, and of course cisco. These are three of tons of cisco/networking forums out there.
The key is to find the forum best fit for you, some forums have different culture, some have very helpful people to help you while there are also grumpy people you might meet also.
Keep the list small, if you're like me, I often got confuse because I registered to many forums out there, quality not quantity.

Cisco IOS Naming Convention and Featurs

When you decided to buy Cisco devices for a home lab, it is very important to ask the reseller about the Cisco IOS image the devices are using.

This is something that most newbies are forgetting about when buying used Cisco devices for the first time.

This should be no problem if you buy Cisco kit/home lab package, since the reseller will optimize the requirements for you, including the IOS version.

Now what exactly is the differences in Cisco IOS package names and the features they have. To list every one of them here is a very tiring work since there might be hundreds if not thousands of IOS packages with different versions and features.

What I can tell you is that the above image shows the naming convention of Cisco IOS images. You will oftenly see the above format used in the naming of IOS image.

HARDWARE

The first part is quite self explanatory, hardware is the hardware supported by the IOS.

FEATURE SET

This is where you can find out the features supported by the IOS. This is the new naming convention of Cisco IOS, some older version still use letters to describe the features. The "Legacy naming convention" can be quite confusing, so it's good they decided to change the naming convention.

Cisco distributes IOS packages according their features, take a look at the following diagram:


The higher the features set, the more features it has. You can check the features of Cisco IOS image with the tool provided by Cisco.
Access the tool at cisco site, and you can search by features, IOS image name, platform, product code, and you can even compare features between images. Great tool you should try.

For the legacy naming convention, you can find it formated as yyyy, where the y can be replaced by the following letters:
  • b - For Apple talk support
  • c - For CommServer lite (CiscoPro)
  • g - For ISDN subset (SNMP, IP, Bridging, ISDN, PPP, IPX, and AppleTalk)
  • i - For IP sebset (SNMP, IP, Bridging, WAN, Remote Node, and Terminal Services)
  • n - For IPX support
  • q - For asynchronous support
  • t - For Telco return (12.0)
  • y - For reduced IP (SNMP, IP RIP/IGRP/EIGRP, Bridging, ISDN, and PPP)
  • (c1003 or c1004)
  • z - For managed modems
  • 40 - For 40 bit encryption
  • 50 - For 50 bit encryption 
  • MEMORY LOCATION and COMPRESSION FORMAT

    This section tells you from which memory location the IOS and what format of compression it uses. Check the following for the formats
    • f - flash
    • m - RAM
    • r - ROM
    • l - the image will be relocated at run time  
    • And these are the compression types:
      • z - zip compression
      • x - mzip compression
      • w - “STAC” compression
      MAINTENANCE RELEASE and INDIVIDUAL RELEASE

      These shows the release version number of the IOS image.

      RELEASE

      The last part shows whether the image is T Release (new feature release identifier), S (individual release), or XR (modular packages).

      For further reference you can see the complete list here and here.

      I've made a mistake when I first bought my router, I didn't ask about the IOS version of the router so I ended up with a very basic IOS version not having even DHCP server feature.
      You don't want to make same mistake, so get familiar with Cisco IOS naming convention.

      If you already bought it, check the features supported by the image with the Cisco tool I told you above.

      You need also consider the amount of DRAM of the device. The higher the version and features of an IOS, the more DRAM you need.