LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 11-24-2006, 11:13 PM   #1
Maleki
LQ Newbie
 
Registered: Sep 2006
Distribution: FC6
Posts: 11

Rep: Reputation: 0
how to set up two network cards in fc6.


All right I have two machines.

1) XP with two network cards 1 out to internet(router) and 1 to fc6 machine
2) fc6 with two network cards 1 out to internet(router) and to to XP machine

This should be simple but unfortunately I can't seem to figure it out. I can connect one machine to the other using the internet network cards but I can't using the network cards connecting the two machines directly.

Can someone give me a hand and let me know what I'm doing wrong? Thanks.

Here is what I get when I use ifconfig:

eth0 Link encap:Ethernet HWaddr 00:118:6C:03:41
inet addr:192.168.1.151 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::211:d8ff:fe6c:341/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:137 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19135 (18.6 KiB) TX bytes:6408 (6.2 KiB)
Interrupt:209

eth1 Link encap:Ethernet HWaddr 00:118:6B:EF:7B
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::211:d8ff:fe6b:ef7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13825436 errors:0 dropped:0 overruns:0 frame:0
TX packets:15992993 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1903341621 (1.7 GiB) TX bytes:4286163063 (3.9 GiB)
Interrupt:177 Base address:0x4000

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:1990 errors:0 dropped:0 overruns:0 frame:0
TX packets:1990 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2213381 (2.1 MiB) TX bytes:2213381 (2.1 MiB)

Here is what I get when I run route:

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1

nb. I used:
route del default
route add default gw 192.168.1.1 dev eth1

it's what I had to do to get this working in fc5.

Thanks in advance,

M
 
Old 11-25-2006, 12:17 AM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Did you connect the two machines with a reverser (crossover) cable? In any case, why would you try to do such a thing? The two machines are connected through the router, anyway. This other connection you're making is redundant.

To be a bit more specific as to why a regular ethernet cable won't work: Ethernet cables are made up of "pairs" of cables. There is a transmit data pair and a receive data pair. If you just hook two machines together with a regular cable, then you would have a transmit pair connected to another transmit pair. There's no way for the transmit data to get to the receive data. Routers connect the transmit to receive (and vise-versa) internally.
 
Old 11-25-2006, 12:37 PM   #3
Maleki
LQ Newbie
 
Registered: Sep 2006
Distribution: FC6
Posts: 11

Original Poster
Rep: Reputation: 0
Why would I do that? That's easy. My router is a 10/100 and those two network cards are gigabit cards. The files that I transfer from one machine (FC6) to the other (XP) go from 175MB to 4-5GB.

Now I could have made a crossover cable but 1) I'm too lazy and 2) Both network cards are auto-sensing so I don't have to. This did work in FC5 so I'm wondering what I've done wrong.

Last edited by Maleki; 11-25-2006 at 07:30 PM.
 
Old 11-25-2006, 07:29 PM   #4
Maleki
LQ Newbie
 
Registered: Sep 2006
Distribution: FC6
Posts: 11

Original Poster
Rep: Reputation: 0
Well I think I've figured it out so I'm recording it here for posterity. Here's my network setup.

XP
192.168.1.100 (internet card)
192.168.1.150 (card to connect to FC6)

FC6
192.168.1.101 (internet card) device: eth1
192.168.1.151 (card to connect to XP) device: eth0

Remove then add default gateway so card can access the internet. Now I don't appear to need to do this in FC6 but I'm doing it anyway.

route del default
route add default gw 192.168.1.1 dev eth1

192.168.1.1 is the ip of my router.

Add route to get to XP machine.

route add -host 192.168.1.150 dev eth0

Works like a charm! Now all I need to do is figure out how to put it so it works at boot up!

M

Last edited by Maleki; 11-25-2006 at 07:36 PM.
 
Old 11-25-2006, 08:04 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Thanks for clearing up both the why and the how. I have wireless in the house, but I may do the same to connect two machines for the same reason. As to what next: put it in an rc.d file?
 
Old 11-26-2006, 10:55 PM   #6
elmr007
Member
 
Registered: Aug 2006
Location: Texas
Distribution: FC6
Posts: 60

Rep: Reputation: 15
using two nic cards is also a security isue. If you only use one nick on your server it is possible for someone using the route comand to bypass your server-firewall-gateway-whatever it is, and target another computer on your LAN. JFYI
 
  


Reply

Tags
network, networking, route


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Head / Screen / Monitor Set-up in FC6 with dual ATI's damber Linux - Hardware 21 11-09-2007 01:11 PM
unable to connect network printer with fc6 Marty757 Linux - Networking 0 11-24-2006 01:06 PM
Wireless Network Card Issues in FC6 SavageNick Fedora 7 11-17-2006 10:56 AM
network (route problems) in FC6 64bit tarotint Fedora 2 11-01-2006 08:02 PM
trying to set up my linux box, two network cards. hamish Linux - Networking 16 11-02-2003 02:35 PM


All times are GMT -5. The time now is 11:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration