ルータを弄る
interlinkの無料体験期間で8グローバルIPを借り受けたのと時を同じくして各種業務ルータを弄り始めたので、無料期間の締めくくりとして設定を纏めてみた。
環境
- xxx.yyy.zzz.104/29の8IPレンジ
- 光終末からのケーブルを受けるインターフェイスはUnnumbered
- 内部インターフェイス側にはローカルIPとグローバルIPを一つ持つ
- 他のグローバルIPを持つマシンは、内部インターフェイスの持つグローバルIPをゲートウェイとして外部に出る
- ルータはNEC IX2015/YAMAHA RT107e/SEIL x86
セキュリティや利便性の設定は記述してないので、注意してください。
NEC IX2015の場合
hostname IX2015
timezone +09 00
ip route default FastEthernet0/0.1
ip access-list napt_host permit ip src 192.168.0.0/24 dest any
proxy-dns ip enable
proxy-dns interface FastEthernet0/0.1ppp profile provider
authentication myname account@example.net
authentication password account@example.net passwordinterface FastEthernet1/0.0
ip address xxx.yyy.zzz.105/29
ip address 192.168.0.1/24 secondary
ip mtu 1454
ip tcp adjust-mss auto
no shutdowninterface FastEthernet0/0.1
encapsulation pppoe
auto-connect
ppp binding provider
ip unnumbered FastEthernet1/0.0
ip tcp adjust-mss auto
ip napt enable
ip napt inside list napt_host
no shutdown
YAMAHA RT107eの場合
login timer 3600
ip route default gateway pp 1
ip lan1 address 192.168.0.1/24
ip lan1 secondary address xxx.yyy.zzz.105/29
pp select 1
pp name provider
pp always-on on
pppoe use lan2
pppoe auto disconnect off
pp auth accept chap
pp auth myname account@example.net password
ppp lcp mru on 1454
ppp ipcp msext on
ip pp nat descriptor 1
pp enable 1
nat descriptor type 1 masquerade
nat descriptor address outer 1 xxx.yyy.zzz.105-xxx.yyy.zzz.110
nat descriptor address inner 1 192.168.0.1-192.168.0.254
dns server pp 1
SEILの場合(抜粋)
hostname "SEIL"
timezone "Japan"
environment login-timer 3600
ppp add provider keepalive 30 ipcp enable ipcp-address off ipcp-dns on ipv6cp disable authentication-method auto identifier account@example.net passphrase password tcp-mss auto
interface lan0 media auto
interface lan1 media auto
interface lan1 queue normal
interface lan1 add xxx.yyy.zzz.105/29
interface lan1 add 192.168.0.1/24
interface pppoe0 over lan0
interface pppoe0 ppp-configuration provider
interface pppoe0 unnumbered on lan1
route add default pppoe0
nat napt add private 192.168.0.0-192.168.255.255 interface pppoe0
dns forwarder enable
dns forwarder add 8.8.8.8
dns forwarder add 8.8.4.4
resolver enable
resolver address add 8.8.8.8
resolver address add 8.8.4.4
SEILを試している時に、unnumberedで通知されるアドレスはlan1のIPアドレスの一覧の中で一番上にあるIPアドレスの様に感じられたので、設定する順番に注意
IX2015の設定は @nabeken さん、RT107eの設定は @ketaiorg さん、SEILの設定は @n_kane さんにご協力を頂きました。ありがとうございました!