Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NAT on a stick 1

Status
Not open for further replies.

ior

Technical User
Mar 11, 2004
29
NO
Hi, Im trying to setup NAT on a stick. I found some guides online on how to do it, but they dont seem to work for me (or maybe ive misunderstood them)

My client (192.168.16.250) can ping both 192.168.16.1 and 10.0.0.1, but trying to reach external networks wont work.

Any hints would be appreciated!
Version 12.3(6)


interface ethernet0
ip address 194.236.28.xxx 255.255.255.0
ip address 192.168.16.1 255.255.255.0 secondary
ip nat inside
ip policy route-map NATSTICK

interface loopback0
ip add 10.0.0.1 255.255.255.252
ip nat outside

ip nat pool NATPOOL 194.236.28.xxx 194.236.28.xxx netmask 255.255.255.0
ip nat inside source list 1 pool NATPOOL overload

ip route 0.0.0.0 0.0.0.0 194.236.28.1

access-list 1 permit 192.168.16.0 0.0.0.255

access-list 100 permit ip any 194.236.28.0 0.0.0.255
access-list 100 permit ip 192.168.16.0 0.0.0.255 any

route-map NATSTICK permit 1
match ip address 100
set ip next-hop 10.0.0.1
 
Why is your loopback interface outside? Loopback interface will not route anything for you, you need to configure real interface, like the one connected to internet to be configured as ip nat outside.

How come you have on the same interface both private and public IP address? Please explain your set-up, so I can help you little more:)

Peter Mesjar
CCNA, A+ certified
pmesjar@centrum.sk
 
Im trying to do a basic version of:
Ie having NAT traffic going in and out on the same interface.

The reason for this is that my router only has 2 ethernet interfaces. Id want to split my network into 3 parts, but because of the limited interfaces and the lacking support for vlan´s Ive decided to do something like this

WLAN-----Internet --- (e0)ROUTER(e1) - LAN

Therefore I need the WLAN (192.168.16.x) to be able to reach the router via e0 and be NATed out via the same interface. (and use VPN if access to the LAN is needed)
 
It is possible to NAT on a loopback interface as long as the IP addresses on that interface are routed to that router. I have a few routers that I do this on.

Chris.


**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
iproute - do you see anything wrong with my config? Or do you have an example config I can take a look at?
 
Hmm... I have never used NAT in this way so far, could you explain iproute why or where this can be useful apart the cisco example?

To ior, try debug ip nat detailed to see how your packets are being translated and whether it is both way (that is incoming and outgoing). Try to follow the tests that are given in the scenario.


Peter Mesjar
CCNA, A+ certified
pmesjar@centrum.sk
 
Doh! Thanks for you help everyone, but it seems I made a crucial mistake, my router (1605R) apparently doesnt support "Nat-on-a-stick".

Thanks for your help and sorry for wasting your time. :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top