Description

This article clarifies how to configure a correct static route on Juniper Networks switches to allow the PC that is directly connected to vme.0 management interface to access the switch via J-Web.

Symptoms

The switch has a default static route and it aims at the PC's IP address as its next hop. However, the PC keeps showing the error “bad gateway” on every attempt to access J-Web on any browser. Summary of configuration and scenario below:

Switch: set interfaces vme unit 0 family inet address 192.168.1.4/24
Default static route: set routing-options static route 0/0 next-hop 192.168.1.1
Web management service configuration: set system services web-management http 
Laptop directly connected to management interface address: 192.168.1.1

Solution

In this scenario, the static route needs to be configured with the vme.0 IP address as next hop, since there are no layer 3 capable devices between the management interface and the connected PC. Hence, there is no valid next hop that may route towards the destination, and the vme.0 will do as next hop. With the changes applied, the scenario will look like this:

Switch: set interfaces vme unit 0 family inet address 192.168.1.4/24
Default static route: set routing-options static route 0/0 next-hop 192.168.1.4
Web management service configuration: set system services web-management http
Laptop directly connected to management interface address: 192.168.1.1

Modification History

2024-01-30 : Article Created