# can't connect to internet



## psycho (Feb 9, 2010)

OK, I am fighting with this problem longer than week and I am thinking about suicide.

I have "ZyXEL Prestige 600 series" modem.
Modem is in routing mode.
I also have windows on other partition and Internet connection is working.

PROBLEM:
I installed FreeBSD 8.0 release.
Choosed "NO" to all questions after install!
When I boot into FreeBSD router seems to have all LED's active!
here is image of router *right after booting!*: http://img641.imageshack.us/img641/391/dsc06112.jpg

Also here is the output of "ifconfig -a" command *right after booting:*

```
re0: [B]flags=8802<BROADCAST,SIMPLEX,MULTICAST>[/B] metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 00:1a:92:34:04:9b
[B]media: Ethernet autoselect (10base/UTP <half-duplex>)
status: active[/B]
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>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
```

I can0t ping 192.168.1.1 (re0).
It gives error message: "no route to host"

output of "dmesg | grep re0" is :

```
re0:<Realtek 8169SC/8110SC Single-chip Gigabit Ethernet> port 0x9800-0x98ff me $
re0: Chip rev. 0x18000000
re0: Mac rev. 0x00000000
re0: Ethernet adress: 00:1a:92:34:04:9b
re0: [FILTER]
```

Anyway when I execute "dhclient re0" command* it gives this:*

```
DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 1
[B]No DHCPOFFERS received.
No working leases in persistent database - sleeping.[/B]
```

AFTER THIS COMMAND OUTPUT OF IFCONFIG -A and LED's on modem ARE CHANGING!

output of "ifconfig -a" *after "dhclient re0" command:*

```
re0: [B]flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>[/B] metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 00:1a:92:34:04:9b
[B]inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
media: Ethernet autoselect (none)
status: no carrier[/B]
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>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
```

and 10/100M LED on my modem after *"dhclient re0" command* becomes unstable.
It changes color to orange and turns *ON:*http://img683.imageshack.us/img683/4774/dsc06116m.jpg
and *OFF:http://img683.imageshack.us/img683/3168/dsc06117h.jpg*
all the time.
Please PLS PLS PLS help me, I don't know what to do


----------



## yavuzg (Feb 9, 2010)

did you try turning firewall of? May be it is blocking dhcp messages. 

if you are using pf,

> su
> /etc/rc.d/pf stop


----------



## SirDice (Feb 9, 2010)

10/100 LED is usually green when you have a 100Mbit connection, orange when it's 10Mbit and off for no connection. 

Ifconfig however shows *status: no carrier*. So something's not connecting right. Cable is ok?

How do you connect to the internet using windows? Is the network interface just set to "automatic address" and it works? Or is it connected to usb?

Also, one thing you could try. I've had a similar 'odd' issue with realtek :x
Booting windows and the NIC works fine, reboot to Freebsd and it won't budge. Nothing, no dhcp, not worky..
Turn the machine completely off, boot fbsd and it would work. Reboot to windows, fine. Reboot to fbsd, b0rked. I had to turn the machine completely off.


----------



## psycho (Feb 9, 2010)

SirDice:


> Ifconfig however shows status: no carrier. So something's not connecting right. Cable is ok?


Sure I'll check it. But then how is status: active  before trying dhclient re0?



> 10/100 LED is usually green when you have a 100Mbit connection, orange when it's 10Mbit and off for no connection.


I don't mind orange color too . What bothers me is that it's not stable. on,off,on,off ....



> How do you connect to the internet using windows? Is the network interface just set to "automatic address" and it works? Or is it connected to usb?


When I use Windows, my modem is connected to comp with USB cable.Interface is set to:
*IP adresses*
IP adress: 192.168.1.55
Subnet mask: 255.255.255.0
Default gateway: 192.168.1.1
*DNS server adress:*
Preferred DNS server: 212.39.98.162
Alternate DNS server: 212.39.98.161
But when using BSD i connect with RJ-45.


----------



## psycho (Feb 9, 2010)

yavuzg:


> did you try turning firewall of? May be it is blocking dhcp messages.
> 
> if you are using pf,
> 
> ...



nothing


----------



## SirDice (Feb 9, 2010)

psycho said:
			
		

> But then how is status: active before trying dhclient re0?


Status should be active *before* trying dhclient. Status active means the card detected a signal on the wire. Without a signal nothing will work.



> When I use Windows, my modem is connected to comp with USB cable.


That's what I thought 



> Interface is set to:
> *IP adresses*
> IP adress: 192.168.1.55
> Subnet mask: 255.255.255.0
> ...



What this probably means is that your modem/router isn't configured correctly. Follow the instructions for windows, make sure windows is able to use the internet using the ethernet cable instead of usb.


----------



## psycho (Feb 9, 2010)

SirDice:


> Follow the instructions for windows, make sure windows is able to use the internet using the ethernet cable instead of usb.


I'll try this. But how can this have effect on FreeBSD? pls explain i'm still noob.

And why isn't possible to use USB cable at freeBSD too?


----------



## SirDice (Feb 9, 2010)

psycho said:
			
		

> I'll try this. But how can this have effect on FreeBSD? pls explain i'm still noob.


Because your router will take care of connecting to the internet. It needs to be properly configured. It actually doesn't matter what OS the client runs, as long as it can use DHCP you should be able to get an Internet connection. Most ISPs will tell you how to configure your modem/router. It'll be easier to follow those when everything looks familiar (windows). 



> And why isn't possible to use USB cable at freeBSD too?


I did a quick search for your modem and I couldn't find a driver. It'll be simpler to make use of the capabilities of your modem/router. At least until you know more about networking, drivers and freebsd 

Once the network/dhcp works for Windows, it'll work for FreeBSD.


----------



## psycho (Feb 10, 2010)

tnx, I'll do my best to activate connection using RJ45 on win_xp.

and you know what is the most terrible thing here?
month ago I installed freebsd for the first time.
I simply plugged in RJ45,  executed "dhclient re0" command and got internet connection working.

That is why this is driving me crazy. I know it can be done , but still problem -.-

you can see my first thread for internet connection here:http://forums.freebsd.org/showthread.php?t=7745&page=2

if you look at the thread you'll see that output of for example "ifconfig -a" command is different comparing to my present situation.
You see , now I don't get tun0 interface in my "ifconfig -a" output, and it was before


----------



## psycho (Feb 10, 2010)

Ok, I called service (of my ISP) and they told me that in order to use this kind of cable (RJ45) I have to download driver for my network card.

do you think this is useful?


and yes I have 10mbit connection


----------



## FBSDin20Steps (Feb 10, 2010)

Is your modem configured as a DHCP server? Then it should give you an ip-address. Otherwise, try to use a static ip-address...


----------



## SirDice (Feb 10, 2010)

psycho said:
			
		

> Ok, I called service (of my ISP) and they told me that in order to use this kind of cable (RJ45) I have to download driver for my network card.


The card is already working fine, no driver needed. You need to concentrate on the configuration of the modem/router.


----------



## psycho (Feb 10, 2010)

SirDice:


> The card is already working fine, no driver needed. You need to concentrate on the configuration of the modem/router.


Where to start?

FBSDin20Steps


> Otherwise, try to use a static ip-address...


how to do this??


----------



## volatilevoid (Feb 10, 2010)

Did you get your router from your ISP? Then it's protected by an unknown password I guess. Otherwise, try to browse to http://192.168.1.1 in Windows. There you should find a web interface which allows configuration of the router.

Setting a static IP address can be done with `# ifconfig re0 inet 192.168.1.55 netmask 255.255.255.0`.


----------



## FBSDin20Steps (Feb 10, 2010)

volatilevoid said:
			
		

> Setting a static IP address can be done with `# ifconfig re0 inet 192.168.1.55 netmask 255.255.255.0`.



...or use sysinstall to set a static ip-address.


----------



## psycho (Feb 11, 2010)

volatilevoid:


> There you should find a web interface which allows configuration of the router.


Yes I know. I've done that configuration(by the manual), but still nothing. 

FBSDin20Steps & volatilevoid:


> Originally Posted by volatilevoid
> Setting a static IP address can be done with # ifconfig re0 inet 192.168.1.55 netmask 255.255.255.0.
> ...or use sysinstall to set a static ip-address.



i tried, it doesn't help. still "no carrier" status, still can't ping 192.168.1.1, still thinking about suicide...

cyanide would be good


----------



## SirDice (Feb 11, 2010)

psycho said:
			
		

> cyanide would be good


It isn't, it's a rather painful death. I would pick carbon-monoxide. 

Anyway, did you try a different ethernet cable? Does it work when you boot to windows?


----------



## psycho (Feb 11, 2010)

SirDice said:
			
		

> It isn't, it's a rather painful death. I would pick carbon-monoxide.
> 
> Anyway, did you try a different ethernet cable? Does it work when you boot to windows?


I'll try differnet cable, I think this is the last solution? i don't see anything else.
And no it doesn't work on windows because I don't have driver for network card, that's why I use usb cable + driver for modem


----------



## SirDice (Feb 11, 2010)

psycho said:
			
		

> And no it doesn't work on windows because I don't have driver for network card, that's why I use usb cable + driver for modem


http://www.realtek.com.tw/downloads...n=4&DownTypeID=3&GetDown=false&Downloads=true


----------



## psycho (Feb 11, 2010)

SirDice said:
			
		

> http://www.realtek.com.tw/downloads...n=4&DownTypeID=3&GetDown=false&Downloads=true


DARN! I downloaded driver and ehternet cable (RJ45) is working under Windows!
I was hoping that something is wrong with cable 
Any suggestions before I drink this cyanide?


----------



## FBSDin20Steps (Feb 11, 2010)

Can you show us your rc.conf and hosts...


----------



## psycho (Feb 11, 2010)

FBSDin20Steps said:
			
		

> Can you show us your rc.conf and hosts...



/etc/rc.conf:

```
#Comments bla 
#bla
#bla
keymap="hr.iso"
hald_enable="YES"
#sysinstall generated deltas -- #Wed Feb 10 22:01:56 2010
ifconfig_re0="inet 192.168.1.55 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
hostname="google.hr"
```

/etc/hosts:

```
::1             localhost    localhost.hr
127.0.0.1       localhost    localhost.hr
192.168.1.33    google.hr    google
192.168.1.33    google.hr.
```


----------



## SirDice (Feb 11, 2010)

psycho said:
			
		

> DARN! I downloaded driver and ehternet cable (RJ45) is working under Windows!



Ok. That's cool. At least we now have a working situation.

Now, keep everything connected as it is. Turn the machine completely off for a few seconds. Then turn it on and boot FreeBSD.

I'm now wondering what the output of [cmd=]ifconfig re0[/cmd] has to say. The link status (10/100 LED) on your modem should turn on. Status should indicate it's active. Now try [cmd=]dhclient re0[/cmd]. This should result in the interface getting an IP address. When that works edit /etc/rc.conf and make sure the following is in there:

```
ifconfig_re0="DHCP"
```


----------



## psycho (Feb 11, 2010)

SirDice said:
			
		

> Ok. That's cool. At least we now have a working situation.
> 
> Now, keep everything connected as it is. Turn the machine completely off for a few seconds. Then turn it on and boot FreeBSD.
> 
> ...


again, same thing.
when i boot, LED turned on, status active.
after dhclient command, LED becomes orange and unstable, status no carrier.

You know, I have some filling, that we could use something from my old old post, when I first time used freebsd and asked for help for internet connection.
here it is:http://forums.freebsd.org/showthread.php?t=7745&page=2

and there are some differences.
for example, in output of "ifconfig -a" some tun0 interface was detected and now not.
and also there are differences on re0 in that output


----------



## psycho (Feb 11, 2010)

any ideas??     Also check out my previous post (/etc/rc.conf and /etc/hosts)

Greetz


----------



## FBSDin20Steps (Feb 11, 2010)

Look at your files again...



			
				psycho said:
			
		

> /etc/rc.conf:
> 
> ```
> #Comments bla
> ...


----------



## psycho (Feb 11, 2010)

lol , your quote is different then my original post.
anyway there is no comment sign (#) on lines ifconfig_re0=...  ,  dedaultrouter=... , and those two last lines in /etc/hosts!
when I look at my original post, it is ok.


HELP MEeeeEEEEEEEEEEEEEEEE


----------



## DutchDaemon (Feb 11, 2010)

You were looking at a suggestion, psycho ...


----------



## psycho (Feb 11, 2010)

ahh sorry didn't got it.

ok i'll try to do it like that, but can some1 explan how did I got some interface named tun0 in my first try long time ago when executing "ifconfig -a" and now I don't get.
Maybe we could find solution here.


----------



## gkontos (Feb 11, 2010)

psycho said:
			
		

> ahh sorry didn't got it.
> 
> ok i'll try to do it like that, but can some1 explan how did I got some interface named tun0 in my first try long time ago when executing "ifconfig -a" and now I don't get.
> Maybe we could find solution here.



Have you ever installed openvpn ?


----------



## psycho (Feb 11, 2010)

no, is that some kind of firewall?


----------



## volatilevoid (Feb 11, 2010)

No, openvpn is a program to create virtual private networks (VPNs).

Any success with the suggestion from FBSDin20Steps?


----------



## psycho (Feb 11, 2010)

no, nothing

any suggestions ...

?


----------



## FBSDin20Steps (Feb 11, 2010)

Is your modem configured as a DHCP server?
Did you try another ether port on your modem?
Did you try another cable?
Did you reboot after my suggestion?


----------



## SirDice (Feb 11, 2010)

Lets see :e


			
				FBSDin20Steps said:
			
		

> Is your modem configured as a DHCP server?


Yes, we already verified that. It works for Windows.


> Did you try another ether port on your modem?


As I understood it there is no other port on that modem.


> Did you try another cable?


Suggested that but it turns out not needed as the same cable and setup works on Windows.


> Did you reboot after my suggestion?



Ah, yes. I suggested that earlier too, even turning the machine completely off. I'm assuming psycho did that 

Ok, "it works on windows" is no guarantee that it also works on FreeBSD but the basic set up, modem serving IP address, dhcp, seems to work. At least that's what I understood.  

This pretty much means it's the fbsd realtek driver.. To be honest I'm a bit lost right now. It is possible psycho has a slightly different chip revision. It does get detected though so I'm not sure why things go wrong. Another option maybe that the realtek gigabit card tries to auto detect speed/duplex settings and this freaks the modem out or vise verse.


----------



## FBSDin20Steps (Feb 11, 2010)

@SirDice
Yes, you certainly did all those suggestions...

A month ago his internet connection with FreeBSD was working. I assume he
is using the same network interface right now. He should check his modem configuration
as well as his configuration on FreeBSD. If he doesn't check his configurations, we will
be staring at our cristal balls...

Psycho save us... :e


----------



## volatilevoid (Feb 12, 2010)

I also was thinking about the card being the component to blame. psycho, do you have a spare card without a Realtek chip on it? If so, I'd give that a try. I read here that especially Realteks are a bit b*tchy.

It doesn't mean much that the card works under Windows - I had a nForce2 board some time ago and the Windows driver contained many hacks to fix hardware bugs...


----------



## psycho (Feb 12, 2010)

FBSDin20Steps said:
			
		

> A month ago his internet connection with FreeBSD was working. I assume he
> is using the same network interface right now. He should check his modem configuration
> as well as his configuration on FreeBSD. If he doesn't check his configurations, we will
> be staring at our cristal balls...
> ...


Yes I have the same network interface!

-----modem configuration------
Alright, when I enter 192.168.1.1 (in windows) it opens web configurator for modem.
And under maintenance tab I can se System status and DHCP table status.
so here it is:

```
System Status
 
System Name: P660RU-T1
ZyNOS F/W Version: V3.40(ST.4) | 8/26/2005
DSL FW Version:DMT FwVer: 3.1.0.3_B_TC, HwVer: T14F7_0.0
Standard:ADSL2PLUS
 
 
WAN Information
 
IP Address:62.113.25.68
IP Subnet Mask:255.255.255.255
Default Gateway:N/A
VPI/VCI:8/ 35
 
 
LAN Information
 
MAC Address:00:13:49:b3:2f:0c
IP Address: 192.168.1.1
IP Subnet Mask: 255.255.255.0
DHCP: Server
DHCP Start IP: 192.168.1.33
DHCP Pool Size: 32
```
 
and DHCP table:

```
Host NameIP   Address        MAC Address
windows-4986224   192.168.1.33   00-13-49-B3-2F-0D
windows-4986224   192.168.1.34   00-1A-92-34-04-9B
```

If you want to look it for real here it is:
System status: http://img4.imageshack.us/img4/6017/48472016.jpg
DHCP table: http://img62.imageshack.us/img62/1116/29346492.jpg

-------FreeBSD configuration---------
can you be more specific here.
what can I show you?? Just tell


----------



## FBSDin20Steps (Feb 12, 2010)

There is one thing missing in your previous posts...
Did you restart your zyxel modem?


----------



## psycho (Feb 12, 2010)

no!
should I do it?


----------



## FBSDin20Steps (Feb 12, 2010)

Not that it would give you a miracle, but it doesn't hurt anyone... :e


----------



## psycho (Feb 12, 2010)

Still nothing i reseted, everything is the same.
Come on guys, be like Dr. House, think think think and suddenly get some nice idea that will work ;D


----------



## FBSDin20Steps (Feb 12, 2010)

Can you show us for the last time what the out of dmesg and ifconfig is...


----------



## psycho (Feb 13, 2010)

FBSDin20Steps said:
			
		

> There is one thing missing in your previous posts...


what's missing?



			
				FBSDin20Steps said:
			
		

> Can you show us for the last time what the out of dmesg and ifconfig is...


Sure, here it comes in next post ;D


----------



## psycho (Feb 13, 2010)

ifconfig -a  :

```
re0: flags=[B]8843[/B]<[B]UP[/B],BROADCAST,[B]RUNNING[/B],SIMPLEX,MULTICAST>metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 00:1a:92:34:04:9b
[B]inet 192.168.1.55 netmask 0xffffff00 broadcast 192.168.1.255[/B]
[B]inet6 fe 80::21a:92ff:fe34:49b%re0 prefixlen 64 scopeid 0x1[/B]
media: Ethernet autoselect (none)
status:no carrier
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>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
```

dmesg | grep re0   :

```
re0:<Realtek 8169SC/8110SC Single-chip Gigabit Ethernet> port 0x9800-0x98ff [B]mem 0xdfcfe000-oxdfcfe0ff irq 20 at device 7.0 on pci 4[/B]
re0: Chip rev. 0x18000000
re0: Mac rev. 0x00000000
re0: Ethernet adress: 00:1a:92:34:04:9b
re0: [FILTER]
```


You see I bolded parts WHICH I DIDN't HAd befor (look at my first post) AND NOW I do!
Also, do you think that switching modem in Bridge mode and using PPPoE to try connect?!"
And FBSDin20Steps, what was missing in my previous post?


----------



## FBSDin20Steps (Feb 13, 2010)

I want your full dmesg...


----------



## psycho (Feb 13, 2010)

dmesg is little too big to write it on paper (like I was doing before.
So, i've created file    dmesg.txt,  and executed this:
"dmesg > dmesg.txt"
and it is now in that text file.
But how can I now copy that file to USB memory stick
I mean I know how to Copy but how to mount.
Its file system is ntfs.


----------



## J65nko (Feb 13, 2010)

psycho said:
			
		

> ifconfig -a  :
> 
> ```
> re0: flags=[B]8843[/B]<[B]UP[/B],BROADCAST,[B]RUNNING[/B],SIMPLEX,MULTICAST>metric 0 mtu 1500
> ...



The old problem came back: the *no carrier* status.

I have an AMD64 box with an re0 NIC on the motherboard. OpenBSD 4.2 had slight problems with that NIC, a few link up/down messages, but after that the NIC would work. But under FreeBSD the re0 did not work. I had to add in a bge0 NIC I bought on Ebay.

If you search the freebsd-stable mailing list you see many reports of people having trouble with re0.


----------



## bschmidt (Feb 13, 2010)

`# ifconfig re0 -rxcsum -txcsum` is also worth a try. It helped me once with an auto-negotiation issue.


----------



## FBSDin20Steps (Feb 13, 2010)

In addition to the previous post. You can also run the following commands:


```
# /etc/rc.d/netif forcerestart
```

and...


```
# /etc/rc.d/routing forcerestart
```

Good luck!


----------



## psycho (Feb 13, 2010)

none of this works  would buying a new NIC solved the problem?


----------



## FBSDin20Steps (Feb 13, 2010)

For sure...


----------



## psycho (Feb 15, 2010)

is that 100% correct??
i don't want to spend money for nothing??
help help


----------



## volatilevoid (Feb 15, 2010)

Well, at least the Realtek cards are not the best choice for FreeBSD and the _no carrier_ problem is definitely a low-level one.


----------



## psycho (Feb 25, 2010)

I AM CONNECTED TO INTEEEEERNEEEEEEEEEET! HELLO FROM FREE BSD 8.0 release. I-m SORRY BUT I AM JUST TO HAPPYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY


----------



## DutchDaemon (Feb 25, 2010)

Hiroshima '45 - Tschernobyl '86 - Windows '95 - Psycho '10


----------



## psycho (Feb 25, 2010)

hehe good one


----------

