The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  ВХОД  слежка  RSS
"NAT через Loopback (саб-интерфейсы)"
Вариант для распечатки  
Пред. тема | След. тема 
Форумы Маршрутизаторы CISCO и др. оборудование. (Public)
Изначальное сообщение [Проследить за развитием треда]

"NAT через Loopback (саб-интерфейсы)"  
Сообщение от GreatFoolDad email(ok) on 27-Янв-06, 09:18 
Имеется маршрутизатор (3725)
Через него к интернету подключены клиенты с серыми адресами.
Будет поднят NAT на loopback.
Какое-то время учет трафика будет вестить с помощью ip accounting.
Хочу, чтобы NAT не портил мне учет.
В принципе похожая схема есть тут:
http://www.comptek.ru/cisco/teach/config/files/ip_account_under_nat.html
но от моей она все-таки отличается - у меня куча саб-интерфейсов с разными сетками, а там их нет.
В итоге мне совсем непонятно - какие адреса я должен повесить на loopback?
И еще - по конфигу (см.ниже)- какие адреса должны входить в этот самый "list 1" из строки
ip nat inside source list 1 interface Ethernet0/1 overload
?

Есть вот такая схема:
(упс...... все съехало.....как бы сюда картинку прилепить?)

     -default---|Loopback 0|policy ----        
    | route      __________    route     |
    |                                    |
____V________                      ______|__________
| Fa0/1       |                    |Fa0/0.101      |                          
| 82.82.82.82 |                    |10.20.0.1/27   |
|_____________|                    |Fa0/0.102      |
                                   |10.20.0.33/27  |
К провайдеру                      |..             |
                                   |Fa0/0.125      |
                                   |10.20.0.181/30 |
                                   |..             |
                                   |_______________|

                                     К клиентам

Вот конфиг из ссылки, исправленный соответственно схеме:
---------------------------------------------------------------

ip nat inside source list 1 interface Ethernet0/1 overload
!
interface Loopback0
ip address ????????????????????
ip accounting output-packets
ip accounting access-violations
ip nat inside
!
interface FastEthernet0/0
description To inside
no ip address
load-interval 30
speed 100
half-duplex
no mop enabled
!
interface FastEthernet0/0.101
encapsulation dot1Q 101
ip address 10.20.0.1 255.255.255.224
ip access-group 100 in
ip accounting output-packets
rate-limit input access-group 103 64000 4000 4000 conform-action transmit exceed-action drop
rate-limit input access-group 104 64000 4000 4000 conform-action transmit exceed-action drop
..
..
rate-limit input access-group 127 128000 8000 8000 conform-action transmit exceed-action drop
rate-limit output access-group 103 64000 4000 4000 conform-action transmit exceed-action drop
rate-limit output access-group 104 64000 4000 4000 conform-action transmit exceed-action drop
..
..
rate-limit output access-group 127 128000 8000 8000 conform-action transmit exceed-action drop
!
interface FastEthernet0/0.102
encapsulation dot1Q 102
ip address 10.20.0.33 255.255.255.224
ip access-group 100 in
ip accounting output-packets
rate-limit input access-group 115 64000 4000 4000 conform-action transmit exceed-action drop
rate-limit input access-group 116 64000 4000 4000 conform-action transmit exceed-action drop
..
..
rate-limit input access-group 119 512000 64000 96000 conform-action transmit exceed-action drop
rate-limit output access-group 115 64000 4000 4000 conform-action transmit exceed-action drop
rate-limit output access-group 116 64000 4000 4000 conform-action transmit exceed-action drop
..
..
rate-limit output access-group 119 512000 64000 96000 conform-action transmit exceed-action drop
!
..
..
interface FastEthernet0/0.125
encapsulation dot1Q 125
ip address 10.20.0.181 255.255.255.252
ip nat inside
ip access-group 100 in
no ip mroute-cache
ip policy route-map test3
rate-limit input 64000 4000 4000 conform-action transmit exceed-action drop
rate-limit output 64000 4000 4000 conform-action transmit exceed-action drop
!
interface Ethernet0/1
ip address 82.82.82.82 255.255.255.252
ip nat outside
no ip route-cache
no ip mroute-cache
!
router eigrp 101
redistribute static
network 10.0.0.0
network 192.168.1.0
no auto-summary
!
ip route 0.0.0.0 0.0.0.0 Ethernet0/1
ip classless
access-list 2 permit 10.20.0.0 0.0.0.31
access-list 2 permit 10.20.0.32 0.0.0.31
..
..
access-list 2 permit 10.20.0.180 0.0.0.3

!
route-map test3 permit 10
match ip address 2
set interface Loopback0
!
end

Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

 Оглавление

Сообщения по теме [Сортировка по времени, UBB]


1. "NAT через Loopback (саб-интерфейсы)"  
Сообщение от sh_ email(??) on 27-Янв-06, 10:57 
На Loopback можешь вешать любые адреса. Acl1 должен матчить сети, которые хочешь натить...
Правка | Высказать мнение | Ответить | Рекомендовать в FAQ | Cообщить модератору | Наверх

Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ]




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру