Mailing List Archive

source address selection for RE generated traffic addresses to direct neighbors
Hi,

how does Junos choose the source address for RE generated traffic
addresses to direct neighbors if the application(for example ping
utility) does not bind to specific address? Does it choose the first
address configured on the egress interface which falls in the same
network as the destination address? Looks like it because if I have a
following configuration:

root@vmx1> show configuration interfaces ge-0/0/0.0 family inet
address 10.10.1.0/31;
address 10.10.99.100/24;
address 10.10.99.2/24;
address 10.10.99.3/24;

root@vmx1> show interfaces ge-0/0/0.0 terse
Interface Admin Link Proto Local Remote
ge-0/0/0.0 up up inet 10.10.1.0/31
10.10.99.2/24
10.10.99.3/24
10.10.99.100/24
multiservice

root@vmx1>

..and I execute the "ping 10.10.99.200", then the source address is 10.10.99.2.

And for IPv6 it should be very straightforward. RFC6724 defines the
"Prefer appropriate scope" rule and as Junos seems to allow only
single link-local IPv6 address per IFL, then for locally generated
IPv6 traffic addressed to direct neighbors uses that link-local IPv6
address as a source address?


thanks,
Martin
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: source address selection for RE generated traffic addresses to direct neighbors [ In reply to ]
Look at default-address-selection option description:
https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/junos-software-system-management-source-address-local-tcp-ip-packets-configuring.html
For IPv4: If this option is not enabled, and destination is directly
connected then Is-Preffered address from this subnet is used, if not
direct then junos uses Is-Primary address of interface.

If option is enabled, then address with "Is-Default" flag used for all
connections except some special cases like ebgp or ldp (it is lo0.0 in
most cases)

For IPv6 there is "scope" algorithm described in rfc6724, but I am not
sure how junos follows it.

22.01.2019 19:18, Martin T ?????:
> Hi,
>
> how does Junos choose the source address for RE generated traffic
> addresses to direct neighbors if the application(for example ping
> utility) does not bind to specific address? Does it choose the first
> address configured on the egress interface which falls in the same
> network as the destination address? Looks like it because if I have a
> following configuration:
>
> root@vmx1> show configuration interfaces ge-0/0/0.0 family inet
> address 10.10.1.0/31;
> address 10.10.99.100/24;
> address 10.10.99.2/24;
> address 10.10.99.3/24;
>
> root@vmx1> show interfaces ge-0/0/0.0 terse
> Interface Admin Link Proto Local Remote
> ge-0/0/0.0 up up inet 10.10.1.0/31
> 10.10.99.2/24
> 10.10.99.3/24
> 10.10.99.100/24
> multiservice
>
> root@vmx1>
>
> ..and I execute the "ping 10.10.99.200", then the source address is 10.10.99.2.
>
> And for IPv6 it should be very straightforward. RFC6724 defines the
> "Prefer appropriate scope" rule and as Junos seems to allow only
> single link-local IPv6 address per IFL, then for locally generated
> IPv6 traffic addressed to direct neighbors uses that link-local IPv6
> address as a source address?
>
>
> thanks,
> Martin
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>

--
? ?????????,
???? ????????
"?????-???????" ?????
???????, ????
(044) 206-77-33 ???.155
www.cyfra.ua
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: source address selection for RE generated traffic addresses to direct neighbors [ In reply to ]
On 1/22/19 11:18 AM, Martin T wrote:
> Hi,
>
> how does Junos choose the source address for RE generated traffic
> addresses to direct neighbors if the application(for example ping
> utility) does not bind to specific address? Does it choose the first
> address configured on the egress interface which falls in the same
> network as the destination address?


Hi Martin,

If you are looking to be deterministic on your address selection, you
will want to check out primary and preferred addresses:

https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/interfaces-configuring-default-primary-and-preferred-addresses-and-interfaces.html


Hope that helps,
Andy

Andy Koch
Hoyos Consulting LLC
ofc: +1 608 616 9950
andyk@hoyosconsulting.com
http://www.hoyosconsulting.com

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