# network does not start automatically



## Pluribootent (Jan 17, 2011)

A week ago I had to exchange my old mainboard by a new one:
old: Gigabyte GA-MA770T-UD3P:Chipset: AMD 770/SB710
new: Gigabyte GA-870A-UD3:Chipset AMD 870/SB850

Since then, when I start freebsd, I have no network connection. I have to 
	
	



```
/etc/rc.d/netif restart
```
and
	
	



```
/etc/rc.d/routing restart
```
almost everytime. That goes for fixed IP and for DHCP.

I never had to do that with my old motherboard. Is it my hardware?

Thank you!


----------



## wblock@ (Jan 17, 2011)

Fixed IP should always work, although you might not be setting something.  DHCP may need to be changed to SYNCDHCP.  Without seeing at least /etc/rc.conf, it's hard to tell.


----------



## Pluribootent (Jan 17, 2011)

of course, sorry:

```
# cat /etc/rc.conf

# -- sysinstall generated deltas -- # Fri Jul 23 00:57:29 2010
# Created: Fri Jul 23 00:57:29 2010
# 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="iso-8x14"
font8x16="iso-8x16"
font8x8="iso-8x8"

#ifconfig_re0="DHCP"

ifconfig_re0="inet 192.168.3.33  netmask 255.255.255.0"
defaultrouter="192.168.3.1"
hostname="freebsd.box.org"

ipv6_enable="YES"

keymap="german.iso"
scrnmap="iso-8859-1_to_cp437"

hald_enable="YES"
dbus_enable="YES"

linux_enable="YES"

webcamd_enable="YES"

#gdm_enable="YES"
#gnome_enable="YES"
```


----------



## wblock@ (Jan 17, 2011)

The net says it has a Realtek 8111D.  The static setup looks fine.  What happens when it doesn't work?

For DHCP, remove the defaultrouter line and just use

```
ifconfig_re0="SYNCDHCP"
```


----------



## Pluribootent (Jan 18, 2011)

Did some testing with fixed IP:

FreeBSD hangs on boot displaying 
	
	



```
Starting avahi-dnsconfg
```
for quite some time and then continues. No internet available, but ->

```
# ifconfig
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:15:fc:1c:6f:65
	ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	lladdr 0.15.fc.a2.0.1c.6f.65.a.2.ff.fe.0.0.0.0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
	ether 1c:6f:65:82:f8:97
	inet 192.168.3.33 netmask 0xffffff00 broadcast 192.168.3.255
	inet6 fe80::1e6f:65ff:fe82:f897%re0 prefixlen 64 scopeid 0x3 
	nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet 127.0.0.1 netmask 0xff000000 
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
	nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
```
pinging google:

```
--- www.l.google.com ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
```
restart routing: no internet
restart netif: no internet
restart routing: sucess: internet available

I will test that with DHCP and post the results, thanks for your help so far, wblock.

I also have Slackware installed on that machine and the network didnt work in 2 out of 6 boots. 
Is it possible that the networkadapter isn't working correctly, hardware issue? But then again, I haven't had issues with Gentoo, which is also on this machine. Maybe kernel-related?


----------



## wblock@ (Jan 18, 2011)

What do you mean by "no internet"?  Please describe in detail.  The ifconfig output looks fine.  The avahi-dnsconfig delay points right at DNS, and that could cause "no internet" also.  Please show the contents of /etc/resolv.conf

Because other operating systems had trouble, that suggests the problem is upstream of that computer.


----------



## Pluribootent (Jan 27, 2011)

By "no internet" I mean I cannot access the internet through the browser and also pinging e.g. http://www.google.com tells me I haven't got a connection.

I wrote down how many times I can boot my system and how many times I had no connection.
In average 1 out of 5 boots have a missing connection (that's booting FreeBSD)

I use several OS on my machine parallel (WinXP, Win7, Gentoo, Slackware, ArchLinux, openSUSE, FreeBSD) and it turns out that only Slackware and FreeBSD have that problem. It never occured in any of the other OS. I booted everyone about 20 times for testing. Of course that isn't really a significant statistic, but thats as far as I got upto now.

The most annoying thing is, that sometimes FreeBSD just hangs on boot displaying 
	
	



```
freebsd.box.org
```
which is the name of my machine. I waited for very long (20min.) and finally turned off the machine. I have to then do fsck_ufs on all harddisks afterward which is very timeconsuming, because they havent been unmounted and therefor the filesystemcheck fails on the following boot.

My test sort of tells me that it might not be hardwarerelated, because the network on other OS worked fine. I don't know. I'm not really an expert, that is all just guessing.

Thank you for your time.


----------



## wblock@ (Jan 27, 2011)

To debug this, you must show exactly what happens when you have "no internet".  Give error numbers and exact text.  This would help to narrow down whether it's DNS or something else.

ping is not a good test of outside networks, because many ISPs either block or don't pass through some types of ICMP packets.

You can probably break out of the long delay with a control-c.  It's common with DNS problems.  I'd bet also that you don't have an entry for your hostname in /etc/hosts.


----------

