Community discussions

MikroTik App
 
Jeroen1000
Member Candidate
Member Candidate
Topic Author
Posts: 202
Joined: Fri Feb 18, 2011 2:05 pm

RB450G: DHCP-client on master interface not working SOLVED

Sat Jul 12, 2014 9:23 pm

Pretty strange issue here.

I've put ETHER2 as master-port for ETHER5 (=WAN PORT). After a reboot, ETHER2 fails to get a DHCP address from my ISP. When I disable and re-enable ETHER5, DHCP works. ETHER2 now obtains a DHCP-address from my ISP.
I'm not sure what I'm doing wrong here. Any ideas fellow Mikrotik users?

/ip dhcp-client
Flags: X - disabled, I - invalid 
 0   interface=ether2 add-default-route=yes default-route-distance=0 
     use-peer-dns=yes use-peer-ntp=yes dhcp-options=hostname,clientid 
     status=bound address=84.194.x.x/20 gateway=84.194.x.x
     dhcp-server=195.130.x.x primary-dns=195.130.x.x 
     secondary-dns=195.130.x.x expires-after=1h44m9s
/interface ethernet> print
Flags: X - disabled, R - running, S - slave 
 #    NAME          MTU MAC-ADDRESS       ARP        MASTER-PORT      SWITCH     
 0 RS WAN          1500 00:0C:42:3E:57:A7 enabled    ether2           switch1    
 1 RS ether1       1500 00:0C:42:3E:57:A3 enabled    ether2           switch1    
 2 R  ether2       1500 00:0C:42:3E:57:A4 enabled     none            switch1    
 3  S ether3       1500 00:0C:42:3E:57:A5 enabled    ether2           switch1    
 4    ether4       1500 00:0C:42:3E:57:A6 enabled    none             switch1    
[admin@MikroTik] /interface ethernet switch vlan> print
Flags: X - disabled, I - invalid 
 #   SWITCH                             VLAN-ID PORTS                            
 0   switch1                                 10 switch1-cpu                      
                                                ether1                           
 1   switch1                                 20 switch1-cpu                      
                                                WAN                              
                                                ether1                           
                                                ether2
/interface ethernet switch port> print
Flags: I - invalid 
 #   NAME             SWITCH             VLAN-MODE VLAN-HEADER    DEFAULT-VLAN-ID
 0   ether1           switch1            secure    add-if-missing               0
 1   ether2           switch1            fallback  leave-as-is                  0
 2   ether3           switch1            secure    always-strip                20
 3   ether4           switch1            fallback  leave-as-is                  0
 4   WAN              switch1            secure    always-strip                20
 5   switch1-cpu      switch1            secure    leave-as-is                  0
Last edited by Jeroen1000 on Sun Jul 13, 2014 1:45 pm, edited 2 times in total.
 
Jeroen1000
Member Candidate
Member Candidate
Topic Author
Posts: 202
Joined: Fri Feb 18, 2011 2:05 pm

Re: Routerboard450G: DHCP-client on master interface not wor

Sat Jul 12, 2014 10:29 pm

This is so weird, what you could NOT see from my first post is that ETHER2 did not have a physical link (there was no device attached to the port). So I've now connected my ISP's cable modem to ETHER2.
The modem was previously on ETHER5 (my WAN port).

Again, I do not receive an IP address on ETHER2 unless I DISABLE en RE-ENABLE the port.

I did so by setting ETHER2 as master for ETHER5. Although nothing is currently connected to ETHER5, this seems to trigger ETHER2 into getting DHCP via the modem. I'm going to try by unplugging the modem from ETHER2 after a reboot, and then plugging it back in.

edit: physically unplugging the network cable from ETHER2 does not seem to trigger it into getting DHCP.
 
Jeroen1000
Member Candidate
Member Candidate
Topic Author
Posts: 202
Joined: Fri Feb 18, 2011 2:05 pm

Re: Routerboard450G: DHCP-client on master interface not wor

Sun Jul 13, 2014 1:39 pm

I've found the problem and solution. However, I don't fully understand it yet.

In below configuration, the switch1-cpu port is set to DEFAULT-VLAN-ID 0. Putting is as access-port in VLAN20 solves the issue:
 5   switch1-cpu      Switch1            secure    always-strip                20
Or setting its VLAN-MODE to fallback also does the trick:
5   switch1-cpu      Switch1            fall-back leave-as-is                 0
OLD CONFIGURATION THAT DOES NOT WORK
/interface ethernet switch port> print
Flags: I - invalid
 #   NAME             SWITCH             VLAN-MODE VLAN-HEADER    DEFAULT-VLAN-ID
 0   ether1           switch1            secure    add-if-missing               0
 1   ether2           switch1            fallback  leave-as-is                  0
 2   ether3           switch1            secure    always-strip                20
 3   ether4           switch1            fallback  leave-as-is                  0
 4   WAN              switch1            secure    always-strip                20
 5   switch1-cpu      Switch1            secure     leave-as-is                 0
Creating a VLAN 1 or 0 (whichever ROS uses as untagged VLAN) at /interface ethernet switch vlan
and putting the CPU-port in it, does not help...

So this, did not work:

/interface ethernet switch vlan> print
Flags: X - disabled, I - invalid
 #   SWITCH                             VLAN-ID PORTS                           
 0   switch1                                 10 switch1-cpu                     
                                                ether1                           
 1   switch1                                 20 switch1-cpu                     
                                                WAN                             
                                                ether1                           
                                                ether2
2   switch1                                 1  switch1-cpu                                              
                                                ether2



Who is online

Users browsing this forum: Amazon [Bot], CGGXANNX and 80 guests