Community discussions

 
elduderino
just joined
Topic Author
Posts: 4
Joined: Fri Aug 16, 2019 3:37 am

can only get a dynamic ip on bridge interface

Fri Aug 16, 2019 4:07 am

hello!

I can't for the life of me figure this out. I've read all the basic setup guides. If I directly set up my eth1 as a dhcp client, it get permanently stuck searching for an ip. dhcp sends a discover message but gets no reply.

if i use a bridge containing all eth interfaces I am however able to get an address.

This is problematic because I am unable to separate my wan interfaces dhcp from my WAN.

any thoughts how this can be fixed? ive tried numerous ways but I am stuck here.

thanks in advance
 
tdw
Member Candidate
Member Candidate
Posts: 173
Joined: Sat May 05, 2018 11:55 am

Re: can only get a dynamic ip on bridge interface

Fri Aug 16, 2019 12:35 pm

Could be any number of things. Post the output of /export hide-sensitive after also disgusing any public IPs present.
 
wja962
just joined
Posts: 12
Joined: Sat Aug 10, 2019 11:33 am
Location: United Kingdom

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 12:03 am

I’m pretty sure you don’t need that DHCP client. You don’t say what device you have but quite literally every Mikrotik device I’ve ever used has just worked straight out of the box with maybe just a PPPoE username and password to get a connection to a modem.

So my first advice is put it back to factory defaults.

If you can say which device you have and what you want to do with it, maybe we can offer a bit more help.
MTCNA / MTCRE / MTCUME / MTCTCE / MTCIPv6E
Image
 
elduderino
just joined
Topic Author
Posts: 4
Joined: Fri Aug 16, 2019 3:37 am

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 4:23 am

Could be any number of things. Post the output of /export hide-sensitive after also disgusing any public IPs present.
this is the export of my config. pretty standard, basic configuration after a system reset. still i dont obtain an ip adress on my wan interface.

# jan/02/1970 00:03:44 by RouterOS 6.45.3
# software id = 9PKM-9HJQ
#
# model = RB931-2nD
# serial number = 94A20AA87D10
/interface bridge
add name=bridge1
/interface wireless
set [ find default-name=wlan1 ] disabled=no mode=ap-bridge ssid=MikroTik
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge1 name=dhcp1
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add interface=ether1 list=WAN
add interface=bridge1 list=LAN
/ip address
add address=192.168.88.1/24 interface=ether2 network=192.168.88.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 gateway=192.168.88.1 netmask=24
/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input connection-state=established
add action=accept chain=input connection-state=related
add action=drop chain=input in-interface-list=!LAN
/ip firewall nat
add action=masquerade chain=srcnat out-interface-list=WAN
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

I’m pretty sure you don’t need that DHCP client. You don’t say what device you have but quite literally every Mikrotik device I’ve ever used has just worked straight out of the box with maybe just a PPPoE username and password to get a connection to a modem.

So my first advice is put it back to factory defaults.

If you can say which device you have and what you want to do with it, maybe we can offer a bit more help.
sorry for being vague, this is a hAP mini. i am trying to follow the standard config setup of letting my eth1 be my WAN interface and the rest of the ports and wlan1 be a brige that groups my LAN.
as of now i can only connect to the internet if i include eth1 in my bridge.
i believe this causes problems as my bridge is set up as a dhcp client and is also in my pool of addresses that my dhcp server assigns IPs.

my ISP does not use PPPoE, it should just obtain an IP like it does with any other device i plug into it.
 
2frogs
Long time Member
Long time Member
Posts: 530
Joined: Fri Dec 03, 2010 1:38 am

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 4:34 am

If you plug your computer into the cable that is on ether1, does it get an IP address. If it does, make sure it is not in the same range as your router (ie 192.168.88.0/24). I don't see anything in config that would prevent it from obtaining an IP.
 
elduderino
just joined
Topic Author
Posts: 4
Joined: Fri Aug 16, 2019 3:37 am

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 5:58 am

If you plug your computer into the cable that is on ether1, does it get an IP address. If it does, make sure it is not in the same range as your router (ie 192.168.88.0/24). I don't see anything in config that would prevent it from obtaining an IP.
Yes it does, as does any other device I plug my ISP cable into. I wouln't get an IP in that range as it's a private one.
Starting to think it's a layer 2 issue involving dhcp parameters unless i' m missing something obvious.
Pretty bummed as I had high hopes for mikrotik
 
User avatar
pukkita
Trainer
Trainer
Posts: 2981
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 12:52 pm

Check System > Routerboard, does Current Firmware match Upgrade Firmware version? If not, upgrade and reboot.

System > Logging, add DHCP. Try dhcp-client again on ether1, post the logs.

What's the mac address of the bridge? and ether1? You can open a new terminal maximized, then issue
/interface p


To print all interface MACs.

Did you play with DHCP leases on the Telco router?
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
tdw
Member Candidate
Member Candidate
Posts: 173
Joined: Sat May 05, 2018 11:55 am

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 12:55 pm

The Mikrotik LAN IP is bound to a member of the bridge rather than the bridge itself, this often breaks things in strange ways. It should be

/ip address
add address=192.168.88.1/24 interface=bridge1 network=192.168.88.0
 
elduderino
just joined
Topic Author
Posts: 4
Joined: Fri Aug 16, 2019 3:37 am

Re: can only get a dynamic ip on bridge interface

Sat Aug 17, 2019 10:30 pm

Check System > Routerboard, does Current Firmware match Upgrade Firmware version? If not, upgrade and reboot.

System > Logging, add DHCP. Try dhcp-client again on ether1, post the logs.

What's the mac address of the bridge? and ether1? You can open a new terminal maximized, then issue
/interface p


To print all interface MACs.

Did you play with DHCP leases on the Telco router?

thanks, i followed your advice and upgraded my firmware.

i finally found a workaround. i turned on dhcp logging for my configuration that partially worked, when all my ports were on the same bridge interface. it was there i found that my ISP was offering the IP to my ehternet 2 interface

08:47:40 dhcp,debug,packet dhcp-client on bridge sending discover with id 3923040042 to 255.255.255.255 
08:47:40 dhcp,debug,packet     secs = 56 
08:47:40 dhcp,debug,packet     ciaddr = 0.0.0.0 
08:47:40 dhcp,debug,packet     chaddr = 74:4D:XX:XX:XX:XX (this i identified was my eth2 MAC)
08:47:40 dhcp,debug,packet     Msg-Type = discover 
08:47:40 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
08:47:40 dhcp,debug,packet     Host-Name = "MikroTik" 
08:47:40 dhcp,debug,packet     Client-Id = 01-74-4D:XX:XX:XX:XX  
08:47:40 dhcp,debug,packet dhcp-client on bridge received offer with id 3923040042 from 190.XXX.XXX.XXX 
08:47:40 dhcp,debug,packet     ciaddr = 0.0.0.0 
08:47:40 dhcp,debug,packet     yiaddr = 190.XXX.XXX.XXX 
08:47:40 dhcp,debug,packet     giaddr = 190.XXX.XXX.XXX 
08:47:40 dhcp,debug,packet     chaddr = 74:4D:XX:XX:XX:XX 
08:47:40 dhcp,debug,packet     Msg-Type = offer 
08:47:40 dhcp,debug,packet     Server-Id = 190.XXX.XXX.XXX 
08:47:40 dhcp,debug,packet     Address-Time = 604800 
08:47:40 dhcp,debug,packet     Subnet-Mask = 255.255.224.0 
08:47:40 dhcp,debug,packet     Router = 190.XXX.XXX.XXX
08:47:40 dhcp,debug,packet     Domain-Server = 200.XXX.XXX.XXX,200.XXX.XXX.XXX 
08:47:40 dhcp,debug,state dhcp-client on bridge entering <requesting...> state 
08:47:40 dhcp,debug,packet dhcp-client on bridge sending request with id 3923040042 to 255.255.255.255 
08:47:40 dhcp,debug,packet     secs = 56 
08:47:40 dhcp,debug,packet     ciaddr = 0.0.0.0 
08:47:40 dhcp,debug,packet     chaddr = 74:4D:XX:XX:XX:XX  
08:47:40 dhcp,debug,packet     Msg-Type = request 
08:47:40 dhcp,debug,packet     Server-Id = 190.XXX.XXX.XXX
08:47:40 dhcp,debug,packet     Address-Request = 190.XXX.XXX.XXX
08:47:40 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
08:47:40 dhcp,debug,packet     Host-Name = "MikroTik" 
08:47:40 dhcp,debug,packet     Client-Id = 01-74:4D:XX:XX:XX:XX 
08:47:40 dhcp,debug,packet dhcp-client on bridge received ack with id 3923040042 from 190.xxx.xxx.xxx
08:47:40 dhcp,debug,packet     ciaddr = 0.0.0.0 
08:47:40 dhcp,debug,packet     yiaddr = 190.XXX.XXX.XXX 
08:47:40 dhcp,debug,packet     giaddr = 190.XXX.XXX.XXX
08:47:40 dhcp,debug,packet     chaddr = 74:4D:XX:XX:XX:XX
08:47:40 dhcp,debug,packet     Msg-Type = ack 
08:47:40 dhcp,debug,packet     Server-Id = 190.XXX.XXX.XXX
08:47:40 dhcp,debug,packet     Address-Time = 604800 
08:47:40 dhcp,debug,packet     Subnet-Mask = 255.255.224.0 
08:47:40 dhcp,debug,packet     Router = 190.XXX.XXX.XXX
08:47:40 dhcp,debug,packet     Domain-Server = 200.XXX.XXX.XXX,200.XXX.XXX.XXX
08:47:40 dhcp,info dhcp-client on bridge got IP address 190.XXX.XXX.XXX 

when i attempted to obtain an IP on my ethernet 1 interface, there was no exchange..i got this on endless loop
00:13:14 dhcp,debug,packet     Host-Name = "MikroTik" 
00:13:14 dhcp,debug,packet     Client-Id = 01-74-4D:XX:XX:XX:XX  
00:13:14 dhcp,debug,packet     dhcp-client on ether1 sending discover with id 3753219351 255.255.255.255 
00:13:14 dhcp,debug,packet     secs= 47
00:13:14 dhcp,debug,packet     flags=broadcast
00:13:14 dhcp,debug,packet     cidr=0.0.0.0  
00:13:14 dhcp,debug,packet     chaddr = 74:4D:XX:XX:XX:XX 
00:13:14 dhcp,debug,packet     Msg-Type = discover
00:13:14 dhcp,debug,packet     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,Ntp-Server,CAPWAP-Server,Vendor-Specific
so now i set my ehternet 2 as my WAN interface and the rest of my ports as a bridge and everything is working.

any ideas why this might be? i was thinking maybe my ISP registered this MAC at some point but why is it there is no communication when i use ethernet 1? i tried resetting my aDSL modem and releasing and renewing my address but i could never get it working

thank you everyone for your input. i am still confused but things are working alright for the time being
 
wja962
just joined
Posts: 12
Joined: Sat Aug 10, 2019 11:33 am
Location: United Kingdom

Re: can only get a dynamic ip on bridge interface

Sun Aug 18, 2019 1:34 pm

Again, what you suggest ie. the ISP using DHCP to give your router an IP address should work on the default configuration if you plug the RJ45 from the ISP connection (modem etc.) into the WAN port with address acquisition set to automatic.

I've done a lot of Mikrotik training and I don't think that Mikrotik help themselves by suggesting that the first thing everyone should do is to reset the router configuration to blank and set up the ports and interfaces from scratch.

The default configuration is safe. And it should work for 99.9% of users.

For example, in the configuration you've provided, I don't see any firewall rules for traffic destined through the router. I can't see any 'forward' rules. 'Input' rules only affect traffic that goes to the router (like ICMP pings), so anything that passes to the inside of your network doesn't appear to be protected.

My strong recommendation would be to reset the router back to factory defaults, change the admin username and password. Add the SSID and password for the WLAN and set address acquisition to automatic and it should work the way you want it to.
MTCNA / MTCRE / MTCUME / MTCTCE / MTCIPv6E
Image
 
User avatar
pukkita
Trainer
Trainer
Posts: 2981
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: can only get a dynamic ip on bridge interface

Sun Aug 18, 2019 1:38 pm

The Mikrotik LAN IP is bound to a member of the bridge rather than the bridge itself, this often breaks things in strange ways. It should be

/ip address
add address=192.168.88.1/24 interface=bridge1 network=192.168.88.0
Good catch, missed that.

As TDW pointed, when you create a bridge, any L3 addressing should be applied on top of the bridge interface itself, not any of the slave interfaces.

Make sure:

- ether1 doesn't belong to any bridge (WAN) and is connected to telco router
- set dhcp-client on ether1.
- rest of ports all added to bridge1
- assign 192.168.88.1/24 to bridge1
- Keep rest of config you posted

i was thinking maybe my ISP registered this MAC
That's certainly a possibility. I'd Try

- powering off the Telco / Mikrotik router some minutes
- Clone the mac of the previous device that worked (CLI only, careful not to repeat macs in your network or you'll have problems)
/interface ethernet set ether1 mac-address=aa:bb:cc:dd:ee:ff
Alternatively, you can reset to defaults and start from scratch as wja962 suggests, default config should work fine with maybe the need of MAC cloning (depends on your ISP).
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum

Who is online

Users browsing this forum: No registered users and 22 guests