Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-07 Thread Dumitru Ciobarcianu

On 07-Jan-13 8:32 AM, h bagade wrote:

I've also tested Cisco router connection on different systems with
different OSes. On Win systems, when I disable the Ethernet card, router
detects it at the time but on FreeBSD systems, when I set interface down,
the router shows Line Protocol as up!



Blame the driver on the FreeBSD.

Many modern unix-like system do not bother to implement interface 
shutdown in the driver or if they do they do not call that function 
when you do an ifconfig interface down.


Dumitru

___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-07 Thread Phil Mayers

On 01/07/2013 06:32 AM, h bagade wrote:

Can I conclude from all discussions above that the ethernet protocol
support a feature named dying gasp which inform the other end that it is
going to shutdown? It seems that it works when we intentionally try to
shutdown an interface but when there is a failure on layer2 connection it
couldn't help?!


No. The spec contains this feature, but virtually nothing supports it.

Link detection on ethernet is actually a slightly subtle area, but if:

 1. You have autoneg enabled, and
 2. The devices are *DIRECTLY* connected

...you can be sure it will work IF THE LINK GOES DOWN.

There's a lot of confusion in your emails, but what I think you're 
asking is:


if you connect two Cisco devices, how is one able to detect the other 
doing shutdown?


...the answer is that on a Cisco, shutdown actually disables the 
physical layer, and the other Cisco detects this. In your case, the 
other device (BSD) is not doing this, so this doesn't happen.


There's no magic - if the light/electricity goes away, the Cisco will 
see line down. If it doesn't, it won't.

___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-07 Thread Benny Amorsen
h bagade baga...@gmail.com writes:

 I've also tested Cisco router connection on different systems with
 different OSes. On Win systems, when I disable the Ethernet card, router
 detects it at the time but on FreeBSD systems, when I set interface down,
 the router shows Line Protocol as up!

Be careful to not be fooled by IPMI either. If IPMI is configured, the
link may stay up even though the OS believes it is down. Indeed, the
link may stay up even though the server is off (though of course it
dies if the server loses power).

Some servers are shipped factory-default with IPMI enabled on the
regular ethernet interfaces.


/Benny

___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-06 Thread h bagade
Can I conclude from all discussions above that the ethernet protocol
support a feature named dying gasp which inform the other end that it is
going to shutdown? It seems that it works when we intentionally try to
shutdown an interface but when there is a failure on layer2 connection it
couldn't help?!

I've also tested Cisco router connection on different systems with
different OSes. On Win systems, when I disable the Ethernet card, router
detects it at the time but on FreeBSD systems, when I set interface down,
the router shows Line Protocol as up!
I tried to capture packets with Wireshark on Win system to find out if any
packet is sent out before the interface is disabled but I see no packet! I
thought maybe it stops capturing on interface and then send the supposed
packet out!

I really confused by what I saw in different scenarios! I need help to fix
it up.

On Sat, Jan 5, 2013 at 11:15 PM, Jay Hennigan j...@west.net wrote:

 On 1/5/13 3:44 AM, h bagade wrote:
  Hi all,
 
  I was wondering how Cisco routers could detect the directly connected
  interface at the other end is shutdown!
 
  there are two general possibility on my point of view:
  1- the other device is sending special information before shutting down
 the
  interface.
  2- there are some method of polling which is done periodically and based
 on
  the answer, the router detect the interface is up or no!

 Some of this depends on the layer 2 protocol (Ethernet vs. DS-3 for
 example) but in most cases there isn't any detectable difference between
 the remote end being administratively shut down and a failure of the
 interconnecting medium.

 The exception is that in some metro ethernet scenarios you can use OAM
 to capture dying-gasp, error disable, or shutdown events.  It isn't a
 periodic poll, but rather like a one-time Going down now!, your
 scenario 1.

  As Cisco router is not able to detect the interface shutdown on the other
  side when connected to some other device, not Cisco like unix systems, it
  seems, it has some sort of protocol for detection which is number 2 of
  above guesses!

 The router will absolutely detect the lack of line protocol and carrier
 and flag the link as down but this would be the case whether the remote
 side is administratively shut down or the cable is just unplugged.

  could you please help me on this? Or provide me a scenario witch I could
  find out if any packet is transmitted between Cisco routers to inform the
  interface shutdown!

 See:

 http://www.cisco.com/en/US/docs/switches/metro/me3400/software/release/12.2_46_se/configuration/guide/swoam.pdf

 --
 Jay Hennigan - CCIE #7880 - Network Engineering - j...@impulse.net
 Impulse Internet Service  -  http://www.impulse.net/
 Your local telephone and internet company - 805 884-6323 - WB6RDV

___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-05 Thread Sander Steffann
Hi,

 I was wondering how Cisco routers could detect the directly connected
 interface at the other end is shutdown!
 
 there are two general possibility on my point of view:
 1- the other device is sending special information before shutting down the
 interface.
 2- there are some method of polling which is done periodically and based on
 the answer, the router detect the interface is up or no!

Neither. The router just sees the power or light disappear on the interface...
Sander


___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-05 Thread Saku Ytti
On (2013-01-05 15:14 +0330), h bagade wrote:

 I was wondering how Cisco routers could detect the directly connected
 interface at the other end is shutdown!

If it is truly directly connected, it should go down in both ends at RTT/2
delay.
Maybe you've disabled autonegotiation which may break this?

Interestingly enough, ethernet standard allows autonegotiation to send type
of 'dying gasp' when operationally shutdown. I.e. far-end device could
differentiate link-loss due to link-cut/HW issue and link-loss due to
intentional shutdown of remote end.
Someone I know checked specs of particular common broadcom chip and this
feature is supported in HW. For some reason router vendors are not
supporting it in software. I personally would love to see in syslog special
line if we detected linkdown due to remote end shutdown.

-- 
  ++ytti
___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


Re: [c-nsp] cisco interface shutdown detection, how is possible?

2013-01-05 Thread Jay Hennigan
On 1/5/13 3:44 AM, h bagade wrote:
 Hi all,
 
 I was wondering how Cisco routers could detect the directly connected
 interface at the other end is shutdown!
 
 there are two general possibility on my point of view:
 1- the other device is sending special information before shutting down the
 interface.
 2- there are some method of polling which is done periodically and based on
 the answer, the router detect the interface is up or no!

Some of this depends on the layer 2 protocol (Ethernet vs. DS-3 for
example) but in most cases there isn't any detectable difference between
the remote end being administratively shut down and a failure of the
interconnecting medium.

The exception is that in some metro ethernet scenarios you can use OAM
to capture dying-gasp, error disable, or shutdown events.  It isn't a
periodic poll, but rather like a one-time Going down now!, your
scenario 1.

 As Cisco router is not able to detect the interface shutdown on the other
 side when connected to some other device, not Cisco like unix systems, it
 seems, it has some sort of protocol for detection which is number 2 of
 above guesses!

The router will absolutely detect the lack of line protocol and carrier
and flag the link as down but this would be the case whether the remote
side is administratively shut down or the cable is just unplugged.

 could you please help me on this? Or provide me a scenario witch I could
 find out if any packet is transmitted between Cisco routers to inform the
 interface shutdown!

See:
http://www.cisco.com/en/US/docs/switches/metro/me3400/software/release/12.2_46_se/configuration/guide/swoam.pdf

--
Jay Hennigan - CCIE #7880 - Network Engineering - j...@impulse.net
Impulse Internet Service  -  http://www.impulse.net/
Your local telephone and internet company - 805 884-6323 - WB6RDV
___
cisco-nsp mailing list  cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/