Page 1 of 1

Public IP's add to Local network

Posted: Tue Dec 19, 2006 3:34 pm
by Peace
I have ISP IP’s x.x.x.160 – x.x.x.176, and I need setup router to give this IP’s also to my local network through Public interface.
How to setup both interfaces Local and Public networks to work with same IP’s?

Posted: Tue Dec 19, 2006 3:36 pm
by sergejs
Use FULL NAT. Full NAT scenario is most suitable on your case,
http://wiki.mikrotik.com/wiki/How_to_li ... Local_ones

Posted: Tue Dec 19, 2006 4:03 pm
by Peace
Depend ot this I must add to Pub;ic addresses all external IP's from 160 - 176 and give to clients fake addresses or I can give also ISP addresses?

Posted: Tue Dec 19, 2006 4:09 pm
by sergejs
Yes, you are correct.
Assing public address to the remote interface, client will use local address, router perfroms address translation from public to local and vice versa.

Posted: Tue Dec 19, 2006 4:19 pm
by mortin
There is also other way.
The network mask from your provider is x.x.x.160/28
You can devide the network into two small ones with mask 29 each:
x.x.x.160/29
x.x.x.168/29

The first one use with WAN interface and second one with LAN interface.
Then put a proper gateway from provider in your route table (which is actually made)

Then you can use 5 ip in your network.
You lose some ips but it works also.

Regards
Marcin

Posted: Tue Dec 19, 2006 4:44 pm
by skillful
Or better still, breakdown your /28 IPs as follows:

x.x.x.160/29
x.x.x.168/30
x.x.x.172/30

Use one of the /30 range on your wan. You are now free to assign the remaining /30 and /29 range on your lan interface. This way, you have 6 IPs to assign to your clients. No NAT, only routing.

Posted: Tue Dec 19, 2006 4:52 pm
by mortin
huh :)

My example you can also mix with sergejs soulution ;)
Some users with NAT and some with routing.

Regards
Marcin

Posted: Tue Dec 19, 2006 4:53 pm
by Peace
skillful
I need all IP's


My ISP have range x.x.x.160/24 and from this give me IP's from 160-176 incuding

Posted: Tue Dec 19, 2006 4:59 pm
by mortin
If you need all ips then use the sergejs example.

With routing it is not possible.

Regards
Marcin

Posted: Tue Dec 19, 2006 5:05 pm
by skillful
If you must maximize IP usage, you have to follow Sergejs' suggestion.

Posted: Tue Dec 19, 2006 5:06 pm
by Peace
I also try to put to Local network range x.x.x.160/28 depend on this that all ISP range are x.x.x.1/24
And this didn't work why? :?

Posted: Tue Dec 19, 2006 5:10 pm
by skillful
Your lan and wan cannot be in the same IP range (subnet)

Posted: Tue Dec 19, 2006 6:23 pm
by Peace
skillful
I try put differents ranges: ISP have x.x.131.1/24 (in Public my address was x.x.131.160/24), but on Local interface i try to pur x.x.131.161/28

Posted: Tue Dec 19, 2006 6:36 pm
by skillful
Peace, the x.x.131.161/28 IP range (x.x.131.160 - 175) is included in the x.x.131.160/24 range (x.x.131.0 - 255), so it is still the same network.

Posted: Tue Dec 19, 2006 7:26 pm
by mortin
Dear Peace

Please read first about basic of addresing and subnetting
http://www.zytrax.com/tech/protocols/ip-classes.html

Regards
Marcin

Posted: Wed Dec 20, 2006 9:46 am
by Peace
skillful, mortin

Thanks i understand this :)