Basic IPv4 Settings
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).
-
IPv4 address settings
-
Route information settings
-
ARP table settings
-
MTU 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 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 no ip address command is executed with automatic 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.
-
-
For IPv4 addresses, 1 primary address and 4 secondary addresses can be specified per VLAN interface.
A maximum of 8 IPv4 addresses can be specified for the entire system.
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.
-
To enable the Auto IP function, use the auto-ip enable command.
-
The Auto IP function can be enabled for only one VLAN interface. 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
-
Set static route information
-
Show route information
3.3.1. Route information for VLAN interfaces
When an IPv4 address is set for a VLAN interface, this product automatically sets the correspondence between the network address and VLAN ID as route information.
When releasing IPv4 addresses set for the VLAN interface, the above settings will be deleted.
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. Set static route information
A static route to the destination network address (the gateway address to which packets will be sent) can be set on this product.
-
Static route information is set using the ip route command.
-
Static route information is displayed using the show ip route command.
3.3.4. Routing table and route selection
You will use the following two types of table to specify routing information.
-
RIB (Routing Information Base: IP routing table)
-
FIB (Forwarding Information Base: IP forwarding table)
The roles of each are explained below.
-
RIB
RIB (Routing Information Base: IP routing table) is a database that stores various routing information.-
A route is registered in the RIB in the following cases.
-
When an IPv4 address is assigned to a VLAN interface
-
When a static route or a default gateway are specified manually
-
When a default gateway is learned via a DHCP message
-
-
To check the RIB, use the show ip route database command.
-
-
FIB
FIB (Forwarding Information Base: IP forwarding table) is a database that is referenced when deciding how to forward IP packets.
Of the routes that are registered in the RIB, the FIB registers only the route that is determined to be “optimal” and is actually used for forwarding packets.-
The conditions by which a route is determined to be optimal are as follows.
-
The corresponding VLAN interface is in the link up state
-
If multiple routes to the same destination are registered in the RIB, only one is decided in the following order of priority
-
A manually specified route takes priority over a route learned via a DHCP message.
-
A route whose gateway has a higher IP address value takes priority
-
-
-
To check the FIB, use the show ip route command.
-
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
-
-
Up to 508 entries are stored in the ARP table, including dynamic and static 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.
-
Settings for the static entries in the ARP table are made using the arp command. Up to 255 items can be registered.
-
Use the show arp command to check the ARP table.
3.5. MTU settings
This product enables MTU values to be specified for VLAN interfaces.
-
Use the mtu command to set MTU values.
-
The default MTU value is 1500 bytes, but setting values ranging from 68 bytes to 9216 bytes can be specified.
However, the setting range for VLAN interfaces with “ipv6 enable” specified is from 1280 bytes to 9216 bytes. -
A maximum of seven MTU values, besides the default value, can be specified.
-
To route received packets, use the following steps.
-
If the IPv4 header “Total Length” field value for IPv4 packets exceeds the MTU value, then packets are forwarded divided into parts (IP fragments).
IPv4 packets appended with a DF (don’t fragment) bit are discarded without being divided into IP fragments and an ICMP error (fragmentation needed) is returned. -
If the IPv6 header “Payload Length” field value for IPv6 packets exceeds the MTU value, then an ICMPv6 error (packet too big) is returned and the packet is discarded.
-
Packets larger than the maximum receivable frame size specified by the mru command are not routed. To forward extra large frames, use the mru command to adjust the maximum receivable frame size setting as necessary.
-
*If divided (IP fragmentation) for forwarding, then software is used for forwarding, which limits the forwarding speed and also dramatically increases the CPU usage rate. *
It is recommended that the mtu command be used to set a frame size large enough to forward extra-large frames without dividing them (IP fragmentation).
-
-
This product forwards packets according to the following steps.
-
If the IPv4/IPv6 packet size sent is larger than the MTU value for the VLAN interface where packets are being sent, then packets are divided (IP fragmentation) based on the MTU value.
-
4. Related Commands
Related commands are indicated below.
For details on the commands, 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 |
|
Enable/disable Auto IP function |
auto-ip enable/disable |
|
Route information settings |
Set default gateway |
ip route |
Show default gateway |
show ip route |
|
Set static route information |
ip route |
|
Show static route information |
show ip route |
|
Show route information |
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 |
|
Set static entry |
arp |
|
MTU settings |
MTU settings |
mtu |
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.
-
Maintenance for this product is done using the default VLAN (VLAN #1).
-
The IPv4 address is set automatically by DHCP for the default VLAN (VLAN #1).
-
Web/TFTP access permission is given from a host connected to VLAN #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
-
Specify DHCP for the default VLAN (VLAN #1).
Yamaha#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Yamaha(config)#interface vlan1 Yamaha(config-if)#ip address dhcp
-
Check the information that was provided by the DHCP server.
Yamaha(config-if)#end Yamaha#show dhcp lease Interface vlan1 -------------------------------------------------------------------------------- IP Address: 192.168.1.3 Expires: YYYY/MM/DD 05:08:41 Renew: YYYY/MM/DD 19:08:41 Rebind: YYYY/MM/DD 02:38:41 Server: Options: subnet-mask 255.255.255.0 default-gateway 192.168.1.1 dhcp-lease-time 72000 domain-name-servers 192.168.1.1 dhcp-server-identifier 192.168.1.1 domain-name xxx.xxxxx.xx.xx
-
Set the default VLAN (VLAN #1) to permit access from HTTP servers and TFTP servers.
Access using a remote host over the Web after settings are made.Yamaha(config)#http-server interface vlan1 (1) Yamaha(config)#tftp-server interface vlan1 (2)
1 HTTP server access permission 2 TFTP server access permission
6. Points of Caution
None