LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2005, 10:52 PM   #1
norus
LQ Newbie
 
Registered: Feb 2005
Location: Internet
Posts: 25

Rep: Reputation: 15
Exclamation Linux box with 3 ethernet cards


I have a Linux box (192.168.0.1) running Debian. The box has three ethernet cards. One of them (eth1) is used to connect to the VPN-server,
second one (eth0) is connected to a Windows box (192.168.0.101). The third one (eth2) is connected to a Solaris server (192.168.0.102).

eth0 Link encap:Ethernet HWaddr 00:80:AD:8F:B8:43
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::280:adff:fe8f:b843/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1761953 errors:0 dropped:0 overruns:0 frame:0
TX packets:3242341 errors:0 dropped:0 overruns:0 carrier:0
collisions:25343 txqueuelen:1000
RX bytes:123853855 (118.1 MiB) TX bytes:412210788 (393.1 MiB)
Interrupt:10 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:59:51B
inet addr:10.10.68.177 Bcast:10.10.69.255 Mask:255.255.254.0
inet6 addr: fe80::2e0:4cff:fe59:51db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:98860 errors:0 dropped:0 overruns:0 frame:0
TX packets:54079 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21401850 (20.4 MiB) TX bytes:6898665 (6.5 MiB)
Interrupt:5 Base address:0xe400

The internet connection is shared by:

# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 192.168.0.101 anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

As you can see, I have internet on both linux box and my windows machine. The problem is that I don't know how to get my Solaris server online
now. I've tried many things but none of them worked. So would you, please, help me to configure my third ethernet card (eth2)?
 
Old 10-20-2005, 04:57 AM   #2
shazam75
Member
 
Registered: Oct 2004
Location: Australia, Brisbane
Distribution: Gentoo
Posts: 296

Rep: Reputation: 30
what does the command

ifconfig eth2 up

do ?
Any messages ?

Regards
 
Old 10-20-2005, 06:02 AM   #3
norus
LQ Newbie
 
Registered: Feb 2005
Location: Internet
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by shazam75
what does the command

ifconfig eth2 up

do ?
Any messages ?

Regards
ifconfig eth2
eth2 Link encap:Ethernet HWaddr 00:50:BF:E0:B4:8F
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:87 dropped:0 overruns:0 carrier:174
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0xe800

You can see that the configuration is wrong.

"ifconfig eth2 up" returns no errors in the terminal.
 
Old 10-20-2005, 07:07 AM   #4
johnnybhoy67
Member
 
Registered: Sep 2004
Distribution: Knoppix 4.0.2
Posts: 54

Rep: Reputation: 15
The mask in eth1 is 255.255.254.0 is this desired? should it not be 255.255.255.0?

J
 
Old 10-20-2005, 07:18 AM   #5
norus
LQ Newbie
 
Registered: Feb 2005
Location: Internet
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by johnnybhoy67
The mask in eth1 is 255.255.254.0 is this desired? should it not be 255.255.255.0?

J
That netmask is being set automaticly by "dhclient eth1". eth0 and eth2 should be set manually.
 
Old 10-20-2005, 07:24 AM   #6
johnnybhoy67
Member
 
Registered: Sep 2004
Distribution: Knoppix 4.0.2
Posts: 54

Rep: Reputation: 15
I'm assuming by your post that this is not a problem with you being able to set the config using command line but that config will not work is this right?
 
Old 10-20-2005, 07:28 AM   #7
norus
LQ Newbie
 
Registered: Feb 2005
Location: Internet
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by johnnybhoy67
I'm assuming by your post that this is not a problem with you being able to set the config using command line but that config will not work is this right?
Yeah, almost. The problem is that I'm new to networks and have no idea how I should configure my third eth. I've set up with two eths but not with three.
 
Old 10-20-2005, 07:35 AM   #8
johnnybhoy67
Member
 
Registered: Sep 2004
Distribution: Knoppix 4.0.2
Posts: 54

Rep: Reputation: 15
Yeah thought as much. I'm a relative n00b also so can't help you much I'm afraid...sorry.

As you most likely know it should be as simple as:

ifconfig eth2 192.168.1.34 netmask 255.255.255.0

but that clearly isn't what's going on here.

J
 
Old 10-20-2005, 07:50 PM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Could it be as easy as turning on IP forwarding in the kernel?

To check, run:
Code:
cat /proc/sys/net/ipv4/ip_forward
## or if necessary (as root)
cat `find /proc -name ip_forward`
Is the result "0" or "1"?

If "0", IP forwarding is not turned on in the kernel, & that may be your problem.

If so so, try (as root):
Code:
echo 1  > /proc/sys/net/ipv4/ip_forward
## or if necessary
echo 1  > `find /proc -name ip_forward`
 
Old 10-20-2005, 08:06 PM   #10
tedfordgif
Member
 
Registered: Dec 2003
Posts: 43

Rep: Reputation: 15
Quote:
TX packets:0 errors:87 dropped:0 overruns:0 carrier:174
Given that you are receiving errors you may have a duplex issue, or a hardware/driver issue.
 
  


Reply


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
Having trouble setting up Linux box with two ethernet cards. GreenerLinux Linux - Networking 8 01-05-2005 03:20 PM
strange behavior with 2 ethernet cards in my linux box newnew Linux - Networking 3 03-19-2004 08:33 PM
Linux Driver for DEC 21040-family ethernet cards red118a Linux - Hardware 7 03-13-2004 11:58 PM
Linux server with multiple ethernet cards darkseed2g3 Linux - Networking 1 11-19-2003 05:01 PM
trying to set up my linux box, two network cards. hamish Linux - Networking 16 11-02-2003 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:13 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
Open Source Consulting | Domain Registration