Strona 1 z 1

Konfiguracja NAT

: 08 gru 2018, 20:09
autor: domcia339
Witajcie,

Mam problem z konfiguracją NAT w routerze Cisco.
Czy moglibyście zweryfikować czy moja konfiguracja jest prawidłowa?
Komenda "show ip nat translation" nie pokazuje mi translacji.

Kod: Zaznacz cały

!

!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
ip name-server 8.8.8.8
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
 log config
  hidekeys
! 
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
 ip address dhcp
 ip nat outside
 ip virtual-reassembly
 duplex half
!
interface FastEthernet1/0
 ip address 194.169.1.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex half
!
interface FastEthernet2/0
 ip address 194.169.2.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex half
!
router ospf 1
 log-adjacency-changes
 network 1.1.1.0 0.0.0.255 area 0
 network 194.169.1.0 0.0.0.255 area 0
 network 194.169.2.0 0.0.0.255 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 dhcp
no ip http server
no ip http secure-server
!
!
ip nat inside source list 1 interface FastEthernet0/0 overload
!
access-list 1 permit 194.169.1.0 0.0.0.255
access-list 1 permit 194.169.2.0 0.0.0.255
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
end

Re: Konfiguracja NAT

: 09 gru 2018, 10:13
autor: drake
Hej,
Nie widac czy Fasteth0 dostaje przez DHCP adres oraz info odn. default GW, zeby byc w pelni funkcjonalnym.

Pozdruffka!

Re: Konfiguracja NAT

: 12 gru 2018, 12:19
autor: judge dredd
Cześć,

Sama konfiguracja NAT jest książkowa i jest OK. Wydaje się, że powinno to działać, ale ja osobiście nigdy nie miałem okazji stosować natowania na adres interfejsu, który otrzymuje adres z DHCP. Być może więc w takiej sytuacji jest jakiś kruczek i składnia powinna być inna - być może do takiego zastosowania powinien być użyty NVI, czyli konfiguracja "ip nat source...", a nie "ip nat inside source...". Rzucam luźne przemyślenia na szybko - kilka punktów zaczepienia do weryfikacji, poszukaj po necie pod tym kątem, podebuguj, napisz co odkryłeś.

Pozdrawiam!

JD

Re: Konfiguracja NAT

: 25 kwie 2019, 20:02
autor: nell
Coś tutaj nie gra,
Po pierwsze z Twojej konfiguracji nie wynika czy możesz takiego nata zrobić gdyż dostajesz adres WAN z DHCP, jak sądzę pewnie nie dostajesz adresu z maską /30 bit zatem nie możesz skorzystać z kierowania na interface.

powinieneś raczej skorzystać ze statycznej konfiguracji interfesu WAN (ale nie jest to konieczne) ale już na pewno trzeba zdefiniować pulę i zamiast interfejs przeciążać pulę.
czyli
ip nat pool dsl 193.19.11.2 193.19.11.2 netmask 255.255.255.0
ip nat inside source list 1 pool dsl overload

druga sprawa to wygląda na to że Twój interfejs lokalny ma publiczne adresy ????? dlaczego