|
||||||||
|
|
#1
|
|
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. Marco A. Cruz Quevedo |
|
#2
|
|||
|
|||
|
Marco A. Cruz Quevedo 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 You can activate the hardware from command prompt. So, there is NOTHING wrong with the network. I would line up different configuration files and teach _them_ how to behave. Have luck Stanislaw Slack user from Ulladulla. |
|
#3
|
|||
|
|||
|
Stanislaw Flatto wrote:
> Marco A. Cruz Quevedo 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 > > You can activate the hardware from command prompt. > So, there is NOTHING wrong with the network. > I would line up different configuration files and teach _them_ how to > behave. > I have to make all this steps AFTER I was updating some software packages to my Linux box. The network was ready whe I just logged in, but now the netowrk does not respond, unless I perform the steps mentioned above. I know I have to check ALL network related files, so I can get to know what is wrong, why the network is not ready when I log into my system. Regards, Marco > Have luck > > Stanislaw > Slack user from Ulladulla. |
|
#4
|
|||
|
|||
|
Followup-To set to comp.os.linux.networking - not applicable to
comp.os.linux.misc - and a stretch for comp.os.linux.setup On 18 Sep 2006, in the Usenet newsgroup comp.os.linux.networking, in article <(E-Mail Removed) .com>, Marco A. Cruz Quevedo 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. /sbin/ifconfig -a /sbin/route -n cat /etc/resolv.conf >When I just log on, I cannot get to internet, unles I manually issue >ifdown eth0, ifup eth0, service network restart. What distribution - what release? What type of connection to the ISP? This sounds as if your network configuration scripts are not set correctly, but there isn't enough information to tell which one[s]. Old guy |
|
#5
|
|||
|
|||
|
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 ~]# |
|
#6
|
|||
|
|||
|
Moe Trin wrote: > Followup-To set to comp.os.linux.networking - not applicable to > comp.os.linux.misc - and a stretch for comp.os.linux.setup > > On 18 Sep 2006, in the Usenet newsgroup comp.os.linux.networking, in article > <(E-Mail Removed) .com>, Marco A. Cruz Quevedo > 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. > > /sbin/ifconfig -a > /sbin/route -n > cat /etc/resolv.conf > > >When I just log on, I cannot get to internet, unles I manually issue > >ifdown eth0, ifup eth0, service network restart. > > What distribution - what release? What type of connection to the ISP? Fedora Core 3, connection is DSL I found that before issuing the commands mentioned above, I can access internet if I type IP addresses instead of urls. !? Would this be a clue? > > This sounds as if your network configuration scripts are not set correctly, > but there isn't enough information to tell which one[s]. Perhaps, because this happened after upgrading some RPMS. :-( > > Old guy |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
|||
|
|||
|
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 |
|
#9
|
|||
|
|||
|
Jack Snodgrass wrote: > 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. I have set PEERDNS=no but it still get being overwritten. The only solution I found is disabling NetworManager service (it seems it is not being used). I am still looking why this was not happening before. Anyway, thanks. Regards, Marco > > 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 |
|
#10
|
|||
|
|||
|
On 22 Sep 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, Marco A. Cruz Quevedo wrote: >Moe Trin wrote: >> Marco A. Cruz Quevedo wrote: >>> When I just log on, I cannot get to internet, unles I manually issue >>> ifdown eth0, ifup eth0, service network restart. >> >> What distribution - what release? What type of connection to the ISP? > >Fedora Core 3, connection is DSL >I found that before issuing the commands mentioned above, I can access >internet if I type IP addresses instead of urls. !? Would this be a >clue? Certainly - as you note on your later post in response to david, this is a problem with the missing /etc/resolv.conf. The solution proposed by "Jack Snodgrass" <(E-Mail Removed)> (disabling the overwriting by the DHCP client) should be one solution, but I'm curious why the different actions (when booting, the client overwrites with a blank file, yet when you restart the service, you apparently get the proper data from the server). >> This sounds as if your network configuration scripts are not set correctly, >> but there isn't enough information to tell which one[s]. > >Perhaps, because this happened after upgrading some RPMS. :-( That might be the dhcp client package - though I thought they were using 'pump' and the last time I looked at fedoralegacy.org, pump wasn't on the updates list, and the dhcp*-3.0.1 stuff hasn't been updated since July 2005. Personally, I'd set the name servers in /etc/resolv.conf, and then set the DHCP client to leave the file alone. Contrary to the mystique, most ISPs do not move their name servers around that much, because of the hassle of getting the word of the new address out to the world. If you've looked at the DNS-HOWTO, you see that an outsider finds the name server by asking the root servers, which refer to top-level-domain servers, and they are supposed to provide the IP addresses of the domain's name servers. You should also be able to get the same data from a 'whois' query. For example, you seem to be posting from a Uninet S.A. de C.V address block, and if I ask LACNIC about this, I am told that the name servers are NSGDL2.UNINET.NET.MX at 200.23.242.204, NSMEX2.UNINET.NET.MX at 200.33.146.204, and NSMTY2.UNINET.NET.MX at 200.33.148.205, and that information was last changed in May, when the block 189.128.0.0/10 was allocated by LACNIC. ISPs use DHCP (Dynamic Host Configuration Protocol) because this makes it simple for the users - not that the name servers are dancing about. Old guy |
![]() |
| Tags |
| connection, diagnostics, network |
| Thread Tools | |
| Display Modes | |
|
|