2013年7月14日星期日

Help configurating an 851 with PPPoE and DHCP


Question:

I write this because i'm Cisco 3560X  puzzling myself for a few days now trying to find a way to configure my 851 for home use.
My internet provider use PPPoE with PAP and althrough I found many configuration options they all are incomplete...or i cant find the logic behind those commands.
First of all I need to say what I need:
1. Configurate my int Fa4 (WAN) with pppoe so when i insert my ISP cable in it it will negotiate and take IP.
2. Configurate DHCP on LAN (Fa0-3) so that when I insert my PC it will take a fake IP.

Here is the place where i found some conf examples: http://www.cisco.com/en/US/docs/routers/access/800/850/software/configuration/guide/pppoenat.html and I have some questions:
1. MTU - Should I use the 1492 value or the "pppoe-client ppp-max-payload 1500"?
2. ip route 10.10.25.2 255.255.255.255 dialer 0 - How can i set an IP route when my connexion informations only come after i connect? (Because is PPPoE)???
3. I cant configurate the DHCP because I dont know the default route, I dont know the DNS, and i dont know the default gateway because I dont know them due to PPPoE !!!

Please help me because I dont know what to do whit it.

Answer:

The document you have referenced seems to have it wrong... You do not need any of the VPDN configured there, just a plain PPPoE client will do.

Your configuration should look as follows:

ip dhcp excluded-address 192.168.0.1 192.168.0.10
ip dhcp pool LAN
 import all
 network 192.168.0.0 255.255.255.0
 default-router 192.168.0.1
 lease 0 0 30
!
interface Vlan1
 ip address 192.168.0.1 255.255.255.0
 ip nat inside
 ip tcp adjust-mss 1452
!
interface FastEthernet 4
 pppoe-client dial-pool-number 1
!
interface Dialer 0
 encapsulation ppp
 dialer pool 1
 ppp pap sent-username YOURLOGIN password YOURPASSWORD
 ip mtu 1492
 ip address negotiated
 ip nat outside
!
ip route 0.0.0.0 0.0.0.0 Dialer0
!
access-list 1 permit 192.168.0.0 0.0.0.255
ip nat inside source list 1 interface Dialer0 overload

To your questions:

1. MTU - Should I use the 1492 value or the "pppoe-client ppp-max-payload 1500"?

Use the ip tcp adjust-mss on your Vlan1 interface, and the ip mtu 1492 on your Dialer0 interface as I already indicated in my configuration example.

2. ip route 10.10.25.2 255.255.255.255 dialer 0 - How can i set an IP  route when my connexion informations only come after i connect? (Because  is PPPoE)???

You do not need to set up this kind of routing. Your own interface address will be assigned to you automatically after the PPP link comes up (thanks to the ip address negotiated command on Dialer0). You only set up the default route statically - ip route 0.0.0.0 0.0.0.0 Dialer0 which does not use any particular address information, just tells the router to send anything through the Dialer0 interface.

3. I cant configurate the DHCP because I dont know the default route, I  dont know the DNS, and i dont know the default gateway because I dont  know them due to PPPoE !!!

Not entirely. The gateway for your stations is the router itself, and in my example, I have assigned it the IP address 192.168.0.1, so this is the gateway. You are correct with the DNS, however, your provider will assign you these addresses during PPP link negotiation and you will automatically import them into the DHCP configuration thanks to the import all command. If this does not work then certainly, your ISP uses a stable set of DNS servers. He should be able to tell you their exact addresses and then we can configure them statically in your DHCP configuration.

Test this configuration please and let Catalyst 3560 Price me know if it worked. Thanks!

没有评论:

发表评论