In some previous articles, although we have introduced some PPPoE Server configuration methods, they are all based on window operations. Here we will explain in detail the text command PPPoE Server configuration method, in general, our configuration can be divided into four steps.
The configuration of the PPPoE Server of RouterOs can be divided into four steps:
· Set an intranet IP address pool for PPPoE virtual dial-up users to dynamically allocate IP addresses to customers.
· Add a PPP profile and set an intranet IP address so that the customer can obtain the IP address from the address pool.
· Add PPPoE dial-up users. Users can use their usernames and passwords to dial up.
· Add a PPPoE Server.
After the work is completed, the user can perform virtual dialing
Let's take a look at the specific PPPoE Server configuration operations:
1. Add an address pool named mypool
[Admin @ MikroTik] ip pool> add name = mypool ranges = 192.168.0.2-192.168.0.254
You can run the print command to check whether:
[Admin @ MikroTik] ip pool> print
# NAME RANGES
0 mypool 192.168.0.2-192.168.0.254
2. Add a PPP Profile named myserver
[Admin @ MikroTik] ppp profile> add name = myserver local-address = 192.168.0.1 remote-address = mypool
You can run the print command to check whether:
[Admin @ MikroTik] ppp profile> print
Flags: *-default
1 name = "myserver" local-address = 192.168.0.1 remote-address = mypool session-timeout = 0 s idle-timeout = 0 s
Use-compression = no use-vj-compression = no use-encryption = no require-encryption = no only-one = no
Change-tcp-mss = yes tx-bit-rate = 0 rx-bit-rate = 0 incoming-filter = "" outgoing-filter = "" dns-server = ""
Wins-server = ""
3. Add the user name abc and password 111 For the PPPoE Server. This user can only use the PPPoE service.
[Admin @ MikroTik] ppp secret> add name = abc password = 111 service = pppoe profile = myserver
Run the print command to check whether:
[Admin @ MikroTik] ppp secret> print
Flags: X-disabled
# Name service caller-id password profile remote-ADDRESS
0 abc pppoe 111 myserver 0.0.0.0
4. Add a PPPoE service named mypppoe and set the port to the Intranet interface et22.
[Admin @ MikroTik] interface pppoe-server> add service-name = mypppoe interface = ether2-default-profile = myserver
You can also run the print command to check the configuration.
◆ Configure NAT
Because we use private IP addresses on the Intranet, We need to configure NAT for address translation to make the Internet accessible.
We want to use the RouterOs method called "Source NAT.
[Admin @ MikroTik] ip firewall src-nat> add action = masquerade out-interface = ether1
Use commands to activate NAT
[Admin @ MikroTik] ip firewall src-nat> enable 0
◆ Configure the default route. The IP address 222.169.252 is the next hop address.
[Admin @ MikroTik] ip route> add dst-address = 0.0.0.0/0 gateway = 222.169.252
◆ Configure the client
You only need to install PPPoE virtual dialing software on the client.
Note: the client and server can communicate normally only through the network set connection of the switch device.