Community discussions

MUM Europe 2020
 
rufee
newbie
Topic Author
Posts: 27
Joined: Mon Dec 10, 2012 2:41 pm

Setting up a RB2011 for 2 ip's

Sat Jan 26, 2013 9:30 pm

Hello,
So i just got my RB2011UAS-2HnD-IN and its an awesome little router with a huge learning curve.
Here is what i want to do:
I have 2 ip's assigned by my isp via dhcp
62.80.xx.x1 - aa:bb:cc:dd:ee:ff
62.80.xx.x2 - aa:bb:cc:dd:ee:f1
(example)

I want to configure a server machine that is connected on ether2 to get the first ip and have all the ports forwarded to it, and have a switch on ether3 use the second ip and assign addresses from a dhcp pool to the clients on the switch.
Been messing all day with it and can't event get it working as a simple router, still quite a newbie so please talk with understandable terms :)

Thanks.
MTCNA
 
rufee
newbie
Topic Author
Posts: 27
Joined: Mon Dec 10, 2012 2:41 pm

Re: Setting up a RB2011 for 2 ip's

Fri Feb 01, 2013 9:04 pm

Well ive managed something with firewall mangle, but only one ip works at a given time.
Does this work for one ISP or does it have to be 2 different ISP's ?
Here's the configuration:
/ip pool
add name=dhcp_pool1 ranges=10.10.10.2-10.10.10.254
add name=dhcp_pool2 ranges=192.168.1.2-192.168.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether5 name=dhcp3
add address-pool=dhcp_pool2 disabled=no interface=ether4 name=dhcp4
/ip address
add address=10.10.10.1/24 interface=ether5 network=10.10.10.0
add address=192.168.1.1/24 interface=ether4 network=192.168.1.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
add dhcp-options=hostname,clientid disabled=no interface=ether3
/ip dhcp-server lease
add address=192.168.1.105 client-id=1:0:50:22:a4:19:cb mac-address=\
    00:50:22:A4:19:CB server=dhcp3
add address=192.168.1.101 mac-address=00:50:22:A4:19:C1 server=dhcp4
/ip dhcp-server network
add address=10.10.10.0/24 gateway=10.10.10.1
add address=192.168.1.0/24 gateway=192.168.1.1
/ip firewall address-list
add address=192.168.1.2-192.168.1.254 list=server
add address=10.10.10.2-10.10.10.254 list=client
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=SRV \
    src-address-list=server
add action=mark-routing chain=prerouting new-routing-mark=CLI \
    src-address-list=client
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 !to-addresses \
    !to-ports
add action=masquerade chain=srcnat out-interface=ether3 !to-addresses \
    !to-ports
/ip route
add distance=1 gateway=62.80.247.1 routing-mark=SRV
add distance=1 gateway=172.24.64.1 routing-mark=CLI
What I want is to put dhcp_pool1 behind 172.24.64. and dhcp_pool2 behind 62.80.247.
MTCNA
 
jandafields
Forum Guru
Forum Guru
Posts: 1514
Joined: Mon Sep 19, 2005 6:12 pm

Re: Setting up a RB2011 for 2 ip's

Sun Feb 03, 2013 8:32 am

If you can't even get it working as a simple router yet, you should read the wiki. It has great examples for all that stuff, dual ISP connections, etc.
 
rufee
newbie
Topic Author
Posts: 27
Joined: Mon Dec 10, 2012 2:41 pm

Re: Setting up a RB2011 for 2 ip's

Sun Feb 03, 2013 11:04 pm

If you can't even get it working as a simple router yet, you should read the wiki. It has great examples for all that stuff, dual ISP connections, etc.
Well i figured a lot out, got it running fine, even tried policy based routing which i guess is what i need for this, that's were i got problems now. But the reply to this thread has not been approved yet :(
MTCNA
 
jandafields
Forum Guru
Forum Guru
Posts: 1514
Joined: Mon Sep 19, 2005 6:12 pm

Re: Setting up a RB2011 for 2 ip's

Thu Feb 07, 2013 5:04 am

Glad you got it working.

By the way, what post hasn't been approved???

Who is online

Users browsing this forum: No registered users and 31 guests