Problem configuring network in FreeBSD 9.1 under Windows 8 Hyper-V

I set up a new VM with a Legacy Network Adapter. Installed the OS, logged in as root, edited etc/rc.conf by adding IP, netmask, gateway under de0 network adapter. Rebooted, logged in, pinged google.com and got nothing.

Am I missing any steps? Has someone tried this before under Windows 8?
 
Try something more than a ping, like fetch(1). Microsoft likes to filter ICMP packets. Or it could be DNS, you don't mention editing /etc/resolv.conf. If there is an error message, please post it.
 
You are right I haven't touched resolv.conf because I don't see it under /etc/. What should I do?

Also how does one find correct IP, netmask, gateway and DNS info for configuring rc.conf and resolv.conf under Hyper-V if my VM accessing Internet through synthetic switch?
 
Those should be found in the configuration/documentation of the virtual machine, FreeBSD can not guess them if DHCP is not used.
 
WinBSD said:
You are right I haven't touched resolv.conf because I don't see it under /etc/. What should I do?

Create it. All it really requires are nameserver entries. See resolv.conf(5).

Also how does one find correct IP, netmask, gateway and DNS info for configuring rc.conf and resolv.conf under Hyper-V if my VM accessing Internet through synthetic switch?

That depends on your network and VM host. If the VM is using a bridged adapter, it'll be just like setting up a real machine on the same network.
 
Here guys, I am making it easier for you to help me. Below is the screenshot of my system with all the necessary windows open, take a look at it and see if anything obvious pops up. It has been one week since I've been trying to set up internet connection and I am almost ready to give up. http://i.imgur.com/gbcL3m0.jpg
 
duplicate IP?

Hello, the screenshots suggest that you use duplicate IPs for Windows and Freebsd FreeBSD, can you assign another IP in ifconfig?
 
Re: Problem configuring network in FreeBSD 9.1 under Windows

Sorry to bump this thread, but it seems I've got to the same spot as the TS.

FreeBSD 9.2 installed under Windows 2012 R2 Hyper-V and is unable to get an IP assigned by DHCP. I used the Hyper-V legacy network card as the normal card AFAIK isn't recognised by FreeBSD. I've also tested NetBSD and run into almost the same issue (although there DHCP succeeded in about one attempt out of four).

On the local net I've got an ISP fiber router box (Telia) with DHCP, which is the default gateway, and a Windows server with AD, DNS and DHCP. Thus there are two DHCP servers, but in different ranges. It seems BSDs prefer the router server. So, to the freebsd FreeBSD machine it should appear as the only thing between itself and the Internet is the router box (although it's only a Hyper-V virtual machine on my WIndows workstation ;))

If I use a static IP, I get route failures "no route to host".

I wonder if anyone has an idea what is wrong here. Does FreeBSD 9.2 contain the Hyper-V support code released from Microsoft? If not, do you think it would solve the above problem? What about Hyper-V support code in FreeBSD-CURRENT?

My /etc/rc.conf:
Code:
hostname="vmaxfreebsd.syrenet.home"
keymap="swedish.iso.kbd"
ifconfig_de0="DHCP"
# ifconfig_de0=" inet 192.168.1.82 netmask 0xffffff00"
# defaultrouter="192.168.1.1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
allscreens_flags=MODE_279

My /etc/resolv.conf:
Code:
# Generated by resolvconf
search lan
nameserver 192.168.1.1
nameserver 192.168.1.5
nameserver 195.67.199.9

ifconfig output:
Code:
de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:15:5d:01:0e:0b
	inet 192.168.1.82 netmask 0xffffff00 broadcast 192.168.1.255
	inet6 fe80::215:5dff:fe01:e0b%de0 prefixlen 64 scopeid 0x1
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX)
	status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

netstat
Code:
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.1        UGS         0        0    de0
127.0.0.1          link#2             UH          0        0    lo0
192.168.1.0/24     link#1             U           0       14    de0
192.168.1.82       link#1             UHS         0        0    lo0
 
Back
Top