[ 目次
/ ダイヤルアクセス
/ エコノミー
/ スタンダード
]
[ +VPN
/ +専用線
/ +ISDN
/ +フィルタ
/ files
]
新規作成日 | 1997/Nov/22 |
最終変更日 | 2018/Nov/06 |
文書サイズ | 23KB |
[ 条件、特徴など ]
[ OCNエコノミー設定条件 ]
項目 内容 アクセス回線 128Kbps専用線
PPP
unnumberdグローバルアドレス 172.16.184.32〜172.16.184.47 (16個)
- ユーザ分(14個)
- ネットワークアドレス(1個)
- ブロードキャストアドレス(1個)
ネットマスク 255.255.255.240 (28ビット) ルータアドレス 172.16.184.33
[ RTの要件 ]
[ ネットワーク設計 ]
OCNエコノミー # # 128Kbps専用線 # # 172.16.184.32/28 (割り当て) +------------+ | RTシリーズ | (NATおよびIPマスカレード) +-----+------+ | 192.168.0.1 | 192.168.0.0/24 ------+----------+--------------------------------------------- | |192.168.0.2〜192.168.0.254 +---------+---------+ | コンピュータ/端末 |… +-------------------+
global | |
種類 | IPアドレスなど |
---|---|
ネットワーク | 172.16.184.32 or 172.16.184.32/28 |
ネットマスク | 255.255.255.240 (28ビット) |
ブロードキャスト | 172.16.184.47 |
ルータ | 172.16.184.33 ↓ default |
アドレス変換ルール global | private |
172.16.184.33.33 | 192.168.0.1 172.16.184.34〜172.16.184.46 | all |
空き | なし |
private | |
種類 | IPアドレスなど |
ネットワーク | 192.168.0.0 or 192.168.0.0/24 |
ネットマスク | 255.255.255.0 (24ビット) |
ブロードキャスト | 192.168.0.255 |
ルータ | 192.168.0.1 ↓ default |
空き | 192.168.0.2〜192.168.0.254 |
IPアドレス | 割り当て | DHCPスコープ番号 |
---|---|---|
global | ||
172.16.184.32 | network address | − |
172.16.184.33 | ルータ(NAT) | − |
172.16.184.34 〜 172.16.184.45 | ホスト (未使用) | − |
172.16.184.46 | IPマスカレード | − |
172.16.184.47 | (directed) broadcast address | − |
255.255.255.240 (28ビット) | subnet mask | − |
private | ||
192.168.0.0 | network address | − |
192.168.0.1 | ルータ | − |
192.168.0.2 〜 192.168.0.254 | ホスト | (1) |
192.168.0.255 | (directed) broadcast address | − |
255.255.255.0 (24ビット) | subnet mask | − |
255.255.255.255 | limited broadcast address | − |
宛先/ネットマスク | 次のホップ | 生成コマンド |
---|---|---|
default | PP[LEASED]、または、PP[01] | ip pp route add net |
192.168.0.0/24 | LAN1(192.168.0.1) | ip lan address |
<外側> …PPインタフェース側 +----+------------+ | ★ | ☆ | …外側アドレス (グローバル・アドレス) | ↑ | ↑ | | | | | | | ■ | ▲ | …1組の静的NATと1組のIPマスカレード | | | / \ | | ↑ | ↑↑↑↑↑ | | ● | ○○○○○ | …内側アドレス (プライベート・アドレス) +----+------------+ <内側> …ルーティング側
項目 | 内容 | 生成コマンド |
---|---|---|
適用インタフェース | PP[LEASED]またはPP[01] | pp select leased pp select 1 |
NAT | 使用する | nat use on |
IPマスカレード | 使用する | nat masqerade on |
グローバルIPアドレス | 172.16.184.46 | nat address global |
プライベートIPアドレス | auto | nat address private |
静的なNAT設定 | 172.16.184.33=192.168.0.1 | nat address global |
静的IPマスカレード | なし |
項目 | 内容 | 生成コマンド |
---|---|---|
NATディスクリプタ番号 | 1 | |
タイプ | masquerade | nat descriptor type |
外側アドレス | 172.16.184.46 | nat descriptor address outer |
内側アドレス | auto | nat descriptor address inner |
静的なNAT設定 | 172.16.184.33=192.168.0.1 | nat descriptor static |
静的IPマスカレード | なし | |
適用インタフェース | PP[LEASED]、または、PP[01] |
種類 | IPアドレスなど |
---|---|
IPアドレス | 192.168.0.2〜192.168.0.254 |
ネットマスク | 255.255.255.0 (24ビット) |
ブロードキャストアドレス | 192.168.0.255 |
ゲートウェイのIPアドレス | 192.168.0.1 (ルータ) |
DNSサーバ | プロバイダに指定されたもの |
SMTPサーバ | プロバイダに指定されたもの |
POPサーバ | プロバイダに指定されたもの |
ドメイン名 | プロバイダに指定されたもの |
[ 設定例の設定内容 ]
[ 設定例 ]
# # RTに関する設定 # pp line l128 ip lan address 192.168.0.1/24 ip lan routing protocol none # # 接続相手(OCNエコノミー,専用線)に関する設定 # pp select leased ip pp route add net default 1 nat use on nat masquerade on nat address global 172.16.184.46 172.16.184.33=192.168.0.1 pp enable leased # # RTに関する設定 # dns server "OCNで指定されたDNSアドレス" dns domain "OCNで指定されたドメイン名" dns private address spoof on # # 保存と再起動 # save restart
# # RTに関する設定 # pp line l128 ip lan address 192.168.0.1/24 ip lan routing protocol none # # NATディスクリプタの設定 # nat descriptor type 1 masquerade nat descriptor address outer 1 172.16.184.46 nat descriptor static 1 1 172.16.184.33=192.168.0.1 # # 接続相手(OCNエコノミー,専用線)に関する設定 # pp select leased ip pp route add net default 1 ip pp nat descriptor 1 pp enable leased # # RTに関する設定 # dns server "OCNで指定されたDNSアドレス" dns domain "OCNで指定されたドメイン名" dns private address spoof on # # 保存と再起動 # save restart
# # RTに関する設定 # bri line 1 l128 ip lan address 192.168.0.1/24 ip lan routing protocol none # # 接続相手(OCNエコノミー,専用線)に関する設定 # pp select 1 pp bind bri 1 ip pp route add net default 1 nat use on nat masquerade on nat address global 172.16.184.46 172.16.184.33=192.168.0.1 pp enable 1 # # RTに関する設定 # dns server "OCNで指定されたDNSアドレス" dns domain "OCNで指定されたドメイン名" # # 保存と再起動 # save restart
# # RTに関する設定 # bri line 1 l128 ip lan address 192.168.0.1/24 ip lan routing protocol none # # NATディスクリプタの設定 # nat descriptor type 1 masquerade nat descriptor address outer 1 172.16.184.46 nat descriptor static 1 1 172.16.184.33=192.168.0.1 # # 接続相手(OCNエコノミー,専用線)に関する設定 # pp select 1 pp bind bri 1 ip pp route add net default 1 ip pp nat descriptor 1 pp enable 1 # # RTに関する設定 # dns server "OCNで指定されたDNSアドレス" dns domain "OCNで指定されたドメイン名" dns private address spoof on # # 保存と再起動 # save restart
ip pp routing protocol rip
は要らないのですか?
設定してはいけません(要りません)。
デフォルトの「ip pp routing protocol none
」にしてください。
設定するとPrivate Addressで構築した内部のNetwork情報を上位のプロバイダに
流してしまいます。
何が起るか予想できません。
以下のようにプライベートアドレスのフィルタ設定を行ないます。
# # IPフィルタの定義 # ip filter 20 reject 192.168.0.0/24 * * * * ip filter 21 pass * 192.168.0.0/24 icmp * * ip filter 22 pass * 192.168.0.0/24 established * * ip filter 23 pass * 192.168.0.0/24 tcp,udp * domain,ident ip filter 24 pass * 192.168.0.0/24 tcp ftpdata * ip filter 25 pass * 192.168.0.0/24 udp domain * ip filter directed-broadcast on ip filter source-route on
# PP[01]のIN方向にフィルタを適用 pp select 1 ip pp secure filter in 20 21 22 23 24 25
# PP[LEASED]のIN方向にフィルタを適用 pp select leased ip pp secure filter in 20 21 22 23 24 25
ちなみに、フィルタ処理とNAT&IPマスカレード処理の位置関係で、
グローバルアドレスに対するフィルタは、不要です。
パケットがPPインタフェースに入力(IN)される場合は、
NAT&IPマスカレード処理後のパケットがフィルタ処理されます。
: [BRI] : ISDN回線 or 専用線 : +-----------------+-------------------+ | | | | +-----------------------------+ | | | PPPやISDN回線の処理 | | | +-----------------------------+ | | | | | +-----------------------------+ |<外側> | | NAT | | | +-----------------------------+ |<内側> | | | | +-----------------------------+ | | | IPフィルタ | | | | +----(↓)----+----(↑)----+ | | ip filter ... | | | in | out | | | ip pp secure filter in/out .... | | +----(↓)----+----(↑)----+ | | | +-----------------------------+ | | | | | (PP#n) | ip pp local address | | | | +-----------------------------+ | | | IPルーティング | | | +-----------------------------+ | | | | | (LAN) | ip lan address | | | | +-----------------------------+ | | | IPフィルタ | | | | +----(↑)----+----(↓)----+ | | ip filter ... | | | in | out | | | ip lan secure filter in/out .... | | +----(↑)----+----(↓)----+ | | | +-----------------------------+ | | | | | +-----------------------------+ | | | イーサネットの処理 | | | +-----------------------------+ | | | | +-----------------+-------------------+ [LAN] | ------------------+--------------------
192.168.0.2をサーバとして公開するのなら、NATの設定も公開用に変更する必要があります。
サーバの提供する情報/サービスの使用するプロトコルを26番のフィルタのよ うに追加します。
# IPフィルタの定義 ip filter 20 reject 192.168.0.0/24 * * * * ip filter 21 pass * 192.168.0.0/24 icmp * * ip filter 22 pass * 192.168.0.0/24 established * * ip filter 23 pass * 192.168.0.0/24 tcp,udp * domain,ident ip filter 24 pass * 192.168.0.0/24 tcp ftpdata * ip filter 25 pass * 192.168.0.0/24 udp domain * ip filter 26 pass * 192.168.0.2 tcp,udp * smtp,gopher,finger,www,nntp,ntp,33434-33500 ip filter directed-broadcast on ip filter source-route on
# PP[01]のIN方向にフィルタを適用 pp select 1 ip pp secure filter in 20 21 22 23 24 25 26
# PP[LEASED]のIN方向にフィルタを適用 pp select leased ip pp secure filter in 20 21 22 23 24 25 26
(Rev.3以前のファームウェア…NATとIPマスカレード)
(Rev.4以降のファームウェア…NATディスクリプタ)
# 例(1) nat descriptor type 1 masquerade nat descriptor address outer 1 172.16.184.46 nat descriptor static 1 1 172.16.184.33=192.168.0.1 nat descriptor static 1 2 172.16.184.34=192.168.0.11 nat descriptor static 1 3 172.16.184.35=192.168.0.21 nat descriptor static 1 4 172.16.184.36=192.168.0.31 nat descriptor static 1 5 172.16.184.37=192.168.0.41 nat descriptor static 1 6 172.16.184.38=192.168.0.51
# 例(2) nat descriptor type 1 masquerade nat descriptor address outer 1 172.16.184.46 nat descriptor static 1 1 172.16.184.33=192.168.0.1 10
IPマスカレードも複数利用可能です。
nat descriptor type 1 nat nat descriptor address outer 1 172.16.184.33 nat descriptor address inner 1 192.168.0.1 nat descriptor static 1 1 172.16.184.33=192.168.0.1 nat descriptor type 2 masquerade nat descriptor address outer 2 172.16.184.45 nat descriptor address inner 2 192.168.0.2-192.168.0.127 nat descriptor type 3 masquerade nat descriptor address outer 3 172.16.184.46 nat descriptor address inner 3 192.168.0.128-192.168.0.254
アドレスに余裕のある間はNATで処理し、不足してきたらIPマスカレードで処理されます。
nat descriptor type 1 nat-masquerade nat descriptor address outer 1 172.16.184.33-172.16.184.46 nat descriptor static 1 1 172.16.184.33=192.168.0.1
NATアドレスの範囲指定は、1組です。 IPマスカレードを併用する場合は、1組のアドレス範囲の最初の1個です。 グローバルIPアドレスとプライベートIPアドレスを固定する指定は、 範囲指定に続けて8組まで指定できます。
引数の順番 | 個数 | 形式 | 内容 |
1番目 | 1組 | global_range | NATでグローバルIPアドレスとして扱う範囲 |
2番目〜9番目 | 8組 | global = private | グローバルIPアドレスとプライベートIPアドレスを固定する |
nat address global gs-ge g1=p1 g2=p2 g3=p3 g4=p4 g5=p5 g6=p6 g7=p7 g8=p8 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ 範囲 固定1 固定2 固定3 固定4 固定5 固定6 固定7 固定8
設定例では、固定割付しておりますが、プロバイダからそのようにするよう 指示が無ければ、固定割付する必要はありません。
[ 目次
/ ダイヤルアクセス
/ エコノミー
/ スタンダード
]
[ +VPN
/ +専用線
/ +ISDN
/ +フィルタ
/ files
]
|