Management and IP Interfaces
The switch can work in a Layer 2 mode or a Layer 3 mode.
- In Layer 2 mode, the switch operates as a Layer 2 VLAN-aware switch, and has no routing capabilities.
- In Layer 3 mode, the switch has IP routing capabilities as well as Layer 2 mode capabilities.
In this mode, the switch does not support MAC-based VLAN, Dynamic VLAN Assignment, VLAN Rate Limit, SYN Rate DoS Protection, and Advanced QoS Policers.
Configuring the switch to work in either mode is done by the Console interface, described in the Console Menu Interface section of the administration guide or through the CLI, as described in the CLI Reference Guide.
The following sections describe the differences between IP addressing when the switch is in Layer 2 or Layer 3 mode.
Layer 2 IP Addressing
In Layer 2 mode, the switch has a single IP address in the management VLAN. This IP address and the default gateway can be configured manually, or by DHCP. The static IP address and default gateway for Layer 2 mode are configured on the IPv4 Interface page. In Layer 2 mode, the switch uses the default gateway, if configured, to communicate with devices that are not in the same IP subnet with the switch. By default, VLAN 1 is the management VLAN, but this can be modified. When operating in Layer 2 mode, the switch can only be reached at the configured IP address through its management VLAN.
The factory default setting of the IP address configuration is DHCP. This means that the switch acts as a DHCP client, and sends out a DHCP request during boot up.
If the switch receives a DHCP response from the DHCP server with an IP address, it sends Address Resolution Protocol (ARP) packets to confirm that the IP address is unique. If the ARP response shows that the IP address is in use, the switch sends a DHCPDECLINE message to the offering DHCP server, and sends another DHCPDISCOVER packet that restarts the process.
If the switch does not receive a DHCP response in 60 seconds, it continues to send DHCPDISCOVER queries, and adopts the default IP address: 192.168.1.254/ 24.
IP address collisions occur when the same IP address is used in the same IP subnet by more than one device. Address collisions require administrative actions on the DHCP server and/or the devices that collide with the switch.
When a VLAN is configured to use dynamic IP addresses, the switch issues DHCP requests until it is assigned an IP address from a DHCP server. In Layer 2 mode, only the management VLAN can be configured with a static or dynamic IP address. In Layer 3 mode, up to 32 interfaces (ports, LAGs, and/or VLANs) on the switch can be configured with a static or dynamic IP address. The IP subnets to which these IP addresses belong are known as directly-connected/attached IP subnets.
The IP address assignment rules for the switch are as follows:
- When in Layer 2 mode, unless the switch is configured with a static IP address, it issues DHCP queries until a response is received from the DHCP server.
- If the IP address on the switch is changed, the switch issues gratuitous ARP packets to the corresponding VLAN to check IP address collisions. This rule also applies when the switch reverts to the default IP address.
- The system status LED changes to solid green when a new unique IP address is received from the DHCP server. If a static IP address has been set, the system status LED also changes to solid green. The LED flashes when the switch is acquiring an IP address and is currently using the factory default IP address 192.168.1.254.
- The same rules apply when a client must renew the lease, prior to its expiration date through a DHCPREQUEST message.
- When no statically defined or DHCP-acquired IP address is available, the default IP address is used. When the other IP addresses becomes available, the addresses are automatically used. The default IP address is always on the management VLAN.
Layer 3 IP Addressing
In Layer 3 mode, the switch can have multiple IP addresses. Each IP address can be assigned to specified ports, LAGs, or VLANs. These IP addresses are configured in the IPv4 Interface page in Layer 3 mode. This provides more network flexibility than the Layer 2 mode, in which only a single IP address can be configured. Operating in Layer 3 mode, the switch can be reached at all its IP addresses from the corresponding interfaces.
A predefined, default route is not provided in Layer 3 mode. To remotely manage the switch, a default route must be defined. All DHCP-assigned default gateways are stored as default routes. In addition, you can manually define default routes. This is defined in the IPv4 Static Routes page.
NOTE The switch can be switched from Layer 2 mode to Layer 3 mode only by using the console interface. When this is done, all configuration settings are returned to their default values. For more information about the console interface, see the Console Menu Interface section.
All the IP addresses configured or assigned to the switch are referred to as Management IP addresses in this guide.The following sections include configuration information that is relevant to both Layer 2 and Layer 3 modes.