Community discussions

MikroTik App
 
Peace
newbie
Topic Author
Posts: 34
Joined: Wed Dec 15, 2004 11:04 am
Location: Latvia

Public IP's add to Local network

Tue Dec 19, 2006 3:34 pm

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?
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Tue Dec 19, 2006 3:36 pm

Use FULL NAT. Full NAT scenario is most suitable on your case,
http://wiki.mikrotik.com/wiki/How_to_li ... Local_ones
 
Peace
newbie
Topic Author
Posts: 34
Joined: Wed Dec 15, 2004 11:04 am
Location: Latvia

Tue Dec 19, 2006 4:03 pm

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?
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Tue Dec 19, 2006 4:09 pm

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.
 
mortin
newbie
Posts: 41
Joined: Wed Mar 09, 2005 9:54 pm

Tue Dec 19, 2006 4:19 pm

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
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Tue Dec 19, 2006 4:44 pm

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.
 
mortin
newbie
Posts: 41
Joined: Wed Mar 09, 2005 9:54 pm

Tue Dec 19, 2006 4:52 pm

huh :)

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

Regards
Marcin
 
Peace
newbie
Topic Author
Posts: 34
Joined: Wed Dec 15, 2004 11:04 am
Location: Latvia

Tue Dec 19, 2006 4:53 pm

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
 
mortin
newbie
Posts: 41
Joined: Wed Mar 09, 2005 9:54 pm

Tue Dec 19, 2006 4:59 pm

If you need all ips then use the sergejs example.

With routing it is not possible.

Regards
Marcin
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Tue Dec 19, 2006 5:05 pm

If you must maximize IP usage, you have to follow Sergejs' suggestion.
 
Peace
newbie
Topic Author
Posts: 34
Joined: Wed Dec 15, 2004 11:04 am
Location: Latvia

Tue Dec 19, 2006 5:06 pm

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? :?
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Tue Dec 19, 2006 5:10 pm

Your lan and wan cannot be in the same IP range (subnet)
 
Peace
newbie
Topic Author
Posts: 34
Joined: Wed Dec 15, 2004 11:04 am
Location: Latvia

Tue Dec 19, 2006 6:23 pm

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
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Tue Dec 19, 2006 6:36 pm

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.
 
mortin
newbie
Posts: 41
Joined: Wed Mar 09, 2005 9:54 pm

Tue Dec 19, 2006 7:26 pm

Dear Peace

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

Regards
Marcin
 
Peace
newbie
Topic Author
Posts: 34
Joined: Wed Dec 15, 2004 11:04 am
Location: Latvia

Wed Dec 20, 2006 9:46 am

skillful, mortin

Thanks i understand this :)

Who is online

Users browsing this forum: BoraHorza, obscurus and 72 guests