networking-forum.com
Community BlogCommunity Wiki * Register  * Search  * Login
View unanswered postsView active topics

All times are UTC - 6 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Jul 01, 2012 10:46 am 
Offline
New Member
New Member

Joined: Sun Jul 01, 2012 10:19 am
Posts: 2
Certs: CCNA
Hi all,

I have a simple isp topology built in GNS3, for testing (pppoe) dialers:
cisco router(R1) connected to my pc network card, doing NAT translations for all the devices in the topology.
I know how to configure NAT for spesific ip range, but i can't find out how to configure NAT for networks which are learned through ospf (or any other dynamic way).

The current config of R1:
Code:
hostname R1
!
l2tp-class 015
 hostname L2TP_ROUTER
!
track 1 interface Virtual-PPP1 ip routing
!

pseudowire-class dialer-to-015
 encapsulation l2tpv2
 protocol l2tpv2 015
 ip local interface FastEthernet0/0
!
interface FastEthernet0/0
 ip address 192.168.1.33 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.20.33 255.255.255.252
 ip nat inside
 ip virtual-reassembly
 speed 100
 full-duplex
!
interface Virtual-PPP1
 ip address negotiated
 ip nat outside
 ip virtual-reassembly
 load-interval 30
 no cdp enable
 ppp pap sent-username sup2 password 0 xxx
 pseudowire X.X.170.44 11 pw-class dialer-to-015
!
router ospf 1
 log-adjacency-changes
 network 172.16.20.33 0.0.0.0 area 0
 default-information originate
!
ip route 0.0.0.0 0.0.0.0 Virtual-PPP1 track 1
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 192.168.1.1 200
ip route X.X.170.44 255.255.255.255 FastEthernet0/0 192.168.1.1
!
ip nat inside source route-map ViPPP1 interface Virtual-PPP1 overload
!
ip access-list extended NAT
 permit ip 10.0.0.0 0.255.255.255 any
 permit ip 172.16.0.0 0.0.255.255 any
 deny   ip any any
!
!
route-map DEFAULT_GW permit 10
 match ip address NAT
 match interface FastEthernet0/0
!
route-map ViPPP1 permit 10
 match ip address NAT
 match interface Virtual-PPP1


[ internet <-> R1 (NAT) <-> ospf networks ]


So i'm looking for something like:
Code:
route-map ViPPP1 permit 10
 match interface Virtual-PPP1
 match ospf area 1
 ! OR
 match ospf networks


How to do NAT for networks which are learned through ospf?


Top
 Profile  
 
PostPosted: Sun Jul 01, 2012 11:25 am 
Offline
Ultimate Member
Ultimate Member
User avatar

Joined: Thu Jan 13, 2011 5:10 pm
Posts: 991
Location: Leeds, UK
Certs: CCIE R&S #38338, CCNP, CCIP
You could do the NAT ACL the other way round, denying any networks you knew you DIDN'T want to NAT for and then use a 'permit ip any any' at the bottom to allow everything else.

That would cover you for any networks that you are not already aware of but would require adding an entry every time you had a destination that you didn't want to NAT to.

_________________
---
David
CCIE R&S #38338, CCIP, CCNP

http://networkbroadcast.co.uk - My Blog
http://twitter.com/davidrothera


Top
 Profile  
 
PostPosted: Tue Jul 03, 2012 1:25 pm 
Offline
New Member
New Member

Joined: Sun Jul 01, 2012 10:19 am
Posts: 2
Certs: CCNA
i managed it with double NAT:
R1 does NAT for ANY ANY df route to R2
R2 does NAT only for R1 df to (real)dialer..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: OverComplicated, timaz, totaluser, wintermute000 and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group