2016年2月17日 星期三

Enable NAT(PAT) on DHCP Server

Enable NAT(PAT) on DHCP Server


=========================
PC>ping 192.168.3.10

Pinging 192.168.3.10 with 32 bytes of data:

Reply from 192.168.3.10: bytes=32 time=1ms TTL=126
Reply from 192.168.3.10: bytes=32 time=1ms TTL=126
Reply from 192.168.3.10: bytes=32 time=1ms TTL=126
Reply from 192.168.3.10: bytes=32 time=1ms TTL=126

Ping statistics for 192.168.3.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 1ms, Average = 1ms

PC>

=========================
R1#sh ip nat translations
Pro  Inside global     Inside local       Outside local      Outside global
icmp 10.0.0.1:5        192.168.1.10:5     192.168.3.10:5     192.168.3.10:5
icmp 10.0.0.1:6        192.168.1.10:6     192.168.3.10:6     192.168.3.10:6
icmp 10.0.0.1:7        192.168.1.10:7     192.168.3.10:7     192.168.3.10:7
icmp 10.0.0.1:8        192.168.1.10:8     192.168.3.10:8     192.168.3.10:8
icmp 10.0.0.1:10       192.168.2.10:10    192.168.3.10:10    192.168.3.10:10
icmp 10.0.0.1:11       192.168.2.10:11    192.168.3.10:11    192.168.3.10:11
icmp 10.0.0.1:12       192.168.2.10:12    192.168.3.10:12    192.168.3.10:12
icmp 10.0.0.1:9        192.168.2.10:9     192.168.3.10:9     192.168.3.10:9

R1#
=========================

R1#sh ip nat statistics
Total translations: 0 (0 static, 0 dynamic, 0 extended)
Outside Interfaces: Serial0/0/0
Inside Interfaces: FastEthernet0/0 , FastEthernet0/1
Hits: 19  Misses: 20
Expired translations: 20
Dynamic mappings:
-- Inside Source
access-list 10 pool mypool refCount 0
 pool mypool: netmask 255.255.255.252
       start 10.0.0.1 end 10.0.0.1
       type generic, total addresses 1 , allocated 0 (0%), misses 0
R1#

=========================

R1#show ip dhcp binding
IP address       Client-ID/              Lease expiration        Type
                 Hardware address
192.168.1.10     0001.C706.A76A           --                     Automatic
192.168.2.10     0001.4348.BE92           --                     Automatic
R1#
R1#

=========================
R1#sh run
!
hostname R1
!
!
!
!
ip dhcp excluded-address 192.168.1.1 192.168.1.9
ip dhcp excluded-address 192.168.2.1 192.168.2.9
!
ip dhcp pool mydhcp
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.254
 dns-server 8.8.8.8
ip dhcp pool mydhcp2
 network 192.168.2.0 255.255.255.0
 default-router 192.168.2.254
 dns-server 8.8.8.8
!
!
interface FastEthernet0/0
 ip address 192.168.1.254 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.2.254 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface Serial0/0/0
 ip address 10.0.0.1 255.255.255.252
 ip nat outside
!
!
router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0.0.0.0
 network 192.168.2.0 0.0.0.255 area 0.0.0.0
 network 10.0.0.0 0.0.0.3 area 0.0.0.0
!
ip nat pool mypool 10.0.0.1 10.0.0.1 netmask 255.255.255.252
ip nat inside source list 10 pool mypool overload
ip classless
!
!
access-list 10 permit 192.168.1.0 0.0.0.255
access-list 10 permit 192.168.2.0 0.0.0.255
!
!
end


R1#

=========================

R2#sh run
!
hostname R2
!
interface GigabitEthernet0/0
 ip address 192.168.3.254 255.255.255.0
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 10.0.0.2 255.255.255.252
!
router ospf 1
 log-adjacency-changes
 network 192.168.3.0 0.0.0.255 area 0.0.0.0
 network 10.0.0.0 0.0.0.3 area 0.0.0.0
!
end

R2#
=========================

1 則留言:

  1. We've found constantly thought in assisting learners reach the goals in addition to we've found from the time that toiled really hard to make certain that all of our consumer is capable of gain the job objectives using the assistance individuals works not to mention theses. https://imgur.com/a/6Qtvaue https://imgur.com/a/lLH0InT http://3nw3rw855s.dip.jp https://imgur.com/a/yvfqRM6 https://imgur.com/a/xGYmp2K https://imgur.com/a/3dV4pnK https://imgur.com/a/Chfckxf

    回覆刪除