# Basic IPv4 Settings

### 1. Function Overview

This product is compatible with the following IPv4 network environment settings, mainly for the purpose of maintenance (configuring the settings of the switch).

1. IPv4 address settings

2. Route information settings

3. ARP table settings

### 2. Definition of Terms Used

IPv4 Link Local Address

This is an address that is only valid within the same segment, within the range of 169.254.0.0/16 to 169.254.255.255/16.

### 3. Function Details

#### 3.1. IPv4 address settings

This product lets you specify the IPv4 address and subnet mask for a VLAN interface.
As the setting method, both fixed settings and automatic settings via DHCP are supported.

- To set the fixed/automatic IPv4 address, use the ip address command.

- The IPv4 address setting cannot be left unspecified.

- The following actions occur if addresses are specified automatically by DHCP.

  - The HostName option (option code 12) can be added to the Discover/Request message.

  - The lease time requested to the DHCP server is fixed at 72 hours. (The actual lease time will depend on the setting of the DHCP server.)

  - If the ip address command is executed with automatic settings and the settings are changed to fixed settings, a release message for the IPv4 address obtained is sent to the DHCP server.

  - The information obtained from the DHCP server can be checked using the show dhcp lease.

- An IPv4 address can only be specified for one VLAN interface.
  If an IPv4 address already specified for a VLAN interface is specified for another VLAN interface, the IPv4 address for the old VLAN interface will be deleted.
  The IPv4 address that is allocated to a VLAN interface can be checked using the show ip interface command.

- In the initial state, 192.168.100.240/24 is fixed for the default VLAN (VLAN #1).

#### 3.2. Auto IP function

As part of the IPv4 address setting functionality, this product provides an auto IP function which automatically generates IPv4 link local addresses based on the MAC address.
The auto IP function only works when an IPv4 address has not been allocated from the DHCP server. (The IPv4 address must be set to “DHCP” as a prerequisite.)
This function confirms whether the automatically-generated IPv4 link local address does not already exist on the network via ARP.
If it has been confirmed that the address does not already exist, the generated address will start to be used.
If the IPv4 address was allocated from the DHCP server after the IPv4 link local address was determined via auto IP, the IPv4 link local address is discarded, and the IP address obtained from the DHCP server is used.

- The auto IP function can only be enabled for VLAN interfaces whose IPv4 address is specified. In the initial state, the default VLAN (VLAN #1) is enabled.

#### 3.3. Route information settings

This product refers to a routing table when sending syslog messages and when sending out voluntary IPv4 packets as an IPv4 host for NTP-based time adjustments and so on.
This product uses the following functions to perform the routing table operations.

- Set VLAN interface route information

- Set default gateway

- Show route information

##### 3.3.1. Route information for VLAN interfaces

When setting an IPv4 address on this product for a VLAN interface, the correspondence between the network address and VLAN ID is automatically set as route information.

##### 3.3.2. Set default gateway

The destination for IPv4 packets sent to network addresses that are not set in the routing table can be set as the default gateway on this product.

- To set the default gateway, use the ip route command.

- To show the default gateway, use the show ip route command.

##### 3.3.3. Show route information

- This product is provided with an FIB (Forwarding Information Base: IP forwarding table) as route information.
  FIB is a database that is referenced when deciding how to forward IP packets.
  Use the show ip route command to check the FIB.

#### 3.4. ARP table settings

When sending IPv4 packets, this product uses ARP (Address Resolution Protocol) to obtain the MAC addresses from the IPv4 addresses.
The correspondence between IPv4 address and MAC address is saved in the ARP table with the following specifications.

- The ARP entries saved in the ARP table manage the following information.

  - IPv4 address

  - MAC address

  - VLAN interface

- The number of ARP table entries is guaranteed to operate up to 512 entries.

- With the default settings, dynamic entries saved in the ARP table are maintained for 300 sec.
  The entry timeout value can be changed using the arp-ageing-timeout command.

- Dynamic entries saved in the ARP table can be cleared regardless of the timeout value, by using the clear arp-cache command.

- Use the show arp command to check the ARP table.

### 4. Related Commands

Related commands are indicated below.
For command details, refer to the command reference.

Function types | Operations | Operating commands
--- | --- | ---
IPv4 address settings | IPv4 address settings | ip address
Show IPv4 address | show ip interface
Set dynamic IPv4 address by DHCP client | ip address dhcp
Show DHCP client status | show dhcp lease
Route information settings | Set default gateway | ip route
Show default gateway | show ip route
ARP table settings | Show ARP table | show arp
Set the dynamic entry hold time | arp-ageing-timeout
Clear dynamic entries | clear arp-cache

### 5. Examples of Command Execution

#### 5.1. IPv4 network environment settings (DHCP)

In this example, the IPv4 addresses are set on this product, and an environment is set up for accessing the unit from a remote terminal.

- The IPv4 address is set automatically by DHCP for the default VLAN (VLAN #1).

1. Check the IPv4 address that is currently set.
   If the default settings are still in effect, the fixed IPv4 address (192.168.100.240/24) is set.

       Yamaha#show ip interface brief
       Interface            IP-Address                Status                Protocol
       vlan1                192.168.100.240/24        up                    up

2. Specify DHCP for the default VLAN (VLAN #1).

   - Changing the IP address may disable access to this product. Use particular caution when making any changes.

       Yamaha#configure terminal
       Enter configuration commands, one per line.  End with CNTL/Z.
       Yamaha(config)#interface vlan1
       Yamaha(config-if)#ip address dhcp
       Do you really want to change IP address? [y/N]:y

3. Use TELNET to access the IP address allocated by the DHCP server and log in.

       Username:******
       Password:******

       SWX2210P-10G Rev.1.03.03 (Thu Jan 16 13:20:45 2020)
         Copyright (c) 2018-2020 Yamaha Corporation. All Rights Reserved.

       Yamaha>enable
       Password:******
       Yamaha#

4. After logging in, check the information provided by the DHCP server.

       Yamaha#show dhcp lease
       Interface   vlan1
       -----------------------------------------------------------------
       IP Address:                     192.168.1.9
       Expires:                        2019/10/13 18:47:32
       Renew:                          2019/10/12 18:47:32
       Rebind:                         2019/10/13 12:47:33
       Server:
       Options:
         subnet-mask                   255.255.255.0
         default-gateway               192.168.1.1
         dhcp-lease-time               172800
         domain-name-servers           192.168.1.1
         dhcp-server-identifier        192.168.1.1
         domain-name                   domain.test

### 6. Points of Caution

When the IPv4 address settings are changed, all of the following commands related to remote access control will be deleted.
Use particular caution when changing the IPv4 address.

- telnet-server access

- http-server access

- tftp-server access

- snmp-server access

### 7. Related Documentation

- L2 Switching Function: VLAN

- Remote Access Function: Remote Access Control

- Yamaha RTpro: What is ARP?

Search result
No more search results.
There are no topics that match your search query.