
https://github.com/Lenniusce/pppoe
| Device | Interface | IP |
| PPPOE_Server – vIOS Router | G0/1 | |
| PPPOE_Client – vIOS Switch | G0/0 G0/1 G0/2 G0/3 VLAN101 VLAN102 VLAN103 | |
| Computer_1 – Ubuntu Linux | E0 | 10.1.1.2 |
| Computer_2 – Ubuntu Linux | E0 | 10.2.1.2 |
| Computer_3 – Ubuntu Linux | E0 | 10.3.1.2 |
SERVER ROUTER
bba-group pppoe globalvirtual-template 1
Then
interface virtual-template 1ip address 172.18.0.1 255.255.255.0mtu 1492ip tcp adjust-mss 1452peer default ip address pool CLIENTppp authentication pap callin
Then
ip local pool CLIENT 172.18.0.2 172.18.0.10
Then
username LENNY password CISCO
Then
interface GigabitEthernet0/0no shutdownip address dhcpinterface GigabitEthernet0/1no shutdownpppoe enable group globalip route 0.0.0.0 0.0.0.0 G0/0
CLIENT ROUTER
Then
interface GigabitEthernet1 no ip address negotiation auto pppoe enable pppoe-client dial-pool-number 103 pppoe-client dial-pool-number 102 pppoe-client dial-pool-number 101
Then
ip dhcp pool COMPUTER_1network 10.1.1.0 255.255.255.0default-router 10.1.1.1ip dhcp pool COMPUTER_2network 10.2.1.0 255.255.255.0default-router 10.2.1.1ip dhcp pool COMPUTER_3network 10.3.1.0 255.255.255.0default-router 10.3.1.1
Then
interface Gigabitethernet2no shutdownip address 10.1.1.1 255.255.255.0ip nat insideip policy route-map DIALER_101interface Gigabitethernet3no shutdownip address 10.2.1.1 255.255.255.0ip nat insideip policy route-map DIALER_102interface Gigabitethernet4no shutdownip address 10.3.1.1 255.255.255.0ip nat insideip policy route-map DIALER_103
Then
interface Dialer101mtu 1492ip address negotiatedno ip redirectsip nat outsideencapsulation pppip tcp adjust-mss 1442dialer pool 101no cdp enableppp authentication pap callinppp pap sent-username LENNY password 0 CISCOppp ipcp route defaultinterface Dialer102mtu 1492ip address negotiatedno ip redirectsip nat outsideencapsulation pppip tcp adjust-mss 1442dialer pool 102no cdp enableppp authentication pap callinppp pap sent-username LENNY password 0 CISCOppp ipcp route defaultinterface Dialer103mtu 1492ip address negotiatedno ip redirectsip nat outsideencapsulation pppip tcp adjust-mss 1442dialer pool 103no cdp enableppp authentication pap callinppp pap sent-username LENNY password 0 CISCOppp ipcp route default
Then
ip nat inside source route-map NAT_101 interface Dialer101 overloadip nat inside source route-map NAT_102 interface Dialer102 overloadip nat inside source route-map NAT_103 interface Dialer103 overload
Then
ip access-list extended COMPUTER110 permit ip 10.1.0.0 0.0.255.255 anyip access-list extended COMPUTER210 permit ip 10.2.0.0 0.0.255.255 anyip access-list extended COMPUTER310 permit ip 10.3.0.0 0.0.255.255 any
Then
route-map DIALER_101 permit 10match ip address COMPUTER1set interface Dialer101route-map DIALER_102 permit 10match ip address COMPUTER2set interface Dialer102route-map DIALER_103 permit 10match ip address COMPUTER3set interface Dialer103route-map NAT_101 permit 10match ip address COMPUTER1set interface Dialer101route-map NAT_102 permit 10match ip address COMPUTER2set interface Dialer102route-map NAT_103 permit 10match ip address COMPUTER3set interface Dialer103
track 1 interface Dialer101 ip routingtrack 2 interface Dialer102 ip routingtrack 3 interface Dialer103 ip routingip route 0.0.0.0 0.0.0.0 Dialer101 track 1ip route 0.0.0.0 0.0.0.0 Dialer102 track 2ip route 0.0.0.0 0.0.0.0 Dialer103 track 3event 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 *"!event manager applet FlushNAT-D3 event track 3 state any action 1.1 cli command "enable" action 1.2 cli command "clear ip nat translation *"
COMPUTERS
Computer1 = 10.1.1.2Computer2 = 10.2.1.2Computer3 = 10.3.1.3


Leave a comment