...
- Configure a static route for each VRF for data forwarding. For example, the destination network segment is 10.10.1.0/24, the next hop is 172.168.1.13.
Procedure
Step1 Enable IP routing function before using VRF function.
...
Step5 (Optional) Configure a static route entry into the VRF, the destination network segment is 10.10 1.0/24, the next hop is 172.168.1.13.
Code Block |
---|
admin@XorPlus# set protocols static vrf vrf1 route 10.10.1.0/24 next-hop 172.168.1.13 admin@XorPlus# set protocols static vrf vrf2 route 10.10.1.0/24 next-hop 172.168.1.13 |
Verify the Configuration
- You can use the run show vrf command to view the binding information between VRFs and the Layer 3 VLAN interfaces.
...
- You can use the run show route vrf command to check the routing table information of the specific VRF.
Code Block |
---|
admin@Xorplus#admin@XorPlus# run show route vrf vrf1 show ip route vrf vrf1 ======================= Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, DF - SHARPPBR, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued route, r - rejected route , b - backup t - trapped, o - offload failure VRF vrf1: K>S>* 17210.16810.1.10/3224 [2551/8192] unreachable (ICMP unreachable), 04:31:56 K>0] via 172.168.1.3, vlan10, weight 1, 00:00:45 C>* 172.168.1.0/24 [2400/8192] unreachable (ICMP unreachable), 04:31:56 show ipv6 is directly connected, vlan10, 00:04:43 C>* 192.168.2.0/24 is directly connected, vlan11, 00:04:45 admin@XorPlus# run show route vrf vrf2 show ip route vrf vrf1vrf2 ========================= |
You can use the run show route forward-host command to check the information about the host hardware forwarding table information of the specific VRF, run show route forward-route command to check the hardware route forwarding table information of the specific VRF.
Code Block |
---|
admin@XorPlus# run show route vrf vrf1 forward-route ipv4 all Destination NextHopMac Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, Port T - Table, v - VNC, V - VNC-Direct, A - Babel, F ------ PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t ------------ --------- trapped, o - offload failure VRF vrf2: S>* 10.10.1.0/24 [1/0] via 172.168.1.3, vlan20, weight 1, 00:00:59 C>* 172.168.1.0/24 is directly connected, vlan20, 00:04:7D:7B:62:93:FF connected Total route count:1 |
Code Block |
admin@Xorplus#56 C>* 192.168.2.0/24 is directly connected, vlan21, 00:04:59 |
- You can use the run show route forward-route command to check the hardware route forwarding table information of the specific VRF.
Code Block |
---|
admin@XorPlus# run show route vrf vrf1 forward-hostroute ipv4 all Address Destination NextHopMac HWaddress Port Port --------------- ----------------- --------- 192.168.2.0/24 CC:37:AB:BE:0E:D1 connected 172.168.1.1 0/24 CC:37:AB:BE:0E:D1 connected 10.10.1.0/24 04:7D:7B:62:93:FF te-1/1/3 Total host count:1 3 |