Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Direct Cable Connect RT8111B
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Unobtanium
n00b
n00b


Joined: 09 Sep 2006
Posts: 33

PostPosted: Thu May 10, 2007 10:38 pm    Post subject: [SOLVED] Direct Cable Connect RT8111B Reply with quote

I have been trying for a long time to connect my 2 PCs together using a crossover ethernet cable - yes you guessed right - I can't do it :roll:
Each PC is connected to a network switch/ hub (ethernet) which is connected to the internet. I want to create a (secure) direct link between the two but I cant seem to get the NIC (Eth1) to become active on my Gentoo box.
Here is ifconfig:
Code:

eth0      Link encap:Ethernet  HWaddr 00:18:4D:E9:88:ED
          inet addr:10.0.0.7  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::218:4dff:fee9:88ed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:825 errors:0 dropped:0 overruns:0 frame:0
          TX packets:697 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:971861 (949.0 Kb)  TX bytes:83349 (81.3 Kb)
          Interrupt:16 Base address:0x400

eth1      Link encap:Ethernet  HWaddr 00:19:66:0B:5F:AC
          inet6 addr: fe80::219:66ff:fe0b:5fac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20968 (20.4 Kb)  TX bytes:2862 (2.7 Kb)
          Interrupt:18 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

ra0       Link encap:Ethernet  HWaddr 00:13:D3:7A:47:3E
          inet6 addr: fe80::213:d3ff:fe7a:473e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4829 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21782 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:615600 (601.1 Kb)  TX bytes:0 (0.0 b)
          Interrupt:21

So ite seems to me to be configured correctly - maybe?
Here is conf.d/net
Code:
iface_ra0="dhcp"
preferred_aps=( "Gentoo_Home" )
associate_order="forcepreferredonly"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
config_eth1=( "dhcp" )
dhcp_eth1="nodns nontp nonis"

Both eth 1 & 0 are included in rc (default) and they have both been symlinked to init.d as per the Gentoo Handbook.
I have tried connecting with the windows firewall turned off and still nothing.
I have no firewall installed on Gentoo as yet (why not advertise it :roll: )
I can connect to the internet no problem via eth0 - it seems to work fine.
Eth1 is a RT8111B the drivers installed as per the following script found on the Ubuntu forum
Code:

wget ftp://202.65.194.211/cn/nic/r1000_v1.05.tgz
tar xzvf r1000_v1.05.tgz
cd r1000_v1.05
make clean modules
make install
depmod -a
modprobe r1000

lsmod gives me the following
Code:

lsmod
Module                  Size  Used by
r1000                  18572  0
ath_pci                84256  0
wlan                  171588  1 ath_pci
ath_hal               193616  1 ath_pci
nvidia               6829940  32
rt61                  219268  1

It seems to me that the r1000 module is inactive?

lspci gives me the following
Code:

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Unknown device 8168                                                                             (rev 01)
01:02.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
01:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139                                                                            C+ (rev 10)

I dont have a clue as to what to do next?
I am using the gentoo-sources 2.6.21 kernel with the 2.6.21 linux-headers - I thought support was built in for my NIC but I cant find it.
If you could help me you will have made me one very happy person as I am totally stumped :?
TIA


Last edited by Unobtanium on Sat May 12, 2007 10:27 pm; edited 5 times in total
Back to top
View user's profile Send private message
godish
n00b
n00b


Joined: 05 Oct 2004
Posts: 50
Location: Boston MA

PostPosted: Thu May 10, 2007 11:17 pm    Post subject: Reply with quote

Unless you have a dhcp server running on your windows box, you will want to give your "internal" network static ip addresses.
To do this, remove/comment out

/etc/conf.d/net

Code:

#config_eth1=( "dhcp" ) to....

config_eth1=( "192.168.0.1/24" )


Then restart that ethernet port...
Code:

/etc/init.d/net.eth1 restart


Also..
Generally, most 1000mbit cards can automagically swap the send a recieve pins so a cross-over cable is unnecessary.

On the windows box, you will want to setup the computer with a static ip address too,
It should look like this in TCP/IP properties...

192.168.0.2
255.255.255.0

With that setup you should be able to ping each computer.
_________________
Nobody makes me bleed my own blood... NOBODY!
Back to top
View user's profile Send private message
Unobtanium
n00b
n00b


Joined: 09 Sep 2006
Posts: 33

PostPosted: Fri May 11, 2007 5:20 pm    Post subject: Reply with quote

Godfish you are a star - thank you very much it works a treat - the connection is up :D

One question remaining - how can I force the connection to windows to use Eth1 as it seems to prefer Eth0?
I have just transferred my music across but it has gone via the network hub - this was not what I had planned.
Any further help would be appreciated even more :oops:
TIA (again)
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Fri May 11, 2007 7:27 pm    Post subject: Reply with quote

Unobtanium wrote:
how can I force the connection to windows to use Eth1 as it seems to prefer Eth0?

Just unplug the cable from eth0, then all the data will flow through eth1. :wink:

Even though this is not the solution you are looking for, you may want to try it anyways just to make sure eth1 works at all.
Back to top
View user's profile Send private message
Unobtanium
n00b
n00b


Joined: 09 Sep 2006
Posts: 33

PostPosted: Fri May 11, 2007 9:50 pm    Post subject: Reply with quote

Why is it that the most simple solution is the last that comes to mind?

Well I unplugged eth0 and smb tells me that
Code:
Unable to find any workgroups in your local network. This might be caused by an enabled firewall.

So I disabled my firewall and the windows firewall is not running either. I still get the warning from smb.

ifconfig gives the following - it seems not to have an IP address?
Code:
eth1      Link encap:Ethernet  HWaddr 00:19:66:0B:5F:AC
          inet6 addr: fe80::219:66ff:fe0b:5fac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:569 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:78028 (76.1 Kb)  TX bytes:2520 (2.4 Kb)
          Interrupt:18 Base address:0x2000

However windows is claiming that it is connected?

Code:
iface_ra0="dhcp"
preferred_aps=( "Gentoo_Home" )
associate_order="forcepreferredonly"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
config_eth1=( "192.168.0.1" )
dhcp_eth1="nodns nontp nonis"



I'm at a loss still :?
Back to top
View user's profile Send private message
godish
n00b
n00b


Joined: 05 Oct 2004
Posts: 50
Location: Boston MA

PostPosted: Sat May 12, 2007 1:54 am    Post subject: Reply with quote

I would take out the line
Quote:
dhcp_eth1="nodns nontp nonis"
as you are no longer using dhcp on that interface. You definitely want ifconfig to report an ip address of 192.168.0.1 else it will not work.

On your linux computer, make sure u can ping 192.168.0.2...
Code:

#ping 192.168.0.2


Also, if you only want smb to function on one interface, modify /etc/samba/smb.conf to include

Code:
[global]
        bind interfaces only = yes
        interfaces = eth1


Windows saying it is connected only means that there is a physical connection... you need more then just layer one connectivity :-)
_________________
Nobody makes me bleed my own blood... NOBODY!
Back to top
View user's profile Send private message
Unobtanium
n00b
n00b


Joined: 09 Sep 2006
Posts: 33

PostPosted: Sat May 12, 2007 10:25 pm    Post subject: Reply with quote

Thanks godfish
My smb.conf already has your recommendation.
I have modified my conf.d/net as per the Gentoo Handbook - it reads
Code:
iface_ra0="dhcp"
preferred_aps=( "Gentoo_Home" )
associate_order="forcepreferredonly"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
#config_eth1=( "192.168.0.1" )
#dhcp_eth1="nodns nontp nonis"
config_eth1=( "192.168.10.101 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth1=( "default via 192.168.10.1" )

I was still getting the firewall blocking access notification.
After re-installing my firewall - the problem has gone.

Thanks to all for your help - I would have still been fiddling otherwise. :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum