Routing public IP addresses to PPPoE clients

Hi,
Let me describe my network:
I have a linux box that provides NAT from one public ip (eth0) that is connected to a switch and then a router that routes my whole C class network. That linux box is connected to a mikrotik wireless routerboard with other nic card (eth1) on a private ip addresses, mikrotik ethernet and wireless interfaces are bridged and are in the same ip subnet (192.168.5.x), pppoe clients get ip addresses from the same subnet and they get to the internet without problem, but the problem is i have a client that needs to get public ip address over pppoe connection. How can i do that? I tried to add alias ip addresses to all network interfaces such as eth1 on NAT box, then another one on bridge1 on mikrotik and third one to assign to ppp profile for that particular pppoe user, but it doesn’t work.

let’s say that IP that need to be routed is 147.91.8.6 (just example) …
and let’s say that you’r MT box is 10.0.0.253 (linux is 10.0.0.254) ..

  • to route that external IP to MT BOX we must …

on some linux you do something like this
#route add 147.91.8.6/32 gw 10.0.0.253
on some other linux you must
#route add 147.91.8.6 netmask 255.255.255.255 gw 10.0.0.253

  • and now on MT BOX we use winbox …

PPP → PROFILES → + BIG RED PLUS SIGN →
now in that new Profile … in section GENERAL
you have local adress and remote adress …
try to put 147.91.8.6 in remote adress and put
10.0.0.253 in remote adress … or reverse
that i do not remeber :slight_smile: … it was long time ago :slight_smile:

and that’s it’s …

hope that work … if not … :slight_smile: ..ups..

You also need to enable proxy-arp on your interfaces.

Proxy-Arp?

Can’t you just have the PPPoE server push the public information to the PPPoE Client?

local-address = xx.yy.zz.1
remote-address = xx.yy.zz.100

Where xx.yy.zz.aa = Public address.

You’d just have to define the static routes to the intended networks on the concentrator and core router(s)…

I assume this could be done. Please correct me if I’m wrong.

I haven’t used PPPoE much so perhaps there is another way around this. I suggested Proxy-Arp as it sounds like the public address scope for the WAN port is the same as the scope that he want’s to allocate on the LAN side for PPP users (where they are terminating on the same router). Since you can’t have more than one addresse from the same subnet on more than one interface of the same router, the internal client won’t be able to surf (routing won’t be possible). NAT is the most common way around this, but with proxy-arp you can get away with this…at least without PPPoE - I’m very well might be overlooking something relating to PPPoE though.

This is the only way I know of to acheive public on the inside (private LAN) where the WAN contains the same public subnet…perhaps there is another way around this? Maybe this doesn’t apply to PPPoE or this particular network?

proxy arp and static route ?
why …

both networks have that one MT as GW … he internaly know for both networks .. no need for any extra route :slight_smile:

You’re right, and it works. I just tested it.