Networking W/ Freebsd Under Vmware?


Recommended Posts

Hi,

I am attempting to install FreeBSD 4.7 under VMWare, and I have a question - I'm using NAT for the network card in my virtual machine, and I am having trouble with getting it to connect to the internet.

Just a little bit of info on what I have tried so far:

Everything's installed, VMWareTools are installed (so X runs fine)

I accidentally installed IPv6, although my host OS doesn't support it yet (I told it to use DHCP... how can I remove IPv6?)

I see two actual network cards: faith0 and lnc0 (I believe those are the correct terms)... which of these should I be using and how can I set them up?

Thanks - I've tried reading all over the FreeBSD site and on man pages but I was unable to find anything on my problem (most likely it's a VMWare issue (?) )

Link to comment
Share on other sites

>> I accidentally installed IPv6

>> how can I remove IPv6?

You mean, you accident enabled it. IPv6 is already include FreeBSD, which you just enable or disable it. Check in the /etc/rc.conf and delete whole IPv6 lines there.

>> I see two actual network cards: faith0 and lnc0 (I believe those are the correct terms).

You have two nics for real?

>> which of these should I be using?

Good question, it's up to your choice. You pick, if you have two nics for real. Why need two nics if you are going to use a nic? Just pick one that support higher Mbps or more trust.

BTW: What kind of nics do you have?

>> how can I set them up?

man rc.conf

man 8 ifconfig

/etc/defaults/rc.conf (do NOT edit this file, it's an example file for /etc/rc.conf)

http://www.freebsd.org/doc/en_US.ISO8859-1...primer/c30.html (Keep click next when you finish read each page.)

http://www.freebsd.org/doc/en_US.ISO8859-1...figuration.html

If you still want to use DHCP:

man rc.conf

/etc/defaults/rc.conf (do NOT edit this file, it's an example file for /etc/rc.conf)

http://www.freebsd.org/doc/en_US.ISO8859-1...dbook/dhcp.html

>> most likely it's a VMWare issue?

I don't know, I never use nor learn VMWare. I just guess, it has nothing to do with VMWare.

Link to comment
Share on other sites

Kay, thanks for the info about IPv6 :)

I have only one nic in my VMWare virtual machine (and one in my real one)... the vm nic is configured to use NAT...

Thanks for those man pages/links - I will look at them tomorrow and see how they work...

:D

Link to comment
Share on other sites

Mezz: Thank you so much for your help :cool:

I got *somewhat* further than I was before;

IPv6 is disabled, and I can now ping other machines on the LAN.

However, when starting x/kde, it says: "Can't get own hostname. Your system is severely misconfigured"

I tried editing rc.conf, to no avail... can you please offer some suggestions as to what I can do next? thanks.

Link to comment
Share on other sites

>> However, when starting x/kde, it says: "Can't get own hostname. Your system is severely misconfigured"

>> can you please offer some suggestions as to what I can do next?

Edit the /etc/hosts, it should solve your problem.

Ex: My /etc/rc.conf's hostname is personal.mezzweb.com, so I just add in the /etc/hosts like this.. The LAN IP on this machine is 192.168.1.7. So, edit the /etc/hosts like this.

192.168.1.7 personal personal.mezzweb.com

or

127.0.0.1 localhost personal.mezzweb.com

or whatever what IP you can get it works. Myself, I am using local DNS server instead.

Your welcome,

Link to comment
Share on other sites

Again, thanks so much :)

However, I am still having problems with this thing ... (really sorry to keep bothering you)

I can connect to external IPs fine, but only if I specify the actual IP, no hostnames work...

Any ideas on how to get hostnames to resolve correctly?

Thanks

Link to comment
Share on other sites

Again, thanks so much :)

However, I am still having problems with this thing ... (really sorry to keep bothering you)

I can connect to external IPs fine, but only if I specify the actual IP, no hostnames work...

Any ideas on how to get hostnames to resolve correctly?

Thanks

Yeah, list the contents of your /etc/host.conf file here. :yes:

Link to comment
Share on other sites

# First comment has info re: FreeBSD version (4.7-RELEASE)

# First try the /etc/hosts file

hosts

# Now try the nameserver next.

bind

# If you have YP/NIS configured, uncomment the next line.

# nis

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

here is /etc/hosts:

127.0.0.1 localhost flipkid.flipflop

Link to comment
Share on other sites

# First comment has info re: FreeBSD version (4.7-RELEASE)

# First try the /etc/hosts file

hosts

# Now try the nameserver next.

bind

# If you have YP/NIS configured, uncomment the next line.

# nis

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

here is /etc/hosts:

127.0.0.1 localhost flipkid.flipflop

okay, in /etc/host.conf change the line that has:

hosts

to

#hosts

and the DNS should work.

and also make sure your /etc/resolv.conf has the search domain for the first line... followed by the order of DNSes you're using...

Here's mines for example... You can keep adding nameserver lines since it will do it in the order it's listed.

domain WURLDLINK.NET

nameserver 216.235.52.2

nameserver 216.235.52.1

Link to comment
Share on other sites

What do your /etc/hosts and /etc/rc.conf look like? Can you post them? You might have done something wrong. Your problem is well known, which you just need to correct the /etc/hosts.

Link to comment
Share on other sites

Thanks guys - sorry for the late reply (was gone for the last few days).

Here are the contents of /etc/hosts, /etc/host.conf, /etc/rc.conf and /etc/resolv.conf

/etc/hosts:

127.0.0.1 localhost flipkid.flipflop

192.168.146.128 flippitiy flipkid.flipflop

- 192.168.146.128 is the lan ip of the virtual machine.

/etc/host.conf:

# First comment has info re: FreeBSD version (4.7-RELEASE)

# First try the /etc/hosts file

# hosts

# Now try the nameserver next.

bind

# If you have YP/NIS configured, uncomment the next line.

# nis

/etc/rc.conf:

# -- sysinstall generated deltas -- # Sat Nov 30 21:29:15 2002

# Created Sat Nov 30 21:29:15 2002

# Enable network daemons for user convenience

# Please make all changes to this file, not to /etc/defaults/rc.conf

# This file now contains just the overrides from /etc/defaults/rc.conf

font8x14="NO"

font8x16="NO"

font8x8="NO"

hostname="flipkid.flipflop"

ifconfig_lnc0="DHCP"

ipv6_enable="NO"

kern_securelevel_enable="NO"

linux_enable="YES"

moused_enable="NO"

moused_port="/dev/psm0"

moused_type="auto"

nfs_reserved_port_only="YES"

sendmail_enable="YES"

sshd_enable="YES"

usbd_enable="YES"

inetd_enable="YES"

/etc/resolv.conf

search localdomain

nameserver 192.168.146.2

Thanks again for all your help mezz, Almighty1 :)

Link to comment
Share on other sites

/etc/hosts:

127.0.0.1 localhost flipkid.flipflop

192.168.146.128 flippitiy flipkid.flipflop

- 192.168.146.128 is the lan ip of the virtual machine.

It looks fine..

/etc/host.conf:

# First comment has info re: FreeBSD version (4.7-RELEASE)

# First try the /etc/hosts file

# hosts

# Now try the nameserver next.

bind

# If you have YP/NIS configured, uncomment the next line.

# nis

Do you have BIND (named) running as DNS server? I doubt it, so I suggest you to bring hosts back. hosts is need.

/etc/rc.conf:

# -- sysinstall generated deltas -- # Sat Nov 30 21:29:15 2002

# Created Sat Nov 30 21:29:15 2002

# Enable network daemons for user convenience

# Please make all changes to this file, not to /etc/defaults/rc.conf

# This file now contains just the overrides from /etc/defaults/rc.conf

font8x14="NO"

font8x16="NO"

font8x8="NO"

hostname="flipkid.flipflop"

ifconfig_lnc0="DHCP"

ipv6_enable="NO"

kern_securelevel_enable="NO"

linux_enable="YES"

moused_enable="NO"

moused_port="/dev/psm0"

moused_type="auto"

nfs_reserved_port_only="YES"

sendmail_enable="YES"

sshd_enable="YES"

usbd_enable="YES"

inetd_enable="YES"

Delete ipv6 and moused_*, because they are disable by default.

/etc/resolv.conf

search localdomain

nameserver 192.168.146.2

Delete search line, which you don't need it.

Ummm, you are using DHCP, so how about domain in the DHCP? What did you set it up? Myself, I never use DHCP, so I don't really know. I don't know if it's conflict or something else. I might suggest you to try post over at bsdforums.org to see if you will get the better answer than from me.

I don't really see reason why you need DHCP, when you have the network with the static lan IP.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.