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. |
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. |
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. |
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 |
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
|
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 ???.???.???.??? |
All times are GMT -5. The time now is 09:22 PM. |