Showing posts with label How to. Show all posts
Showing posts with label How to. Show all posts

Monday, October 20, 2014

Configuring a Router as a PPPoE Client for DSL Connectivity



Cabling the topology:

1 straight-through cable connecting switch to switch
2 crossover cables between the switches and routers

The basic settings:

Disable DNS lookup "no ip domain-lookup"
Set hostnames "hostname (name)"
encrypt passwords "service password-encryption"
Create a MOTD banner saying "unauthorized access is prohibited"  "banner motd # Unauthorized Access is Prohibited!#"
create passwords for EXEC mode, console, and vty. Then enable login.
set logging synchronous "line con 0" "logging synchronous"
save config "copy running-config startup-config"

I have my routers preconfigured and saved with these settings (minus the passwords) so I typically skip this part. I do set the hostnames to avoid confusion. 

Configuring the ISP router

In global config mode enter the command " username Cust1 password ciscopppoe". This creates a database entry for Cust1 with a password of ciscopppoe. This will allow the Cust1 router to connect with the ISP router using that password later. 

The ISP needs a pool of addresses to hand out to it's DSL customers. Using the command "ip local pool PPPoEPOOL 10.0.0.1 10.0.0.10" creates a range of addresses from 10.0.0.1 to 10.0.0.2 to hand out over PPPoE.

Next we are going to make a Virtual template and connect the F0/1 interface with it. This is done with these commands:
interface virtual-template 1
Creates the Virtual template
ip address 10.0.0.254 255.255.255.0
Assigns it the ip 10.0.0.254/24
mtu 1492
Sets the mtu size to 1492B
peer default ip address pool PPPoEPOOL
Assigns the previously created pool of ip addresses "PPPoEPOOL" to this template
ppp authentication chap callin
Sets the requirement to authenticate using chap to establish a connection.

Now to associate the template to the PPPoE group
bba-group pppoe global
Creates a bba (broadband aggregation) group for PPPoE
virtual-template 1
Assigns virtual-template 1 to the bba group.

Finally link the PPPoE group to the actual f0/1 interface
int f0/1
Moves to int f0/1
pppoe enable group global
Connects the PPPoE group to the interface
no shut
Activates the interface

Configuring the Cust1 router

First configure the f0/1 interface to use PPPoE
int f0/1
Moves to int f0/1
pppoe enable
Enables PPPoE on the interface
pppoe-client dial-pool-number 1
Tells the router is the client and assigns it the dial pool number of 1. The dial pool number corresponds with the dialer interface that will be created next. The dialer and the number assigned here must match to work.

Creating the interface dialer.
int dialer 1
Moves to and creates the dialer interface
mtu 1492
Sets the mtu size to 1492B
ip address negotiated
Tells the interface that the address will be negotiated
encapsulation ppp
Sets the encapsulation to ppp
dialer pool 1
Connects the dialer pool and int f0/1 to the dialer
ppp authentication chap callin
Sets the authentication encryption to chap
ppp chap hostname Cust1
Sets the chap hostname to be used as "Cust1"
ppp chap password ciscopppoe
Sets the chap password to "ciscopppoe"

Set the static default route pointing to dialer 1 and enable some debugging.
ip route 0.0.0.0 0.0.0.0 dialer 1
Sets the static default route to dialer 1
exit
Moves back to privileged mode
debug ppp authentication
Shows PPP events
debug pppoe events
Shows PPPoE events

Lastly enable interface f0/1 with the "no shut" command

To confirm PPPoE is working use "show pppoe session" and "ping 10.0.0.254". there should be an entry in the session table and ping should be successful.




Reflection


Why do ISPs who use DSL, primarily use PPPoE with their customers?


PPPoE allows easy separation of DSL subscribers connections. The means one subscriber cannot see the traffic of another subscriber. PPPoE also allows the ISP to easily track usage by a subscriber. ISP can use deep packet inspection to analyze traffic and limit users connections.
 

Sunday, October 19, 2014

Router upgrades!



I wanted to play with some IPv6 addressing and found my router's IOS couldn't handle it. I found a newer IOS for the 1841 that could. In order to use it two of my routers needed more flash space and more RAM. I ordered the ram off Ebay for $19 total and ordered the CompactFlash cards on Newegg for ~$26. None of it official Cisco parts but good enough for my lab. Links are to what I actually bought. I have installed everything and they all work great. I wanted to share how I did it.

Installing the memory Modules

Installing the memory requires taking the router off the rack and opening it.

 Steps for opening the router:

  1. flip router on back and remove the single screw closest to the faceplate side of the router. (marked in yellow)
  2. Use a flat screwdriver and put it in one of the slots (marked brown) and rotate 90 to separate the cover from the case. (should look like image 2)
  3. Carefully flip the router right side up with the faceplate facing you. Pull the cover toward you and it should slide right off. Now you can see the inside and where the RAM should go.  (Marked in yellow)
  4. Insert the Ram in the slot at an angle (much like laptop ram). push in until the pins are fully in the slot.
  5. Then push the top of the RAM down till it clicks in place.
  6. Slide the cover back on, put the screw back in, now you're done.

Installing the CompactFlash  Card

Installing the Flash card requires formatting the card than bringing the IOS over TFTP.

Steps for installing the Flash card:

  1. Allow the router to fully boot and wait till the access light stays off.
  2. Pull out the original card and Insert the new one.
  3. In privileged mode use the command "format flash:" It will ask you to confirm twice than format the card.
Now that the card is formatted we can bring over the new IOS image.
  1. Set up an IP address on a port you can use. I used port "f0/1" and set the IP to "192.168.1.14 255.255.255.0" (My pc uses the address "192.168.1.13 255.255.255.0")
  2. On your computer start you TFTP server. Make sure ports are open in the firewall if need be. make sure your new IOS is in the servers folder. I use OpenTFTP and it defaults to "C:\OpenTFTPServer"
  3. In the router's console, in privileged mode, enter "copy tftp flash". after that it will ask for the address of the TFTP server (in my case "192.168.1.13"). Then it will ask for the name of the IOS to transfer (in this case "c1841-advipservicesk9-mz.151-4.M1.bin"). It will ask what the IOS should be named on the router (I just use the default and hit enter). Now the Transfer will start.
  4. After the transfer is done the new cards should be ready.

Here is the device recognizing the new RAM and the CompactFlash card