Hello
Could you help to figure out the problem about settings of IP-addresse of network interface.
There are:
Host: Windows 7, VirtualBox 4.2.12 r84980
Virtual machine: FreeBSD 11.1
Network interfaces:
1) bridge mode (em0)
2) internal mode (em1)
I add a local IP-address for network interfases of FreeBSD by:
The network works:
AND:
Then I add the lines in file /etc/rc.conf:
...and restart networking(
After that the network interfaces lose all settings about IP-address:
Why it happens and how to fix it?
Could you help to figure out the problem about settings of IP-addresse of network interface.
There are:
Host: Windows 7, VirtualBox 4.2.12 r84980
Virtual machine: FreeBSD 11.1
Network interfaces:
1) bridge mode (em0)
2) internal mode (em1)
I add a local IP-address for network interfases of FreeBSD by:
ifconfig em0 192.168.1.200 255.255.255.0
The network works:
Code:
root@gate:~ # ifconfig -a
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:25:36:b2
hwaddr 08:00:27:25:36:b2
inet 192.168.1.200 netmask 0xffffff00 broadcast 255.255.255.0
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:e5:b5:7e
hwaddr 08:00:27:e5:b5:7e
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
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 0x3
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
Code:
root@gate:~ # ping 192.168.1.200
PING 192.168.1.200 (192.168.1.200): 56 data bytes
64 bytes from 192.168.1.200: icmp_seq=0 ttl=64 time=0.032 ms
64 bytes from 192.168.1.200: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from 192.168.1.200: icmp_seq=2 ttl=64 time=0.054 ms
^C
--- 192.168.1.200 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.032/0.048/0.058/0.011 ms
-------------------
Code:
Ifconfig_em0="inet 192.168.1.200 netmask 255.255.255.0"
Ifconfig_em1="inet 172.16.0.1 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
/etc/rc.d/netif restart
) or reboot the system. After that the network interfaces lose all settings about IP-address:
Code:
em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:25:36:b2
hwaddr 08:00:27:25:36:b2
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 08:00:27:e5:b5:7e
hwaddr 08:00:27:e5:b5:7e
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
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 0x3
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo