cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
244
Views
2
Helpful
1
Replies

Unexpected Default Route Change with New SVI Configuration

Hi everyone,

I encountered a strange situation and could use some insights. Initially, I had the following setup:

- **Interface**: VLAN 200
- **Static IP Address**: 172.16.16.12
- **Static Route**:
```
ip route 0.0.0.0 0.0.0.0 172.16.16.245
```

Running `show ip route` gave me:

```
Gateway of last resort is 172.16.16.245 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 172.16.16.245
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.16.0/24 is directly connected, Vlan200
L 172.16.16.12/32 is directly connected, Vlan200
```

However, after adding a second SVI on VLAN 71 with the command `ip address dhcp`, the routing table changed to:

```
S* 0.0.0.0/0 [0/0] via 192.168.71.1
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.16.0/24 is directly connected, Vlan200
L 172.16.16.12/32 is directly connected, Vlan200
192.168.71.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.71.0/24 is directly connected, Vlan71
L 192.168.71.100/32 is directly connected, Vlan71
```

My question is: Why did the switch set `S* 0.0.0.0/0 [0/0] via 192.168.71.1` as the default route in the routing table and categorize it as static?

Any ideas or explanations would be greatly appreciated.

Thanks!

 

1 Reply 1

because the DHCP provide IP to VLAN is also push default route and SW prefer it 
to solve this use in global mode 
ip dhcp-client default-route distance 100 <<- this make distance of any default route get via DHCP have value 100 and hence make SW prefer the lowest metric one 

MHM

Review Cisco Networking for a $25 gift card