hostname Router_A interface ewan 1 ip address 192.0.2.6 255.255.255.252 exit interface lan 1 ip address 192.168.1.1 255.255.255.0 exit router bgp 65000 neighbor 192.0.2.5 remote-as 65000 network 192.0.2.4 255.255.255.252 redistribute connected exit end
hostname Router_B interface ewan 1 ip address 192.0.2.1 255.255.255.252 exit interface lan 1 ip address 192.0.2.5 255.255.255.252 exit router bgp 65000 neighbor 192.0.2.6 next-hop-self neighbor 192.0.2.6 remote-as 65000 network 192.0.2.4 255.255.255.252 redistribute ospf exit router ospf network 192.0.2.0 0.0.0.3 area 0 redistribute bgp exit end
hostname Router_C interface ewan 1 ip address 192.0.2.2 255.255.255.252 exit interface lan 1 ip address 192.168.2.1 255.255.255.0 exit router ospf network 192.0.2.0 0.0.0.3 area 0 redistribute connected exit end
設定内容 | 画面表示例 |
---|---|
特権ユーザモードへの移行 パスワードの入力 設定情報の初期化 設定モードの変更 設定入力 設定保存 装置再起動 |
Router>enable Enter password: Router# Router#clear working.cfg Router# Router#configure terminal Router(config)#hostname Router_A Router_A(config)#interface ewan 1 Router_A(config-if ewan 1)# ip address 192.0.2.6 255.255.255.252 Router_A(config-if ewan 1)#exit Router_A(config)#interface lan 1 Router_A(config-if lan 1)# ip address 192.168.1.1 255.255.255.0 Router_A(config-if lan 1)#exit Router_A(config)#router bgp 65000 Router_A(config-bgp)# neighbor 192.0.2.5 remote-as 65000 Router_A(config-bgp)# network 192.0.2.4 255.255.255.252 Router_A(config-bgp)# redistribute connected Router_A(config-bgp)#exit Router_A(config)# Router_A(config)#end Router_A# Router_A#save SIDE-A % saving working-config % finished saving Router_A#reset Going to reset with SIDE-A.frm and SIDE-A.cfg. Boot-back not scheduled for next boot. Next rebooting firmware SIDE-A.frm is fine. Are you OK to cold start?(y/n)y |
設定内容 | 画面表示例 |
---|---|
特権ユーザモードへの移行 パスワードの入力 設定情報の初期化 設定モードの変更 設定入力 ※ 設定保存 装置再起動 |
Router>enable Enter password: Router# Router#clear working.cfg Router# Router#configure terminal Router(config)#hostname Router_B Router_B(config)#interface ewan 1 Router_B(config-if ewan 1)# ip address 192.0.2.1 255.255.255.252 Router_B(config-if ewan 1)#exit Router_B(config)#interface lan 1 Router_B(config-if lan 1)# ip address 192.0.2.5 255.255.255.252 Router_B(config-if lan 1)#exit Router_B(config)#router bgp 65000 Router_B(config-bgp)# neighbor 192.0.2.6 next-hop-self Router_B(config-bgp)# neighbor 192.0.2.6 remote-as 65000 Router_B(config-bgp)# network 192.0.2.4 255.255.255.252 Router_B(config-bgp)# redistribute ospf Router_B(config-bgp)#exit Router_B(config)#router ospf Router_B(config-ospf)# network 192.0.2.0 0.0.0.3 area 0 Router_B(config-ospf)# redistribute bgp Router_B(config-ospf)#exit Router_B(config)# Router_B(config)#end Router_B# Router_B#save SIDE-A % saving working-config % finished saving Router_B#reset Going to reset with SIDE-A.frm and SIDE-A.cfg. Boot-back not scheduled for next boot. Next rebooting firmware SIDE-A.frm is fine. Are you OK to cold start?(y/n)y |
※:iBGPで経路情報を送る場合、Next Hopは変更されません。
本設定にて、Router Aに広告する経路のNext Hopを自装置(Router B)に書き換えています。
設定内容 | 画面表示例 |
---|---|
特権ユーザモードへの移行 パスワードの入力 設定情報の初期化 設定モードの変更 設定入力 設定保存 装置再起動 |
Router>enable Enter password: Router# Router#clear working.cfg Router# Router#configure terminal Router(config)#hostname Router_C Router_C(config)#interface ewan 1 Router_C(config-if ewan 1)# ip address 192.0.2.2 255.255.255.252 Router_C(config-if ewan 1)#exit Router_C(config)#interface lan 1 Router_C(config-if lan 1)# ip address 192.168.2.1 255.255.255.0 Router_C(config-if lan 1)#exit Router_C(config)#router ospf Router_C(config-ospf)# network 192.0.2.0 0.0.0.3 area 0 Router_C(config-ospf)# redistribute connected Router_C(config-ospf)#exit Router_C(config)# Router_C(config)#end Router_C# Router_C#save SIDE-A % saving working-config % finished saving Router_C#reset Going to reset with SIDE-A.frm and SIDE-A.cfg. Boot-back not scheduled for next boot. Next rebooting firmware SIDE-A.frm is fine. Are you OK to cold start?(y/n)y |
BGP経路情報を確認します。(Router A)
確認内容 | 画面表示例 |
---|---|
ルーティング情報 を表示 ※ |
Router_A#show ip bgp BGP table version is 0, local router ID is 192.168.1.1 Status codes: s suppressed, d damped, h history, p stale, * valid, > best,i- internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i 192.0.2.4/30 192.0.2.5 100 0 i *> 0.0.0.0 0 32768 ? * 0.0.0.0 32768 i *> 192.168.1.0 0.0.0.0 0 32768 ? *>i 192.168.2.0 192.0.2.5 20 100 0 ? |
※:Router CのLAN側のネットワーク(192.168.2.0/24)が、BGPの経路として表示されることを確認してください。
BGP経路情報を確認します。(Router B)
確認内容 | 画面表示例 |
---|---|
ルーティング情報 を表示 ※1 ※2 |
Router_B#show ip bgp BGP table version is 0, local router ID is 192.168.1.1 Status codes: s suppressed, d damped, h history, p stale, * valid, > best,i- internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i 192.0.2.4/30 192.0.2.6 100 0 ? *> 0.0.0.0 0 32768 i *> 192.168.1.0 192.0.2.6 0 100 0 ? *>i 192.168.2.0 192.0.2.2 20 32768 ? |
※1:Router AのLAN側のネットワーク(192.168.1.0/24)がBGPの経路として表示されることを確認してください。
※2:Router CのLAN側のネットワーク(192.168.2.0/24)がBGPの経路として表示されることを確認してください。
ネイバー状態を確認します。(Router A)
確認内容 | 画面表示例 |
---|---|
BGPネイバー情報を表示 ※1 ※2 |
Router_A#show ip bgp neighbors BGP neighbor is 192.0.2.5, remote AS 65000, local AS 65000, internal link BGP version 4, remote router ID 192.0.2.5 BGP state = Established, up for 00:52:51 Last read 00:00:51, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: Route refresh: advertised and received (old and new) Address family IPv4 Unicast: advertised and received Received 69 messages, 2 notifications, 0 in queue Sent 65 messages, 0 notifications, 0 in queue Route refresh request: received 0, sent 0 Minimum time between advertisement runs is 5 seconds For address family: IPv4 Unicast Index 1, Offset 0, Mask 0x2 Community attribute sent to this neighbor (both) 2 accepted prefixes 2 announced prefixes Connections established 3; dropped 2 Local host: 192.0.2.6, Local port: 179 Foreign host: 192.0.2.5, Foreign port: 65523 Nexthop: 192.0.2.6 Nexthop global: :: Nexthop local: :: BGP connection: non shared network Read thread: on Write thread: off |
※1:BGP neighborにRouter BのIPアドレスが表示されることを確認してください。
※2:BGP stateがEstablishedになっていることを確認してください。
ネイバー状態を確認します。(Router B)
確認内容 | 画面表示例 |
---|---|
BGPネイバー情報を表示 ※1 ※2 |
Router_B#show ip bgp neighbors BGP neighbor is 192.0.2.6, remote AS 65000, local AS 65000, internal link BGP version 4, remote router ID 192.168.1.1 BGP state = Established, up for 00:53:15 Last read 00:00:15, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: Route refresh: advertised and received (old and new) Address family IPv4 Unicast: advertised and received Received 64 messages, 0 notifications, 0 in queue Sent 76 messages, 2 notifications, 0 in queue Route refresh request: received 0, sent 0 Minimum time between advertisement runs is 5 seconds For address family: IPv4 Unicast Index 1, Offset 0, Mask 0x2 NEXT_HOP is always this router Community attribute sent to this neighbor (both) 2 accepted prefixes 2 announced prefixes Connections established 3; dropped 2 Local host: 192.0.2.5, Local port: 65523 Foreign host: 192.0.2.6, Foreign port: 179 Nexthop: 192.0.2.5 Nexthop global: :: Nexthop local: :: BGP connection: non shared network Read thread: on Write thread: off |
※1:BGP neighborにRouter AのIPアドレスが表示されることを確認してください。
※2:BGP stateがEstablishedになっていることを確認してください。
経路情報を確認します。(Router A)
確認内容 | 画面表示例 |
---|---|
ルーティング情報を表示 ※ |
Router_A#show ip route Max entry: 10000 (Commonness in IPv4 and IPv6) Active entry:4 (IPv4), 2 (IPv6) Peak:4 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF B - BGP, I - IKE, U - SA-UP, D - REDUNDANCY, E - EventAction A - AutoConfig, > - selected route, * - FIB route, p - stale info. C> * 127.0.0.0/8 is directly connected, LOOP0 C> * 192.0.2.4/30 is directly connected, EWAN1 C> * 192.168.1.0/24 is directly connected, LAN B> * 192.168.2.0/24 [200/2] via 192.0.2.5, EWAN1, 00:00:03 |
※:Router CのLAN側のネットワーク(192.168.2.0/24)がBGPの経路として表示されていることを確認してください。
経路情報を確認します。(Router B)
確認内容 | 画面表示例 |
---|---|
ルーティング情報を表示 ※1 ※2 |
Router_B# show ip route Max entry: 10000 (Commonness in IPv4 and IPv6) Active entry:6 (IPv4), 2 (IPv6) Peak:6 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF B - BGP, I - IKE, U - SA-UP, D - REDUNDANCY, E - EventAction A - AutoConfig, > - selected route, * - FIB route, p - stale info. C> * 127.0.0.0/8 is directly connected, LOOP0 O 192.0.2.0/30 [110/1] is directly connected, EWAN1, 00:04:01 C> * 192.0.2.0/30 is directly connected, EWAN1 C> * 192.0.2.4/30 is directly connected, LAN B> * 192.168.1.0/24 [200/0] via 192.0.2.6, LAN, 00:54:27 O> * 192.168.2.0/24 [110/20] via 192.0.2.2, EWAN1, 00:03:12 |
※1:Router AのLAN側のネットワーク(192.168.1.0/24)が、BGPの経路として表示されていることを確認し てください。
※2:Router CのLAN側のネットワーク(192.168.2.0/24)が、OSPFの経路として表示されていることを確認 してください。
経路情報を確認します。(Router C)
確認内容 | 画面表示例 |
---|---|
ルーティング情報を表示 ※ |
Router_C#show ip route Max entry: 10000 (Commonness in IPv4 and IPv6) Active entry:5 (IPv4), 2 (IPv6) Peak:5 Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF B - BGP, I - IKE, U - SA-UP, D - REDUNDANCY, E - EventAction A - AutoConfig, > - selected route, * - FIB route, p - stale info. C> * 127.0.0.0/8 is directly connected, LOOP0 O 192.0.2.0/30 [110/1] is directly connected, EWAN1, 00:23:00 C> * 192.0.2.0/30 is directly connected, EWAN1 O> * 192.168.1.0/24 [110/1] via 192.0.2.1, EWAN1, 00:22:59 C> * 192.168.2.0/24 is directly connected, LAN |
※:Router AのLAN側のネットワーク(192.168.1.0/24)がOSPFの経路として表示されていることを確認してください。
データ通信が行えることを確認します。
例:Router_Aより ping 192.168.2.1 source-interface lan 1を実施します。
確認内容 | 画面表示例 |
---|---|
pingを実行する ping応答あり |
Router_A#ping 192.168.2.1 source-interface lan 1 Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms |