Mailing List Archive

Event script to advertise DHCP issued IP in LLDP?
In our environment we're using EX2300-C's as 10Gbps NID's for metro
ethernet use *(meaning they're essentially a managed L2 switch with an
in-band management IP). *These are configured without an IP address on the
physical me0 interface, but instead receive an IP via DHCPv4 & v6 as a
tagged "irb" VLAN interface *(note the dhcp retransmission-attempt,
-interval, and force-discover options are crucial here - otherwise the unit
will timeout all DHCP attempts prior to the interface having link up..).*

We're trying to figure out an approach to define the "protocols lldp
management-address" stanza with the current issued IP address.
Unfortunately this command only accepts a static defined IP address, not an
interface name. Upon looking at the possible events for a SLAX or Python
script, only DHCP serving events exist - not DHCP client *(based off "help
syslog" listing). *This is probably a feature request, but maybe another
creative solution is possible? Thanks.

--Matt
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: Event script to advertise DHCP issued IP in LLDP? [ In reply to ]
? 8 avril 2019 18:25 -07, Matt Peterson <matt@peterson.org>:

> In our environment we're using EX2300-C's as 10Gbps NID's for metro
> ethernet use *(meaning they're essentially a managed L2 switch with an
> in-band management IP). *These are configured without an IP address on the
> physical me0 interface, but instead receive an IP via DHCPv4 & v6 as a
> tagged "irb" VLAN interface *(note the dhcp retransmission-attempt,
> -interval, and force-discover options are crucial here - otherwise the unit
> will timeout all DHCP attempts prior to the interface having link up..).*
>
> We're trying to figure out an approach to define the "protocols lldp
> management-address" stanza with the current issued IP address.
> Unfortunately this command only accepts a static defined IP address, not an
> interface name. Upon looking at the possible events for a SLAX or Python
> script, only DHCP serving events exist - not DHCP client *(based off "help
> syslog" listing). *This is probably a feature request, but maybe another
> creative solution is possible? Thanks.

Maybe: set interfaces me0 unit 0 family inet unnumbered-address
xe-0/0/0.0 ?
--
In the Spring, I have counted 136 different kinds of weather inside of
24 hours.
-- Mark Twain, on New England weather
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: Event script to advertise DHCP issued IP in LLDP? [ In reply to ]
Sadly no, interesting find - never seen the unnumber-address before.

matt@CPE-HW02173XXXX# commit check
[edit interfaces me0 unit 0 family inet unnumbered-address]
'irb.255'
referred interface must have address configured under family inet
error: configuration check-out failed: (statements constraint check failed)

matt@CPE-HW02173XXXX# show interfaces irb.255
family inet {
dhcp {
retransmission-attempt 5;
retransmission-interval 5;
force-discover;
}
}
family inet6 {
dhcpv6-client {
client-type stateful;
client-ia-type ia-na;
client-identifier duid-type duid-ll;
}
}


On Mon, Apr 8, 2019 at 10:14 PM Vincent Bernat <bernat@luffy.cx> wrote:

> ? 8 avril 2019 18:25 -07, Matt Peterson <matt@peterson.org>:
>
> > In our environment we're using EX2300-C's as 10Gbps NID's for metro
> > ethernet use *(meaning they're essentially a managed L2 switch with an
> > in-band management IP). *These are configured without an IP address on
> the
> > physical me0 interface, but instead receive an IP via DHCPv4 & v6 as a
> > tagged "irb" VLAN interface *(note the dhcp retransmission-attempt,
> > -interval, and force-discover options are crucial here - otherwise the
> unit
> > will timeout all DHCP attempts prior to the interface having link up..).*
> >
> > We're trying to figure out an approach to define the "protocols lldp
> > management-address" stanza with the current issued IP address.
> > Unfortunately this command only accepts a static defined IP address, not
> an
> > interface name. Upon looking at the possible events for a SLAX or Python
> > script, only DHCP serving events exist - not DHCP client *(based off
> "help
> > syslog" listing). *This is probably a feature request, but maybe another
> > creative solution is possible? Thanks.
>
> Maybe: set interfaces me0 unit 0 family inet unnumbered-address
> xe-0/0/0.0 ?
> --
> In the Spring, I have counted 136 different kinds of weather inside of
> 24 hours.
> -- Mark Twain, on New England weather
>
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: Event script to advertise DHCP issued IP in LLDP? [ In reply to ]
? 8 avril 2019 18:25 -07, Matt Peterson <matt@peterson.org>:

> In our environment we're using EX2300-C's as 10Gbps NID's for metro
> ethernet use *(meaning they're essentially a managed L2 switch with an
> in-band management IP). *These are configured without an IP address on the
> physical me0 interface, but instead receive an IP via DHCPv4 & v6 as a
> tagged "irb" VLAN interface *(note the dhcp retransmission-attempt,
> -interval, and force-discover options are crucial here - otherwise the unit
> will timeout all DHCP attempts prior to the interface having link up..).*
>
> We're trying to figure out an approach to define the "protocols lldp
> management-address" stanza with the current issued IP address.
> Unfortunately this command only accepts a static defined IP address, not an
> interface name. Upon looking at the possible events for a SLAX or Python
> script, only DHCP serving events exist - not DHCP client *(based off "help
> syslog" listing). *This is probably a feature request, but maybe another
> creative solution is possible? Thanks.

You may run your script on PFE_FW_SYSLOG_IP if you set the appropriate
firewall rule to match on DHCP answer. Your script will be executed
twice as this is not possible to make a difference between a DHCPOFFER
and a DHCPACK just with a family inet filter.
--
Let the data structure the program.
- The Elements of Programming Style (Kernighan & Plauger)
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: Event script to advertise DHCP issued IP in LLDP? [ In reply to ]
Hi Matt,

> This is probably a feature request, but maybe another
> creative solution is possible? Thanks.

What if you simply periodically check the address on IRB interface and if
this differs from the LLDP management-address, then configure latter
accordingly? Something like this:
https://github.com/jumation/mgmt-IP-to-LLDP


WBR,
Martin
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp