Community discussions

MikroTik App
 
knat53
newbie
Topic Author
Posts: 28
Joined: Fri Oct 15, 2021 4:53 am

Cannot resolve DNS name

Thu May 19, 2022 4:22 am

I'm trying to configure RouterOS on a Netpower 16p (CRS318-16P-2S+) to work as a switch. However, I'm getting the error "ERROR: could not resolve dns name" when attempting to check for updates. I manually updated the device to RouterOS 7.2.3.

Could someone please let me know why I have no Internet access on the switch and how to resolve this? I provided the configuration below. Thanks!

# may/18/2022 14:41:26 by RouterOS 7.2.3
# software id = QYSF-WDA0
#
# model = CRS318-16P-2S+

/interface bridge
add admin-mac=08:55:31:4F:81:86 auto-mac=no comment=defconf name=bridge

/interface list
add name=LAN
add name=WAN

/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no

/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik

/port
set 0 name=serial0

/routing bgp template
set default disabled=no output.network=bgp-networks

/routing ospf instance
add disabled=no name=default-v2

/routing ospf area
add disabled=yes instance=default-v2 name=backbone-v2

/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether1
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=ether6
add bridge=bridge comment=defconf ingress-filtering=no interface=ether7
add bridge=bridge comment=defconf ingress-filtering=no interface=ether8
add bridge=bridge comment=defconf ingress-filtering=no interface=ether9
add bridge=bridge comment=defconf ingress-filtering=no interface=ether10
add bridge=bridge comment=defconf ingress-filtering=no interface=ether11
add bridge=bridge comment=defconf ingress-filtering=no interface=ether12
add bridge=bridge comment=defconf ingress-filtering=no interface=ether13
add bridge=bridge comment=defconf ingress-filtering=no interface=ether14
add bridge=bridge comment=defconf ingress-filtering=no interface=ether15
add bridge=bridge comment=defconf ingress-filtering=no interface=ether16
add bridge=bridge comment=defconf ingress-filtering=no interface=sfp-sfpplus1
add bridge=bridge comment=defconf ingress-filtering=no interface=sfp-sfpplus2

/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192

/interface list member
add interface=ether1 list=WAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
add interface=ether6 list=LAN
add interface=ether7 list=LAN
add interface=ether8 list=LAN
add interface=ether9 list=LAN
add interface=ether10 list=LAN
add interface=ether11 list=LAN
add interface=ether12 list=LAN
add interface=ether13 list=LAN
add interface=ether14 list=LAN
add interface=ether15 list=LAN
add interface=ether16 list=LAN
add interface=sfp-sfpplus1 list=LAN
add interface=sfp-sfpplus2 list=LAN

/interface ovpn-server server
set auth=sha1,md5

/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0

/ip dhcp-client
add interface=bridge use-peer-ntp=no

/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox port=23321
set api-ssl disabled=yes

/system clock
set time-zone-name=America/Chicago

/system identity
set name=main-switch

/system routerboard settings
set boot-os=router-os
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Cannot resolve DNS name

Thu May 19, 2022 6:41 am

could not resolve dns name

What does "/ip/dns/print" yield?

I provided the configuration below. Thanks!

No, thank you for not making us come back and demand it. :)

FYI: There's a fair bit of flotsam in this configuration due to upgrading stepwise between versions. The LTE, WiFi, OSPF, and BGP stuff can be removed. None of it's doing anything actively useful.

/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0

/ip dhcp-client
add interface=bridge use-peer-ntp=no

It's a bit odd to have a static IP and a DHCP client both. It's legal, just odd. Are you sure you mean to do this?

If you simply want the switch to have the same IP all the time while getting the gateway and DNS info from DHCP, a static DHCP reservation is more flexible. Beware that RouterOS bridges can change MACs on you when you reconfigure them, however. If the switch suddenly stops appearing at the assigned static IP, it's not difficult to recover, but it can cause some head-scratching first.

This isn't nitpicking: my guess is that your problem is due to battling default gateways, one from the static IP config and one from the dynamic config.
 
knat53
newbie
Topic Author
Posts: 28
Joined: Fri Oct 15, 2021 4:53 am

Re: Cannot resolve DNS name

Thu May 19, 2022 3:11 pm

I didn't add a static IP address. I want the switch to get an IP address dynamically from my router. I'm not sure why there's an entry under "/ip address." Is that a default path for the bridge to the gateway?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Cannot resolve DNS name

Thu May 19, 2022 4:10 pm

No it is a default configuration (recognizable by the label comment=defconf) intended to allow access to the device when it is operating standalone.
When you use DHCP you can remove it.
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Cannot resolve DNS name  [SOLVED]

Thu May 19, 2022 5:40 pm

Adding to what pe1chl wrote, your configuration does pull a dynamic IP via DHCP, but that doesn’t overwrite the static defconf IP. The dynamic IP is added to the static IP config, possibly explaining your symptom.

There are legitimate use cases for static + dynamic IP addressing. RouterOS doesn’t second-guess the user as common desktop OSes do. Windows makes this ridiculously difficult, so that it's barely possible for users of everyday skill to achieve. It's easier on other OSes, but you may still have to go somewhat out of your way to achieve it.

RouterOS doesn't put up any barriers at all. It leaves sanity checking to the humans.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Cannot resolve DNS name

Thu May 19, 2022 9:01 pm

RouterOS doesn’t second-guess the user as common desktop OSes do. Windows makes this ridiculously difficult, so that it's barely possible for users of everyday skill to achieve. It's easier on other OSes, but you may still have to go somewhat out of your way to achieve it.
In a typical "desktop Linux" it used to be easy, you could just type an "ip addr add ..." command for an interface that is using DHCP, but due to the Poetterization of Linux this is no longer true. It is becoming more and more like Windows.
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Cannot resolve DNS name

Thu May 19, 2022 11:02 pm

…due to the Poetterization of Linux…

It's there. You just have to learn the new tools:

$ sudo nmcli con mod NAME +ipv4.addresses "192.0.2.0/24"

Yes, it's longer, but it has the benefit of being persistent, which the "ip" commands aren't.

I find it easier with nmtui, which has an explicit function for adding an IP alias, including a DHCP one.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Cannot resolve DNS name

Fri May 20, 2022 12:00 pm

Yes, it's longer, but it has the benefit of being persistent, which the "ip" commands aren't.
Yeah, but that is actually a DISadvantage!
It was always possible to make persistent changes, but it was also possible to make temporary changes e.g. only to reach some device that you know was configured on an incompatible address, and you need to reconfigure it.
Now, you are making persistent changes that you must undo later. Not good.
 
knat53
newbie
Topic Author
Posts: 28
Joined: Fri Oct 15, 2021 4:53 am

Re: Cannot resolve DNS name

Fri May 20, 2022 6:30 pm

Thank you very much. Removing the static IP address resolved the issue. I was not aware that this was the default configuration and that it needed to be disabled (I have not yet encountered that issue with the other Mikrotik routers and switches that I setup).

I was able to remove the OSPF and BGP items but it's not letting me remove the lte apn and wireless security-profile settings. I'm receiving the error "not enough permissions (9)" when I run the following commands, even though I'm logged in as full administrator.

/interface/lte/apn> remove 0
not enough permissions (9)

/interface/wireless/security-profiles> remove 0
not enough permissions (9)

How do I remove these wireless settings? Also, do you know why they are configured in the first place, considering this is the netPower 16p switch with no wireless capabilities?

Btw, I miss the "?" for help that we had in previous RouterOS versions. Anyway to get that back? I find "?" easier to type than F1.

Thanks!

could not resolve dns name

What does "/ip/dns/print" yield?

I provided the configuration below. Thanks!

No, thank you for not making us come back and demand it. :)

FYI: There's a fair bit of flotsam in this configuration due to upgrading stepwise between versions. The LTE, WiFi, OSPF, and BGP stuff can be removed. None of it's doing anything actively useful.

/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0

/ip dhcp-client
add interface=bridge use-peer-ntp=no

It's a bit odd to have a static IP and a DHCP client both. It's legal, just odd. Are you sure you mean to do this?

If you simply want the switch to have the same IP all the time while getting the gateway and DNS info from DHCP, a static DHCP reservation is more flexible. Beware that RouterOS bridges can change MACs on you when you reconfigure them, however. If the switch suddenly stops appearing at the assigned static IP, it's not difficult to recover, but it can cause some head-scratching first.

This isn't nitpicking: my guess is that your problem is due to battling default gateways, one from the static IP config and one from the dynamic config.
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Cannot resolve DNS name

Fri May 20, 2022 6:58 pm

it's not letting me remove the lte apn

I've collected several solutions for this class of problems here, along with explanations of why these items appear in /export output.

I miss the "?" for help that we had in previous RouterOS versions. Anyway to get that back? I find "?" easier to type than F1.

I missed it, too, for about a week past the date I upgraded my last ROS 6 device to ROS 7. It wasn't grooved very deeply into my muscle memory.
 
knat53
newbie
Topic Author
Posts: 28
Joined: Fri Oct 15, 2021 4:53 am

Re: Cannot resolve DNS name

Fri May 20, 2022 7:50 pm

it's not letting me remove the lte apn

Answers here.
I tried the suggestion in that post:
/interface/lte/apn set [ find default ] use-network-apn=yes ip-type=auto

but it didn't remove this from my switch's configuration. When I run /export it still shows. Any other suggestions on this?
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Cannot resolve DNS name

Fri May 20, 2022 8:01 pm

I tried the suggestion in that post

There are several more solutions in that thread, including "/interface/lte/apn reset [find default]".
 
knat53
newbie
Topic Author
Posts: 28
Joined: Fri Oct 15, 2021 4:53 am

Re: Cannot resolve DNS name

Fri May 20, 2022 8:19 pm

I tried the suggestion in that post

There are several more solutions in that thread, including "/interface/lte/apn reset [find default]".
Okay, that one did the trick. The lte apn setting is missing from /export now. Still can't find a way to remove /interface wireless security-profiles though.

More important question: I have eth1 assigned to WAN and eth2-eth16 assigned to LAN but I'm not using this as a router, but as an internal switch. Should I set eth1 also to LAN since eth1 is just connecting to the router's built-in switch?
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Cannot resolve DNS name

Fri May 20, 2022 8:25 pm

I have eth1 assigned to WAN and eth2-eth16 assigned to LAN but I'm not using this as a router, but as an internal switch. Should I set eth1 also to LAN since eth1 is just connecting to the router's built-in switch?

You aren't using those interface lists at all, as far as I can see. They have no effect unless used in an IP filter rule or similar. You can nuke them.

What would have an effect like you seem to be worrying about is putting ether1 into a separate bridge from the rest, which can have interesting consequences
 
knat53
newbie
Topic Author
Posts: 28
Joined: Fri Oct 15, 2021 4:53 am

Re: Cannot resolve DNS name

Fri May 20, 2022 8:33 pm

I have eth1 assigned to WAN and eth2-eth16 assigned to LAN but I'm not using this as a router, but as an internal switch. Should I set eth1 also to LAN since eth1 is just connecting to the router's built-in switch?

You aren't using those interface lists at all, as far as I can see. They have no effect unless used in an IP filter rule or similar. You can nuke them.

What would have an effect like you seem to be worrying about is putting ether1 into a separate bridge from the rest, which can have interesting consequences
Ohh okay, thanks for helping me get this switch setup with an initial configuration. I thought it was necessary to create that interface list in order to setup the switch bridge. I guess the bridge is now setup out-of-the-box with all the ethernet interfaces assigned to the same default bridge. I remember with other MT devices that I needed to do this manually.

Who is online

Users browsing this forum: Bing [Bot], fibracapi, raiod and 62 guests