Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PPPoE with multiple Public IPs

53 views
Skip to first unread message

Mohamed Shazrin Mohamed Isa

unread,
Sep 3, 2004, 8:00:30 AM9/3/04
to
Hi,

Currently i'm connected to the internet via PPPoE on the tun0
interface (as per the FreeBSD's Handbook).

The PPPoE connectivity is running fine but with only one Public IP
address assigned to the tun0 interface.

Recently I acquired a /29 subnet Public IP to be used with my PPPoE
connection. The first address of the Public IP is currently being used
by the tun0 while 7 more are currently unassigned.

The machine is currently running IPFWv2 and PPP's NAT service.

I can do port based translations if the incoming packet's destination
Public IP is the one i'm using for tun0.

Question:
1. Can I assign multiple Public IPs on the tun0 interface while its
under PPPoE connection ? I need to translate incoming packets destined
for all my Public IPs to internal machines.

2. Is the above practical or is doing bridging the solution (internal
machines assigned with Public IPs)? How do I go about that in the
scenario above ?

Thank you in advance :)

Don Beal

unread,
Sep 13, 2004, 6:03:15 AM9/13/04
to
You could just `ifconfig tun0 inet iphere netmask 255.255.255.255 alias` for
all of your additional IP's and then do translations as you need them.

To utilize your IP's as a local subnet, I would contact your provider and
have them route your /29 to an address that you get from the PPPoE pool.
That way you can setup the local subnet on your inside NIC.

--
Don Beal
Systems Administrator
Colomart Internet Services, LLC
214-269-0272 ext. 201
d...@colomart.com

"Mohamed Shazrin Mohamed Isa" <shazr...@yahoo.com> wrote in message
news:6261e7aa.04090...@posting.google.com...

Mohamed Shazrin Mohamed Isa

unread,
Sep 13, 2004, 11:02:46 PM9/13/04
to
Hi,

Thanks for the reply ...

> You could just `ifconfig tun0 inet iphere netmask 255.255.255.255 alias` for
> all of your additional IP's and then do translations as you need them.

I did just that and the following error output from 'ifconfig' came
out.

prompt# ifconfig tun0 inet one_of_the_public_ips netmask
255.255.255.255 alias
ifconfig: ioctl (SIOCAIFADDR): Destination address required

...seems that tun0 alias requires iface as well as hisaddr (just like
any PPP interfaces) :(

Is there any way I can create the same alias IP exercise from ppp.conf
?

> To utilize your IP's as a local subnet, I would contact your provider and
> have them route your /29 to an address that you get from the PPPoE pool.
> That way you can setup the local subnet on your inside NIC.

... meaning that the servers will each hold public IPs ; without
translations ?

Philip Paeps

unread,
Sep 15, 2004, 5:55:24 AM9/15/04
to
Mohamed Shazrin Mohamed Isa <shazr...@yahoo.com> wrote:
> Recently I acquired a /29 subnet Public IP to be used with my PPPoE
> connection. The first address of the Public IP is currently being used by
> the tun0 while 7 more are currently unassigned.
>
> Question:
> 1. Can I assign multiple Public IPs on the tun0 interface while its under
> PPPoE connection ? I need to translate incoming packets destined for all my
> Public IPs to internal machines.

I never managed to get this to work when I got my DSL connection and my /28
last year. I haven't tried since. The problems I had were similar to those
you've mentioned later in this thread.

> 2. Is the above practical or is doing bridging the solution (internal
> machines assigned with Public IPs)? How do I go about that in the scenario
> above ?

This is what I'm doing. I have my PPPoE connection on tun0 and routable IPs
on fxp0 and internal machines. There's nothing really to the configuration,
just statically assign your internal interface one address, and your internal
machines the others, setting their default route to the first machine. Then
it's just a straight setup allowing forwarding packets and possibly NAT.

- Philip

--
Philip Paeps Please don't email any replies
phi...@paeps.cx I follow the newsgroup.

"Yow! Am I in Milwaukee?"
-- Zippy the Pinhead

Mohamed Shazrin Mohamed Isa

unread,
Sep 15, 2004, 10:26:11 PM9/15/04
to
Hi,

> This is what I'm doing. I have my PPPoE connection on tun0 and routable IPs
> on fxp0 and internal machines. There's nothing really to the configuration,
> just statically assign your internal interface one address, and your internal
> machines the others, setting their default route to the first machine. Then
> it's just a straight setup allowing forwarding packets and possibly NAT.

Can you please elaborate on the above ?
Is fxp0 the interface NOT used as the PPPoE physical interface ?
Does this mean that fxp0 (and the network connected to it) and tun0
has IPs of the same network-address ?
If the network connected to fxp0 points to fxp0's IP address as the
default gateway, will I need to enable NAT on the tun0 IP or the fxp0
IP ?

Note:
I managed to manually add an IP alias on the tun0 interface with the
command :
'ifconfig tun0 inet ONE-OF-THE-PUBLIC-IP DESTINATION-ADDRESS netmask
255.255.255.255 alias'

I suppose the netmask should be a 32 bit as all aliases do but i'm a
bit confused with the DESTINATION-ADDRESS. Should it be the original
HISADDR assigned by the ISP or should it be 255.255.255.255 (i've seen
some unrelated info when I googled for information where they used
255.255.255.255 for the destination address :P )

If the above works, i'll turn off PPP's NAT feature and use some
userland NATs like IPNAT or NATD since I can only translate the NAT'ed
IP address on PPP. If I used IPNAT instead i can simply monitor the
tun0 interface for all IPs assigned to it and be able to translate IPs
and ports on all of them.

Thank you.

0 new messages