Networking Forums

Networking Forums > Computer Networking > Linux Networking > Interface goes down

Reply
Thread Tools Display Modes

Interface goes down

 
 
soup_or_power@yahoo.com
Guest
Posts: n/a

 
      04-09-2007, 06:00 PM
Hi

We have 3 linux boxes on a subnet 192.168.5.0. They are all Red Hat.
There is a router 192.168.5.1 to forward packets to the subnet
192.168.11.0

Periodically one of the linux boxes 192.168.5.152 loses connectivity
with other linux boxes 192.168.5.150 and 192.168.5.151

I tried
/sbin/route add -host 192.168.5.151 gw 192.168.5.2 dev eth1

It didn't work even though I did
/sbin/ifconfig eth1 up

I saw in one of the posts the following command

/etc/rc.d/init.d/network restart

So I tried it and everything worked fine. Now I have inserted this
command into root's crontab to be called once a day. Is this the best
way? I am curious to know why interface eth1 goes down on the linux
box. The box also has eth0 and it stays up all the time. Can someone
please disambiguate this issue. I am relatively new to linux and
networking.

Thank you

 
Reply With Quote
 
 
 
 
Antoine EMERIT
Guest
Posts: n/a

 
      04-09-2007, 08:22 PM
"(E-Mail Removed)" <(E-Mail Removed)> écrivait
news:(E-Mail Removed) ups.com:

> Hi
>
> We have 3 linux boxes on a subnet 192.168.5.0. They are all Red Hat.
> There is a router 192.168.5.1 to forward packets to the subnet
> 192.168.11.0
>
> Periodically one of the linux boxes 192.168.5.152 loses connectivity
> with other linux boxes 192.168.5.150 and 192.168.5.151
>
> I tried
> /sbin/route add -host 192.168.5.151 gw 192.168.5.2 dev eth1
>
> It didn't work even though I did
> /sbin/ifconfig eth1 up
>
> I saw in one of the posts the following command
>
> /etc/rc.d/init.d/network restart
>
> So I tried it and everything worked fine. Now I have inserted this
> command into root's crontab to be called once a day. Is this the best
> way? I am curious to know why interface eth1 goes down on the linux
> box. The box also has eth0 and it stays up all the time. Can someone
> please disambiguate this issue. I am relatively new to linux and
> networking.


On Rehdta, all the network configuration is in the
/etc/sysconfig/network-scripts directory.

You have files to setup network interfaces like ifcfg-eth1. You should
have 'ONBOOT=yes' in theses files to configure them at boor time.

To start or stop an interface usr 'ifup eth1' or 'ifdown eth1'.

If your default gateway is not 192.168.5.1, you should add a static route
to the network 192.168.11.0 by creating a 'route-eth1' file in the same
directory with the content :

192.168.11.0/24 via 192.168.5.1 dev eth1


Hope it may help you.


Note: if it doesn't help, give more information (ifconfig -a, netstat -
rn, ...).
 
Reply With Quote
 
soup_or_power@yahoo.com
Guest
Posts: n/a

 
      04-09-2007, 08:45 PM
On Apr 9, 4:22 pm, Antoine EMERIT <blackh...@nowhere.org> wrote:
> "soup_or_po...@yahoo.com" <soup_or_po...@yahoo.com> écrivaitnews:(E-Mail Removed) ooglegroups.com:
>
>
>
>
>
> > Hi

>
> > We have 3 linux boxes on a subnet 192.168.5.0. They are all Red Hat.
> > There is a router 192.168.5.1 to forward packets to the subnet
> > 192.168.11.0

>
> > Periodically one of the linux boxes 192.168.5.152 loses connectivity
> > with other linux boxes 192.168.5.150 and 192.168.5.151

>
> > I tried
> > /sbin/route add -host 192.168.5.151 gw 192.168.5.2 dev eth1

>
> > It didn't work even though I did
> > /sbin/ifconfig eth1 up

>
> > I saw in one of the posts the following command

>
> > /etc/rc.d/init.d/network restart

>
> > So I tried it and everything worked fine. Now I have inserted this
> > command into root's crontab to be called once a day. Is this the best
> > way? I am curious to know why interface eth1 goes down on the linux
> > box. The box also has eth0 and it stays up all the time. Can someone
> > please disambiguate this issue. I am relatively new to linux and
> > networking.

>
> On Rehdta, all the network configuration is in the
> /etc/sysconfig/network-scripts directory.
>
> You have files to setup network interfaces like ifcfg-eth1. You should
> have 'ONBOOT=yes' in theses files to configure them at boor time.
>
> To start or stop an interface usr 'ifup eth1' or 'ifdown eth1'.
>
> If your default gateway is not 192.168.5.1, you should add a static route
> to the network 192.168.11.0 by creating a 'route-eth1' file in the same
> directory with the content :
>
> 192.168.11.0/24 via 192.168.5.1 dev eth1
>
> Hope it may help you.
>
> Note: if it doesn't help, give more information (ifconfig -a, netstat -
> rn, ...).- Hide quoted text -
>
> - Show quoted text -



Hi Antoine
There is no route-eth1 file in /etc/sysconfig/network-scripts
I don't know how eth1 even gets started because there is no ifcfg-eth1
in the directory

Following is the output of ls

ifcfg-eth0 ifup-ipsec ifdown-post ifup-plip
ifdown network-functions ifup-post ifup-plusb
ifdown-isdn ifup-aliases ifup-sit ifup-sl
ifup network-functions-ipv6 ifdown-sit ifdown-ippp
ifup-isdn ifup-routes ifup-ippp ifcfg-lo
ifdown-ppp init.ipv6-global ifup-wireless ifdown-aliases
ifup-ppp ifdown-ipv6 ifup-ipx
ifdown-ipsec ifup-ipv6 ifdown-sl

Here is the content of ifcfg-eth0

cat ifcfg-eth0
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
ONBOOT=yes
USERCTL=no
PEERDNS=no
#GATEWAY=192.168.5.1
GATEWAY=192.168.5.2
TYPE=Ethernet
IPADDR=192.168.5.152
DEVICE=eth0
HWADDR=00:13:72:3b:96:ea
BOOTPROTO=none
NETMASK=255.255.255.0
BROADCAST=192.168.5.255
NETWORK=192.168.5.0

Thanks for your help

 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      04-09-2007, 10:08 PM
(E-Mail Removed) <(E-Mail Removed)> wrote:

> Periodically one of the linux boxes 192.168.5.152 loses connectivity
> with other linux boxes 192.168.5.150 and 192.168.5.151


I have seen a problem like this with certain network cards.

When the computer is powered on, some cards output a carrier straight away.
(This appears as a light on the hub). Other cards do not output the carrier,
until the driver is activated. Those that do not put the light on until the
driver is activated may be problematic.

Have a look to see if you can tell what your card in 192.168.5.152 is doing.

What type of network card is it?

Regards,

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

 
Reply With Quote
 
Allen McIntosh
Guest
Posts: n/a

 
      04-10-2007, 04:31 AM
(E-Mail Removed) wrote:
> On Apr 9, 4:22 pm, Antoine EMERIT <blackh...@nowhere.org> wrote:
>> "soup_or_po...@yahoo.com" <soup_or_po...@yahoo.com> écrivaitnews:(E-Mail Removed) ooglegroups.com:
>>> We have 3 linux boxes on a subnet 192.168.5.0. They are all Red Hat.
>>> There is a router 192.168.5.1 to forward packets to the subnet
>>> 192.168.11.0
>>> Periodically one of the linux boxes 192.168.5.152 loses connectivity
>>> with other linux boxes 192.168.5.150 and 192.168.5.151

....
>>>...I tried
>>>/sbin/route add -host 192.168.5.151 gw 192.168.5.2 dev eth1

?huh? eth1 is also connected to 192.168.5/24? This is a Very Bad Idea.
....
> Here is the content of ifcfg-eth0
>
> cat ifcfg-eth0
> ONBOOT=yes
> USERCTL=no
> PEERDNS=no
> #GATEWAY=192.168.5.1
> GATEWAY=192.168.5.2

??? This doesn't look right
> TYPE=Ethernet
> IPADDR=192.168.5.152
> DEVICE=eth0
> HWADDR=00:13:72:3b:96:ea
> BOOTPROTO=none
> NETMASK=255.255.255.0
> BROADCAST=192.168.5.255
> NETWORK=192.168.5.0


So it looks like this box has only one active NIC, connected to
192.168.5.0/24. The gateway isn't configured the way you say it should
be (but perhaps it's also set in /etc/sysconfig/network?)

You say the box has a second NIC - where is that connected?

Please expand on what you mean by "loses connectivity". Does ifconfig
show the interface is still there? Can you ping one of the other boxes?
If you use tcpdump -n, can you see any traffic on the interface at
all? Are the appropriate lights still on, and have they changed at all
from the case where the box has not lost connectivity?
 
Reply With Quote
 
soup_or_power@yahoo.com
Guest
Posts: n/a

 
      04-10-2007, 05:18 PM
On Apr 10, 12:31 am, Allen McIntosh <nos...@mouse-potato.com> wrote:
> soup_or_po...@yahoo.com wrote:
> > On Apr 9, 4:22 pm, Antoine EMERIT <blackh...@nowhere.org> wrote:
> >> "soup_or_po...@yahoo.com" <soup_or_po...@yahoo.com> écrivaitnews:(E-Mail Removed) ooglegroups.com:
> >>> We have 3 linux boxes on a subnet 192.168.5.0. They are all Red Hat.
> >>> There is a router 192.168.5.1 to forward packets to the subnet
> >>> 192.168.11.0
> >>> Periodically one of the linux boxes 192.168.5.152 loses connectivity
> >>> with other linux boxes 192.168.5.150 and 192.168.5.151

> ...
> >>>...I tried
> >>>/sbin/route add -host 192.168.5.151 gw 192.168.5.2 dev eth1

>
> ?huh? eth1 is also connected to 192.168.5/24? This is a Very Bad Idea.
> ...> Here is the content of ifcfg-eth0
>
> > cat ifcfg-eth0
> > ONBOOT=yes
> > USERCTL=no
> > PEERDNS=no
> > #GATEWAY=192.168.5.1
> > GATEWAY=192.168.5.2

>
> ??? This doesn't look right
>
> > TYPE=Ethernet
> > IPADDR=192.168.5.152
> > DEVICE=eth0
> > HWADDR=00:13:72:3b:96:ea
> > BOOTPROTO=none
> > NETMASK=255.255.255.0
> > BROADCAST=192.168.5.255
> > NETWORK=192.168.5.0

>
> So it looks like this box has only one active NIC, connected to
> 192.168.5.0/24. The gateway isn't configured the way you say it should
> be (but perhaps it's also set in /etc/sysconfig/network?)
>
> You say the box has a second NIC - where is that connected?
>
> Please expand on what you mean by "loses connectivity". Does ifconfig
> show the interface is still there? Can you ping one of the other boxes?
> If you use tcpdump -n, can you see any traffic on the interface at
> all? Are the appropriate lights still on, and have they changed at all
> from the case where the box has not lost connectivity?


Here is the content of /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain

I couldn't ping other hosts on the subnet 192.168.5.0/24 when the box
lost connectivity. However, I could ping hosts on the subnet
192.168.11.0/24. I also could ping the gateway 192.168.5.2 which is a
switch/router. I don't understand what you mean by the gateway is not
set up right.

I ran tcpdump but this is post fact and there was a lot of traffic.
Currently the interfaces are up. When the system was incommunicado the
eth1 interface was down, eth0 was up.

I checked the cables and the second NIC is not connected to anything.

Thanks

 
Reply With Quote
 
Allen McIntosh
Guest
Posts: n/a

 
      04-10-2007, 11:23 PM
(E-Mail Removed) wrote:
> On Apr 10, 12:31 am, Allen McIntosh <nos...@mouse-potato.com> wrote:
> I couldn't ping other hosts on the subnet 192.168.5.0/24 when the box
> lost connectivity. However, I could ping hosts on the subnet
> 192.168.11.0/24. I also could ping the gateway 192.168.5.2 which is a
> switch/router. I don't understand what you mean by the gateway is not
> set up right.


Partly my mistake. You told us the gateway to 192.168.11.0 was
192.168.5.1. I assumed that it was the default gateway also. Since you
didn't send us the output of "route -n", it was a reasonable assumption
IMHO :-). The GATEWAY= line is correct if 192.168.5.2 is the default
gateway.

Is your box connected directly to the switch/router? What I'm wondering
is if the traffic to the rest of 192.168.5.0/24 must go through the switch.

> I ran tcpdump but this is post fact and there was a lot of traffic.


See last comment

> Currently the interfaces are up.


I'm not clear on why you should care if eth1 is up, or if that's what
you mean.

> When the system was incommunicado the
> eth1 interface was down, eth0 was up.


In your shoes, assuming that the switch is responsible for getting
packets from 192.168.5.152 to .150 and .151, my initial hypothesis would
be that the switch was screwing up somehow. If you have access to the
machines, then next time this happens start up tcpdump -n on all three
and then run "ping -c 3" from .152 to .150. You should at least see an
ARP and a reply at both ends. (It might be good to do this while things
are working and save the output so you can see what "normal" behavior is.)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am in need of a netsh script that will disable the "Local Area Connection" interface then re-enable that same interface. Spin Windows Networking 3 11-03-2005 12:58 AM
serial interface to ethernet interface Kenneth Sparre Linux Networking 9 11-01-2005 12:27 PM
More than one interface in my PC Daniel Camps Linux Networking 2 12-22-2004 10:18 PM
PCI interface or USB interface David Windows Networking 4 09-16-2004 12:59 PM
Linux API to create logical interface on a physical interface? Zarko Coklin Linux Networking 2 07-18-2004 01:50 AM



1 2 3 4 5 6 7 8 9 10 11