Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

can i setup nat on a router with single interface?

router just has fa0.

can i use subinterfaces to setup nat on the router and provide internet to clients ?

5 REPLIES
Silver

can i setup nat on a router with single interface?

Yes, you can do NAT on subinterfaces or you could do NAT on a stick. If you make a topology and provide some informaiton we can help you find the best solution.

Daniel Dib
CCIE #37149

Daniel Dib CCIE #37149 Please rate helpful posts.
New Member

Re: can i setup nat on a router with single interface?

I have a cisco 1700 router with just fa0.

internet cable modem will provide public ip via dhcp to the router.

internal network will be 192.168.1.0/24

default gw for clients will be 192.168.1.1

the switch is a linksys home wireless so it doesnt do vlans

modem -------------- switch ------------router

                                    |

                                 clients

can someone give a config for this ? I've tried but not getting thru:

Router(config)#int fa0

Router(config-if)#no ip add

Router(config-if)#int fa0.1

Router(config-subif)#encapsulation dot1Q 1

Router(config-subif)#ip add dhcp

Router(config-subif)#int fa0.2

Router(config-subif)#ip add 192.168.1.1 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Router(config-subif)#encapsulation dot1Q 1

%Configuration of multiple subinterfaces of the same main

interface with the same VID (1) is not permitted.

This VID is already configured on FastEthernet0.1.

Silver

can i setup nat on a router with single interface?

You need to put another VLAN on fa0.2:

int fa0.2

encapsulation dot1q 2

But your switch does not support VLANs so it doesn't matter.

You could try a solution called NAT on a stick but it requires to configure a secondary IP on your interface. We can't match DHCP and static addresses. Can you use a static IP on your router?

Daniel Dib
CCIE #37149

Daniel Dib CCIE #37149 Please rate helpful posts.
New Member

Re: can i setup nat on a router with single interface?

when u say the switch does not support VLANs so it doesn't matter, do u mean it will work ?

Silver

can i setup nat on a router with single interface?

It means that solution won't work. What you need is to put multiple subnets in the same broadcast domain. It's not best practice but for a home network it should be fine.

However you can't mix DHCP and static on the same interface. So if you can put a static IP on the router that would be better. It should be part of the same subnet as the modem.

Daniel Dib
CCIE #37149

Daniel Dib CCIE #37149 Please rate helpful posts.
319
Views
0
Helpful
5
Replies
CreatePlease to create content