On Fri, 22 Sep 2006 10:35:38 -0700, Marco A. Cruz Quevedo wrote:
> david wrote:
>> On 18 Sep 2006 23:05:50 -0700, "Marco A. Cruz Quevedo"
>> <(E-Mail Removed)> wrote:
>>
>> >Is there a quick or practical way to check a network connection? I
>> >mean, to get IP, gateway address, etc, and to know what is going wrong.
>> >When I just log on, I cannot get to internet, unles I manually issue
>> >ifdown eth0, ifup eth0, service network restart.
>> >
>> >Thanks
>> >
>> >Marco
>> >
>> >---------------------
>> >Freedom is not a permission for chaos.
>>
>> ifconfig -a shows interfaces (NICs or "adapters"), including their IP
>> if they have one. route -n shows the routing table, including the
>> default route if there is one, which default route contains the
>> gateway address. For example, below, the eth0 NIC's IP is
>> 192.168.3.12. If that line is missing your NIC lacks an IP. And the
>> gateway address is 192.168.3.2. The default route is the route to
>> "0.0.0.0" and you see that address in that route's line item in the
>> table. Maybe your service network restart is triggering an address
>> request (ie running a dhcp client), but that's not taking place as
>> part of the boot process. Check /etc/sysconfig/network for something
>> like ONBOOT=no (or yes). If it's no, it's configured to omit setting
>> up network stuff as part of booting. Check also for something like
>> BOOTPROTO=dhcp (I think) to see whether, when the network config is
>> performed it entails use of dhcp. To experiment with running dhcp
>> client manually, the name of the client is usually dhclient, otherwise
>> there's one called pump and one called dhcpcd. Your system might have
>> one or another of those.
>>
>> Example:
>> [root@hostx ~]# ifconfig eth0
>> eth0 Link encap:Ethernet HWaddr 00:02:B3:41:86:F9
>> inet addr:192.168.3.12 Bcast:192.168.3.255
>> Mask:255.255.255.0
>> inet6 addr: fe80::202:b3ff:fe41:86f9/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:8038 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:5327 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:10726255 (10.2 MiB) TX bytes:377137 (368.2 KiB)
>>
>> [root@hostx ~]# route -n
>> Kernel IP routing table
>> Destination Gateway Genmask Flags Metric Ref Use
>> Iface
>> 192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>> 0.0.0.0 192.168.3.2 0.0.0.0 UG 0 0 0 eth0
>> [root@hostx ~]#
>
> Thanks for the suggestion.
>
> I found that my /etc/resolv.conf is being overwritten with a blank
> file! no nameserver addresses in it!
>
> I have not been able to stop this overwriting. It seems that
> NetworkManager service is overwiting but this was not happening before.
set the
peerdns=no
in your
/etc/sysconfig/network-scripts/ifcfg-ethX
( or what ever network script your box uses )
and see if it leaves your DNS resolv.conf file
alone.
Most DHCP servers supply accurate info and the
file is overwritten when ever you get a DHCP
update. If it's bad data, you get a bad resolv.conf
file. The peerdns=no should tell your system to stop
updating the file.
jack
--
D.A.M. - Mothers Against Dyslexia
see
http://www.jacksnodgrass.com for my contact info.
jack - Grapevine/Richardson