You are not logged in.
Pages: 1
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:0xe800lo 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:0xe800lo 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
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
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:0xe800lo 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:0xe800lo 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:0xe800lo 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
I notice that right after boot up, the RX packets are 0. I don't know what that means though.
Offline
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
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
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
Pages: 1