Virtual LAN Routing Commands

Use these commands to view and configure VLAN routing and to view VLAN routing status information.

vlan routing

M4250

M4350

This command enables routing on a VLAN. The vlanid value has a range from 1 to 4093. The interface-id value has a range from 1 to 128. Typically, you do not supply the interface ID argument, and the system automatically selects the interface ID. However, if you specify an interface ID, the interface ID becomes the port number in the slot/port (M4250 series switch) or unit/slot/port (M4350 series switch) for the VLAN routing interface.

If you select an interface ID that is already in use, the CLI displays an error message and does not create the VLAN interface. For products that use text-based configuration, including the interface ID in the vlan routing command for the text configuration ensures that the slot/port (M4250 series switch) or the unit/slot/port (M4350 series switch) for the VLAN interface stays the same across a restart. Keeping the slot/port (M4250 series switch) or the unit/slot/port (M4350 series switch) the same ensures that the correct interface configuration is applied to each interface when the system restarts.

Format vlan routing vlanid [interface-id]
Mode VLAN Config (also referred to as VLAN Database)

no vlan routing

This command deletes routing on a VLAN.

Format no vlan routing vlanid
Mode VLAN Config (also referred to as VLAN Database)

Command example:

The following example specifies a VLAN ID value. The interface ID argument is not used.

CODE
(NETGEAR Switch)(Vlan)#vlan 14
(NETGEAR Switch)(Vlan)#vlan routing 14 ?
<cr>                     Press enter to execute the command.
<1-24>                  Enter interface ID

Typically, you press Enter without supplying the Interface ID value; the system automatically selects the interface ID.

Command example:

The following example specifies interface ID 51 for VLAN 14 interface. The interface ID becomes the port number in the slot/port (M4250 series switch) or unit/slot/port (M4350 series switch) for the VLAN routing interface.

In this example, unit/slot/port is 4/51 for the VLAN 14 interface.

CODE
(NETGEAR Switch)(Vlan)#vlan 14 51
(NETGEAR Switch)(Vlan)#
(NETGEAR Switch)#show ip vlan
MAC Address used by Routing VLANs:   00:11:88:59:47:36

           Logical
VLAN ID   Interface        IP Address      Subnet Mask
-------  --------------  -------------  --------------
10       4/1             172.16.10.1     255.255.255.0
11       4/50            172.16.11.1     255.255.255.0
12       4/3             172.16.12.1     255.255.255.0
13       4/4             172.16.13.1     255.255.255.0
14       4/51            0.0.0.0         0.0.0.0 <--u/s/p is 4/51 for VLAN 14 interface

Command example:

The following example selects an interface ID that is already in use. In this case, the CLI displays an error message and does not create the VLAN interface.

CODE
(NETGEAR Switch) #show ip vlan

MAC Address used by Routing VLANs:   00:11:88:59:47:36

           Logical
VLAN ID   Interface        IP Address       Subnet Mask
-------  --------------  ---------------  ---------------
10       4/1             172.16.10.1      255.255.255.0
11       4/50            172.16.11.1      255.255.255.0
12       4/3             172.16.12.1      255.255.255.0
13       4/4             172.16.13.1      255.255.255.0
14       4/51            0.0.0.0          0.0.0.0

(NETGEAR Switch)#config
(NETGEAR Switch)(Config)#exit
(NETGEAR Switch)#vlan database
(NETGEAR Switch)(Vlan)#vlan 15
(NETGEAR Switch)(Vlan)#vlan routing 15 1
Interface ID 1 is already assigned to another interface

Command example:

The show running-config command lists the interface ID for each routing VLAN:

CODE
(NETGEAR Switch) #show running-config
!!Current Configuration:
!
!System Description "NETGEAR M4350-12X12F 12x10G Copper 12x10G SFP+ Managed Switch,
14.0.0.15, 1.0.0.4"
!System Software Version "14.0.0.15"
!System Up Time          "0 days 0 hrs 23 mins 7 secs"
!Additional Packages     QOS,Multicast,IPv6,IPv6 Management,Routing
!Current SNTP Synchronized Time: SNTP Client Mode Is Disabled
!
vlan database
exit

configure
no logging console
aaa authentication enable "enableNetList" none
line console
serial timeout 0
exit

line telnet
exit

line ssh
exit

!
router rip
exit
exit

interface vlan

M4250

M4350

Use this command to enter Interface configuration mode for the specified VLAN. The vlan-id range is 1 to 4093.

Format interface vlan vlan-id
Mode Global Config

autostate

M4250

M4350

The autostate feature is enabled on all VLAN routing interfaces by default. In this mode, when all ports in the VLAN are down, the IP interface for that VLAN is also down.

Default Enabled
Format autostate
Mode Interface Config

no autostate

This command configures the VLAN routing interface to remain up, even if there are no ports that are members of the VLAN. The switch responds to the pings on that IP address.

Format no autostate
Mode Interface Config

show ip vlan

M4250

M4350

This command displays the VLAN routing information for all VLANs with routing enabled.

Format show ip vlan
Modes

Privileged EXEC

User EXEC

Term Definition
MAC Address used by Routing VLANs The MAC Address associated with the internal bridge-router interface (IBRI). The same MAC Address is used by all VLAN routing interfaces. It will be displayed above the per-VLAN information.
VLAN ID The identifier of the VLAN.
Logical Interface The logical unit/slot/port associated with the VLAN routing interface.
IP Address The IP address associated with this VLAN.
Subnet Mask The subnet mask that is associated with this VLAN.