# My Connection [ADSL]  always lost



## ohdediku (May 19, 2010)

hai all,
I am a newbie in freebsd
I had a problem when want to connect ADSL to freebsd,
my connection always interrupted ...
problem solved when I try this command repeatedly

`# ifconfig re0 down`

continue

`# ifconfig re0 up`

help me..


----------



## wblock@ (May 19, 2010)

Check your network cable connectors: are they making solid contact?  Are the network cables free of pet chewings, cuts, and crimps?  Always check the easy stuff first!

Otherwise, it could also be a problem with your Realtek card (they're not great) or something to do with the DSL modem.  You can collect some useful information:

Is this a notebook or desktop?  What model of DSL modem do you have?

Which version of Realtek card you have: `# pciconf -lv | grep -B1 -A2 -i network`

How it is set up in /etc/rc.conf:`# grep ifconfig /etc/rc.conf`

What ifconfig thinks:`# ifconfig re0`


----------



## ohdediku (May 19, 2010)

wblock said:
			
		

> Check your network cable connectors: are they making solid contact?  Are the network cables free of pet chewings, cuts, and crimps?  Always check the easy stuff first!
> 
> Otherwise, it could also be a problem with your Realtek card (they're not great) or something to do with the DSL modem.  You can collect some useful information:
> 
> ...



Check your network cable connectors??
i think not a problem, because in ubuntu linux fine.

Is this a notebook or desktop?
i use a PC.. dualboot ubuntu-lucid lyn and freebsd-8.0


```
rootBSD# pciconf -lv | grep -B1 -A2 -i network
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111)'
    class      = network
    subclass   = ethernet
rootBSD# grep ifconfig /etc/rc.conf
ifconfig_re0="inet 192.168.1.103  netmask 255.255.255.0"
rootBSD# ifconfig re0
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
	ether 00:e0:4d:4f:7c:38
	media: Ethernet autoselect (10baseT/UTP <half-duplex>)
	status: no carrier


**i'm sorry, my english languange very bad... :D
```


----------



## wblock@ (May 20, 2010)

ohdediku said:
			
		

> Check your network cable connectors??
> i think not a problem, because in ubuntu linux fine.



Okay, run `# ifconfig eth0` on Ubuntu and compare.  Does it also come up as 10baseTX and half-duplex?

Oh, and what version of FreeBSD are you running?


----------



## ohdediku (May 20, 2010)

```
#ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:e0:4d:4f:7c:38  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:4dff:fe4f:7c38/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:98243 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90599 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:104842282 (104.8 MB)  TX bytes:11090471 (11.0 MB)
          Interrupt:25 Base address:0x6000

** FreeBSD 8.0-RELEASE
```


----------



## wblock@ (May 20, 2010)

Doh.  Apparently you have to use `# ethtool eth0`on Linux.

The reason I ask is that I'm think an autonegotiation error.  But maybe that's not it.  I know there have been changes to the re driver since FreeBSD-8.0; you could update to 8-stable.


----------



## ohdediku (May 20, 2010)

```
ohdediku@linuxer:~$ sudo ethtool eth0
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: g
	Current message level: 0x00000033 (51)
	Link detected: yes
```


----------



## wblock@ (May 20, 2010)

Under Ubuntu, it goes to 100Mb and full duplex.  You can try manually setting that on FreeBSD with `# ifconfig re0 media 100baseTX mediaopt full-duplex`


----------



## ohdediku (May 20, 2010)

wblock said:
			
		

> Under Ubuntu, it goes to 100Mb and full duplex.  You can try manually setting that on FreeBSD with `# ifconfig re0 media 100baseTX mediaopt full-duplex`



Voila.... problem solved... 

thanks


----------

