Routing

Expand all | Collapse all

Need help configuring routing of a subnet on a MX40

Jump to Best Answer
  • 1.  Need help configuring routing of a subnet on a MX40

    Posted 03-09-2019 12:10

    Hello,

     

    Struggling to understand how I can use my MX40 to route a subnet through a serial to my ISP.  Specially:
      Serial: 65.156.39.84/30 (my IP: 65.156.39.86, GW (ISP): 65.156.39.85)
      Subnet that I was given for use: 66.155.178.160/29 (using 66.155.178.161 as default GW for subnet)

     

    On my MX40, I have two ports I am using:

      xe-0/0/0 <--- Interface for ISP connection, serial IP of 65.156.39.86 for interface IP addr, directly connected to ISP.
      xe-0/0/1 <--- Interface for subnet 66.155.178.160/29, using 66.155.178.161 for interface IP addr, connected to a switch with other devices attached

     


    I have been trying to use "logical-systems" believing that is the way this should work, however, I am struggling with getting the subnet to work.  I can successfully setup my end of the serial and ping out to the world and the world can ping my IP (65.156.39.86) on the router.  However, the subnet I setup on xe-0/0/1 is clearly completely wrong as it can not ping any address nor can it be pinged even with devices are attached to the same switch as its plugged into.

    Here is my relevant configuration section:
    logical-systems {
    LS1 {
    interfaces {
    xe-0/0/0 {
    unit 0 {
    description "GW to ISP - 86";
    family inet {
    address 65.156.39.86/30;
    }
    family iso;
    }
    }
    }
    routing-options {
    static {
    route 0.0.0.0/0 next-hop 65.156.39.85;
    }
    }
    }
    LS2 {
    interfaces {
    xe-0/0/1 {
    unit 0 {
    description "Internal GW - 161";
    family inet {
    address 66.155.178.161/29;
    }
    family iso;
    }
    }
    }
    routing-options {
    static {
    route 0.0.0.0/0 next-hop 65.156.39.86;
    }
    }
    }
    }

     

    I have tried all sorts of permutations on the above configuration to no avail.  I can see that there is no route setup for that 66.155.178.160/30 subnet (LS2), that is, it doesn't have a static route for next hop even though I defined one (see above):

    show route logical-system all

    logical-system: LS2

    inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    66.155.178.160/29 *[Direct/0] 01:22:32
    > via xe-0/0/1.0
    66.155.178.161/32 *[Local/0] 01:22:32
    Local via xe-0/0/1.0

    inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    ff02::2/128 *[INET6/0] 01:22:32
    MultiRecv
    -----

    logical-system: LS1

    inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    0.0.0.0/0 *[Static/5] 00:59:05
    > to 65.156.39.85 via xe-0/0/0.0
    65.156.39.84/30 *[Direct/0] 01:27:13
    > via xe-0/0/0.0
    65.156.39.86/32 *[Local/0] 01:27:13
    Local via xe-0/0/0.0

    inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    ff02::2/128 *[INET6/0] 01:27:13
    MultiRecv
    -----

     



  • 2.  RE: Need help configuring routing of a subnet on a MX40

    Posted 03-09-2019 13:00
    There is no need to configure logical system in this case. However, if you would like to use it configure both interfaces in logical system LS1 and remove LS2.
    Or
    Remove both logical systems and configure interfaces and routing normally. Everything in global routing table inte.0


  • 3.  RE: Need help configuring routing of a subnet on a MX40

    Posted 03-09-2019 13:31

     

     

    interfaces {
        xe-0/0/0 {
            description "GW ISP - 86";
            unit 0 {
                family inet {
                    address 65.156.39.86/30;
                }
            }
        }
        xe-0/0/1 {
            description "PUB SUBNET - 161";
            unit 0 {
                family inet {
                    address 66.155.178.161/30;
                }
            }
        }
        fxp0 {
            unit 0 {
                family inet {
                    address 10.255.255.4/24;
                }
            }
        }
    }
    routing-options {
        static {
            route 10.255.254.0/24 {
                next-hop 10.255.255.1;
                retain;
                no-readvertise;
            }
            route 0.0.0.0/0 next-hop 65.156.39.85;
        }
    }
    # run show route
    
    inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    0.0.0.0/0          *[Static/5] 00:03:29
                        > to 65.156.39.85 via xe-0/0/0.0
    10.255.254.0/24    *[Static/5] 04:34:04
                        > to 10.255.255.1 via fxp0.0
    10.255.255.0/24    *[Direct/0] 04:34:04
                        > via fxp0.0
    10.255.255.4/32    *[Local/0] 04:34:04
                          Local via fxp0.0
    65.156.39.84/30    *[Direct/0] 00:13:55
                        > via xe-0/0/0.0
    65.156.39.86/32    *[Local/0] 00:13:55
                          Local via xe-0/0/0.0
    66.155.178.160/30  *[Direct/0] 00:10:30
                        > via xe-0/0/1.0
    66.155.178.161/32  *[Local/0] 00:10:30
                          Local via xe-0/0/1.0
    
    inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    ff02::2/128        *[INET6/0] 17:32:00
                          MultiRecv
    


  • 4.  RE: Need help configuring routing of a subnet on a MX40

    Posted 03-09-2019 14:02

    So after having moved the configuration away from logical systems setup, I am still faced with the problem that I clearly don't know how to setup the routing to make m subnet routed correctly/pingable.  Again, as a noob, can someone help me understand what I need to do.  Any URL's or tech notes would be most welcome.  Thanks!



  • 5.  RE: Need help configuring routing of a subnet on a MX40

    Posted 03-09-2019 18:11

    Looks like your ISP does not have route for  the LAN subnet 66.155.178.160/29 or ISP firewall is blocking the communication. May be they did not advertise the LAN subnet. To verify this:

    First verify ISP gateway reachability using lan ip then any internet ip from MX

    ping 65.156.39.85 source 66.155.178.161
    ping 8.8.8.8 source 66.155.178.161
    traceroute 8.8.8.8 source 66.155.178.161 no-resolve

    Use online tools like https://ping.eu/traceroute/ to verify the route and reachability. Do it for both WAN IP and LAN IP.

     



  • 6.  RE: Need help configuring routing of a subnet on a MX40

    Posted 03-10-2019 11:14

    Thanks for the debugging tips! 



  • 7.  RE: Need help configuring routing of a subnet on a MX40

    Posted 03-10-2019 11:17

    Indeed, this mess came down to a typo when the circuit was first setup. Thanks for noticing my typo which brought out the real typo which the provider fixed.  All is golden now.



  • 8.  RE: Need help configuring routing of a subnet on a MX40
    Best Answer

     
    Posted 03-10-2019 04:29

    I notice a typo on your assigned public subnet you have it in as a /30 instead of the /29

    xe-0/0/1 {
            description "PUB SUBNET - 161";
            unit 0 {
                family inet {
                    address 66.155.178.161/30;
                }
            }
        }

    But this should not affect reachability.

     

    Looking at the two subnets I wonder if there is a typo from your carrier notice.

    66.155.178.160/29 is a windstream owned subnet

    65.156.39.84/30 is a Centurylink owned subnet

    The traceroutes into them are different paths.  I would expect them both to be assigned to the same carrier in your setup.  I would confirm with your provider the assignments.

     

    I also notice you have private addressing to manage the MX on the fxp0.  You probably want these out of your transit traffic routing instance.  If you are running 17.3 you can move the fxp0 interface for that purpose.  In earlier versions you need to move all the transit interfaces into a virtual router routing instance instead.

     

    https://www.juniper.net/documentation/en_US/junos/topics/topic-map/management-interface-in-non-default-instance.html