You are not logged in.
Ok I have setup a static IP before on this machine and now I cannot get it for some reason. To begin with I have a router with 4 client machines. The router shows:
Here is the /etc.rc.conf revelant part:
eth0="eth0 192.168.10.120 netmask 255.255.255.0 broadcast 192.168.10.255"
#eth0="dhcp"
INTERFACES=(eth0)
gateway="default gw 192.168.10.1"
ROUTES=(gateway)
and here is my /etc/resolve.conf:
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search DarkStar
nameserver 192.168.10.1
# /etc/resolv.conf.tail can replace this line
Also, here is the route command after dhcpcd eth0:
[comhack@Venus ~]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
I have looked at the wiki and many posts in the forums and still cannot figure out what the problem is. With this configuration I can ping and open up the router but nothing else. I am having to dhcpcd eth0 to get any internet. Please help or atleast point me in the right direction. This is driving me crazy.
Thanks
Last edited by securitybreach (2009-04-20 15:57:56)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
a) What is the output of `ifconfig eth0` after you run dhcpcd?
b) What is the output of `ifconfig eth0` and `route -n` after you boot and the static IP address takes hold?
c) Are you sure this address isn't being used elsewhere? While you're on a DHCP address, run `arping 192.168.10.120`
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Your router is configured to consistently map your MAC to the IP.
However, you are configuring rc.conf to use static mappings, then running a dhcp client yourself manually.
Solution: Configure rc.conf to use dhcp on the client. Your router should assign it the same ip whenever it renews.
Alternate solutions.
Remove the static mapping in the router. Use a static ip assignment on the client (in rc.conf), and pick an ip outside the router's dhcp lease range (so there will be no address conflicts).
Last edited by cactus (2009-04-20 02:43:18)
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
A)
bash-3.2# eth0 Link encap:Ethernet HWaddr 00:24:21:19:37:1F
inet addr:192.168.10.120 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::224:21ff:fe19:371f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2179 (2.1 Kb) TX bytes:4320 (4.2 Kb)
Interrupt:21 Base address:0x4000
B)
bash-3.2# eth0 Link encap:Ethernet HWaddr 00:24:21:19:37:1F
inet addr:192.168.10.120 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::224:21ff:fe19:371f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:725 (725.0 b) TX bytes:812 (812.0 b)
Interrupt:21 Base address:0x4000
bash-3.2# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
C)
bash-3.2# arping 192.168.10.120
ARPING 192.168.10.120 from 192.168.10.120 eth0
^CSent 197 probes (197 broadcast(s))
Received 0 response(s)
Thanks
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
Your router is configured to consistently map your MAC to the IP.
However, you are configuring rc.conf to use static mappings, then running a dhcp client yourself manually.Solution: Configure rc.conf to use dhcp on the client. Your router should assign it the same ip whenever it renews.
Alternate solutions.
Remove the static mapping in the router. Use a static ip assignment on the client (in rc.conf), and pick an ip outside the router's dhcp lease range (so there will be no address conflicts).
Well first I configured rc.conf for dhcp and the router shows both static/dhcpcd to be this machine. Note I rebooted the router to flush the info.
Secondly I removed the static from the router and used the static from the rc.conf. The same thing happened, I could not get the internet without dhcpcd eth0. I also tried to set it outside of the range like you suggested. I set it to 192.168.10.202 and the range is 192.168.10.101-192.168.10.200 then I got this error :
Invalid Static DHCP IP address, it should be set within the DHCP address pool
Thanks for the help though.
Last edited by securitybreach (2009-04-20 03:10:18)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
That makes no sense... Everything appears to be coming up OK.
What Make/Model router is it? There's not some funny rules in there that only allows access to hosts that it has given a DHCP lease to..? Without using dhcpcd, can you ping outside via IP address (try 75.127.96.189)?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
cactus wrote:Your router is configured to consistently map your MAC to the IP.
However, you are configuring rc.conf to use static mappings, then running a dhcp client yourself manually.Solution: Configure rc.conf to use dhcp on the client. Your router should assign it the same ip whenever it renews.
Alternate solutions.
Remove the static mapping in the router. Use a static ip assignment on the client (in rc.conf), and pick an ip outside the router's dhcp lease range (so there will be no address conflicts).Well first I configured rc.conf for dhcp and the router shows both static/dhcpcd to be this machine. Note I rebooted the router to flush the info.
Secondly I removed the static from the router and used the static from the rc.conf. The same thing happened, I could not get the internet without dhcpcd eth0. I also tried to set it outside of the range like you suggested. I set it to 192.168.10.202 and the range is 192.168.10.101-192.168.10.200 then I got this error :
Invalid Static DHCP IP address, it should be set within the DHCP address pool
Thanks for the help though.
I meant configure the client with an ip outside the range of the router range. eg. set the client to .202, while the router has a range of 101-200. The client shouldn't report the above error message (likely that was something you were trying to do with your router).
Best case: just set the MAC to IP mapping in the router, and set the client to dhcp.
.....
bash-3.2# arping 192.168.10.120 ARPING 192.168.10.120 from 192.168.10.120 eth0 ^CSent 197 probes (197 broadcast(s)) Received 0 response(s)
No idea why you were doing that. You are trying to arping yourself, from yourself. This means your machine was sending out 'who has this ip', but not responding (arping doesn't elicit a responce when it sends from itself for itself). Arping'ing the router ip would have been better.
What you want to do it... ping the router ip. If you get a response, hooray. then try pinging a known external ip. If you get a response...then routing is working.
Then you can try name resolution.
Last edited by cactus (2009-04-20 07:49:28)
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
No idea why you were doing that. You are trying to arping yourself, from yourself. This means your machine was sending out 'who has this ip', but not responding (arping doesn't elicit a responce when it sends from itself for itself). Arping'ing the router ip would have been better.
I asked him to -- to see if there was an IP conflict on the network
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Cactus: I tried to use 192.168.10.202 in the rc.conf and I got no address when I restarted /etc/rc.d/network.
fukawi2: The router is a Trendnet TEW-432BRP.
My friend suggested changing the destination:
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
192.168.10.0 to 192.168.10.1.
How do I go about this? I know it is the route command but I do not want to mess it up.
Thanks
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
OK I added the information from the dhcpcd generated /etc/resolve.conf to the static generated one and it worked.
Its a workaround but it does work:
After reboot the /etc/resolve.conf stayed the same. I was wondering if anything will overwrite that file?
Thank
Last edited by securitybreach (2009-04-20 16:09:43)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline