You are not logged in.

#1 2009-04-20 00:58:23

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

[Solved by workaround] Static IP Extremely frustrated?

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:

54678f33161049.gif

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

#2 2009-04-20 02:31:07

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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`

Offline

#3 2009-04-20 02:42:52

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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

#4 2009-04-20 02:43:54

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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

#5 2009-04-20 03:07:10

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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.

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

#6 2009-04-20 06:44:03

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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)?

Offline

#7 2009-04-20 07:47:55

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

securitybreach wrote:
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

#8 2009-04-20 09:29:29

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

cactus wrote:

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 smile

Offline

#9 2009-04-20 13:10:04

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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

#10 2009-04-20 15:54:56

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: [Solved by workaround] Static IP Extremely frustrated?

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

Board footer

Powered by FluxBB