Heop with Static-IP setup in Gentoo
i want to receive ethernet-connection from 192.168.2.1
I dont care what the box's IP has to be, but i had randomly set it to 192.168.1.120 because my other computer on the LAN is 192.168.1.119 So, I set the configuration to this: modules=( "ifconfig" ) # the primary network interface auto eth0 iface eth0 inet static address 192.168.1.120 netmask 255.255.255.0 network 192.168.2.1 broadcast 192.168.1.255 gateway 192.168.1.118 #dns-* options are implemented by the resolvconf package, if installed dns-nameserver 192.168.2.1 As far as ifconfig is concerned, It appears to be working. I fear i have set something up wrong, for web-browsing, Ping, and netstat all confirm i am not actually getting internet connectivity. route -n prints: Code:
Destination Gateway Genmask flags metric ref Use Iface |
Quote:
Quote:
192.168.1.118 ? |
Hi, thanks for your reply.
The IP address i am receiving the eth0 connection from is correctly 192.168.2.1 It is coming to the gentoo box via a macbook pro with 'ethernet sharing' turned on as a service. So i assumed that i would put that IP address as the 'router' in this case, since the gentoo box is only being served a connection from the macbook pro, opposed to the actual router. |
So
192.168.2.1 is the gateway ? Code:
modules=( "ifconfig" ) |
I am sorry. that was incorrect. I am not on the actual computer, so i am typing from a different station.
the current configuration has been simplified down to this /etc/conf.d/net file: modules=( "ifconfig" ) config_eth0=( "192.168.120/24" ) routes_eth0=( "default via 192.168.1.118" ) |
and no, i cannot seem to ping 192.18.1.118
|
Quote:
What is connected to 192.168.1.118 ? How is the setup from your network? internet <=> 192.168.2.1 <=> 192.168.2.120 This doesn't seem correct config_eth0=( "192.168.120/24" ) make sure you stay in the same subnet for all addresses. why do you use 192.168.1.* and 192.168.2.* |
Quote:
192.168.1.118 was just the IP i picked for default gateway. the gentoo box is receiving ethernet connection from a macbook pro which is sharing it's ethernet-connection. the IP the macbook pro gives to share ethernet with is 192.168.2.1 I was told in the #Gentoo-AMD IRC channel that this: config_eth0=( "192.168.120/24" ) was a correct way for gentoo. However, i am not 100% clear on how TCP/IP works sometimes. So are you saying that the client IP of 192.168.1.118 cannot use gateway 192.168.2.1? thanks again |
Quote:
As default gw you need to use the ip from the router or the server which makes the connection. in your case 192.168.2.1 Did you tried the setup from post #4 ? Do you have connection from the other computer on the lan (192.168.1.119) If yes, just copy the settings. |
thanks to your last post, i appear to have made progress, but still cannot use portage or web-browser. I changed static IP to
192.168.2.120, and now can ping the IP 192.168.2.1 additionally, I can also pick up the gentoo box on the IP-Scanner from the macbook pro server, which i have not been able to do ever, until now. Also, i no longer think it is a bad NIC, because pinging 127.0.0.1 from the gentoo box. It is quite odd that it seems all signal say this machine should be getting internet access, yet for all purposes it is still unable to. |
|
this is an odd result, but pinging that IP you posted just returns a line like it is doing something, but the cursor doesnt complete a blink, it just freezes before it blinks once, and then it just times-out, but never gives any error message or confirmation of anything.
pinging www.google.com prints the error 'unknown host' i added the dns server as 192.168.2.1 |
Quote:
what is the output from Code:
telnet 192.168.2.1 53 Do you have a connection from the other client on 192.168.1.119 ? If yes, how is the network configured on that computer? |
Quote:
there is a dns server at 192.168.2.1, it is the IP address for ethernet-sharing on the macbook pro. 192.168.1.119 is the macbook pro's own IP address on the LAN. the macbook pro is wirelessly connected to a wrt150N Linksys, which is connected to a comcast cable-internet router. Cable Internet | v linksys 192.168.1.1 wifi | v macbookproserver 192.168.1.119 eth-sharing 192.169.2.1 | v Gentoo Box 192.168.2.120 |
you are connected with a wire to the macpro, right?
what is the output from |
All times are GMT -5. The time now is 11:35 PM. |