# Network config don't work on FreeBSD but work on Ubuntu/Debian/OpenBSD; why ?



## zyzuz (Mar 28, 2012)

Hello to all, guys, I'm new here.

I recently b*ought* a VPS from an Austrian provider, _I_ cho*se* the VPS in the ZÃ¼rich (Switzerland) datacenter. For the beginning *I*'m connecting to the VPS with VNC, just for initial install. I asked the hosting provider for freebsd FreeBSD and he said yes; the hosting provider specifically states that freebsd FreeBSD is installable: it's a KVM VPS what *I* b*ought*.

*M*oreover, before all, *I* have done some tests on my local virtual machine obviously, and all is fine, including network configuration (*I* mean *I* can configure correctly all). I am not an expert user, but *I* know what *I* need to start a box, for the moment.

Ok, this is where small things comes to big problems: when *I* finally wanted to install freebsd FreeBSD 8.2 from bootonly i386 iso, obviously *I* w*as* going so fast because *I* knew how to. However when *I* came to the network configuration. A disaster!  *P*roblem is that using data provided by hosting, the NIC does not work! 

The sysinstall say*s*: 
	
	



```
cannot resolve hostiname ftp.freebsd.org
```

*I* tried with many different FTPs, and the following option "ftp", "ftp passive" "ftp http proxy", but nothing, it won't work, for what *I* can understand, it seems a DNS problem. However there is a surprise: to do a check/test *I* tried to install instead OpenBSD and Ubuntu, and surprise surprise in both cases the  network configuration provided worked! Obviously when *I* installed Ubuntu and OpenBSD, *I* did ping localhost, the gateway provided from the hosting, *I* did ping the ipv4 from my local machine and also from the vps itself.  Just to be sure that it isn't the network configuration provided to be wrong.

Just to specify: *I* have 2 Realtek NICs (detected as re0 and re1). I obviously checked both with the config provided from the hosting provider.

Finally this is the configuration *I* inserted every time:

```
host: server0.*******.com
domain: *******.com
gateway: 178.***.***.1
ipv4 address: 178.***.***.28
netmask: 255.255.255.0
dns: (not provided by the hosting, [B]I[/B] used external DNS resolver, [B]I[/B] tried both OpenDNS and Google DNS)
```

Note: this configuration worked on OpenBSD and Ubuntu. Why does it not work on FreeBSD?

So it is or it isn't a DNS problem?  And how could *I* solve this matter?

*P*lease help! 

*I* love freebsd FreeBSD (*I* prefer it over OpenBSD/NetBSD and other linux distros)


----------



## SirDice (Mar 28, 2012)

If you can ping the gateway it's most likely a DNS issue. You probably didn't enter the DNS servers correctly in /etc/resolv.conf.


----------



## zyzuz (Mar 28, 2012)

Thank you for your reply.

Indeed, I have entered 2 different DNS (Google DNS and OpenDNS) but it just won't work. The problem is that I'm using sysinstall.

How can I install the minimal base system (I have only the bootonly ISO), and then set ftp connection, all via shell (no sysinstall)?


----------



## aa (Mar 28, 2012)

Have you tried ftp to IP address directly? DNS is used (mainly) ONLY for translating name to address, pinging gateway (or any IP addresses) or changing ftp mode doesn't mean anything about DNS problem.

You should check your output of *ifconfig* first. Throw them..


----------



## zyzuz (Mar 28, 2012)

aa said:
			
		

> Have you tried ftp to IP address directly? DNS is used (mainly) ONLY for translating name to address, pinging gateway (or any IP addresses) or changing ftp mode doesn't mean anything about DNS problem.



Ok.. And how can I ftp to IP address, using *sysinstall*?




			
				aa said:
			
		

> You should check your output of *ifconfig* first. Throw them..



How can I check the output of *ifconfig*, using *sysinstall*?

I don't know how to quit the *sysinstall* GUI, and use the shell then. If you (or someone else) can explain it to me, then I can check and see why the VPS can't resolve hostnames. Thank you every one, I appreciate your help.


----------



## ondra_knezour (Mar 29, 2012)

zyzuz said:
			
		

> How can I check the output of ifconfig, using sysinstall?



As far as I can rememeber, there is emergency terminal started during FreeBSD setup, sysinstall is running at first console, install output on second and emergency terminal on fourth? Try to switch to another console with Alt + [F1, F2, F4] for 1st, 2nd and 4th.


----------



## zyzuz (Mar 29, 2012)

Thank you! I will check and I hope I can pass over this damn problem


----------



## zyzuz (Mar 30, 2012)

*problem solved*

So, I found that while configuring the network interface with the sysinstall, re0 and re1 net interfaces had to be put down for some reason. What's happened after, has given to me the (re)solution of the problem.

I rebooted the system in verbose or safe mode (I don't remember) and the system has frozen, so I had to restart the VPS via the control panel provided by the hosting provider. While restarting the VPS, I noticed that there were additional informations in the page. In addition to the various information that I already knew (IP address of the host, Gateway IP address, HDD space, Bandwidth, and so on) I noticed these additional lines:


```
Nameserver:	 91.***.204.*** / 91.***.205.***		
 
IPv6 Address:	 2a02:***:***:***:178:***:28:0/***		
Gateway:	 2a02:***:***::1		
Nameserver:	 2001:***:***::8*** / 2001:***:***::***4
```

These lines were put between yesterday and today because before they weren't there. I saw that page five times that day and they weren't there. So I thought: "You want to see that now it will work?". Then it just worked. I mean I inserted the new nameserver provided and the connection finally was working.

But it was not only this. I tried rebooting and choosing instead the public Google DNS (8.8.8.8) and surprise, now it was working it too! How is this possible?

So it really was a DNS problem, but it wasn't caused by me, it was some network problem _I_ presume, because before no DNS was working and now whatever DNS just works fine, and for both NICs. I have lost one entire week tr*y*ing to figure out what was the problem and now, surprise, the problem was no more there. I suspect sysadmins did something at the nework level because *I* advised them that installing FreeBSD things were not working.

So *I* have solved the problem. I hope that anyone who experience my same problem does not get lost for one entire week without understanding the cause of this problem like me.

Peace And Love to All. Bye!


----------

