1

I have a cisco 2921 router and 2 wan ips provide by 2 diferents isp via dhcp. The main connection is funtional right now, I have a subnet with a nat to this ip, but I want put the second ip just to another subnet. I put a route like this:

ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0

and the second route for the other ip:

ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1

But when I do this the second ip not works, so how can I fix this?

Config:

ip dhcp excluded-address 10.28.11.1
ip dhcp excluded-address 10.28.12.1
!
ip dhcp pool vlan 11
 import all
 network 10.28.11.0 255.255.255.0
 domain-name *****
 default-router 10.28.11.1 
 dns-server 1.1.1.1 208.67.220.220 
 lease 3
!
ip dhcp pool vlan 12
 import all
 network 10.28.12.0 255.255.255.0
 domain-name *****
 dns-server 1.1.1.1 208.67.220.220 
 default-router 10.28.12.1 
 lease 3  
!         
!         
!         
no ip domain lookup
ip domain name LAN-***
no ipv6 cef
!         
multilink bundle-name authenticated

interface Embedded-Service-Engine0/0
 no ip address
 shutdown 
!         
interface GigabitEthernet0/0
 ip address dhcp
 ip nat outside
 ip virtual-reassembly in
 duplex auto
 speed auto
!         
interface GigabitEthernet0/1
 ip address dhcp
 ip nat outside
 ip virtual-reassembly in
 duplex auto
 speed auto
!         
interface GigabitEthernet0/2
 i no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface GigabitEthernet0/1/0
 switchport access vlan 10
 no ip address
!         
interface GigabitEthernet0/1/1
 switchport access vlan 11
 no ip address
!         
interface GigabitEthernet0/1/2
 switchport access vlan 10
 no ip address
!         
interface GigabitEthernet0/1/3
 switchport access vlan 12
 no ip address
!         
interface Vlan1
 no ip address
!         
interface Vlan10
 ip address 10.28.10.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!         
interface Vlan11
 ip address 10.28.11.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!         
interface Vlan12
 ip address 10.28.12.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
!         
ip forward-protocol nd
!         
no ip http server
no ip http secure-server
!         
ip nat inside source list 1 interface GigabitEthernet0/0 overload
ip nat inside source list 2 interface GigabitEthernet0/0 overload
ip nat inside source list 3 interface GigabitEthernet0/1 overload
ip nat inside source static tcp 10.28.10.50 80 ****** 80 extendable
ip nat inside source static tcp 10.28.10.50 443 ****** 443 extendable
ip nat inside source static udp 10.28.10.22 1194 ****** 1194 extendable
ip nat inside source static tcp 10.28.10.20 8006 ****** 8006 extendable
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1
!         
access-list 1 permit 10.28.11.0 0.0.0.255
access-list 2 permit 10.28.10.0 0.0.0.255
access-list 3 permit 10.28.12.0 0.0.0.255
3
  • You need to give us more information. For example, a simple network diagram and the network device configurations.
    – Ron Maupin
    Jun 18 '18 at 20:52
  • 1
    Those routes don't do what you think they do. Your nat statements will need to use route-maps to be "interface aware". You appear to want different vlans to use different ISPs. That can be done with policy routing (source based routing), or VRF.
    – Ricky
    Jun 19 '18 at 1:39
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Dec 25 '18 at 8:55
1

So, your question is not very clear, but let me give you some tips.

When a Cisco router performs NAT, it will only do so after searching the routing table for where the traffic should go. So you have two quad-0 routes, where one points out each internet connection. By default, the router will perform ECMP, and some packets will go out one connection and some packets will go out a different connection. So you're probably not going to get good results like that.

If you're trying to get one of the connections to perform like a backup connection, then set one of the static routes with a higher distance, so that the more preferred one is always used unless the primary connection looses link.

If you're trying to get them to load balance, sorry, you can't do that (with good results) with a 2921 router.

If you're trying to get different internal subnets to use difference internet connections, then you need policy routing, where you use route-maps to specify what traffic should be sent in which direction, thereby overriding the route table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.