NEC IXのIPv4 IPv6アドレスの設定

スポンサーリンク

NEC IXシリーズにIPv4/IPv6アドレスを設定する方法について説明します。また、IXシリーズにおけるデバイス番号、インターフェース番号の概念について説明します。

設定まとめ

コマンド一覧

IPアドレス設定に関するコマンド一覧は以下の通りです。

Router(config)# interface GigaEthernet0.X
Router(config-GigaEthernet0.X)# encapsulation dot1q <vlan_id>
Router(config-GigaEthernet0.X)# ip address <addr>/<mask>
Router(config-GigaEthernet0.X)# ipv6 address <addr>/<mask>
Router(config-GigaEthernet0.X)# no shutdown

Router(config)# device GigaEthernet2
Router(config-GigaEthernet2)# vlan-group <group_num> port <port_num> [  <port_num> ... ]
Router(config)# interface GigaEthernet2:X.Y
Router(config-GigaEthernet2:X.Y)# encapsulation dot1q <vlan_id>
Router(config-GigaEthernet2:X.Y)# ip address <addr>/<mask>
Router(config-GigaEthernet2:X.Y)# ipv6 address <addr>/<mask>
Router(config-GigaEthernet2:X.Y)# no shutdown

インターフェースの指定

以下のようなコマンドを用いて、インターフェースコンフィグモードに入ります。Xはデバイス番号を表しています。

Router(config)# interface GigaEthernetX.0
Router(config-GigaEthernetX.0)# 

IPアドレスの設定

以下のようなコマンドを用いて、IPv4アドレス, IPv6アドレスを設定する事ができます。

Router(config)# interface GigaEthernetX.0
Router(config-GigaEthernetX.0)# ip address <addr>/<mask>
Router(config-GigaEthernetX.0)# ipv6 address <addr>/<mask>

インターフェースの有効化

WAN側の初期設定は”administratively down”状態です。WAN側の通信をするには”no shut”コマンドが必要になります。

Router(config)# interface GigaEthernetX.0
Router(config-GigaEthernetX.0)# no shutdown

動作確認

動作確認の構成

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

+-----------------+
| Rocky Linux 8.4 |
|      host200    |
+-------+---------+
 ens192 | .200
        | :254
        |
        | 200.0.0.0/24
        | 2001:200::/64
        | 
        | .254
  Gi0.0 | :254
+-------+---------+ 
|   NEC IX 2015   | 
|       R1        |
+-------+---------+
  Gi1.0 | .254
        | :254
        |
        | 192.168.1.0/24
        | 2001:1::/64
        |
        | .100
 ens192 | :100
+-------+---------+
| Rocky Linux 8.4 |
|      host100    |
+-----------------+

初期設定

IX2015は工場出荷時の状態で動作確認をします。工場出荷時の初期設定は以下の通りです。

R1 : 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 16-Tue-2021 21:46:56 JST
!
!
hostname Router
timezone +09 00
!
!
!
!
!
!
!
!
!
logging buffered 131072
logging subsystem all warn
logging timestamp datetime
!
!       
ip ufs-cache enable
ip dhcp enable
ip access-list web_console permit ip src any dest 192.168.1.254/32
!
!
!
!
!
!
!
!
!
!
http-server username admin
http-server ip access-list web_console
http-server ip enable
!
!
!
!
!       
!
!
!
ip dhcp profile web_gigaethernet1.0
  assignable-range 192.168.1.1 192.168.1.253
  dns-server 192.168.1.254
!
device GigaEthernet0
!
device GigaEthernet1
!
interface GigaEthernet0.0
  no ip address
  shutdown
!
interface GigaEthernet1.0
  ip address 192.168.1.254/24
  ip dhcp binding web_gigaethernet1.0
  no shutdown
!
interface Loopback0.0
  no ip address
!       
interface Null0.0
  no ip address

動作確認 (1) IPv4 IPv6アドレスの設定

工場出荷時のIPアドレス設定は以下の通りです。

interface GigaEthernet1.0
  ip address 192.168.1.254/24
  no shutdown

以下のようなコマンドを実行し、IPv4アドレスとIPv6アドレスを設定します。

interface GigaEthernet1.0
  ip address 192.168.1.254/24
  ipv6 address 2001:1::254/64
  no shutdown
!
interface GigaEthernet0.0
  ip address 200.0.0.254/24
  ipv6 address 2001:200::254/64
  no shutdown

動作確認 (2) 設定の表示

interfaceのup/downを確認するには、”show interface brief”が便利です。

Router# show interfaces brief 
Interface GigaEthernet0.0 is up
  IPv4 subsystem connected, physical layer is up, 0:03:20
  ARP subsystem connected, physical layer is up, 0:03:20
  IPv6 subsystem connected, physical layer is up, 0:03:20
Interface GigaEthernet1.0 is up
  IPv4 subsystem connected, physical layer is up, 0:06:22
  ARP subsystem connected, physical layer is up, 0:41:08
  IPv6 subsystem connected, physical layer is up, 0:06:22
Interface Null0.0 is up
  IPv4 subsystem connected, physical layer is up, 0:41:17
  IPv6 subsystem connected, physical layer is up, 0:41:17
Interface Loopback0.0 is up
  IPv6 subsystem connected, physical layer is up, 0:41:17

IPv4アドレス IPv6アドレスを確認するには、”show ip interface”, “show ipv6 interface”を使って下さい。cisco機のように”show ip int bri”や”| include”は使えません。

Router# show ip interface GigaEthernet1.0
Interface GigaEthernet1.0 is up, line protocol is up
  Internet address is 192.168.1.254/24
  Broadcast address is 255.255.255.255
  Address determined by config
  MTU is 1500 octets
  Directed broadcast forwarding is disabled
  Proxy ARP is disabled
  Local proxy ARP is disabled
  ICMP redirects are always sent
  IGMP is disabled
  TCP MSS adjustment is disabled
Router# 
Router# 
Router# 
Router# show ipv6 interface GigaEthernet1.0
Interface GigaEthernet1.0 is up, line protocol is up
  Interface identifier is 0260:b9ff:fee1:03f0
  MTU is 1500 octets, Hop-limit is 64
  ICMP redirects are always sent
  TCP MSS adjustment is disabled
  Global address(es):
    2001:1::254 prefixlen 64
    2001:1:: prefixlen 64 anycast
  Link-local address(es):
    fe80::260:b9ff:fee1:3f0 prefixlen 64
    fe80:: prefixlen 64 anycast
  Multicast address(es):
    ff02::1
    ff02::2
    ff02::1:ff00:0
    ff02::1:ff00:254
    ff02::1:ffe1:3f0
  Advertising prefix is auto-prefix11:
    2001:1:: prefixlen 64
    Valid life time 2592000 seconds
    Preferred life time 604800 seconds
    On-link flag is on
    Autonomous flag is on
  Neighbor discovery variable(s):
    Neighbor cache garbage time 0 seconds
  Router advertisement variable(s):
    Sending RA is disabled
    Max transmit interval 600 seconds
    Min transmit interval 198 seconds
    Reachable time 0 seconds
    Life time 1800 seconds
    Retrans timer 0 milliseconds
    Current hop limit 64 hops
    Managed address configuration flag is off
    Other stateful configuration flag is off
    Source link-layer address 00:60:b9:e1:03:f0
    Prefix is auto-prefix11 address 2001:1:: prefixlen 64
  Neighbor solicitation variable(s):
    Transmit interval 0 seconds
  Stateless address auto configuration variable(s):
    DAD attempts 1, fails 0
  Multicast listener discovery variable(s):
    Running version is 2
    Query interval is 125 seconds
    Query max response delay is 10 seconds
    Robustness is 2
    Multicast listener interval is 260 seconds
    Other querier present interval is 255 seconds
    Startup query interval is 31 seconds
    Startup query count is 2
    Last listener query interval is 1 seconds
    Last listener query count is 2
    Last listener query time is 2 seconds
    Unsolicited report interval (version 1) is 10 seconds
    Unsolicited report interval (version 2) is 1 seconds
    Older version querier present interval is 260 seconds
    Older version host present interval is 260 seconds
    Querier is unknown
Router# 

疎通確認

Host100からIX2215への疎通を確認します。

[host010:RockyLinux8.4]
[root@host010 ~]# ping -c 3 192.168.1.254
PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
64 bytes from 192.168.1.254: icmp_seq=1 ttl=64 time=0.242 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=64 time=0.334 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=64 time=0.317 ms

--- 192.168.1.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2046ms
rtt min/avg/max/mdev = 0.242/0.297/0.334/0.039 ms
[root@host010 ~]# 
[root@host010 ~]# 
[root@host010 ~]# ping6 -c 3 2001:1::254
PING 2001:1::254(2001:1::254) 56 data bytes
64 bytes from 2001:1::254: icmp_seq=1 ttl=64 time=0.327 ms
64 bytes from 2001:1::254: icmp_seq=2 ttl=64 time=0.346 ms
64 bytes from 2001:1::254: icmp_seq=3 ttl=64 time=0.332 ms

--- 2001:1::254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2030ms
rtt min/avg/max/mdev = 0.327/0.335/0.346/0.008 ms
[root@host010 ~]# 
タイトルとURLをコピーしました