Junos OS

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  MX5 ping: sendto: Can't assign requested address

    Posted 09-18-2018 11:56

    Hello,

    I was setting up snmp on a MX5 when I realized that it can't talk the to the snmp server.

    The log message said

    SNMPD_SEND_FAILURE: jnx_netsnmp_udp_send: send message  failure: Can't assign requested address

     

    When I gave lo0 ip address the message changed to:

    SNMPD_SEND_FAILURE: jnx_netsnmp_udp_send: send message failure: No route to host

     

    Ping also doesn't work unless the interface is specified.

    What am I missing? I tried comparing config with MX80 that this router is connected to and I couldn't find out anything that stands out.

     

    Thanks!


    #mx
    #SNMP
    #ping


  • 2.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-18-2018 19:51

    Hi Hunt,

    Below message is triggred when no route is confiured for the specified client.

     

    SNMPD_SEND_FAILURE: jnx_netsnmp_udp_send: send message failure: No route to host

     

    Please check if route is configured for the client.

    >show route <client ip>

     

    Thanks, 

    Gaurao



  • 3.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-19-2018 05:21

    The routes seem to look fine, as the router been functioning properly for years.

    I can ping fine as long as I specify the interface.

     

    show route 10.4.64.30

    0.0.0.0/0          *[Static/5] 23w6d 00:38:12
                        > to X.X.183.249 via ge-1/0/0.0
                        [Static/25] 23w6d 00:38:39
                        > to X.X.183.253 via ge-1/1/0.0

     

    10.4.0.0/16        *[Static/5] 8w6d 20:05:17
                        > to 10.4.1.1 via ge-1/1/5.129

     



  • 4.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-19-2018 05:48

    Is the address you use to successfully ping the snmp server the lo0 address configured?

     

    Can you check that the trace route also works sourced from that address?

     

    Are we talking snmp polling inbound?  If so, what about routes and access from server to mx.

     



  • 5.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-19-2018 08:00

    I configured lo0 as 127.0.0.1/24 just to see if that what it needed. I also tried giving it IP addess from a valid range.

    If I run ping 10.4.64.30 interface ge-1/1/5.129 works fine.

    Other then that, the router works fine and it has been since I started working with it.

    If I run show route it gives me a proper route.

     

    I added the configuration below with some stuff reducted.

     

    set interfaces ge-1/0/0 flexible-vlan-tagging
    set interfaces ge-1/0/0 encapsulation flexible-ethernet-services
    set interfaces ge-1/0/0 unit 0 description "Public Internet Routing"
    set interfaces ge-1/0/0 unit 0 vlan-id 10
    set interfaces ge-1/0/0 unit 0 family inet address X.X.X.250/30
    set interfaces ge-1/0/0 unit 100 encapsulation vlan-bridge
    set interfaces ge-1/0/0 unit 100 vlan-tags outer 100
    set interfaces ge-1/0/0 unit 100 vlan-tags inner 20
    set interfaces ge-1/0/0 unit 130 vlan-id 130
    set interfaces ge-1/0/0 unit 130 family inet address 10.50.1.2/30
    set interfaces ge-1/0/1 unit 0
    set interfaces ge-1/0/2 unit 0
    set interfaces ge-1/0/3 unit 0
    set interfaces ge-1/0/4 unit 0
    set interfaces ge-1/0/5 unit 0 family inet address X.X.X.222/30
    set interfaces ge-1/0/6 vlan-tagging
    set interfaces ge-1/0/6 encapsulation flexible-ethernet-services
    set interfaces ge-1/0/6 unit 4 vlan-id 4
    set interfaces ge-1/0/6 unit 4 family inet address X.X.X.161/27
    set interfaces ge-1/0/6 unit 5 vlan-id 5
    set interfaces ge-1/0/6 unit 5 family inet address X.X.X.97/27
    set interfaces ge-1/0/7 unit 0
    set interfaces ge-1/0/8 unit 0 family inet address X.X.X.201/30
    set interfaces ge-1/0/9 vlan-tagging
    set interfaces ge-1/0/9 unit 64 vlan-id 64
    set interfaces ge-1/0/9 unit 64 family inet address X.X.X.1/30
    set interfaces ge-1/0/9 unit 67 vlan-id 67
    set interfaces ge-1/0/9 unit 67 family inet address X.X.X.205/30
    set interfaces ge-1/1/0 flexible-vlan-tagging
    set interfaces ge-1/1/0 encapsulation flexible-ethernet-services
    set interfaces ge-1/1/0 unit 0 vlan-id 10
    set interfaces ge-1/1/0 unit 0 family inet address X.X.X.254/30
    set interfaces ge-1/1/1 unit 0
    set interfaces ge-1/1/2 unit 0
    set interfaces ge-1/1/3 unit 0
    set interfaces ge-1/1/4 unit 0
    set interfaces ge-1/1/5 vlan-tagging
    set interfaces ge-1/1/5 unit 31 vlan-id 31
    set interfaces ge-1/1/5 unit 31 family inet address X.X.X.193/28
    set interfaces ge-1/1/5 unit 92 vlan-id 92
    set interfaces ge-1/1/5 unit 92 family inet address X.X.X.97/27
    set interfaces ge-1/1/5 unit 93 vlan-id 93
    set interfaces ge-1/1/5 unit 93 family inet address X.X.X.65/27
    set interfaces ge-1/1/5 unit 94 vlan-id 94
    set interfaces ge-1/1/5 unit 94 family inet address X.X.X.225/28
    set interfaces ge-1/1/5 unit 95 vlan-id 95
    set interfaces ge-1/1/5 unit 95 family inet address X.X.X.1/27
    set interfaces ge-1/1/5 unit 96 vlan-id 96
    set interfaces ge-1/1/5 unit 96 family inet address X.X.X.177/28
    set interfaces ge-1/1/5 unit 129 vlan-id 129
    set interfaces ge-1/1/5 unit 129 family inet address 10.4.1.5/24
    set interfaces ge-1/1/5 unit 151 vlan-id 151
    set interfaces ge-1/1/5 unit 151 family inet address X.X.X.161/27
    set interfaces ge-1/1/5 unit 152 vlan-id 152
    set interfaces ge-1/1/5 unit 152 family inet address X.X.X.241/29
    set interfaces ge-1/1/6 unit 0 family inet address X.X.X.33/29
    set interfaces ge-1/1/7 unit 0
    set interfaces ge-1/1/8 unit 0 family inet address X.X.X.209/30
    set interfaces ge-1/1/9 vlan-tagging
    set interfaces ge-1/1/9 unit 65 vlan-id 65
    set interfaces ge-1/1/9 unit 65 family inet address 10.100.65.1/30
    set interfaces ge-1/1/9 unit 69 vlan-id 69
    set interfaces ge-1/1/9 unit 69 family inet address X.X.X.205/30
    set policy-options prefix-list XXXX X.X.X.160/27
    set policy-options prefix-list XXXX X.X.X.96/27
    set policy-options prefix-list XXXXX X.X.X.32/29
    set policy-options prefix-list XXXXX X.X.X.40/30
    set policy-options prefix-list XXXXX X.X.X.44/30
    set policy-options prefix-list XXXXX X.X.X.48/29
    set policy-options prefix-list XXXXX X.X.X.16/28
    set policy-options prefix-list XXXXX X.X.X.0/24
    set policy-options prefix-list XXXXX X.X.X.128/27
    set policy-options prefix-list XXXXX X.X.X.192/29
    set routing-instances PublicInternet instance-type virtual-router
    set routing-instances PublicInternet interface ge-1/0/0.0
    set routing-instances PublicInternet interface ge-1/0/5.0
    set routing-instances PublicInternet interface ge-1/0/6.4
    set routing-instances PublicInternet interface ge-1/0/6.5
    set routing-instances PublicInternet interface ge-1/0/8.0
    set routing-instances PublicInternet interface ge-1/0/9.67
    set routing-instances PublicInternet interface ge-1/1/0.0
    set routing-instances PublicInternet interface ge-1/1/5.31
    set routing-instances PublicInternet interface ge-1/1/5.92
    set routing-instances PublicInternet interface ge-1/1/5.93
    set routing-instances PublicInternet interface ge-1/1/5.94
    set routing-instances PublicInternet interface ge-1/1/5.95
    set routing-instances PublicInternet interface ge-1/1/5.96
    set routing-instances PublicInternet interface ge-1/1/5.151
    set routing-instances PublicInternet interface ge-1/1/5.152
    set routing-instances PublicInternet interface ge-1/1/6.0
    set routing-instances PublicInternet interface ge-1/1/8.0
    set routing-instances PublicInternet interface ge-1/1/9.69
    set routing-instances PublicInternet routing-options static route X.X.X.0/23 next-hop X.X.X.221
    deactivate routing-instances PublicInternet routing-options static route X.X.X.0/23
    set routing-instances PublicInternet routing-options static route X.X.X.0/23 next-hop X.X.X.249
    set routing-instances PublicInternet routing-options static route X.X.1X.0/23 next-hop X.X.X.253
    deactivate routing-instances PublicInternet routing-options static route 8.20.182.0/23
    set routing-instances PublicInternet routing-options static route X.X.X.192/28 next-hop X.X.X.221
    deactivate routing-instances PublicInternet routing-options static route X.X.X.192/28
    set routing-instances PublicInternet routing-options static route 0.0.0.0/0 next-hop X.X.X.249
    set routing-instances PublicInternet routing-options static route 0.0.0.0/0 qualified-next-hop X.X.X.253 preference 25
    set routing-instances PublicInternet routing-options static route X.X.X.32/27 next-hop X.X.X.221
    set routing-instances PublicInternet routing-options static route X.X.X.16/28 next-hop X.X.X.221
    set routing-instances PublicInternet routing-options static route X.X.X.0/24 next-hop X.X.X.221
    set routing-instances PublicInternet routing-options static route X.X.X.X/27 next-hop X.X.X.221
    set routing-instances PublicInternet routing-options static route X.X.X.X/29 next-hop X.X.X.221
    set routing-instances PublicInternet routing-options router-id X.X.X.250
    set routing-instances PublicInternet routing-options autonomous-system XXXXX
    set routing-instances Private instance-type virtual-router
    set routing-instances Private interface ge-1/0/0.130
    set routing-instances Private interface ge-1/1/5.129
    set routing-instances Private routing-options static route 10.50.0.0/16 next-hop 10.50.1.1
    set routing-instances Private routing-options static route 10.4.0.0/16 next-hop 10.4.1.1
    set bridge-domains Backend vlan-id 20
    set bridge-domains Backend interface ge-1/0/0.100



  • 6.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-19-2018 09:28

    Since the address you are trying to ping is reachable through a specific routing instance, you need to specify the instance in the ping command:  'ping 10.4.64.30 routing-instance Private'.  Or, as you confirmed, specifying the exit interface explicitly works as well.

     

    For your SNMP, it should work if you configure 'set snmp routing-instance-access' on the MX.  By default most services, including SNMP, only work within the default instance.  You can find more info at https://www.juniper.net/documentation/en_US/junos/topics/concept/understanding-snmp-support-for-routing-instances-junos-nm.html.

     

    Hope this works for you.



  • 7.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-20-2018 04:49

    Thanks for the configuration and the access data.

     

    If I run ping 10.4.64.30 interface ge-1/1/5.129 works fine.
    set interfaces ge-1/1/5 unit 129 vlan-id 129
    set interfaces ge-1/1/5 unit 129 family inet address 10.4.1.5/24
    set routing-instances Private interface ge-1/1/5.129

    So the access for snmp will be inside a routing instance as mentioned by  Louis.  

     

    Can you confirm that ping from routing instance alone works?

    ping 10.4.64.30 routing-instance Private

    If so, then all you should need to add to snmp is the following:

    set snmp routing-instance-access
    set snmp community NAME routing-instance Private clients 10.4.64.30
    

    subsitute your community name for NAME.

     

     



  • 8.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-20-2018 06:24

    Those 3 lines already exist in the config

    set interfaces ge-1/1/5 unit 129 vlan-id 129
    set interfaces ge-1/1/5 unit 129 family inet address 10.4.1.5/24
    set routing-instances Private interface ge-1/1/5.129

    Pinging using routing instance works.

     

    Here is what I got now:

    Sep 18 20:12:52 snmpd[427157e9] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Sep 18 20:12:52 snmpd[427157e9] >>> Get-Request
    Sep 18 20:12:52 snmpd[427157e9] >>>  Source:      10.4.64.30
    Sep 18 20:12:52 snmpd[427157e9] >>>  Destination: 10.4.1.5
    Sep 18 20:12:52 snmpd[427157e9] >>>  Version:     SNMPv2
    Sep 18 20:12:52 snmpd[427157e9] >>>  Request_id:  0x427157e9
    Sep 18 20:12:52 snmpd[427157e9] >>>  Community:   XXXXXX
    Sep 18 20:12:52 snmpd[427157e9] >>>  Error:       status=0 / vb_index=0
    Sep 18 20:12:52 snmpd[427157e9] >>>   OID  : jnxYellowAlarmState.0
    Sep 18 20:12:52 snmpd[427157e9] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Sep 18 20:12:52 snmpd[427157e9]  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Sep 18 20:12:52 snmpd[427157e9]  <<< Get-Response
    Sep 18 20:12:52 snmpd[427157e9]  <<<  Source:      10.4.1.5
    Sep 18 20:12:52 snmpd[427157e9]  <<<  Destination: 10.4.64.30
    Sep 18 20:12:52 snmpd[427157e9]  <<<  Version:     SNMPv2
    Sep 18 20:12:52 snmpd[427157e9]  <<<  Request_id:  0x427157e9
    Sep 18 20:12:52 snmpd[427157e9]  <<<  Community:   XXXXXX
    Sep 18 20:12:52 snmpd[427157e9]  <<<  Error:       status=0 / vb_index=0
    Sep 18 20:12:52 snmpd[427157e9]  <<<   OID  : jnxYellowAlarmState.0
    Sep 18 20:12:52 snmpd[427157e9]  <<<   type : Number
    Sep 18 20:12:52 snmpd[427157e9]  <<<   value: 2
    Sep 18 20:12:52 snmpd[427157e9]  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Sep 18 20:12:52 SNMPD_SEND_FAILURE: jnx_netsnmp_udp_send: send message (10.4.64.30) failure: Can't assign requested address
    

     And here is the config for SNMP

    set snmp name XXXX
    set snmp description "XXXXX"
    set snmp location "XXXXXX"
    set snmp interface ge-1/1/5.129
    set snmp client-list list0 10.4.64.30/32
    set snmp community XXXXX authorization read-only
    set snmp community XXXXX client-list-name list0
    set snmp community XXXXX routing-instance Private clients 10.4.64.30/32
    set snmp routing-instance-access
    set snmp traceoptions flag all
    


  • 9.  RE: MX5 ping: sendto: Can't assign requested address

    Posted 09-21-2018 04:38

    Sorry, I forgot to mention that the request from the snmp polling server has to be in the format of

    RoutingInstance@community

    Private@xxxxx

     

    When just the community is used the response will be from the master or root routing instance.