You are not logged in.

#1 2006-09-29 23:05:23

davidwillis
Member
Registered: 2006-09-19
Posts: 51

static ip problems

my defult gateway is 192.168.1.1, subnetmask 255.255.255.0, DNS server 192.168.0.1

And I am trying to set my computer up to have an ip address of 192.168.1.100 (the router is set up for this ip, and it works in gentoo on this computer.

here is my rc.conf

lo="lo 127.0.0.1"
eth0="eth0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0)

gateway="default gw 192.168.1.1"
ROUTES=(gateway)

the strange thing is that when my computer starts up the internet does not work, but if I run dhcpcd, then run /etc/rc.d/network restart, it works fine with my static ip.

here is my ifconfig before, and after

[root@myhost david]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0D:87:EC:2E:A2
          inet addr:192.168.1.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:87ff:feec:2ea2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)
          Interrupt:18 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3560 (3.4 Kb)  TX bytes:3560 (3.4 Kb)

[root@myhost david]# dhcpcd
[root@myhost david]# /etc/rc.d/network restart
:: Stopping Network                                                      [DONE]
:: Starting Network                                                      [DONE]
[root@myhost david]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0D:87:EC:2E:A2
          inet addr:192.168.1.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:87ff:feec:2ea2/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:590 (590.0 b)  TX bytes:1516 (1.4 Kb)
          Interrupt:18 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3560 (3.4 Kb)  TX bytes:3560 (3.4 Kb)


So how do I make it work without running dhcpcd, and restarting the network?

Thnaks
David

Offline

#2 2006-09-29 23:13:18

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: static ip problems

well it looks like dhcp made your broadcast 192.168.0.255 instead of your specified 192.168.1.255. Not sure how thats right but you say its working. Also, if you are using static i think you need to edit /etc/resolv.conf to your dns server. DHCP probably did that as well.

Offline

#3 2006-09-30 00:01:21

davidwillis
Member
Registered: 2006-09-19
Posts: 51

Re: static ip problems

Sorry, the output you see was pasted from when I tried using the dns servers ip.  Just to see.  I copied the wrong one.

ok here is the right one.

Right after I boot up

[root@myhost david]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0D:87:EC:2E:A2
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:87ff:feec:2ea2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)
          Interrupt:18 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3560 (3.4 Kb)  TX bytes:3560 (3.4 Kb)

after running dhcpc.  By the way the internet works after this, but it is not very fast, and is not using the static ip I want to use.

[root@myhost david]# dhcpcd
[root@myhost david]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0D:87:EC:2E:A2
          inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:87ff:feec:2ea2/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:960 (960.0 b)  TX bytes:1118 (1.0 Kb)
          Interrupt:18 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3560 (3.4 Kb)  TX bytes:3560 (3.4 Kb)

And finally, after restarting network.

[root@myhost david]# /etc/rc.d/network restart
:: Stopping Network                                                      [DONE]
:: Starting Network                                                      [DONE]
[root@myhost david]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0D:87:EC:2E:A2
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:87ff:feec:2ea2/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1996 (1.9 Kb)  TX bytes:2206 (2.1 Kb)
          Interrupt:18 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3560 (3.4 Kb)  TX bytes:3560 (3.4 Kb)

heres my resolv.conf

nameserver 192.168.1.100
nameserver 192.168.0.1
nameserver 205.171.3.65

Do I need to change that?

Offline

#4 2006-09-30 01:10:58

davidwillis
Member
Registered: 2006-09-19
Posts: 51

Re: static ip problems

I notice that right after boot up, the RX packets are 0.  I don't know what that means though.

Offline

#5 2006-09-30 06:19:09

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: static ip problems

From what I know:

RX Packets - packets recieved
TX packates - packets sent.

also - dhcpcd automatically sets your /etc/resolv.conf - so make sure that resolv.conf looks right before you run dhcpcd.

Offline

#6 2006-10-02 02:56:48

davidwillis
Member
Registered: 2006-09-19
Posts: 51

Re: static ip problems

Thanks guys.  My internet is down right now.  So I will have to get back to this when I have it back.  Probably not until saturday.  I changed my phone from qwest to vonage, and qwest shut down my whole service including my dsl, and they can't get it back up for a week.

Offline

#7 2006-10-15 17:19:49

davidwillis
Member
Registered: 2006-09-19
Posts: 51

Re: static ip problems

Just thought I would update.  I am not sure what my problem was before.  But now that I have switched network providers, and am using a different router, and ip address, it is working just fine.  I also erases my whole arch partition by accident, and have re-installed arch.

Anyway, thanks for the help.

Offline

Board footer

Powered by FluxBB