- 構成図の説明
自組織内のRouterなどが、上位ISPのものであって、自由に使えない場合などは
上記に示すような構成をとらなければならない。そして、Router BとRouter Cは
いずれかの方法によって、RIP2, OSPFなどのIGP(Interior Gateway Protocol)を
利用して経路制御を行わなくてはならない。Class Lessな経路を扱わなくては
ならないので、RIPは利用できない。ここでは、OSPFを利用した場合の例を
示す。Router Cが制御できない場合には、自組織のネットワークに接続する
すべての機器がOSPFを利用できる環境を作らないとならない。ホスト系では
gatedを起動する必要もある。
- Configの例
Router AとRouter BはIBGPを使い接続され、BGPの情報をRouter BがOSPFに
翻訳して、自組織のネットワークに流している。また、自組織に接続した
ホスト Aはgatedを使って、OSPFの経路情報を聞いている。この時Areaは
0(バックボーン)のみである。
- Router Aの設定
!
! Router A
!
interface Ethernet0
ip address 192.168.10.69 255.255.255.192
!
interface Ethernet1
ip address 192.168.10.9 255.255.255.192
!
interface Serial0
ip address 192.168.20.1 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
router bgp 64519
redistribute static
neighbor 192.168.10.8 remote-as 64518
neighbor 192.168.10.8 weight 200
neighbor 192.168.10.8 filter-list 1 out
neighbor 192.168.10.68 remote-as 64517
neighbor 192.168.10.68 weight 100
neighbor 192.168.10.68 filter-list 1 out
neighbor 192.168.20.2 remote-as 64519
!
ip classless
ip subnet-zero
ip route 192.168.30.0 255.255.255.0 192.168.20.2
ip as-path access-list 1 permit ^$
!
- Router Bの設定
!
! Router B
!
interface Ethernet0
ip address 192.168.30.1 255.255.255.0
!
! Y-NIX
!
interface Serial0
ip address 192.168.20.2 255.255.255.0
!
ip classless
ip subnet-zero
router bgp 64519
network 192.168.30.0 mask 255.255.255.0
neighbor 192.168.20.1 remote-as 64519
!
router ospf 100
passive-interface Serial0
redistribute bgp 64519 metric 100 subnets
network 192.168.30.0 0.0.0.255 area 0
redistribute static
!
ip route 0.0.0.0 0.0.0.0 192.168.30.1
!
- /etc/gated.confの設定例
Host A(FreeBSD)上で、gated-3.5.5を利用した場合の例。
#
# Config for OSPF
#
interfaces {
interface all passive;
};
#routerid 1.0.0.3 ;
rip no;
ospf yes {
defaults {
preference 10 ;
type 1 ;
};
backbone {
authtype none;
interface all {
priority 1;
};
};
};