cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
863
Views
0
Helpful
6
Replies

2 different VLANs route to 2 dialers

geronikolakis
Level 1
Level 1

Hello,

 

I have a Cisco 2901 router with 2 EHWIC-VA-DSL cards.

I have 2 interface dialers 1 and 2

I have configured 2 VLANs on it VLAN1 and VLAN2

 

I need VLAN1 to have inernet access from dialer 1 and VLAN2 to have internet access from dialer 2

6 Replies 6

balaji.bandi
Hall of Fame
Hall of Fame

Send us the existing configuration to match the config to best working

 

or high level use below methods

 

interface dialer 0

ip nat outside

!

interface dialer 1

ip nat outside

!

!  - change the interface as per the requirement.

interface g0/1

ip nat inside

!

interface g0/1

ip nat inside

!

access-list 10 permit ip 192.168.1.0 0.0.0.255 any   ( change  VLAN 1 IP address here)
access-list 11 permit ip 192.168.2.0 0.0.0.255 any  ( change  VLAN 2 IP address here)

!

ip nat inside source list 10 interface Dialer0 overload
ip nat inside source list 11 interface Dialer1 overload
!

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

track 1 interface Dialer1 ip routing
!
track 2 interface Dialer2 ip routing

interface GigabitEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.9.1 255.255.255.0
ip helper-address 192.168.9.11
ip nat inside
ip virtual-reassembly in
ip policy route-map rmap1
shutdown
!
interface GigabitEthernet0/0.6
encapsulation dot1Q 6
ip address 192.168.40.1 255.255.255.0
ip access-group AllowGuest2Internet in
ip nat inside
ip virtual-reassembly in

 

interface Dialer1
mtu 1492
ip address negotiated
ip nat outside
ip virtual-reassembly in max-reassemblies 64
ip virtual-reassembly out
encapsulation ppp
ip tcp adjust-mss 1452
load-interval 30
dialer pool 1
dialer-group 1

!
interface Dialer2
ip address negotiated
ip nat outside
ip virtual-reassembly in max-reassemblies 64
encapsulation ppp
load-interval 30
dialer pool 2
dialer-group 2

ip nat inside source route-map adsl1 interface Dialer1 overload
ip nat inside source route-map adsl2 interface Dialer2 overload
ip route 0.0.0.0 0.0.0.0 Dialer1 track 1
ip route 0.0.0.0 0.0.0.0 Dialer2 200 track 2

 

ip access-list extended AllowGuest2Internet
permit udp any any eq bootpc
permit udp any any eq bootps
permit icmp 192.168.40.0 0.0.0.255 any
deny ip 192.168.40.0 0.0.0.255 192.168.9.0 0.0.0.255 log
permit ip 192.168.40.0 0.0.0.255 any

!
route-map adsl2 permit 10
match ip address 101
match interface Dialer2
!
route-map adsl1 permit 10
match ip address 101
match interface Dialer1
!

access-list 101 permit ip 192.168.9.0 0.0.0.255 any
access-list 101 permit ip 192.168.40.0 0.0.0.255 any

high level looks ok, what is the issue you have?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

I need to route lan 192.168.9.0 to have internet access from dialer 1 and lan 192.168.40.0 from dialer 2

They are 2 different internet lines

Hello,

 

it doesn't work because both your route maps match both access lists. The other problem you have is that there is no failover; if one dialer is down, traffic for one subnet will not get translated. Use the configuration below, it includes two IP SLAs and a couple of EEM scripts that take care or the failover:

 

track 1 ip sla 1 reachability
!
track 2 ip sla 2 reachability
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.9.1 255.255.255.0
ip helper-address 192.168.9.11
ip nat inside
ip virtual-reassembly in
ip policy route-map rmap1
!
interface GigabitEthernet0/0.6
encapsulation dot1Q 6
ip address 192.168.40.1 255.255.255.0
ip access-group AllowGuest2Internet in
ip nat inside
ip virtual-reassembly in
!
interface Dialer1
mtu 1492
ip address negotiated
ip nat outside
ip virtual-reassembly in max-reassemblies 64
ip virtual-reassembly out
encapsulation ppp
ip tcp adjust-mss 1452
load-interval 30
dialer pool 1
dialer-group 1
!
interface Dialer2
ip address negotiated
ip nat outside
ip virtual-reassembly in max-reassemblies 64
encapsulation ppp
load-interval 30
dialer pool 2
dialer-group 2
!
ip nat inside source route-map adsl1 interface Dialer1 overload
ip nat inside source route-map adsl2 interface Dialer2 overload
!
ip route 0.0.0.0 0.0.0.0 Dialer1
ip route 0.0.0.0 0.0.0.0 Dialer2
!
dialer-list 1 protocol ip permit
dialer-list 2 protocol ip permit
!
ip access-list extended AllowGuest2Internet
permit udp any any eq bootpc
permit udp any any eq bootps
permit icmp 192.168.40.0 0.0.0.255 any
deny ip 192.168.40.0 0.0.0.255 192.168.9.0 0.0.0.255 log
permit ip 192.168.40.0 0.0.0.255 any
!
route-map adsl1 permit 10
match ip address 101
match interface Dialer1
!
route-map adsl2 permit 10
match ip address 102
match interface Dialer2
!
access-list 101 permit ip 192.168.9.0 0.0.0.255 any
access-list 102 permit ip 192.168.40.0 0.0.0.255 any
!
ip sla 1
icmp-echo 8.8.8.8 source-interface Dialer1
frequency 5
threshold 3000
!
ip sla schedule 1 life forever start-time now
!
ip sla 2
icmp-echo 8.8.8.8 source-interface Dialer2
frequency 5
threshold 3000
!
ip sla schedule 2 life forever start-time now
!
event manager applet ISP_1_DOWN
event track 1 state down
action 1.0 cli command “enable”
action 2.0 cli command "conf t"
action 3.0 cli command "no route-map adsl1"
action 4.0 cli command "no ip nat inside source route-map adsl1 interface Dialer1 overload"
action 5.0 cli command "route-map adsl2"
action 6.0 cli command "match ip address 101 102"
action 7.0 cli command "end"
action 8.0 cli command “clear ip nat translation *”
!
event manager applet ISP_1_UP
event track 1 state up
action 1.0 cli command “enable”
action 2.0 cli command "conf t"
action 3.0 cli command "route-map adsl1 permit 10"
action 4.0 cli command "match ip address 101"
action 5.0 cli command "match interface Dialer1"
action 6.0 cli command "ip nat inside source route-map adsl1 interface Dialer1 overload"
action 7.0 cli command "route-map adsl2 permit 10"
action 8.0 cli command "no match ip address 101 102"
action 9.0 cli command "match ip address 102
action 9.1.0 cli command "end"
action 9.2 cli command “clear ip nat translation *”
!
event manager applet ISP_2_DOWN
event track 2 state down
action 1.0 cli command “enable”
action 2.0 cli command "conf t"
action 3.0 cli command "no route-map adsl2"
action 4.0 cli command "no ip nat inside source route-map adsl2 interface Dialer2 overload"
action 5.0 cli command "route-map adsl1"
action 6.0 cli command "match ip address 101 102"
action 7.0 cli command "end"
action 8.0 cli command “clear ip nat translation *”
!
event manager applet ISP_2_UP
event track 2 state up
action 1.0 cli command “enable”
action 2.0 cli command "conf t"
action 3.0 cli command "route-map adsl2 permit 10"
action 4.0 cli command "match ip address 102"
action 5.0 cli command "match interface Dialer2"
action 6.0 cli command "ip nat inside source route-map adsl2 interface Dialer2 overload"
action 7.0 cli command "route-map adsl1 permit 10"
action 8.0 cli command "no match ip address 101 102"
action 9.0 cli command "match ip address 101
action 9.1.0 cli command "end"
action 9.2 cli command “clear ip nat translation *”

 

 

route-map adsl2 permit 10
match ip address 102
match interface Dialer2
!
route-map adsl1 permit 10
match ip address 101
match interface Dialer1

 

Good catch @Georg Pauwen 

 

follow as suggest @Georg Pauwen  let us knw how it goes.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card