Skip to main content

public and private in a single interface in packet tracer

More
14 years 8 months ago #33956 by sam4sg
Hi,

I have a router with Fast Ethernet 0/0 connected to switch.
I want to do both public range and private range in that port.

My configuration is something like:

interface FastEthernet0/0
description LAN connection to Office
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
description Public-LAN 100.100.100.128/27 100.129-158
encapsulation dot1Q 1 native
ip address 100.100.100.129 255.255.255.224
!
interface FastEthernet0/0.2
description Private-NAT-DHCP 172.16.12.0/22 12.1-15.254
encapsulation dot1Q 2
ip address 172.16.12.1 255.255.252.0



When I connect PC via the switch, if I use a public IP, it works, but when I use the private IP, it does not work.

What step might I be missing?


I want to do the following:

int Fa0/0 -> connected to LAN
int Fa0/1 -> connected to WAN1
int Fa1/0 -> connected to WAN2

I want to use 100.100.100.128/27 ip in LAN as well as in DHCP/NAT
Only 172.16.12.0/22 must be NAT and not the public IP.

Please let me know how to do this.

The router is connected to a switch. Do i need to do anything in the switch ?


Thanks,
More
14 years 8 months ago #33959 by sam4sg
I managed to find out the ping/dhcp part.

it was the vlan setting that I had to do in the switch also.

Now DHCP is working, but NAT is not working.

Here is the router config:

uilding configuration...

Current configuration : 1832 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
ip name-server 0.0.0.0
!
interface FastEthernet0/0
description LAN connection to Office
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
description Public-LAN 100.100.100.128/27 100.129-158
encapsulation dot1Q 1 native
ip address 100.100.100.129 255.255.255.224
!
interface FastEthernet0/0.2
description Private-NAT-DHCP 172.16.12.0/22 12.1-15.254
encapsulation dot1Q 172
ip address 172.16.12.1 255.255.252.0
ip nat inside
!
interface FastEthernet8/0
description Broadband Internet
ip address 165.21.100.230 255.255.255.252
ip nat outside
duplex auto
speed auto

!
ip nat inside source list 1 interface FastEthernet8/0 overload
ip classless
ip route 0.0.0.0 0.0.0.0 165.21.100.229
!
!
access-list 1 permit 172.16.12.0 0.0.3.255
!
ip dhcp excluded-address 172.16.12.1 172.16.12.99
!
ip dhcp pool dhcp01
network 172.16.12.0 255.255.252.0
default-router 172.16.12.1
dns-server 100.100.100.2
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end
More
14 years 8 months ago #33960 by Nevins
File Attachment:


Just to be clear this is what your trying to do correct?

Useful Threads
================================
www.firewall.cx/forum/2-basic-concepts/3...e-resource-page.html
More
14 years 8 months ago #33961 by sam4sg
Yes. Right.

100.100.100.129 is in one sub interface
172.16.12.1 is in another sub interface
More
14 years 8 months ago #33963 by Nevins
I have to goto sleep right now but try looking up Inter-Vlan routing. I may be mistaken but I think thats what you need.





I'll take another look at it when I wake up.

Useful Threads
================================
www.firewall.cx/forum/2-basic-concepts/3...e-resource-page.html
More
14 years 8 months ago #33965 by sam4sg
NAT is actually what i am looking for.
Time to create page: 0.151 seconds