Current configuration : 2149 bytes
!
version 12.4
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service internal
!
hostname my_router
!
boot-start-marker
boot-end-marker
!
enable secret 5 <i>пароль</i>
!
no aaa new-model
!
resource policy
!
ip subnet-zero
no ip gratuitous-arps
ip cef
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 10.1.1.1 10.1.1.99
!
ip dhcp pool LAN
network 10.1.1.0 255.255.255.0
dns-server 10.1.1.1
default-router 10.1.1.1
!
!
ip domain name <i>router.com</i>
ip multicast-routing
ip ssh version 2
vpdn enable
!
vpdn-group 1
request-dialin
protocol pptp
rotary-group 0
initiate-to ip 192.168.117.249
!
!
!
!
username <i>user</i> secret 5 <i>password</i>
!
!
!
!
!
!
interface FastEthernet0
!
interface FastEthernet1
!
interface FastEthernet2
!
interface FastEthernet3
!
interface FastEthernet4
mac-address 0050.be05.a00a
ip address dhcp client-id FastEthernet4
ip nat outside
ip nat enable
ip virtual-reassembly
duplex auto
speed auto
no cdp enable
!
interface Vlan1
ip address 10.1.1.1 255.255.255.0
ip nat inside
ip nat enable
ip virtual-reassembly
!
interface Dialer0
mtu 1440
ip address negotiated
ip pim dense-mode
ip nat outside
ip virtual-reassembly
encapsulation ppp
dialer in-band
dialer idle-timeout 0
dialer string internet
dialer vpdn
dialer-group 1
no peer neighbor-route
no cdp enable
ppp pfc local request
ppp pfc remote apply
ppp chap hostname <i>login</i>
ppp chap password 0 <i>password</i>
!
ip default-gateway 10.1.1.1
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer0
ip route 192.168.0.0 255.255.0.0 FastEthernet4 dhcp
!
ip dns server
!
no ip http server
no ip http secure-server
ip nat inside source list INSIDE_NAT interface FastEthernet4 overload
ip nat inside source route-map map_PPTP interface Dialer0 overload
!
ip access-list standard INSIDE_NAT
permit 10.1.1.0 0.0.0.255
!
dialer-list 1 protocol ip permit
!
!
control-plane
!
!
line con 0
logging synchronous
no modem enable
line aux 0
line vty 0 4
login local
transport input ssh
!
scheduler max-task-time 5000
end
ip nat inside source route-map map_PPTP interface Dialer0 overload
no ip nat inside source route-map map_PPTP interface Dialer0 overload
show ip nat translation
no ip nat inside source list INSIDE_NAT interface FastEthernet4 overload
no ip nat inside source route-map map_PPTP interface Dialer0 overload
interface FastEthernet4
no ip nat outside
no ip nat enable
exit
ip nat inside source list INSIDE_NAT interface Dialer0 overload
clear ip nat translation
show ip nat translation
configure replace nvram:startup-config
#show ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 192.168.138.152:4764 10.1.1.100:4764 192.168.117.249:4764 192.168.117.249:4764
router#show ip nat translations
Pro Inside global Inside local Outside local Outside global
udp 93.190.177.42:33159 10.1.1.100:33159 208.67.220.220:53 208.67.220.220:53
udp 93.190.177.42:34346 10.1.1.100:34346 208.67.220.220:53 208.67.220.220:53
udp 93.190.177.42:34371 10.1.1.100:34371 208.67.222.222:53 208.67.222.222:53
udp 93.190.177.42:35332 10.1.1.100:35332 208.67.220.220:53 208.67.220.220:53
udp 93.190.177.42:35643 10.1.1.100:35643 208.67.222.222:53 208.67.222.222:53
udp 93.190.177.42:35882 10.1.1.100:35882 208.67.220.220:53 208.67.220.220:53
doctor@laboratory ~/Рабочий стол $ ping -Dn ya.ru
PING ya.ru (93.158.134.3) 56(84) bytes of data.
[1394702353.482536] 64 bytes from 93.158.134.3: icmp_req=1 ttl=57 time=36.1 ms
[1394702354.483436] 64 bytes from 93.158.134.3: icmp_req=2 ttl=56 time=35.8 ms
[1394702355.485298] 64 bytes from 93.158.134.3: icmp_req=3 ttl=56 time=35.7 ms
[1394702356.487838] 64 bytes from 93.158.134.3: icmp_req=4 ttl=57 time=36.3 ms
[1394702357.489522] 64 bytes from 93.158.134.3: icmp_req=5 ttl=56 time=36.6 ms
[1394702358.490895] 64 bytes from 93.158.134.3: icmp_req=6 ttl=57 time=36.2 ms
[1394702359.492631] 64 bytes from 93.158.134.3: icmp_req=7 ttl=57 time=36.5 ms
^C
--- ya.ru ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6009ms
rtt min/avg/max/mdev = 35.735/36.234/36.619/0.353 ms
doctor@laboratory ~/Рабочий стол $ ping -D ya.ru
PING ya.ru (93.158.134.3) 56(84) bytes of data.
[1394702373.908500] 64 bytes from www.yandex.ru (93.158.134.3): icmp_req=1 ttl=57 time=37.0 ms
[1394702378.996749] 64 bytes from www.yandex.ru (93.158.134.3): icmp_req=2 ttl=57 time=36.0 ms
[1394702384.081748] 64 bytes from www.yandex.ru (93.158.134.3): icmp_req=3 ttl=57 time=35.7 ms
^C[1394702389.168423] 64 bytes from www.yandex.ru (93.158.134.3): icmp_req=4 ttl=56 time=36.2 ms
--- ya.ru ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 15261ms
rtt min/avg/max/mdev = 35.750/36.268/37.048/0.480 ms
interface FastEthernet4
ip nat outside
exit
no ip nat inside source list INSIDE_NAT interface Dialer0 overload
ip nat inside source route-map INTERNET interface Dialer0 overload
ip nat inside source route-map LOCAL interface FastEthernet4 overload
route-map INTERNET permit 10
match ip address INSIDE_NAT
match interface Dialer0
route-map LOCAL permit 10
match ip address INSIDE_NAT
match interface FastEthernet4
Router#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
icmp 93.190.178.73:18 10.1.1.100:18 8.8.8.8:18 8.8.8.8:18
icmp 192.168.138.152:19 10.1.1.100:19 192.168.117.249:19 192.168.117.249:19
$ time dig ya.ru
; <<>> DiG 9.9.2-P1 <<>> ya.ru
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43348
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ya.ru. IN A
;; ANSWER SECTION:
ya.ru. 1077 IN A 213.180.204.3
ya.ru. 1077 IN A 93.158.134.3
ya.ru. 1077 IN A 213.180.193.3
;; Query time: 46 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Thu Mar 13 19:13:33 2014
;; MSG SIZE rcvd: 82
real 0m1.070s
user 0m0.004s
sys 0m0.016s
$ time dig @8.8.8.8 ya.ru
; <<>> DiG 9.9.2-P1 <<>> @8.8.8.8 ya.ru
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27283
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;ya.ru. IN A
;; ANSWER SECTION:
ya.ru. 3475 IN A 213.180.193.3
ya.ru. 3475 IN A 213.180.204.3
ya.ru. 3475 IN A 93.158.134.3
;; Query time: 50 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Mar 13 19:15:59 2014
;; MSG SIZE rcvd: 82
real 0m0.069s
user 0m0.008s
sys 0m0.008s
ip dhcp pool LAN
dns-server 8.8.8.8
show process cpu sorted
с трафиком и без.