Unix administration - intermittent cable connection

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > December 2004 > intermittent cable connection





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author intermittent cable connection
Troy Piggins

2004-12-06, 8:47 pm

I am totally stumped by this, and seek some advice on either a solution
or possible course of action to locate the problem.

The problem is that just yesterday and today the connection to internet
is only working intermittently. By this I mean that it works for hour or so,
then can't see anything outside (ping, DNS etc), then it works for a while,
then not.

I have not installed anything new these last couple of days. Week or 2
ago I installed apache2 from 1.3, but I don't suspect that.

I run a RH9 box as a gateway/NAT/firewall for a small office network.
It has been running fine for about a year. Services include iptables (with NAT
and the only open external port is ssh 22); imap, pop, and sendmail; http
(apache2), samba, squid - there are others, but don't suspect any of
them. It connects to the internet via one of its 2 NICs connected to
cable modem, and the external IP is dynamic (DHCP).

All services - http, ssh, samba etc work fine from the inside network,
it just seems to be anything that uses the external interface.

Because it comes and goes I thought maybe a cron job(?). No new jobs
though in last few days. Each user (about 12) has only 1 cron job set up to
fetchmail every 15 mins. I changed that to 1/2hr to see if large emails
clogging it up, but that hasn't solved anything.

Another thought was that it could be hardware - network card playing up,
or even the modem? I don't know how to check this. I don't have a spare
modem.

I can't ping IP address or URLs (when it is not working). When it works
DNS resolution etc is fine. I spoke to ISP and they don't know of any
problems in the area. Oh, and as soon as I mention the gateway is linux,
they say "we don't support linux, windows only" and conversation ends
shortly after :-(

I am not a linux admin or guru, but I have been a linux user for some
years so know the basics.
I have set up this box with all its services and noone else knows how to
use linux in the office.

Any help appreciated.

--
T R O Y P I G G I N S
e : usenet@piggo.com
bostontech

2004-12-07, 11:19 am

quote:
Originally posted by Troy Piggins
I am totally stumped by this, and seek some advice on either a solution
or possible course of action to locate the problem.

The problem is that just yesterday and today the connection to internet
is only working intermittently. By this I mean that it works for hour or so,
then can't see anything outside (ping, DNS etc), then it works for a while,
then not.

I have not installed anything new these last couple of days. Week or 2
ago I installed apache2 from 1.3, but I don't suspect that.

I run a RH9 box as a gateway/NAT/firewall for a small office network.
It has been running fine for about a year. Services include iptables (with NAT
and the only open external port is ssh 22); imap, pop, and sendmail; http
(apache2), samba, squid - there are others, but don't suspect any of
them. It connects to the internet via one of its 2 NICs connected to
cable modem, and the external IP is dynamic (DHCP).

All services - http, ssh, samba etc work fine from the inside network,
it just seems to be anything that uses the external interface.

Because it comes and goes I thought maybe a cron job(?). No new jobs
though in last few days. Each user (about 12) has only 1 cron job set up to
fetchmail every 15 mins. I changed that to 1/2hr to see if large emails
clogging it up, but that hasn't solved anything.

Another thought was that it could be hardware - network card playing up,
or even the modem? I don't know how to check this. I don't have a spare
modem.

I can't ping IP address or URLs (when it is not working). When it works
DNS resolution etc is fine. I spoke to ISP and they don't know of any
problems in the area. Oh, and as soon as I mention the gateway is linux,
they say "we don't support linux, windows only" and conversation ends
shortly after :-(

I am not a linux admin or guru, but I have been a linux user for some
years so know the basics.
I have set up this box with all its services and noone else knows how to
use linux in the office.

Any help appreciated.

--
T R O Y P I G G I N S
e : usenet@piggo.com






From your description it sounds like it can only be one of three things.

1) The modem your ISP provided
2) The cable connected to the modem.
3) The network interface on your gateway.

See if your ISP can ship you a new modem. Try changing the cable to one you know works, and finally look at the network statistics coming from you NIC to see if it is generating errors (several utilities out there to view this info).

Let me know how it goes.

BTG
V.G.

2004-12-08, 2:47 am

<posted & mailed>

You did not mention whether you have DSL or cable.
Did you try to power cycle your modem?
Did you notice if connection light on the modem goes off during the outage?
Does external interface receive new IP address after connection restored?
Note the IP address of any public server (e.g. www.yahoo.com) and see if
traceroute -n <ip address here>
works


Troy Piggins wrote:

> I am totally stumped by this, and seek some advice on either a solution
> or possible course of action to locate the problem.
>

--

----------------------------------------
www.iwannaplayvolleyball.com
Doug Freyburger

2004-12-08, 5:54 pm

Troy Piggins wrote:
>
> I can't ping IP address or URLs (when it is not working). When it

works
> DNS resolution etc is fine. I spoke to ISP and they don't know of any
> problems in the area. Oh, and as soon as I mention the gateway is

linux,
> they say "we don't support linux, windows only" and conversation ends
> shortly after :-(


Start by checking your Linux gateway while it's working and while it's
not
working.

Save the routing table at both times and compare them. Likely
they will be different. If so consider switching to a static default
route
on it to point out the *interface* to the ISP. That way when the ISP's
DHCP lease expires and your IP number changes, it will continue
working.
Do theLinux routing commands allow setting the default route to an
interface rather than to the IP of a gateway? Some versions do some
don't.

Save your ifconfig -a output and anything about DHCP configs while
working and while not. If your lease is expiring hourly you'll be able
to figure it out that way and react accordingly.

Next check DNS cache timeouts. If it works for an hour then doesn't
work for an hour then does again, it sounds very much like a round
robin where one of the IP numbers in the cycle works and one
doesn't. Use dig or nslookup to find the SOA record of your ISP to
find the TLL entry it uses and very likely it will be 3600, an hour.
Then look closely at the IP numbers offered by your ISP. If you're
going to a name, you may want to switch to it's hard-coded IP
number if this is happening.

Kevin Collins

2004-12-08, 5:54 pm

In article <OEvtd.4270$MS6.2104@trndny01>, V.G. wrote:
><posted & mailed>
>
> You did not mention whether you have DSL or cable.


Actually, both his subject and body mention that he uses cable...
[vbcol=seagreen]
> Did you try to power cycle your modem?
> Did you notice if connection light on the modem goes off during the outage?
> Does external interface receive new IP address after connection restored?
> Note the IP address of any public server (e.g. www.yahoo.com) and see if
> traceroute -n <ip address here>
> works
>
>
> Troy Piggins wrote:
>

Kevin
Troy Piggins

2004-12-08, 5:54 pm

* V.G. wrote:
><posted & mailed>
>
> You did not mention whether you have DSL or cable.


Thought I did - in the body and in the subject heading.

> Did you try to power cycle your modem?


Yep. Didn't help - still problem. I called ISP, they sent out tech
crew and replaced modem. Still problem. Must be local on the pc.

> Did you notice if connection light on the modem goes off during the outage?


All lights are green for go and steady, and the traffic light still
flashes like it does when operation normal. So as far as modem lights
etc go, all looks normal.

WHen I do have connection, I can see the modem's inbuilt web page, but
when connection is not working, I can't get it.

I am thinking ethernet card faulty.

> Does external interface receive new IP address after connection restored?


Sometimes, depends on the lease. I have had several different IP
addresses in the last few days because I have rebooted and restarted the
modem many times.

> Note the IP address of any public server (e.g. www.yahoo.com) and see if
> traceroute -n <ip address here>
> works


Have done so - when connection working all fine. When not, traceroute
just has no output.

Thanks, I will be trying new network card next.

--
T R O Y P I G G I N S
e : usenet@piggo.com
Troy Piggins

2004-12-09, 2:54 am

* Doug Freyburger wrote:
> Save the routing table at both times and compare them. Likely
> they will be different. If so consider switching to a static default
> route
> on it to point out the *interface* to the ISP. That way when the ISP's
> DHCP lease expires and your IP number changes, it will continue
> working.
> Do theLinux routing commands allow setting the default route to an
> interface rather than to the IP of a gateway? Some versions do some
> don't.


Will do and post then.

> Save your ifconfig -a output and anything about DHCP configs while
> working and while not. If your lease is expiring hourly you'll be able
> to figure it out that way and react accordingly.


ok, as above.

> Next check DNS cache timeouts.


Ok, not sure how to check this. Commands?

> If it works for an hour then doesn't
> work for an hour then does again, it sounds very much like a round
> robin where one of the IP numbers in the cycle works and one
> doesn't. Use dig or nslookup to find the SOA record of your ISP to
> find the TLL entry it uses and very likely it will be 3600, an hour.
> Then look closely at the IP numbers offered by your ISP. If you're
> going to a name, you may want to switch to it's hard-coded IP
> number if this is happening.



--
T R O Y P I G G I N S
e : usenet@piggo.com
Troy Piggins

2004-12-09, 2:54 am

* Doug Freyburger wrote:
> Save the routing table at both times and compare them. Likely
> they will be different. If so consider switching to a static default
> route
> on it to point out the *interface* to the ISP. That way when the ISP's
> DHCP lease expires and your IP number changes, it will continue
> working.
> Do theLinux routing commands allow setting the default route to an
> interface rather than to the IP of a gateway? Some versions do some
> don't.


Working :

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.0 * 255.255.255.0 U 0 0 0
eth1
147.10.92.0 * 255.255.252.0 U 0 0 0
eth0
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
default CPE-147-10-92-1 0.0.0.0 UG 0 0 0
eth0

Not working :

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.0 * 255.255.255.0 U 0 0 0
eth1
147.10.92.0 * 255.255.252.0 U 0 0 0
eth0
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
default 147.10.92.1 0.0.0.0 UG 0 0 0
eth0

Both look the same, except working is hostname for default, while not is
just IP.

> Save your ifconfig -a output and anything about DHCP configs while
> working and while not. If your lease is expiring hourly you'll be able
> to figure it out that way and react accordingly.


Nothing different between working and not.

> Next check DNS cache timeouts. If it works for an hour then doesn't
> work for an hour then does again, it sounds very much like a round
> robin where one of the IP numbers in the cycle works and one
> doesn't. Use dig or nslookup to find the SOA record of your ISP to
> find the TLL entry it uses and very likely it will be 3600, an hour.
> Then look closely at the IP numbers offered by your ISP. If you're
> going to a name, you may want to switch to it's hard-coded IP
> number if this is happening.


? How to check DNS cache timeout? What is this going to achieve? I
don't seem to have actual login problems, provided I can get the network
connection. I am going ot check a new network card tonight and see if
that is it.

All services seem to be running fine. The reason I hadn't thought of
network card fault is that even when network down, I can ping it. Can't
ping the modem though. But ISP replaced the modem yesterday but the
problem remains, so will try hardware.

Will keep you posted.

--
T R O Y P I G G I N S
e : usenet@piggo.com
Doug Freyburger

2004-12-09, 6:20 pm

Troy Piggins wrote:
>
> Both look the same, except working is hostname for default, while not

is
> just IP.


When an IP can be translated into a name, DNS is working. When it
can't
be DNS is not working.

One thing to try is to ping the default router's address while it's not
working.
ping 147.10.92.1. If there's no response then you know much of what
the
problem is.

> How to check DNS cache timeout? What is this going to achieve?


Using nslookup something like this:

# nslookup
> set type=soa
> your.isp.com


The response will include the servers, their IP numbers, and the large
record that describes the domain. It's root server, the email contact,
and most importantly the 4 refresh numbers in seconds. The last of
the 4 numbers is the TTL which is the length of time an address is to
be kept in cache on local servers before it those servers check to see
if it has changed.

How to do this in "dig" rather than nslookup is left as an exercise,
but
it will all be on the command line.

The most common TTL is 3600 seconds, an hour. You report an hour
of success followed by an hour of failure. So it sounds like a TTL
issue
to me.

Then lookup the name of the default router while running and not.
When it's running see if there are more than one IP address reported
for the same name. If so,try adding that one as an additional default
router.

When it's not working, try pinging other addresses similar to the one
in your default route just in case.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com