Master port config

Hi guys,

I’m new to the routerboard world since my rb450g came in 2 weeks ago.
Being quite the amateur in networking i’m need of a little help.

I have added a simple paint diagram to help visualise my situation.

I have a cable internet connection coming from my ISP’s modem.
Internally i have a 24port gigabit switch connecting my home hardware.
The real issue though is a settop box for my digital tv.
This box needs to connect directly to the port of the modem, meaning that in my situation i have to add a switch behind the modem with the box and modem connected to it. And from that switch go to my internal network with the router doing DHCP.

I however would like to configure my rb450g to act as a switch to the WAN (ether1) and ether2.
This i have configured and is working OK. My settopbox has an external IP so it works fine.
I have set ether2 to have master port as ether1.

The problem i’m having is that i want to set ether3, which is connected to my internal network by a gigabit switch, witch a DHCP server.
Setting the DHCP server to ether3 give a red status, invalid.

So how do i get the dhcp server going on my internal network through port3 with internet access?

I hope my explanation is understandable, i’m not used to explaining things in a foraign language :slight_smile:
Thx for the help.
net.jpg

Got into testing a bit.
Have now configured ether1 and ether2 into a bridge. So the settopbox gets an external ip fine it seems.

Only thing NOT working is the damn dhcp server set on ether3. Keeps saying invalid!
Only port i can have it is the bridge now.

Is there in fact any way of configuring my situation?

dear,
follow the steps as mention here

  1. Connect you cable modem to Port 1 and make it Dhcp Client , it will get ip from ISP
  2. Connct you Digital tv to port 2 and make it Dhcp server
  3. on port 3 you can connect your Switch select master port 2
  4. ip add route default gate as interface 1
    thats all :smiley:

Thx for the reply Samir,

This however just hands a local ip to the digitv box.
I have added print outs of my configration.
Am i configuring something wrong?

You say to connect digitv to port 2 AND assign dhcp server to port 2, right?
Port 3-5 are have master port set to 2.

Thank you for helping a totel beginner :slight_smile:

[Bart@MikroTik] /interface ethernet> print
Flags: X - disabled, R - running, S - slave 
 #    NAME                                MTU MAC-ADDRESS       ARP        MASTER-PORT                             SWITCH                            
 0 R  ether1-gateway                     1500 D4:CA:6D:35:12:D3 enabled    none                                    switch1                           
 1 R  ether2-master-local                1500 D4:CA:6D:35:12:D4 enabled    none                                    switch1                           
 2 RS ether3-slave-local                 1500 D4:CA:6D:35:12:D5 enabled    ether2-master-local                     switch1                           
 3 RS ether4-slave-local                 1500 D4:CA:6D:35:12:D6 enabled    ether2-master-local                     switch1                           
 4  S ether5-slave-local                 1500 D4:CA:6D:35:12:D7 enabled    ether2-master-local                     switch1



[Bart@MikroTik] > ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADS  0.0.0.0/0                          94.224.0.1                1
 1 ADC  94.224.0.0/20      94.224.12.78    ether1-gateway            0
 2 ADC  192.168.1.0/24     192.168.1.1     ether2-master-l...        0



[Bart@MikroTik] /ip dhcp-server> print
Flags: X - disabled, I - invalid 
 #   NAME                             INTERFACE                            RELAY           ADDRESS-POOL                            LEASE-TIME ADD-ARP
 0   default                          ether2-master-local                                  default-dhcp                            3d



[Bart@MikroTik] /ip dhcp-client> print
Flags: X - disabled, I - invalid 
 #   INTERFACE                                                                        USE-PEER-DNS ADD-DEFAULT-ROUTE STATUS        ADDRESS           
 0   ;;; default configuration
     ether1-gateway                                                                   yes          yes               bound         94.224.12.78/20



[Bart@MikroTik] > ip firewall nat print   
Flags: X - disabled, I - invalid, D - dynamic 
 0   ;;; default configuration
     chain=srcnat action=masquerade to-addresses=0.0.0.0 out-interface=ether1-gateway

Are you sure that your master settings are correct on those interfaces? The printout, diagram and text are inconsistent.

Look at the master settings - don’t you want Ether 2 to have Ether 1 as master and Ethers 4 & 5 to have Ether 3 as master? That isn’t what the printout shows.

The error on setting a DHCP server to Ether 3 is because it is currently slaved to Ether 2.

The printout is what is now my current configuration as samir told me.

Initially i tried to set ether2 with master ether1. This works great.
I then however cannot set the master port of ether 4 and 5 to ether 3. Because i have already set a master port to ether2 ( only 1 possible? )
This leaves me with just switching between ether 1 and 2.

OK - I didn’t notice which device you are using.

You can work around the issue by a bridge. e.g. you could switch off any master settings on ports 1 & 2 and then make a bridge and add ports 1 & 2 to the bridge.

You can then set port 3 as the master for ports 4 & 5.

Note that you would have to move the DHCP client off port 1 and assign it to the bridge created above. From what I understand your DHCP server should be on port 3.

The alternative to the above is that you simply remove the master settings on ports 4 & 5 and don’t use those ports - after all you have a 24 port switch hung off port 3 anyway! removing those master settings would allow you to slave port 2 to port 1.

Thx. I’ll try that when i get home.
Are there disadvantages in using the bridge way? Speed and such?
Not that it would make such a big difference as our isp’s speed isnt’t that great :slight_smile:

The master/slave arrangement on the switch chip is faster than using the CPU to create a bridge. The fastest arrangement would be to use the master slave arrangement on ports 1/2, connect port 3 to your large switch and forget ports 4 & 5 for now.

Ok, i have tried configuring both methods.

When slaving ether 2 to ether1 and forgetting 4 & 5 i cannot add dhcp server to ether 3 ( connected to switch ).
It just states “invalid”.

When setting up bridge.
Ether 1 and 2 in the bridge.
Ether 4&5 slaved to ether 3.
Dhcp client on bridge.
Dhcp server on ether3.
This Also renders the dhcp server invalid.
I can only set dhcp server to ether1 which does not work…

Didn’t think it would be this difficult :slight_smile:
Though i don’t want to add aother switch in front of the router.

Did you make sure that Ether2 has no master set?

yes i did, for testing i removed all master ports.
After that i configured bridge and dhcp, which states “invalid”

[Bart@MikroTik] > interface ethernet print
Flags: X - disabled, R - running, S - slave 
 #    NAME          MTU MAC-ADDRESS       ARP        MASTER-PORT      SWITCH     
 0 R  ether1-g...  1500 D4:CA:6D:35:12:D3 enabled    none             switch1    
 1 R  ether2-m...  1500 D4:CA:6D:35:12:D4 enabled    none             switch1    
 2 R  ether3-s...  1500 D4:CA:6D:35:12:D5 enabled    none             switch1    
 3 R  ether4-s...  1500 D4:CA:6D:35:12:D6 enabled    none             switch1    
 4    ether5-s...  1500 D4:CA:6D:35:12:D7 enabled    none             switch1

Where/when exactly are you seeing “invalid” Command line? Winbox?

You probably don’t have a valid IP number on the interface.

Winbox, and clients aren’t getting any local ip’s.

Still getting used to command line…

Command line:

[Bart@MikroTik] > ip dhcp-server print
Flags: X - disabled, I - invalid 
 #   NAME                                   INTERFACE                                 RELAY           ADDRESS-POOL                                 LEASE-TIME ADD-ARP
 0 I default                                ether3-slave-local                                        default-dhcp                                 3d

If the interface does not have an IP address assigned to it and you try to add a DHCP server it will show it as “invalid”. Make sure you have assigned an IP address to the interface that the DHCP server is on.

Holy batman :slight_smile:

Thank you for pointing that out, damn i was so close everytime. I shouldn’t have missed that.
After changing the local ip to ether3, dhcp server worked.

I have it setup with bridge now. Had to change NAT to the bridge interface for internet access to work too.
But all good now.

Thank you SO much!