Configuring IP Routing

NOTE:

  • Layer 3 packets cannot be forwarded normally if IP routing function is disabled.
  • Enable IP routing function before using VXLAN.
  • IP routing affects only Layer 3 data forwarding, but takes no effect on non-Layer 3 data forwarding of the interface. Therefore, inband management (such as login via SSH) has nothing to do with whether IP routing is enabled or not.
  • If the following commit failed message appears when you enable IP routing, the Enterprise License is not installed, and you need to purchase and install the Enterprise License before the L3 feature can be used properly.

    admin@Xorplus# set ip routing enable true
    admin@Xorplus# commit 
    Command failed: L3 feature is not covered by the installed license key.
    Commit failed.  

To allow users to communicate with users in different VLANs through Layer 3 routing, in addition to configuring Layer 3 interfaces for VLANs, you also need to enable IP routing function on Layer 3 switches.

By default, IP routing function is disabled. If you want to implement the Layer 3 inter-VLAN routing function of the switch, you need to enable the IP routing function first. Similarly, you can configure the system to disable IP routing if you want to disable the Layer 3 inter-VLAN routing function on the switch. When the IP routing function is disabled, the switch can function only as a Layer 2 switch.

Configuring IP Routing

Procedure

•      Use the following command to enable or disable IP routing function.  

set ip routing enable [true | false]

The default setting is set ip routing enable false. The command takes effect immediately after committing.

Configuration Example

Network Requirement

As shown in Figure 1, User1 and User2 are in the same department of the company but belong to different VLANs and are located on different network segments. Follow the configuration steps below to achieve User1 and User2 can communicate with each other.
1. Create a VLAN and specify the VLAN to which the user belongs.
2. Add an interface to the VLAN.
3. Create a Layer 3 interface and configure the IP address.
4. Enable IP routing function to achieve inter-VLAN routing. 

NOTE:

On User1 and User2, add a route with the default gateway to be the IP address of the corresponding Layer 3 VLAN interface.

Figure 1. Network of Inter-VLAN Routing

 

Procedure

Step1         Create VLAN2 and VLAN3 on Switch.

admin@XorPlus# set vlans vlan-id 2
admin@XorPlus# set vlans vlan-id 3

Step2         Add interfaces connected to user terminals to different VLANs.

admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching vlan members 2
admin@XorPlus# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching vlan members 3

Step3         Associate a Layer 3 interface with the VLAN.

admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2
admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3

Step4         Configure IP address of the Layer 3 interface.

admin@XorPlus# set l3-interface vlan-interface vlan-2 address 192.168.2.2 prefix-length 24
admin@XorPlus# set l3-interface vlan-interface vlan-3 address 192.168.3.2 prefix-length 24

Step5         Enable IP routing function.

admin@XorPlus# set ip routing enable true

Step6         Commit the Configuration.

admin@XorPlus# commit

Step7        Verify the Configuration.

    • After the configuration is complete, User1 in VLAN2 and User2 in VLAN3 can communicate with each other.
    • When IP routing function is disabled on the Switch, User1 in VLAN2 and User2 in VLAN3 will be unreachable when pinging each other.
    • Use show route forward-route brief command to view the information of IP routing table. If IP routing function is disabled, the command results "Ip routing is disable".
 admin@Xorplus# run show route forward-route brief
 Ip routing is disable     

Copyright © 2024 Pica8 Inc. All Rights Reserved.