Interface does not exist

I have FreeBSD running in a Hyper-V VM that is set up with multiple virtual switches. I am now trying to get multiple virtual networks setup in FreeBSD. I was able to instantiate the first virtual network, hn0, using:

root@freebsd:~ # sudo ifconfig hn0 inet 10.0.0.2 netmask 255.255.255.0

I have since implemented this in rc.conf so that it instantiates when I startup FreeBSD. However upon trying to setup a second virtual network, hn1, I get an error:

Code:
root@freebsd:~ # sudo ifconfig hn1 inet 10.0.2.3 netmask 255.255.255.0
ifconfig: interface hn1 does not exist

Does anyone know why the first would work fine, but not the second? Any suggestions for how to get more than one virtual network setup?

I'm using FreeBSD version 12.0 and Hyper-V version 10 in Windows 10.

Thanks for the help.
 
Last edited by a moderator:
You need first to add a second network adapter from your Hyper-V Host. This second network adapter will show inside your virtual machine as hn1. You can check it using ifconfig. Also when you are logged as root you don't have to use sudo
 

Attachments

  • 1553935164698.png
    1553935164698.png
    42.4 KB · Views: 301
Back
Top