Community discussions

MikroTik App
 
flynno
Member Candidate
Member Candidate
Topic Author
Posts: 257
Joined: Wed Aug 27, 2014 8:11 pm

Static IP to Client over PPPOE

Thu Apr 12, 2018 4:32 am

Hello Guys, I require some help.

I've received a /29 allocation of IPv4 addresses from my ISP.
For sake of discussion, I will call this the 100.0.0.168/29 network.

This IP space is divided as follows:

100.0.0.168/29: Subnet
100.0.0.170-174: Give out to customers
100.0.0.169: Gateway
8.8.8.8 DNS
8.8.4.4 DNS

Router 1 or R1

I started off by setting gateway 100.0.0.169 and Dst. Address 0.0.0.0/0
and added the 100.0.0.170/29 and 100.0.0.168 to network on sfp1 interface
and DNS to above.

The router link is up and connected to the internet and reachable via ip 100.0.0.170.

Setup address 10.0.0.0/21 on sfp2 with is for my internal network.
I created bridge called loopback with address 10.255.255.1.
Configured OSPF and added 100.0.0.168/29: Subnet and loopback 10.255.255.1 and 10.0.0.0/21
Router ID is set to loopback address.

Router 2 or R2
Wireless PTP link between R1 and R2
OSPF running on router 2 with PPPoe Server for customer termination
10.0.0.4/21 on interface one

Customers internet is working fine but one customer is looking for a static IP address to be assigned.
Can anyone give me some guidance on how to achieve this via PPPoe, I use radius for AAA.

Thanks in advance :D
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Static IP to Client over PPPOE

Thu Apr 12, 2018 9:56 am

Maybe you should assign this address in ppp secret user profile as remote address?
 
flynno
Member Candidate
Member Candidate
Topic Author
Posts: 257
Joined: Wed Aug 27, 2014 8:11 pm

Re: Static IP to Client over PPPOE

Thu Apr 12, 2018 2:52 pm

Maybe you should assign this address in ppp secret user profile as remote address?
Hi Anumrak,

Thank you for your reply, it was late last night when I wrote this post so I left out the stuff that I did try to solve this.

I added the static IP to the ppp secret as remote address and in gives the static IP to the client but does not route the client through the IP and the client has no internet.
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Static IP to Client over PPPOE

Thu Apr 12, 2018 3:02 pm

Maybe you should assign this address in ppp secret user profile as remote address?
Hi Anumrak,

Thank you for your reply, it was late last night when I wrote this post so I left out the stuff that I did try to solve this.

I added the static IP to the ppp secret as remote address and in gives the static IP to the client but does not route the client through the IP and the client has no internet.
What you mean doesn't route? You have no default route on Tik to the provider direction?
 
flynno
Member Candidate
Member Candidate
Topic Author
Posts: 257
Joined: Wed Aug 27, 2014 8:11 pm

Re: Static IP to Client over PPPOE

Thu Apr 12, 2018 4:51 pm

Default routes used on both routers

Note: Isp gateway is 100.0.0.169

R1 IP 100.0.0.170 sfp1
Default Gateway 0.0.0.0/0 Gateway 100.0.0.169 reachable sfp1
Dst address 100.0.0.168/29 sfp1 reachable Pref. Source 100.0.0.170 <<< R1 IP reachable via internet
Dst. Address 10.0.0.0/21 <<< Network Address sfp2 reachable 10.0.0.1

OSPF Networks
10.0.0.0/21 <<< Network Address sfp2
10.255.255.1 <<< Router ID loopback address
100.0.0.168/29 <<< ISP Subnet


R2 IP 10.0.0.4/21 sfp1
Default Gateway 0.0.0.0/0 Gateway 10.0.0.1 reachable sfp1
Dst address 100.0.0.168/29 sfp1 reachable

OSPF Networks
10.0.0.4/21 <<< Network Address sfp2
10.255.255.2 <<< Router ID loopback address
100.0.0.168/29 <<< ISP Subnet

IP pool for clients 10.20.2.1/24
PPPoe Server on R2 running on sfp1 with an IP pool /24 for customers
Radius AAA
R2: Firewall chain srcnat src. Address "IP pool /24" action masquerade

If I want to give the client static IP 100.0.0.172 I can do so via Radius or Secrets in PPP and see the IP populate in Route List.
I see Dst. Address 100.0.0.172 <pppoe-user1> reachable Pref. Source 10.20.2.1 <<< IP pool /24 for customers


On R2 the ISP Gateway 100.0.0.169 is not in the Route List

Default Gateway 0.0.0.0 Gateway 10.0.0.1 reachable sfp1
Dst address 100.0.0.168/29 sfp1 reachable Gateway 10.0.0.1
Dst. Address 10.0.0.0/21 <<< Network Address sfp1 reachable 10.0.0.4
10.255.255.1 reachable 10.0.0.1
10.255.255.2 loopback reachable Pref. Source 10.255.255.2
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: Static IP to Client over PPPOE

Thu Apr 12, 2018 7:31 pm

Hello, you have to set ARP to WAN interface of your router as ARP-PROXY so ISP router will know MAC of your client CPE. I have the same thing with /27 Public Subnet and works perfectly!
Regards!
 
flynno
Member Candidate
Member Candidate
Topic Author
Posts: 257
Joined: Wed Aug 27, 2014 8:11 pm

Re: Static IP to Client over PPPOE

Thu Apr 12, 2018 11:38 pm

I enabled proxy arp on interface sfp1 on R1 and proxy arp on interface sfp1 on R2
Then on R2 in /ip arp menu, I added the static address I wanted to give to the client on interface sfp1
Then added the static route to PPP remote address and now the client gets a static IP

The client is now reachable via the static IP but his IP address is been masquerade as the IP address on SFP1 interface on R1 100.0.0.170
instead of 100.0.0.171

What NAT config is required to keep his IP same as the static?
 
flynno
Member Candidate
Member Candidate
Topic Author
Posts: 257
Joined: Wed Aug 27, 2014 8:11 pm

Re: Static IP to Client over PPPOE

Fri Apr 13, 2018 1:25 am

Ok to bypass the Nat rule on R1.
I added an accept rule above the nat on sfp1 with the client static IP

Nat rule below
action accept
chain srcnat
Src. Address add client static IP here

Who is online

Users browsing this forum: Bing [Bot], unhuzpt and 111 guests