NEC IXのIPv4 IPv6ルーティング(RIP)

スポンサーリンク

NEC IX ルータにおけるIPv4, IPv6 rip routeの設定例を紹介します。IPv6におけるRIPはRIPng (RIP next generation)と呼ばれ、旧来のIPv4 RIPとは若干仕様が異なります。

関連記事 : NEC IX 構築方法

設定まとめ

コマンド一覧

RIP version2, RIPngに関連するコマンド一覧は以下の通りです。

Router(config)# ip router rip
Router(config)# ipv6 router rip
Router(config-GigaEthernetX.Y)# ip rip enable
Router(config-GigaEthernetX.Y)# ipv6 rip enable

RIP

NEC IXルータではRIPを使用するには、”ip router rip”コマンドでRIPルーティングを開始する必要があります。

Router(config)# ip router rip

以下のコマンドでRIPv2を有効にするインターフェースを指定できます。

Router(config-GigaEthernetX.Y)# ip rip enable

RIPng

RIPng (RIP next generation)はIPv6用のRIPです。NEC IXルータではRIPngを使用するには、”ipv6 router rip”コマンドでRIPngルーティングを開始する必要があります。

Router(config)# ipv6 router rip

RIPngを有効にしたいインターフェースに”ipv6 rip enable”コマンドを投入します。Cisco IOSのようにRIPngプロセス名の指定はできません。

Router(config-GigaEthernetX.Y)# ipv6 rip enable

動作確認

動作確認の構成

以下の環境で動作確認を行います。

        |
        | 192.168.3.0/24
        | 2001:3::/64
        | 
        | .3
   eth1 | :3
+-------+----------+
|    VyOS 1.4      | 
|        R3        |
| Lo:10.3.3.3/32   |
|    2001:30::3/128|
+-------+----------+
   eth0 | .3
        | :3
        |
        | 192.168.23.0/24
        | 2001:23::/64
        | 
        | .2 
   G0.0 | :2 
+-------+----------+ 
|    NEC IX 2015   | 
|        R2        |
| Lo:10.2.2.2/32   |
|    2001:20::2/128|
+-------+----------+
   G1.0 | .2
        | :2
        |
        | 192.168.12.0/24
        | 2001:12::/64
        |
        | .1 
   eth1 | :1
+-------+----------+ 
|    VyOS 1.4      | 
|        R1        |
| Lo:10.1.1.1/32   |
|    2001:10::1/128|
+-------+----------+
   eth0 | .1
        | :1
        |
        | 192.168.1.0/24
        | 2001:1::/64
        |

初期設定

初期設定はIPアドレスのみとします。NATの設定は入れていません。

R1 : VyOS1.4
set interfaces ethernet eth0 address '192.168.1.1/24'
set interfaces ethernet eth0 address '2001:1::1/64'
set interfaces ethernet eth0 hw-id '00:50:56:90:fa:a9'
set interfaces ethernet eth1 address '192.168.12.1/24'
set interfaces ethernet eth1 address '2001:12::1/64'
set interfaces ethernet eth1 hw-id '00:50:56:90:0d:6f'
set interfaces loopback lo address '2001:10::1/128'
set interfaces loopback lo address '10.1.1.1/32'
set service ssh
set system config-management commit-revisions '100'
set system console device ttyS0 speed '115200'
set system host-name 'R1'
set system login user admin authentication encrypted-password '$6$lG0ncSUZMogMH9p3$LekXBmi0/S942wFfLdoo8wDbz1BIU3RP34aLLiw6KEht0Na63PMACvSKBfc9ahIsYpR8Oq8TtylCp6LCRPuEI1'
set system login user vyos authentication encrypted-password '$6$oi8WXPY0U$1zEw/LSjazofZ/LA866G9D08JmPb6gMjBK/5qDpyzAomekPDFKCfcsSzN/gGHUpQNVaM.lZyyFnN05cyL2l9P0'
set system login user vyos authentication plaintext-password ''
set system ntp server time1.vyos.net
set system ntp server time2.vyos.net
set system ntp server time3.vyos.net
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'
R2 : NEC IX 2015
! NEC Portable Internetwork Core Operating System Software
! IX Series IX2105 (magellan-sec) Software, Version 8.10.11, RELEASE SOFTWARE
! Compiled Aug 02-Fri-2013 13:57:45 JST #2
! Current time Nov 26-Fri-2021 18:11:52 JST
!
!
hostname R2
timezone +09 00
!
!
!
!
!
!
!
!
!
logging buffered 131072
logging subsystem all warn
logging timestamp datetime
!
!       
ip ufs-cache enable
!
!
!
!
!
!
!
!
!
!
telnet-server ip enable
!
!
!
!
!
!
!
!
!
device GigaEthernet0
!       
device GigaEthernet1
!
interface GigaEthernet0.0
  ip address 192.168.23.2/24
  ipv6 address 2001:23::2/64
  no shutdown
!
interface GigaEthernet1.0
  ip address 192.168.12.2/24
  ipv6 address 2001:12::2/64
  no shutdown
!
interface Loopback0.0
  ip address 10.2.2.2/32
  ipv6 address 2001:20::2/128
!
interface Null0.0
  no ip address
R1 : VyOS1.4
set interfaces ethernet eth0 address '192.168.23.3/24'
set interfaces ethernet eth0 address '2001:23::3/64'
set interfaces ethernet eth0 hw-id '00:50:56:90:8d:e0'
set interfaces ethernet eth1 address '192.168.3.3/24'
set interfaces ethernet eth1 address '2001:3::3/64'
set interfaces ethernet eth1 hw-id '00:50:56:90:21:b2'
set interfaces loopback lo address '2001:30::3/128'
set interfaces loopback lo address '10.3.3.3/32'
set service ssh
set system config-management commit-revisions '100'
set system console device ttyS0 speed '115200'
set system host-name 'R3'
set system login user admin authentication encrypted-password '$6$lG0ncSUZMogMH9p3$LekXBmi0/S942wFfLdoo8wDbz1BIU3RP34aLLiw6KEht0Na63PMACvSKBfc9ahIsYpR8Oq8TtylCp6LCRPuEI1'
set system login user vyos authentication encrypted-password '$6$oi8WXPY0U$1zEw/LSjazofZ/LA866G9D08JmPb6gMjBK/5qDpyzAomekPDFKCfcsSzN/gGHUpQNVaM.lZyyFnN05cyL2l9P0'
set system login user vyos authentication plaintext-password ''
set system ntp server time1.vyos.net
set system ntp server time2.vyos.net
set system ntp server time3.vyos.net
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'

動作確認 (1) IPv4 rip route

設定投入

互いに疎通可能になるようRIP version2を設定します。

[R1:VyOS1.4]
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip interface lo
[R2:IX2015]
ip router rip
!
interface GigaEthernet0.0
  ip rip enable
!
interface GigaEthernet1.0
  ip rip enable
!
interface Loopback0.0
  ip rip enable
[R3:VyOS1.4]
set protocols rip interface eth0
set protocols rip interface eth1
set protocols rip interface lo

疎通確認

互いにprefixを交換できている事を確認します。

[R2:IX2015]
R2(config)# show ip route rip 
IP Routing Table - 4 entries, 5 hidden, 2039 frees
Entries: 0 Connected, 0 Static, 4 RIP, 0 OSPF, 0 BGP
Codes: C - Connected, S - Static, R - RIP, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, B - BGP
       * - Candidate default, s - Summary
Timers: Age
R      10.1.1.1/32 [120/2] via 192.168.12.1, GigaEthernet1.0, 0:00:13
R      10.3.3.3/32 [120/2] via 192.168.23.3, GigaEthernet0.0, 0:00:13
R    192.168.1.0/24 [120/2] via 192.168.12.1, GigaEthernet1.0, 0:00:13
R    192.168.3.0/24 [120/2] via 192.168.23.3, GigaEthernet0.0, 0:00:13
R2(config)# 

R2からR1, R3への疎通を確認します。

[R2:IX2015]
R2(config)# ping 10.1.1.1 count 3
PING 192.168.12.2 > 10.1.1.1 56 data bytes
64 bytes from 10.1.1.1: icmp_seq=0 ttl=64 time=0.647 ms
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.603 ms
64 bytes from 10.1.1.1: icmp_seq=2 ttl=64 time=0.633 ms

--- 10.1.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0.603/0.627/0.647
R2(config)# 
R2(config)# 
R2(config)# 
R2(config)# ping 10.3.3.3 count 3
PING 192.168.23.2 > 10.3.3.3 56 data bytes
64 bytes from 10.3.3.3: icmp_seq=0 ttl=64 time=0.562 ms
64 bytes from 10.3.3.3: icmp_seq=1 ttl=64 time=0.621 ms
64 bytes from 10.3.3.3: icmp_seq=2 ttl=64 time=0.544 ms

--- 10.3.3.3 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0.544/0.575/0.621
R2(config)# 

動作確認 (2) IPv6 RIPng route

設定投入

互いに疎通可能になるようRIPngを設定します。

[R1:VyOS1.4]
set protocols ripng interface eth0
set protocols ripng interface eth1
set protocols ripng interface lo
[R2:IX2015]
ipv6 router rip
!
interface GigaEthernet0.0
  ipv6 rip enable
!
interface GigaEthernet1.0
  ipv6 rip enable
!
interface Loopback0.0
  ipv6 rip enable
[R3:VyOS1.4]
set protocols ripng interface eth0
set protocols ripng interface eth1
set protocols ripng interface lo

疎通確認

互いにprefixを交換できている事を確認します。

[R2:IX2015]
R2(config)# show ipv6 route rip
IPv6 Routing Table - 14 entries, unlimited
Codes: C - Connected, L - Local, S - Static
       R - RIPng, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, B - BGP
       s - Summary
Timers: Uptime/Age
R      2001:1::/64 global [120/2]
         via fe80::250:56ff:fe90:d6f, GigaEthernet1.0, 0:10:31/0:00:20
R      2001:3::/64 global [120/2]
         via fe80::250:56ff:fe90:8de0, GigaEthernet0.0, 0:03:11/0:00:44
R      2001:10::1/128 global [120/2]
         via fe80::250:56ff:fe90:d6f, GigaEthernet1.0, 0:10:31/0:00:20
R      2001:12::/64 global [120/2]
         via fe80::250:56ff:fe90:d6f, GigaEthernet1.0, 0:10:31/0:00:20
R      2001:20::2/128 global [120/3]
         via fe80::250:56ff:fe90:8de0, GigaEthernet0.0, 0:03:11/0:00:44
         via fe80::250:56ff:fe90:faa9, GigaEthernet0.0, 0:03:11/0:00:20
R      2001:23::/64 global [120/2]
         via fe80::250:56ff:fe90:8de0, GigaEthernet0.0, 0:03:12/0:00:00
R      2001:30::3/128 global [120/2]
         via fe80::250:56ff:fe90:8de0, GigaEthernet0.0, 0:03:12/0:00:00
R2(config)# 

R2からR1, R3への疎通を確認します。NEC IXでIPv6 pingを実行するにはping6コマンドを使います。

[R2:IX2015]
R2(config)# ping6 2001:10::1 count 3
PING 2001:12::2 > 2001:10::1 56 data bytes
64 bytes from 2001:10::1 icmp_seq=0 hlim=64 time=1.246 ms
64 bytes from 2001:10::1 icmp_seq=1 hlim=64 time=0.665 ms
64 bytes from 2001:10::1 icmp_seq=2 hlim=64 time=0.653 ms

--- 2001:10::1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0.653/0.854/1.246
R2(config)# 
R2(config)# 
R2(config)# 
R2(config)# ping6 2001:30::3 count 3
PING 2001:12::2 > 2001:30::3 56 data bytes
64 bytes from 2001:30::3 icmp_seq=0 hlim=63 time=0.983 ms
64 bytes from 2001:30::3 icmp_seq=1 hlim=63 time=0.939 ms
64 bytes from 2001:30::3 icmp_seq=2 hlim=63 time=0.916 ms

--- 2001:30::3 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0.916/0.946/0.983
R2(config)# 
タイトルとURLをコピーしました