I am using a LTE Router with a Cellular interface.
I have a private LAN (/24 mask), so I'm using NAT to translate my private subnet in order to use the external public IP that my provider assigns to my cellular interface. This IP is dynamic, so here is what I am using :
ip access-list extended NAT
permit ip 192.168.0.0 0.0.0.255 any
ip nat inside source list NAT interface Cellular0 overload
ip route 0.0.0.0 0.0.0.0 Cellular0 100
interface Cellular0
ip nat outside
interface vlan10
ip nat inside
This setup is working fine.
I also have a wired WAN interface, that I want to use when possible, therefore bypassing the Cellular interface. Seeing as I have a default route moving all packets to my cellular interface, here is what I have done to achieve using my Wired Gi0 interface when possible :
track 1 interface gigabitEthernet 0 line-protocol
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0 50 track 1
ip route 0.0.0.0 0.0.0.0 Cellular0 100
But to be perfectly automatic, I would need to change my NAT command-line to this :
ip nat inside source list NAT interface **Gig0** overload
so that my private LAN traffic can be translated and use Gig0's public ip.
Is there a way to do this ? Cell0 and gig0 public IPs are not the same.
Thanks