cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2166
Views
0
Helpful
1
Replies

Cisco 3825 Router with multiple PPPoE on subinterfaces

Roberto Kippins
Level 1
Level 1

Hi I have a single router that I would like to use for PPPoE. I have two PPPoE connections and my ISP gave me two different username and passwords. I would be grateful if somebody could help me with the configs. I plan to use two separate vlans on a L2 switch to plug the ISP modems in and then use my g0/1 interface as a trunk to the switch. I have G0/1.500 and G0/1.600 configured. I would like to configure PPPoE on both sub-interfaces using the two user accounts. lets say the user accounts were user1 and user2 with password cisco123 for both. the public ip will be given automatically by isp.

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Roberto,

Assuming that you want to use both of your connections simultaneously, this would be the configuration on the router (I assume here that your internal IP network is addressed from the 10.0.0.0/8 space - if it isn't please modify the ACL-NAT access list; also do not forget to mark your inside interfaces with ip nat inside):

interface GigabitEthernet0/1
no shutdown
!
interface GigabitEthernet0/1.500
encapsulation dot1q 500
pppoe-client dial-pool-number 1
!
interface GigabitEthernet0/1.600
encapsulation dot1q 600
pppoe-client dial-pool-number 2
!
interface Dialer1
encapsulation ppp
mtu 1492
dialer pool 1
ppp chap hostname user1
ppp chap password cisco123
ip address negotiated
ip tcp adjust-mss 1452
ip nat outside
!
interface Dialer2
encapsulation ppp
mtu 1492
dialer pool 2
ppp chap hostname user2
ppp chap password cisco123
ip address negotiated
ip tcp adjust-mss 1452
ip nat outside
!
track 1 interface Dialer1 ip routing
track 2 interface Dialer2 ip routing
!
ip route 0.0.0.0 0.0.0.0 Dialer1 track 1
ip route 0.0.0.0 0.0.0.0 Dialer2 track 2
!
ip access-list standard ACL-NAT
permit 10.0.0.0 0.255.255.255
!
route-map RM-NAT-D1
match interface Dialer1
match ip address ACL-NAT
!
route-map RM-NAT-D2
match interface Dialer2
match ip address ACL-NAT
!
ip nat inside source route-map RM-NAT-D1 interface Dialer1 overload
ip nat inside source route-map RM-NAT-D2 interface Dialer2 overload
!
event manager applet FlushNAT-D1
 event track 1 state any
 action 1.1 cli command "enable"
 action 1.2 cli command "clear ip nat translation *"
!
event manager applet FlushNAT-D2
 event track 2 state any
 action 1.1 cli command "enable"
 action 1.2 cli command "clear ip nat translation *"
!
end

So what this configuration does is the following:

  • It starts two independent PPPoE clients on individual subinterfaces of Gi0/1
  • Each PPPoE client is then used by a standalone Dialer interface
  • Two track objects are created, each monitoring whether the corresponding Dialer interface has been assigned an IP address from the provider
  • Two default routes are configured, each of them being installed into the routing table only if the corresponding track object is up, in turn meaning that a default route over a particular Dialer interface will be installed only if the Dialer interface has received an IP address from the provider
  • An ACL is defined that covers your internal network(s)
  • Two route-maps are created that will help the router properly decide what outside address should be used to NAT your internal networks depending on what Dialer interface the packets will be sent out
  • NAT/PAT is configured to hide all your internal networks behind either Dialer1 or Dialer2, depending on what interface the packet is sent out to the internet
  • Two EEM scripts are created that will flush the stale NAT entries from the NAT routing table if any of the Dialer interfaces goes down or up

Please give this a try and let us know if it worked for you.

Best regards,
Peter

View solution in original post

1 Reply 1

Peter Paluch
Cisco Employee
Cisco Employee

Roberto,

Assuming that you want to use both of your connections simultaneously, this would be the configuration on the router (I assume here that your internal IP network is addressed from the 10.0.0.0/8 space - if it isn't please modify the ACL-NAT access list; also do not forget to mark your inside interfaces with ip nat inside):

interface GigabitEthernet0/1
no shutdown
!
interface GigabitEthernet0/1.500
encapsulation dot1q 500
pppoe-client dial-pool-number 1
!
interface GigabitEthernet0/1.600
encapsulation dot1q 600
pppoe-client dial-pool-number 2
!
interface Dialer1
encapsulation ppp
mtu 1492
dialer pool 1
ppp chap hostname user1
ppp chap password cisco123
ip address negotiated
ip tcp adjust-mss 1452
ip nat outside
!
interface Dialer2
encapsulation ppp
mtu 1492
dialer pool 2
ppp chap hostname user2
ppp chap password cisco123
ip address negotiated
ip tcp adjust-mss 1452
ip nat outside
!
track 1 interface Dialer1 ip routing
track 2 interface Dialer2 ip routing
!
ip route 0.0.0.0 0.0.0.0 Dialer1 track 1
ip route 0.0.0.0 0.0.0.0 Dialer2 track 2
!
ip access-list standard ACL-NAT
permit 10.0.0.0 0.255.255.255
!
route-map RM-NAT-D1
match interface Dialer1
match ip address ACL-NAT
!
route-map RM-NAT-D2
match interface Dialer2
match ip address ACL-NAT
!
ip nat inside source route-map RM-NAT-D1 interface Dialer1 overload
ip nat inside source route-map RM-NAT-D2 interface Dialer2 overload
!
event manager applet FlushNAT-D1
 event track 1 state any
 action 1.1 cli command "enable"
 action 1.2 cli command "clear ip nat translation *"
!
event manager applet FlushNAT-D2
 event track 2 state any
 action 1.1 cli command "enable"
 action 1.2 cli command "clear ip nat translation *"
!
end

So what this configuration does is the following:

  • It starts two independent PPPoE clients on individual subinterfaces of Gi0/1
  • Each PPPoE client is then used by a standalone Dialer interface
  • Two track objects are created, each monitoring whether the corresponding Dialer interface has been assigned an IP address from the provider
  • Two default routes are configured, each of them being installed into the routing table only if the corresponding track object is up, in turn meaning that a default route over a particular Dialer interface will be installed only if the Dialer interface has received an IP address from the provider
  • An ACL is defined that covers your internal network(s)
  • Two route-maps are created that will help the router properly decide what outside address should be used to NAT your internal networks depending on what Dialer interface the packets will be sent out
  • NAT/PAT is configured to hide all your internal networks behind either Dialer1 or Dialer2, depending on what interface the packet is sent out to the internet
  • Two EEM scripts are created that will flush the stale NAT entries from the NAT routing table if any of the Dialer interfaces goes down or up

Please give this a try and let us know if it worked for you.

Best regards,
Peter