Community discussions

MikroTik App
 
yacsap
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Wed Dec 17, 2014 11:44 am
Location: Auckland, New Zealand
Contact:

Need help working with multiple public IP network (yes, different networks)

Fri Feb 22, 2019 7:33 am

Hi guys,

I'm setting up a new MikroTik CCR 1009 router, I have a question regarding setting up multiple public IP network (yes, different networks)

From the ISP, they are providing me one network cable, they said it will route the following public WAN IP addresses:

2.0.0.1/24
3.0.0.1/24
4.0.0.1/24

I have setup the WAN public IP above on ether1-WAN.

My ISP said, all of the IPs above can use single gateway, which is 1.0.0.1 (do you think this makes sense) because as far as I know, we can't use gateway outside of our IP network itself (correct me if I'm wrong)

If we can use single gateway, I'm planning to route 0.0.0.0/0 to 1.0.0.1 and -- which is problem solved :)

BUT, if I can't use single gateway (just like what I'm thinking)

How can I specify multiple gateways in my router?


Please help, any input would be appreciated.

Cheers!
[ IMikroTik ] >
 
yacsap
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Wed Dec 17, 2014 11:44 am
Location: Auckland, New Zealand
Contact:

Re: Need help working with multiple public IP network (yes, different networks)

Fri Feb 22, 2019 7:59 am

Additional questions:

Since they said all of my public IP Addresses are routed using 1.0.0.1 gateway, can I add all of my public IP Addresses using /32 cidr and hope they will be routed using 1.0.0.1 gateway?
[ IMikroTik ] >
 
mkx
Forum Guru
Forum Guru
Posts: 4317
Joined: Thu Mar 03, 2016 10:23 pm

Re: Need help working with multiple public IP network (yes, different networks)

Fri Feb 22, 2019 11:51 am

You could try to configure WAN interface in a point-to-point manner:
/ip address
add address=2.0.0.1/32 interface=wan_interface network=1.0.0.1
/ip route
add dst-address=0.0.0.0/0 gateway=1.0.0.1
Be sure to communicate used local IP address with your ISP (are you completely sure they're not assigning you a single address from the same subnet as upstream gateway?) ...

The only (minor) problem with the setup above is that you can use the rest of 2.0.0.x/24 addresses as usual subnetted addresses but you'll have to play with lengths of masks ... because you can not use 2.0.0.1. Usable are the following subnets:

2.0.0.4/30
2.0.0.8/29
2.0.0.16/28
2.0.0.32/27
2.0.0.64/26
2.0.0.128/25

For sure you can use smaller subnets.

You can use these subnets (and the rest of /24 subnets you're getting routed at your router) on other interfaces of your router (either physical or VLAN or PPP or ...).
BR,
Metod
 
yacsap
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Wed Dec 17, 2014 11:44 am
Location: Auckland, New Zealand
Contact:

Re: Need help working with multiple public IP network (yes, different networks)

Fri Feb 22, 2019 6:55 pm

Thanks for your input.

Can I use that configuration with one LAN IP network only? For example 192.168.1.0/24?

My servers are in that LAN network and I will have many dsf-nat port forwardings.

Do I need to add each IP route gateway?

And do I need to mangle them (mark connections)?
[ IMikroTik ] >
 
yacsap
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Wed Dec 17, 2014 11:44 am
Location: Auckland, New Zealand
Contact:

Re: Need help working with multiple public IP network (yes, different networks)

Mon Feb 25, 2019 3:03 am

*bumpie*
[ IMikroTik ] >

Who is online

Users browsing this forum: Baks38RUS, BartoszP, Google [Bot], papukbanot, pe1chl, WookieeFer and 79 guests