<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Setting DNS with static IP config]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm trying to use static IP for the Omega2, last firmware 0.2.0 (b194).<br />
All works fine, except DNS setting.</p>
<p dir="auto">This is my <code>/etc/config/network</code> file config:</p>
<pre><code>config interface 'wwan'
        option ifname 'apcli0'
        option proto 'static'
        option hostname 'Omega'
        option ipaddr '192.168.1.95'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '8.8.8.8'
</code></pre>
<p dir="auto">After network config restart with command <code>/etc/init.d/network restart</code>, I try to ping to google with:</p>
<pre><code>root@Omega # ping google.com
 ping: bad address 'google.com'
</code></pre>
<p dir="auto">It can't resolve hostnames with static IP configuration. If I use DHCP config, no problem.</p>
<p dir="auto">My <code>ifconfig</code> output:</p>
<pre><code>apcli0    Link encap:Ethernet  HWaddr 40:A3:6B:C1:44:0E
          inet addr:192.168.1.95  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::42a3:6bff:fec1:440e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
</code></pre>
<p dir="auto">Anybody use static IP? Can share configuration files?.</p>
<p dir="auto">Thanks in advance!</p>
]]></description><link>http://community.onion.io/topic/3107/setting-dns-with-static-ip-config</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 22:31:41 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/3107.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Aug 2018 14:21:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Setting DNS with static IP config on Mon, 27 Aug 2018 14:21:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm trying to use static IP for the Omega2, last firmware 0.2.0 (b194).<br />
All works fine, except DNS setting.</p>
<p dir="auto">This is my <code>/etc/config/network</code> file config:</p>
<pre><code>config interface 'wwan'
        option ifname 'apcli0'
        option proto 'static'
        option hostname 'Omega'
        option ipaddr '192.168.1.95'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '8.8.8.8'
</code></pre>
<p dir="auto">After network config restart with command <code>/etc/init.d/network restart</code>, I try to ping to google with:</p>
<pre><code>root@Omega # ping google.com
 ping: bad address 'google.com'
</code></pre>
<p dir="auto">It can't resolve hostnames with static IP configuration. If I use DHCP config, no problem.</p>
<p dir="auto">My <code>ifconfig</code> output:</p>
<pre><code>apcli0    Link encap:Ethernet  HWaddr 40:A3:6B:C1:44:0E
          inet addr:192.168.1.95  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::42a3:6bff:fec1:440e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
</code></pre>
<p dir="auto">Anybody use static IP? Can share configuration files?.</p>
<p dir="auto">Thanks in advance!</p>
]]></description><link>http://community.onion.io/post/17537</link><guid isPermaLink="true">http://community.onion.io/post/17537</guid><dc:creator><![CDATA[Oximoron]]></dc:creator><pubDate>Mon, 27 Aug 2018 14:21:13 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Mon, 27 Aug 2018 15:53:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">i work in DHCP but with a static lease with the MAC Address of apcli0 (xxxxx0E for you but not the MAC Address of the Omega Label )</p>
<p dir="auto">my router is a Mikrotik and this system work for all IOT (ESP 8266 / ESP 32 / 4Duino ...)</p>
<p dir="auto">Bye</p>
]]></description><link>http://community.onion.io/post/17539</link><guid isPermaLink="true">http://community.onion.io/post/17539</guid><dc:creator><![CDATA[Jean Eudes Quidet 0]]></dc:creator><pubDate>Mon, 27 Aug 2018 15:53:04 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Mon, 27 Aug 2018 16:21:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/5722">@Jean-Eudes-Quidet-0</a> said in <a href="/post/17539">Setting DNS with static IP config</a>:</p>
<blockquote>
<p dir="auto">Hi</p>
<p dir="auto">i work in DHCP but with a static lease with the MAC Address of apcli0 (xxxxx0E for you but not the MAC Address of the Omega Label )</p>
<p dir="auto">my router is a Mikrotik and this system work for all IOT (ESP 8266 / ESP 32 / 4Duino ...)</p>
<p dir="auto">Bye</p>
</blockquote>
<p dir="auto">Hi, It's no apply in this case, because I'm finding a solution without modify router setup.</p>
]]></description><link>http://community.onion.io/post/17542</link><guid isPermaLink="true">http://community.onion.io/post/17542</guid><dc:creator><![CDATA[Oximoron]]></dc:creator><pubDate>Mon, 27 Aug 2018 16:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Mon, 27 Aug 2018 17:49:32 GMT]]></title><description><![CDATA[<p dir="auto">Maybe the <code>dnsmasq</code> program interferes? What does <code>/etc/resolv.conf</code> say?</p>
]]></description><link>http://community.onion.io/post/17543</link><guid isPermaLink="true">http://community.onion.io/post/17543</guid><dc:creator><![CDATA[Maximilian Gerhardt]]></dc:creator><pubDate>Mon, 27 Aug 2018 17:49:32 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Mon, 27 Aug 2018 23:37:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4683">@Maximilian-Gerhardt</a> said in <a href="/post/17543">Setting DNS with static IP config</a>:</p>
<blockquote>
<p dir="auto">Maybe the <code>dnsmasq</code> program interferes? What does <code>/etc/resolv.conf</code> say?</p>
</blockquote>
<p dir="auto">Maybe... I try all configurations in <code>/etc/config/network</code> and <code>/etc/config/dhcp</code>, but it doesn't work.</p>
<p dir="auto">File <code>/etc/resolv.conf</code> is modified by <code>dnsmasq</code> after boot.</p>
]]></description><link>http://community.onion.io/post/17544</link><guid isPermaLink="true">http://community.onion.io/post/17544</guid><dc:creator><![CDATA[Oximoron]]></dc:creator><pubDate>Mon, 27 Aug 2018 23:37:01 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Tue, 28 Aug 2018 00:04:48 GMT]]></title><description><![CDATA[<p dir="auto">Well, I think is a problem of routing tables:</p>
<p dir="auto">Output of <code>route -n</code> command with DHCP (default device config):</p>
<pre><code>Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 apcli0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 apcli0
192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0 apcli0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br-wlan
</code></pre>
<p dir="auto">With STATIC IP config:</p>
<pre><code>Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 apcli0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br-wlan
</code></pre>
<p dir="auto">So, I route manually with command:<br />
<code># route add default gw 192.168.1.1</code></p>
<p dir="auto">And voila, <code>ping google.com</code> works...</p>
<hr />
<h1>Complete config for static IP</h1>
<p dir="auto">Device IP address 192.168.1.95 and router/gateway in 192.168.1.1.</p>
<p dir="auto">Modify interface 'wwan' in file <code>/etc/config/network</code> as follow:</p>
<pre><code>config interface 'wwan'
        option ifname 'apcli0'
        option proto 'static'
        option hostname 'Omega-XXXX'
        option ipaddr '192.168.1.95'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '8.8.8.8'
</code></pre>
<p dir="auto">If you use the Access Point (example a phone connected to Omega as Wi-Fi client) add DNS servers to <code>/etc/dnsmasq.conf</code> file:</p>
<pre><code># Use public DNS servers for Access Point when
# static IP is used for 'wwan' interface.

server=8.8.8.8
server=8.8.4.4
</code></pre>
<p dir="auto">Add these commands to <code>/etc/rc.local</code> to update config on next boot:</p>
<pre><code># ----------------------------------------------------------
# COMMANDS FOR STATIC IP CONFIG
# ----------------------------------------------------------

# Add routing table (need it for STATIC IP config)
route add default gw 192.168.1.1

# Restart Dnsmasq for update DNS servers (only Access Point)
/etc/init.d/dnsmasq restart
</code></pre>
<p dir="auto">Next, <code>reboot</code> Omega.</p>
<p dir="auto">Check if the <code>route -n</code> has a similar output:</p>
<pre><code>Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 apcli0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 apcli0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br-wlan
</code></pre>
<p dir="auto">And ofcourse, try <code>ping google.com</code> command.</p>
<h1>Conclusion</h1>
<p dir="auto">In my humilde opinion there are a config bug for static IP, maybe Onion would fix it.</p>
<p dir="auto">References:</p>
<p dir="auto">[<a href="https://wiki.openwrt.org/doc/howto/dhcp.dnsmasq" rel="nofollow">https://wiki.openwrt.org/doc/howto/dhcp.dnsmasq</a>](link url)</p>
<p dir="auto">[<a href="https://wiki.openwrt.org/doc/uci/routing_in_ipv4" rel="nofollow">https://wiki.openwrt.org/doc/uci/routing_in_ipv4</a>](link url)</p>
<p dir="auto">[<a href="https://wiki.openwrt.org/doc/uci/network" rel="nofollow">https://wiki.openwrt.org/doc/uci/network</a>](link url)</p>
<p dir="auto">[<a href="https://www.techrepublic.com/article/configure-it-quick-use-the-route-command-to-set-up-routing-tables-on-linux/" rel="nofollow">https://www.techrepublic.com/article/configure-it-quick-use-the-route-command-to-set-up-routing-tables-on-linux/</a>](link url)</p>
]]></description><link>http://community.onion.io/post/17545</link><guid isPermaLink="true">http://community.onion.io/post/17545</guid><dc:creator><![CDATA[Oximoron]]></dc:creator><pubDate>Tue, 28 Aug 2018 00:04:48 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Thu, 17 Jan 2019 16:18:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4611">@Oximoron</a> said in <a href="/post/17545">Setting DNS with static IP config</a>:</p>
<blockquote>
<p dir="auto">route add default gw 192.168.1.1</p>
</blockquote>
<p dir="auto">I tried that solution but I noticed that the Gateway configuration dissapears when the wifi disconnects from an AP.</p>
<p dir="auto">Has anyone found a better solution?</p>
]]></description><link>http://community.onion.io/post/18700</link><guid isPermaLink="true">http://community.onion.io/post/18700</guid><dc:creator><![CDATA[zedf]]></dc:creator><pubDate>Thu, 17 Jan 2019 16:18:52 GMT</pubDate></item><item><title><![CDATA[Reply to Setting DNS with static IP config on Sun, 18 Oct 2020 09:30:47 GMT]]></title><description><![CDATA[<p dir="auto">Move route add default gw 192.168.1.1 to end of rc.common file work for me.</p>
]]></description><link>http://community.onion.io/post/22689</link><guid isPermaLink="true">http://community.onion.io/post/22689</guid><dc:creator><![CDATA[rich]]></dc:creator><pubDate>Sun, 18 Oct 2020 09:30:47 GMT</pubDate></item></channel></rss>