View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Jul 16, 2014 11:08 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
I seem to be the king of odd problems. DNS was working earlier today and then tonight I pulled up chrome and nothing was working. I did a " ping google.com" command and got a response of "unknown host". While poking around in some Arch forums I ran across someone suggesting to investigate resolv.conf. I checked it out and it said it was "generated by dhcpcd" so I ran
Code:
sudo dhcpcd
and now everything is working again.
BUT WHY?
How in the Wide wide world of sports did I screw this up?!

_________________
My System


Last edited by mattbatt on Sat Jul 26, 2014 10:05 pm, edited 1 time in total.


Top
 Profile  
 
PostPosted: Thu Jul 17, 2014 6:50 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
I had to do it again tonight to make the internet work.

_________________
My System


Top
 Profile  
 
PostPosted: Mon Jul 21, 2014 8:40 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
blindly running dhcpcd is in general a bad idea, especially if your not using dhcp to obtain the ip address.
I think the first thing todo would be to look at the contents of /etc/resolv.conf. Are there other lines then the "generated by" one?
It's possible the lease on the ip ran out and dhcp messed up the renew somehow.


Also to restart network run /etc/net/scripts/network.init stop|start


Top
 Profile  
 
PostPosted: Mon Jul 21, 2014 9:15 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
So I've been running "sudo dhcpcd" every time I reboot to make DNS work. What really doesn't make sense is that my MythBox has a static address and that is set up in the LinHES->Network menu. My router knows to assign MythTV a specific address.
Here is what "/etc/resolv.conf" says right after reboot. Restarting etc/net/scripts/network.init didn't change anything.
Code:
  GNU nano 2.2.6                                                    File: /etc/resolv.conf

# Generated by dhcpcd
search local
# /etc/resolv.conf.tail can replace this line



and this is what it says after running "sudo dhcpcd"
Code:
GNU nano 2.2.6                                                    File: /etc/resolv.conf

# Generated by dhcpcd from eth0
search local
domain lan
nameserver 192.168.0.1
# /etc/resolv.conf.tail can replace this line



Thanks Jams for your help

_________________
My System


Top
 Profile  
 
PostPosted: Tue Jul 22, 2014 7:46 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
What are the contents of:
/etc/net/ifaces/eth0/options
&
/etc/systemconfig

Feel free to email them to me if you don't what it public.

Assuming that eth0 is the interface in question


Top
 Profile  
 
PostPosted: Tue Jul 22, 2014 2:12 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
mattbatt wrote:
So I've been running "sudo dhcpcd" every time I reboot to make DNS work. What really doesn't make sense is that my MythBox has a static address and that is set up in the LinHES->Network menu.

If true, then this is your problem and you would have to manually place the appropriate entries into your resolv.conf (and perhaps others) file. A system with a truly static IP address wouldn't need to run a DHCP client.

mattbatt wrote:
My router knows to assign MythTV a specific address.

This is where the confusion starts. A static IP assignment is defined on the device itself, in this case your Myth box. A DHCP reservation - Where a DHCP server assigns a specific IP address to a device based on it's MAC address - is not a static IP address (although many refer to this as a "static DHCP address", still (more or less) technically incorrect).

So, if your Myth box is truly set for a static address and you don't update the resolv.conf file, it doesn't know what name servers (DNS) to use. Once you run the DHCP client that information is populated by the info sent from your router. You'll have to decide if the system is to have a true static address (doesn't run dhcpcd) or one reserved for it from the DHCP pool.

I don't run any Arch-based systems but I bet the other files that may need looking into are those that Jams mentioned :wink:

Scott


Top
 Profile  
 
PostPosted: Wed Jul 23, 2014 7:48 am 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
Back in the day I use to have an pci intel nic in my box and it would do that business can't find google and then I had to restart the service and it would work. I noticed that if when I installed if I would make a make in the ip address transpose or the network was having issues it would not be able to resolve and it would let me continue the install. Then I had to start digging with the resolve.cfg and it would eventually work. More recently I started using Mythwelcome so I changed my setup to use dhcp service from my router. I created a pool on the router for exactly the number of machines in my network and now it works perfect for the past year.....


Top
 Profile  
 
PostPosted: Wed Jul 23, 2014 9:40 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
Code:
[mythtv@gimli ~]$ sudo nano /etc/net/ifaces/eth0/options
  GNU nano 2.2.6                   File: /etc/net/ifaces/eth0/options

# If you want to change current interface name, edit /etc/net/iftab,
# rename current directory and uncomment this line:
TYPE=eth
DISABLED=no
BOOTPROTO=static
ONBOOT=yes
CONFIG_WIRELESS=no


WOW that was a close one I almost posted my password on the world wide web. Ya should warn a guy next time!!! :-)
Code:

#    Language
#-----------------------------
language="EN_US"

#    Hostype
#-----------------------------
SystemType="Master_backend"
dbhost=192.168.0.164
RunFrontend="1"
UseMythWelcome="0"

#    Network config
#-----------------------------
hostname="gimli"
default_interface="eth0"

#    Network config for eth0
#-----------------------------
Hostipeth0="192.168.0.164"
Hostnetmasketh0="/24    255.255.255.0"
HostDNSeth0="192.168.0.1"
HostUSEDHCPeth0="1"
HostGWeth0="192.168.0.1"
HostActiveeth0="1"
HostESSIDeth0=""
HostUseEncryptioneth0=""
HostKeyeth0=""
HOST_iswirelesseth0="0"
HostMTUeth0=""

#    Misc
#-----------------------------
timezone="America/New_York"
Hostupdateplan="All"
ShowTips="1"

#    Advanced
#-----------------------------
bewait="0"
ncidclient="0"
Runncidd="0"
nciddSerialPort="ttyS0"
nciddDeviceNetCallerID="0"
Usebootsplash="0"
RemoteBackup="0"
RemoteBackupDir="shadowfax"
RunDHCP="0"
UseMythWEB="1"

#    fileshare
#-----------------------------
UseSamba="1"
Samba_media="1"
Samba_mediareadonly="0"
Samba_home="1"
Samba_homereadonly="0"
Samba_domain="WORKGROUP"
UseNFS="1"
HaveCentralNFS="no"
NFSserver="file:nfsmap"
NFSmount="/myth"
CentralNFSallhosts="1"

#    sleep
#-----------------------------
AutoShutdown="0"
Shutdowntime="2"
Shutdowntime2="2"

#    X display settings
#-----------------------------
XIgnoreConfig="1"
Xcardtype=""
XUseAdvanced=""
Xres="1920x1080"
UseXLargeMouse="0"

#    Audio settings
#-----------------------------
Audiotype="ALSA"
Audiotypeout="Analog"
SoundDevice="hw:1,9"

#    Software settings
#-----------------------------
mytharchive="0"
mythbrowser="0"
mythnetvision="1"
mythgallery="1"
mythgame="0"
mythmusic="1"
mythnews="0"
mythzoneminder="0"
mythweather="0"
#-----------------------------
romdb="1"
snes9x="0"
fceux="0"
mame="1"
mednafen="0"
mupen64="0"
dolphinemu="0"
xe="1"
#-----------------------------
dvdcss="1"
mythappletrailers="1"
miro="0"
webonlinhes="0"
huludesktop="1"
foldingathome="0"
foldingusername=""
foldingworksize="big"

#    ddns settings
#-----------------------------
DDnslogin=""
DDnspassword=""
DDnshostname=""
DDnsEnable="0"

#    screensaver settings
#-----------------------------
Screensavertype="none"
Screensaveridle="5"
Screensavertheme=""

#    IR settings
#-----------------------------
Remotetype="streamzap"
Remotebucket="favorites"
ReceiverType="streamzap"
HDHRlirc_device="1012BFEE"
HostLircWait=""
ReceiverSerialport="ttyS0"
HostTransmitproto_1="none"
HostTransmitproto_2="none"
HostTransmitproto_3="none"
HostTransmitproto_4="none"
HostTransmitDelay_1=""
HostTransmitDelay_2=""
HostTransmitDelay_3=""
HostTransmitDelay_4=""
HostBlasterType="None"
HostSerialPort_blasterlirc="ttyS0"
Hostnumblaster="1"
LCDtype="no_lcd"

#    user settings
#-----------------------------
rootSSH="0"

#    Supplemental
#-----------------------------
supplemental="1"
windowmanager="enlightenment"
EnhancedWMStyle="1"

#    VNC
#-----------------------------
vncenable="1"
vncpassword="**********"
xvncenable="1"
xvncpassword="************"

#    webuser
#-----------------------------
UseMythWEB_auth="1"

_________________
My System


Last edited by mattbatt on Wed Jul 23, 2014 10:07 pm, edited 1 time in total.


Top
 Profile  
 
PostPosted: Wed Jul 23, 2014 9:56 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
@slowtolearn
Yes that is what is confusing me as well the router is reserving 192.168.0.164 for my NIC's MAC address and I have MythTV set (in the settings at least) to static 192.168.0.164 and to look at 192.168.0.1 for DNS requests. I've thought about changing that to 8.8.8.8 or one of OpenDNS's address, I'm just not sure how to add a second (redunat backup) if the first DNS cache is down.

Here is a screen capture of my network settings page. BTW big thanks Admins for adding XVNC to the standard LinHES install it has proven useful in situations like this. :-)
https://www.dropbox.com/s/5i8drb17zfq6g ... ttings.jpg

_________________
My System


Top
 Profile  
 
PostPosted: Thu Jul 24, 2014 2:35 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
mattbatt wrote:
Yes that is what is confusing me as well the router is reserving 192.168.0.164 for my NIC's MAC address and I have MythTV set (in the settings at least) to static 192.168.0.164 and to look at 192.168.0.1 for DNS requests. I've thought about changing that to 8.8.8.8 or one of OpenDNS's address, I'm just not sure how to add a second (redunat backup) if the first DNS cache is down.

Hi mattbatt,

You have already configured the router to give the mythtv box 192.168.0.164. It would probably be easier to configure the mythtv box for dynamic IP and let DHCP do the rest. The router will give the mythbox the desired IP (192.168.0.164) plus all the required DNS, next-hop, etc.

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
PostPosted: Thu Jul 24, 2014 6:54 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
mattbatt wrote:
Yes that is what is confusing me as well the router is reserving 192.168.0.164 for my NIC's MAC address and I have MythTV set (in the settings at least) to static 192.168.0.164 and to look at 192.168.0.1 for DNS requests. I've thought about changing that to 8.8.8.8 or one of OpenDNS's address, I'm just not sure how to add a second (redunat backup) if the first DNS cache is down.

You need to choose either static or DHCP. Right now your setup is (sort of) both. With BOOTPROTO set to static your myth box won't start dhcpcd automagically.

alien wrote:
Hi mattbatt,

You have already configured the router to give the mythtv box 192.168.0.164. It would probably be easier to configure the mythtv box for dynamic IP and let DHCP do the rest. The router will give the mythbox the desired IP (192.168.0.164) plus all the required DNS, next-hop, etc.

^^ This :wink:


Top
 Profile  
 
PostPosted: Thu Jul 24, 2014 9:31 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
Quote:
You need to choose either static or DHCP. Right now your setup is (sort of) both. With BOOTPROTO set to static your myth box won't start dhcpcd automagically.

I guess what I'm confused about is why I have to run dhcpcd at all? I literally just replaced the computer last month, It's the same router the same IP same settings and now it's not working. Sure I can set it to DHCP that's an adequate band-aid but I was trying to figure out where I went wrong.

Thanks for the help guys.

_________________
My System


Top
 Profile  
 
PostPosted: Fri Jul 25, 2014 6:19 am 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
Dhcp service is easier to manage. Typically servers and printers have static ips and the computers get put into the dhcp pool. When you have a large network it's a impossible to have to remember all the ips so you do not have a conflict. Dhcp can run on a server or a router. Sometimes the router stores the mac address of the nic. It you replace the device (ie new nic) the mac might need to be removed and then recreate the device.....


Top
 Profile  
 
PostPosted: Fri Jul 25, 2014 6:53 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
mattbatt wrote:
I guess what I'm confused about is why I have to run dhcpcd at all?
You don't. But you have to choose one or the other, and adjust settings based on that decision.
mattbatt wrote:
Sure I can set it to DHCP that's an adequate band-aid but I was trying to figure out where I went wrong.
It's not a bandaid at all, it's one standard option. Where you went wrong was setting it for static, but not providing the necessary information for DNS servers in your resolv.conf (if you want it to have a static IP), or setting it for static when you really want it to use DHCP and let the DHCP server provide all the necessary information.

It's an either-or choice. Since you already have the router set to provide the myth box a certain IP address, seems the easiest thing would be to let DHCP do it's job. If you choose to go with a static address make sure it's not within your DHCP range.


Top
 Profile  
 
PostPosted: Sat Jul 26, 2014 1:11 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Mattbatt,
looks like things are setup correctly, but by running dhcpcd it has messed up the settings for resolv.conf.

run:
sudo systemconfig.py -m network

and it should fix it up for you.

To verify look at /etc/resolv.conf to make sure the correct values are present.
Also make sure that dhcpcd is not running on the system, otherwise it will continue to muck up that file.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu