LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-16-2002, 09:27 PM   #1
sc300t
LQ Newbie
 
Registered: Jan 2002
Posts: 9

Rep: Reputation: 0
2 Network Card config


Hi, I'm a newbie, and I'm having problem with installing 2 nic on red hat 7.1. I have successfully assigned an local IP to eth0, and I want to connect the other nic (eth1) to a valid static IP. When I ran the ifconfig, the status of both nics are up. The problem is that I can ping the eth0 (the local IP), but not the eth1 (the valid static IP).

I need the real static ip on the eth1 because I'm planning to have my own webserver (apache & php).

Any help is appreciated.

Thank you.
 
Old 01-16-2002, 09:36 PM   #2
pbharris
Member
 
Registered: Apr 2001
Location: chicago, IL
Distribution: debian, redhat
Posts: 280

Rep: Reputation: 30
hello,
are you pinging eth0 ? have you tried ping the ip of eth1 ? if ifconfig is showing good information for both nics it should be working.
 
Old 01-16-2002, 09:44 PM   #3
sc300t
LQ Newbie
 
Registered: Jan 2002
Posts: 9

Original Poster
Rep: Reputation: 0
I set the eth0 to 192.168.1.6 (255.255.255.0) and the default gateway is 192.168.1.1. The eth1 (the one that is supposed to connect to the internet) is set at 216.52.172.71 (255.255.255.240).

Now, the problem is that I can ping eth0 from another computer, but I can not ping eth1.

I tried to ping from the linux to my other windows nt server (216.52.172.7..), it actually goes out from eth1 which is 216.52.172.71. Looks like that it can go out, but when I tried to ping the address from another machine, it gives me time out.

Any idea? Thanks.

Last edited by sc300t; 01-16-2002 at 09:49 PM.
 
Old 01-16-2002, 10:03 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you will need to setup ip forwarding to get the machines internal nic to forward packets

echo 1 > /proc/sys/net/ipv4/ip_forward

also you will need to do ipmasq if you want to get through to the internet with those lan addresses

is your internet connection working on the linux box
 
Old 01-17-2002, 03:33 AM   #5
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
why have you set a gateway? surely that'll screw stuff up, you only set a gateway on internal nodes on a network. i'd recommend looking firestarter, which goes over if_forward annd that gubbins for you
 
Old 01-18-2002, 08:07 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I didn't notice that, very good point

if you are on the internet than the default gateway should be the server on the internet, not some internal server ip.

the routing for the internal number is automatically routed to ips on the same network. The internet will need the default gateway because the ips are not on your network.

you should do this command

route del default

then if dhcp is used to connect to the internet it should set it to the right gateway

or if it's static then you need to know the correct number and use this command

route add default gw ???.???.???.???

Last edited by DavidPhillips; 01-18-2002 at 08:08 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up Network/Sound Card config? vpatel Linux - Networking 7 02-23-2005 05:02 PM
Network Card Config. carpetbelly Linux - Networking 2 01-14-2005 08:12 AM
how i get to the config of my network card? New In Linux 11 Linux - Networking 15 07-24-2004 11:37 PM
How to config double network card idoido Linux - Networking 1 07-22-2004 09:36 PM
Network card config Debian dicou Linux - Newbie 1 05-13-2004 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:29 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