Wednesday
Hello,
i need help with a problem:
We have a X440-G2 which has on VLAN1 Managament IP-Address 172.31.30... and a default route to 172.31.30..
I want the switch to have a management IP-Address in a diffrent subnet. for example Vlan2 ip should be 172.30.2.5 255.255.255.0. If configured the IP on a VLAN and the route 172.30.2.0 255.255.255.0 172.30.2.1 Both routes have the metric 1 and both are in the same VR.
No when i want to ping the switch there is no response, other switches in the same subnet i can reach. Enabling ipforwarding also doesnt work.
I cant change the default route because i wil lose acces to the switch.
Wednesday
As the switch has two equal default routes (I guess that's what you mean), it will choose one based on some "random"/unknown criteria. In your case, it doesn't do what you want. As you're migrating from one management IP to another, one thing you can do is to set a more specific route in the switch that only points to your computer's IP. This way, another PC in the client subnet will still be able to reach the switch if you somehow mess up the route. You could also ssh to another switch in the old VLAN and ssh from that to this switch as that will be a local "intra-subnet" connection, not dependent on any routing.
Example:
configure iproute add 10.1.2.3/32 172.30.2.1 (replace 10.1.2.3/32 with your IP and /32, meaning only one IP or 255.255.255.255)
This will only affect traffic to that IP and nothing else. A more specific route always wins when evaluated against other route entries, no matter the metric etc.
If you can reach the switch on the new IP, you can then remove the IP from the old VLAN and the route associated with that, save and be done!
11 hours ago
I think Fredrik is on the right track.
If two default routes are installed at the same time (show iproute), the switch will use the route that has the lowest next-hop IP address.
Therefore, if you have 2 subnets:
172.31.30.0/24
172.30.2.0/24
And you create 2 default routes:
172.31.30.1
172.30.2.1
The switch will try to use the lower IP address next-hop interface/VLAN, EG 172.30.2.1.
Depending on if that network is tagged correctly to the gateway, and if that gateway has correct routes back to the switch, you may be breaking the routing setup by adding the 2nd interface.
Hope that helps!