LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2010, 08:47 PM   #1
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Rep: Reputation: 0
Slackware VM - hostname not resolving


I have a version of slackware installed as a virtual machine and am not able to ping hosts or otherwise receive data from any IP addresses external to the LAN. I think this problem is due to the hostname of the vm not being recognized by the gateway (ddwrt); the vm receives an IP via dhcp but the gateway does not seem to recognize its hostname (registers as *).

Will readily respond with whatever conf file is needed.
 
Old 01-28-2010, 08:59 PM   #2
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
First thing to know is what Virtualization product are you using. Another thing to consider is if your Virtual Machine is setup to use a NAT network card or a Bridged network card. NAT will give out a private IP to communicate with the Host machine only. Bridged will obtain an IP from your network DHCP server.
 
Old 01-28-2010, 09:17 PM   #3
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
I am using VMWare Workstation 7.0 and my virtual NIC is set to bridged. I should have mentioned in the original post that I can connect via NAT.
 
Old 01-28-2010, 09:24 PM   #4
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
It makes Sense that it will work via NAT. When you use NAT vmware will give a private IP address to access the Host machine and other NAT machines. It will then do any external traffic via the Host machine's network configuration.

When you use Bridged, the VM acts as if it is a separate machine and not a VM on the Host machine. Therefore all network traffic is done on it's own with your Physical Network. check your settings in /etc/network/interfaces. You may need to specify a gateway on dns servers.
 
1 members found this post helpful.
Old 01-31-2010, 09:25 PM   #5
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
The file you listed is not present; instead I have listed my rc.inet1.conf and hosts files:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=BARRIER05
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
##WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=7B1ABEEB5D197741923ED26727569C365E31212096A0EAFAD563B268BAD01CAF TxRate=0"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="ndiswrapper"

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name nstead of
# the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
#DHCP_KEEPRESOLV[4]="yes" # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes" # If you don't want the DHCP server to change
# your default gateway
#DHCP_IPADDR[4]="" # Request a specific IP address from the DHCP
# server
#WLAN_ESSID[4]=DARKSTAR # Here, you can override _any_ parameter
# defined in rc.wireless.conf, by prepending
# 'WLAN_' to the parameter's name. Useful for
# those with multiple wireless interfaces.
#WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=thekey TxRate=0"
# Some drivers require a private ioctl to be
# set through the iwpriv command. If more than
# one is required, you can place them in the
# IWPRIV parameter (space-separated, see the
# example).

-------------------------------------

hosts:
127.0.0.1 localhost
127.0.0.1 bt.localhost bt

Also here are the results of my ping

PING google.com (74.125.95.105) 56(84) bytes of data.

--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2000ms
 
Old 01-31-2010, 10:06 PM   #6
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
All of your wireless config settings are commented out. Deleted the leading # on the following lines to make them look like this
Code:
## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]="icculus-wireless"
DHCP_KEEPRESOLV[4]="yes"
DHCP_KEEPNTP[4]="yes"
DHCP_KEEPGW[4]="yes"
DHCP_IPADDR[4]=""
WLAN_ESSID[4]=BARRIER05
WLAN_MODE[4]=Managed
WLAN_RATE[4]="54M auto"
LAN_CHANNEL[4]="auto"
WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=7B1ABEEB5D197741923ED26727569C365E31212096A0EAFAD563B268BAD01CAF TxRate=0"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="ndiswrapper"
Try running ifconfig and see what your IP address is. Looks like to me you are not actually pulling an IP because your network settings are commented out. Interesting thing is that it knows what IP matches google.com even though it can not connect. Do you have a local DNS server?
 
Old 01-31-2010, 10:21 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
vmware doesn't (to the best of my knowledge) offer virtualised
WiFi cards to guests. What he wants to edit is the first eth section.
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
And the gateway
Code:
# Default gateway IP address:
GATEWAY=""
and then the /etc/resolv.conf
 
Old 02-02-2010, 12:20 AM   #8
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
What am I to enter into the three sections? Here is my /etc/resolv.conf

Code:
# Generated by dhcpcd for interface eth0
nameserver 192.168.1.1
 
Old 02-02-2010, 04:12 AM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hmmm ... if resolv.conf looks like that you're most likely getting a lease
from a router. Funny that it shouldn't set-up a default route via the
DHCP response, though.


What does 'route' - executed w/o parameters - tell you?



Cheers,
Tink
 
Old 02-09-2010, 07:40 PM   #10
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
results of route:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default DD-WRT 0.0.0.0 UG 0 0 0 eth0


Sorry it took so long to get back.
 
Old 02-09-2010, 08:43 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
OK, that's all wrong ... 0.0.0.0 is not a valid IP address,
if your router announces itself as that I'm not surprised
you're not getting anywhere. Looks to me like the router
is misconfigured.
 
Old 02-15-2010, 10:14 PM   #12
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
All of the other devices on the LAN receive IPs successfully, including two windows boxes and a debian distro..... I'm considering giving up on Slackware altogether...
 
Old 02-16-2010, 12:53 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Are "all the other boxes" virtualised, too? What's the host OS?
 
Old 02-16-2010, 01:25 PM   #14
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by Tinkster View Post
OK, that's all wrong ... 0.0.0.0 is not a valid IP address,
if your router announces itself as that I'm not surprised
you're not getting anywhere. Looks to me like the router
is misconfigured.
Yes. Might be informative to set DEBUG_ETH_UP="yes" in /etc/rc.d/rc.inet1.conf and see what shows in the logs after reboot or
Code:
/etc/rc.d/rc.inet1 eth0_restart
Isn't there a config file to control which parameters are accepted from the DHCP server? Might be possible to prevent accepting the default route using that and configure the desired one in /etc/rc.d/rc.inet1.conf using GATEWAY.
 
Old 02-20-2010, 10:47 PM   #15
dilzniksan
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Are "all the other boxes" virtualised, too? What's the host OS?
Pardon me. The "other boxes" are actual physical devices.

The host OS for the VM that I am troubleshooting is XP 64.

If the router is announcing an incorrect IP? How can I correct this?

I know this is getting off topic, but I am using a Buffalo WHR-HP-G54 with DDWRT v24. I have just created another vm and the router is announcing itself as 0.0.0.0 there as well...

I may be retitling this thread.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My hostname is NOT resolving correctly cucolin@ Linux - Networking 5 08-29-2007 11:22 AM
locally resolving hostname Hewson Linux - Networking 3 05-16-2007 07:44 PM
Resolving a hostname from it's ip? Infernal211283 Linux - Networking 3 01-09-2006 06:09 AM
hostname updated, but not resolving ericnmu Linux - Networking 5 09-09-2004 06:34 AM
Resolving Hostname on Slackware MrCarl Linux - General 3 11-05-2003 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration