Page 1 of 1
ISP gives block of 16 address -- Need help configuring plz!
Posted: Mon Aug 18, 2014 11:19 pm
by rizwan602
Hello,
This is the first time I am setting up a MikroTik router like this:
I ordered a block of 16 public IP addresses from our ISP. This is the information they gave me. NOTE the IP addresses have been altered for example.
How can I set up the MikroTik router with these addresses properly? I have only done work with NAT. Never with routing between two IPv4 networks. The ISP said I would need a 'business router' like a Cisco systems (not a Linksys type router). I would like to use MikroTik router. I do not need NAT on a port, but it would be nice if I could. But I just need this to work as soon as possible.
Info:
(WAN info)
Static IP:
71.165.180.199
Gateway: 71.165.180.193
Netmask: 255.255.255.240
Primary Name server: 4.2.2.1
Secondary Name server: 4.2.2.2
(CIDR info)
Subnet 180.185.160.208/28
NetMask 255.255.255.240
Number of hosts 13
Suggested Default Gateway 180.185.160.209
First Useable 180.185.160.210
Last Useable 180.185.160.222
Broadcast 180.185.160.223
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Tue Aug 19, 2014 12:54 am
by skillful
It appears that the ISP will be routing the 180.185.160.208/28 block to you over the wan static ip 71.165.180.199
If this is the case, just setup PPPoE server on your client interface and handout the IP block 180.185.160.208/28 directly to your clients statically or dynamically using IP Pool 180.185.160.208-180.185.160.223. Then have your clients dial-in with a PPPoE Client.
This way, you can make us of the entire 16 IP addresses without any wastage.
For further reading, see
http://wiki.mikrotik.com/wiki/Manual:Interface/PPPoE
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Tue Aug 19, 2014 1:17 am
by rizwan602
I don't need to use PPPoE. I will assign the IP addresses static-ly. Also how do I properly eliminate NAT and make sure that traffic from the internet is allowed to come into all the CIDR block IP addresses? (In case we want to run web servers or other services on those IP addresses).
It appears that the ISP will be routing the 180.185.160.208/28 block to you over the wan static ip 71.165.180.199
If this is the case, just setup PPPoE server on your client interface and handout the IP block 180.185.160.208/28 directly to your clients statically or dynamically using IP Pool 180.185.160.208-180.185.160.223. Then have your clients dial-in with a PPPoE Client.
This way, you can make us of the entire 16 IP addresses without any wastage.
For further reading, see
http://wiki.mikrotik.com/wiki/Manual:Interface/PPPoE
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Tue Aug 19, 2014 1:36 am
by skillful
You can assign the IP statically without using PPPoE.
Setup the interface facing your client to use IP address 180.185.160.209/28
/ip address add address=180.185.160.209/28 interface=lan
Modify your NAT rule to exclude source ip 180.185.160.208/28
add action=masquerade chain=srcnat src-address=!180.185.160.208/28 out-interface=wan
Then assign statically to your clients:
IP Addresses 180.185.160.210 - 180.185.160.222
NetMask 255.255.255.240
Default Gateway 180.185.160.209
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Tue Aug 19, 2014 6:56 pm
by rizwan602
What is the purpose of excluding source IP 180.185.160.208/28?
Modify your NAT rule to exclude source ip 180.185.160.208/28
add action=masquerade chain=srcnat src-address=!180.185.160.208/28 out-interface=wan
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Tue Aug 19, 2014 7:55 pm
by bvandenbremt
What is the purpose of excluding source IP 180.185.160.208/28?
Modify your NAT rule to exclude source ip 180.185.160.208/28
add action=masquerade chain=srcnat src-address=!180.185.160.208/28 out-interface=wan
You cannot use first or last Ip address of a subnet. You cannot use .208 or .223 So out of your 16 addresses you only can use 14. Gateway Ip address included.
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Tue Aug 19, 2014 8:36 pm
by DLNoah
The reason to exclude the 180.185.160.208/28 block from your masquerade rule is to prevent the router from rewriting those addresses (as well as any private IP addresses you currently have and plan to keep using) to your WAN IP.
If you have the rule without the exclusion:
add action=masquerade chain=srcnat out-interface=wan
Then
ANY traffic that goes through your router and out the WAN interface will get rewritten by NAT to look like it's coming from 71.165.180.199 (your WAN IP). With the exclusion, you make sure that any new traffic coming out from one of those IPs maintains its original source address (e.g. 180.185.160.210).
If you don't have any private IP addresses on the "internal" side of your router, then you don't need a src-nat rule at all. Otherwise, since you do need the src-nat rule in order to maintain Internet access for the private IP LAN, you would need to make sure you exclude the new Public Static IPs from the src-nat rule, so they don't get rewritten.
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Thu Sep 11, 2014 11:52 am
by roan
Please share your mikrotik setting for lan subnet of 16 ips because i also got 16 public ips with wan ip from isp, i do not know how to setup on mikrotik. how do you setup lan setup on mikrotik, please help me
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Fri Sep 12, 2014 1:03 pm
by niamul
ip address add address=180.185.160.210/28 interface=lan (whichever interface you want to distribute from)
ip route add dst=180.185.160.208/28 gateway=71.165.180.193
your isp also has to route the ip address block.
that should do the trick.
Re: ISP gives block of 16 address -- Need help configuring p
Posted: Fri Sep 12, 2014 1:36 pm
by roan
thanks for helping me but i still in trouble to configure this
How can I set up the mikrotik hotspot with theses addresses properly, information as mention below:
WAN IP: 186.165.180.198
Gatway: 186.165.180.199
Subnet mask: : 255.255.255.252
-----------------------------------
16 public ips: 180.185.160.208 – 180.185.160.223
Gateway: 180.185.160.209
NetMask 255.255.255.240
--------------------------------
And I want to use 192.168.88.1/24 for hotspot, please help me to setup this setting on mikrotik router
Is this right:
ip address add address=186.165.180.198/24 interface=wan
ip address add address=180.185.160.208/28 interface=lan
what should be gateway?
now how do i setup Hotspot with private ips?
please i need help with this