GTAC-Sophia Publish time 2023-7-14 10:25:12

How do I set the default gateway of Ruijie switch?

1. Configure the default gateway of the management IP address for the Layer 2 switch
Ruijie>enable
Ruijie#configure terminal
Ruijie(config)#ip default-gateway192.168.1.254------>Set the default gateway of the switch to 192.168.1.254
Ruijie(config)#end
Ruijie#write------>Confirm that the configuration is correct and save the configuration
Commands for viewing gateway configurations on Layer2 switches are as follows:
Ruijie#show ip redirects
default-gateway: 192.168.1.254
2.Layer 3 switch Configure the default gateway forthe switch. That is, configure the default route for the switch
Ruijie>enable
Ruijie#configure terminal
Ruijie(config)#ip route 0.0.0.0 0.0.0.0192.168.1.254------>Set the default gateway of the switch to 192.168.1.254
Ruijie(config)#end
Ruijie#write------>Confirm that the configuration is correct and save the configuration
Commands for viewing gateway configurations on Layer3 switches are as follows:
Ruijie#show ip route
Codes:C -connected, S - static, R - RIP, B - BGP
      O -OSPF, IA - OSPF inter area
      N1 -OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
      E1 -OSPF external type 1, E2 - OSPF external type 2
      i -IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
      ia -IS-IS inter area, * - candidate default
Gateway of last resort is 192.168.1.254 to network0.0.0.0
S*0.0.0.0/0 via 192.168.1.254
Pages: [1]
View full version: How do I set the default gateway of Ruijie switch?