04-19-2016 01:08 PM - edited 03-05-2019 03:50 AM
Hello,
I'm having trouble with setting up PAT in packet tracer. The problem is that if i set up PAT i can no access the http server. With static nat everything is ok. Can you give me a hint what i'm doing wrong?
Building configuration...
Current configuration : 823 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2901/K9 sn FTX1524G3J2
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 1.0.0.2 255.255.255.252
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 2.0.0.1 255.255.255.252
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router eigrp 10
network 2.0.0.0
network 1.0.0.0
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
ip classless
!
ip flow-export version 9
!
!
access-list 1 permit 10.0.0.0 0.0.0.255
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
05-06-2016 02:17 AM
I can see that you are doing PAT on CopyRouter4 according to your topology.
As it is now, the PC do not know which IP the Server-PT is using. If you want the Server to have a public IP address, you need to use static NAT so you know which IP address it is using. You can give it 2.0.0.1:80 or 2.0.0.1:443 if you want to give it just a port-number instead of the entire IP address.
05-06-2016 05:04 AM
Hello
Youll need a Nat static to identify a specific port to nat towards, As PAT wont know what to translate to without it.
So if there is only one HTTP destination device then you can add a static defining the outside interface and inside ip address of the http server and port number, However is their are multiple destination inside your network then you can do the same but using different inside host and port number
ip nat inside source static tcp x.x.x.x interface gig0/1 80
ip nat inside source static tcp x.x.x.x interface gig0/1 8080
or as you have already stated, you can use individual statics with individual public addressing (thats if you have public ips free to use)
ip nat inside source static tcp x.x.x.x 80 2.0.0.5 80
ip nat inside source static tcp x.x.x.x 80 2.0.0.6 80
res
Paul
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide