cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3803
Views
5
Helpful
30
Replies

NAT on 1 Physical Interface

nino.sehovic
Level 1
Level 1

Hi everyone...

I need some help please.

I have a site with a router and all of its ports are already taken except one.

The thing is i need 2 interfaces for a customer that wants a seperate connection to the internet with NAT. Ofcourse they ill have their own 

IP address and own Internal Ip Address.

The external ip address would be 77.77.77.1 (for example) and the inside 10.204.0.0 255.255.0.0

The problem is that i have only 1 interface can i somehow NAT over subinterfaces or Virtual interface?

As far as i have seen on the documentation it is not possible,but perhaps one of u guys has an idea????

Thanks in advance...

30 Replies 30

With which command do you get this error?

ping 8.8.8.8 source 77.77.77.1

it means IP address of 77.77.77.1 is not set on the any interface.

Show ip int brief

If you do not see 77.77.77.1, create it

int loopback 100

ip address 77.77.77.1 255.255.255.255

I know Masoud but u said earlier i should not put this IP on any interface...which was awkward for me...If i set it to loopback its ok but since i dont have any interfaces free I dont know where to set this IP Adddress,thats the main problem.I have onyl 1 interface free on which i configured the network between my router and customer router...

I understand. I just want to test that IP. I want to make sure that IP works.

Create that interface with IP of 77.77.77.1. Ping and then remove it.

no interface loopback 100.

If you are sure your new IP works, skip that test.

Masoud

masoud yes the ip works like i posted earlier if i set it to loopback its np it works...

OK :)

access-list 50 was not in your config. add it and then

It is just for test. I want to check your NAT works.

Interface G0/0 is already connected to a switch so

Int g0/0

Ip address 10.204.0.1 255.255.0.0

Ip nat inside

Connect a pc to your switch (VLAN1)

PC IP and gateway

10.204.0.2

255.255.0.0

10.204.0.1

**********************************

Another way to test

interface GigabitEthernet0/0.70
encapsulation dot1Q 70
Ip address 10.204.0.1 255.255.0.0
ip nat inside

Create vlan 70 on switch

connect PC to a switch port in vlan 70

configure IP on PC and test.

I can not connect it to Gig0/0 since its connected to a switch already and the production is going on :) I cant touch anything right now besides the gig0/1.

Thats is the problem :) There are also no free ports on the switch and i do not have access to the switch since its on a remote side. I may try the subinterface gig0/0.50 or so and then ask somebody to try it...I was thinking of doing it that way masoud but its really complicated i guess in the end i will have to go and order a new FA Module for my router and then I will have no problems :P Anyways thank you a lot for your help.

OK.

So the problem is not NAT. The problem is port density.

Gig 0/1 has IP address. It is in production also? How are you going to connect your customer to to G0/1 which is already in production?

Is Digel your new customer?

interface GigabitEthernet0/1
description DIGEL-LAN
ip address 192.168.50.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto

The only free PORT is PORT gig0/1 which is not in production, my initial question was if there are no more free slots,if there is a possibility to do nat inside and outside on only 1 port in this case the port Gig0/1. 

Check the attachement again pls Masoud :D 

Just listen to me :D.

The configuration will be the same as configuration you chose as a correct answer.

I gave another configuration related to G0/0 because I saw your configuration and thought g0/1 is in production. How would I know DIGEL is your new customer?

I am giving you the final configuration one more time with 192.168.50.1

no touch on Gi0/0

interface G0/1

Des conneted-to-customer

IP address 192.168.50.1 255.255.255.0

IP nat inside

***

access-list 50 permit 10.204.0.0 0.0.255.255

ip nat pool Public-IP 77.77.77.1 77.77.77.1 prefix 24

ip nat inside source list 50 pool Public-IP overload

***

Ip route 10.204.0.0 255.255.0.0 192.168.50.2

**

ON your customer router

IP route 0.0.0.0 0.0.0.0 192.168.50.2

The configuration above is your final configuration.

The configuration below is just test for you to make sure nat works

I want to simulate your laptop as your customer

no touch on Gi0/0

interface G0/1

Des conneted-to-a laptop

IP address 10.204.0.1 255.255.0.0

IP nat inside

***

access-list 50 permit 10.204.0.0 0.0.255.255

ip nat pool Public-IP 77.77.77.1 77.77.77.1 prefix 24

ip nat inside source list 50 pool Public-IP overload

***

Connect a laptop to port G0/1.

Give  laptop IP and gateway

 IP address 10.204.0.2 255.255.0.0

Gateway  10.204.0.1

and set DNS

and browse the web.

Test the second configuration with your laptop to make sure NAT works then connect your customer with the first configuration.

No touch on Gi0/0 :)

Thank you Masoud I will try it tommorow :)

Trouble shooting.

Ping 10.204.0.1 from your laptop. ( you should get replies)

ping 8.8.8.8 ( you should get replies)

Show access-list 50  ( you should see hit)

show ip nat translation | include 77.77.77.1  (should have entries after test by your laptop)

Give me your feedback.

Masoud

Adding to my previous comment.

Interface G0/0 is already connected to a switch so

Int g0/0

Ip address 10.204.0.1 255.255.0.0

Ip nat inside

Connect a pc to your switch (VLAN1)

PC IP and gateway

10.204.0.2

255.255.0.0

10.204.0.1

Another way to test

interface GigabitEthernet0/0.70
encapsulation dot1Q 70
Ip address 10.204.0.1 255.255.0.0
ip nat inside

Create vlan 70 on switch

connect PC to a port in vlan 70

configure IP on PC and test.

Masoud

Where did you get did error? With ping?

Review Cisco Networking products for a $25 gift card