Community discussions

 
benjaminkah
just joined
Topic Author
Posts: 6
Joined: Tue Aug 07, 2018 1:16 pm

LAN and internet in the same public range /27

Wed Dec 12, 2018 5:29 am

I am an amateur in the use of Mikrotik,
My provider made me a range of public IP address / 27 that comes with the internet, I wanted to give it also for my clients by the queues. i'm using mikrotik ccr1036-12g-4s.
I do not know how to proceed if some can make me a script that can facilitate me has granted these public addresses which is will be to the lan an wan interface
 
mducharme
Trainer
Trainer
Posts: 798
Joined: Tue Jul 19, 2016 6:45 pm

Re: LAN and internet in the same public range /27

Wed Dec 12, 2018 5:56 am

Hi,

The best thing to do would be to ask your provider to route the /27 through your router instead of to the WAN side of your router. They should be able to do that. You could even use a private /30 on the WAN side of your router to connect to the provider.
 
benjaminkah
just joined
Topic Author
Posts: 6
Joined: Tue Aug 07, 2018 1:16 pm

Re: LAN and internet in the same public range /27

Wed Dec 12, 2018 5:57 am

there isnt another way to use the same range to Lan and wan ?
 
User avatar
k6ccc
Member
Member
Posts: 479
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)

Re: LAN and internet in the same public range /27

Wed Dec 12, 2018 7:06 am

Why are you wanting to use the same IP range?
RB750Gr3, RB750r2, CRS326-24G-2S (in SwitchOS), CSS326-24G-2S, CSS106-5G-1S, RB260GS
Not sure if I beat them in submission, or they beat me into submission


Jim
 
benjaminkah
just joined
Topic Author
Posts: 6
Joined: Tue Aug 07, 2018 1:16 pm

Re: LAN and internet in the same public range /27

Wed Dec 12, 2018 7:17 am

I have no choice, it's the only one that the supplier gave me
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: LAN and internet in the same public range /27

Wed Dec 12, 2018 8:28 am

On WAN side (outside against your ISP) you do use public IP (your 27 rang)
On LAN side (where you clients are) you use private IP that uses NAT.
If you want some host inside to have public IP, you can do a 1:1 NAT from the 27 range to an internal IP.

Yo can setup your Mikrotik as a switch and use the 27 directly, but then you are very exposed.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
benjaminkah
just joined
Topic Author
Posts: 6
Joined: Tue Aug 07, 2018 1:16 pm

Re: LAN and internet in the same public range /27

Tue Dec 18, 2018 12:52 pm

my provider gave me 2 ranges of IP address, the first is just for P2P 192.xx.xx.254 / 30 (private address) and the second 197.xx.xx.225/27 for public addresses . I configured the 192.xx.xx.254 / 30 on the wan interface as well as its 192.xx.xx.253 gateway in the route and the 197.xx.xx.225 / 27 I added it on the lan interface. The problem is that I can not get the internet but I can ping the p2p gateway 192.xx.xx.253 which is my provider without problem but I do not have internet; is there a nat or mangle that I need to add for this to work properly?
if anyone can make me a script that will facilitate my configuration to get the public IP address that i can give to my client and that a can manage the bandwidth
Last edited by benjaminkah on Tue Dec 18, 2018 5:02 pm, edited 1 time in total.
 
mkx
Forum Guru
Forum Guru
Posts: 2942
Joined: Thu Mar 03, 2016 10:23 pm

Re: LAN and internet in the same public range /27

Tue Dec 18, 2018 2:04 pm

my provider gave me 2 rows of IP address, the first is just for P2P 192.xx.xx.2 / 30 .... I configured the 192.xx.xx.254 / 30 on the wan interface as well as its 192.xx.xx.253 gateway in the route
.
I'll assume you made a typo when writing addresses above. 192.x.x.2/30 covers host IP addresses 192.x.x.1 and 192.x.x.2 with network address 192.x.x.0 and broadcast address 192.x.x.3. If they assigned you 192.x.x.2, it probably means that their router has address 192.x.x.1.
.
... and the 197.xx.xx.225 / 27 I added it on the lan interface. The problem is that I can not get the internet but I can ping the p2p gateway 192.xx.xx.253 which is my provider without problem but I do not have internet; is there a nat or mangle that I need to add for this to work properly?
.
I guess your ISP is routing you the given WAN IP subnet via the private addresses. So you can either route those directly to clients ... or assign them to WAN interface and use NAT to facilitate them (even 1:1 if you wish).
BR,
Metod
 
benjaminkah
just joined
Topic Author
Posts: 6
Joined: Tue Aug 07, 2018 1:16 pm

Re: LAN and internet in the same public range /27

Tue Dec 18, 2018 5:03 pm

how can i did it?
 
tdw
Member Candidate
Member Candidate
Posts: 190
Joined: Sat May 05, 2018 11:55 am

Re: LAN and internet in the same public range /27

Wed Dec 19, 2018 2:45 pm

Do clients connected to the LAN port using addresses 197.xx.xx.226 - 197.xx.xx.254 have internet access?

Assuming they do, the issue is that traffic from the Mikrotik itself will originate from 192.xx.xx.254, as that is assigned to the WAN port, not one of the public IP addresses. You should be able to use a NAT rule to fix this, along the lines of
add action=src-nat chain=srcnat out-interface=YOUR_WAN_INTERFACE src-address=192.xx.xx.254 to-addresses=197.xx.xx.225
 
User avatar
m4t7e0
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Tue Jun 09, 2015 12:17 am
Contact:

Re: LAN and internet in the same public range /27

Thu Dec 20, 2018 12:33 pm

You can configure the p2p to mikrotik and set the pubblic ip to customer, you want the mikrotik on internet or not? it mean you must use one of this pubblic ip address.

Who is online

Users browsing this forum: No registered users and 27 guests