Ruijie Community

Title: What are the CLI commands for configuration of NAT on Ruijie EG? [Print this page]

Author: GTAC-Sophia    Time: 2023-6-27 13:33
Title: What are the CLI commands for configuration of NAT on Ruijie EG?
Topology:



Ruijie EG is connected to ISP Modem directly. And there are 2 local network segments for 2 intranet users.
Command Reference
The command to configure NAT on Ruijie EG is shown below:
Ruijie> enable
Ruijie# config ter
Ruijie(config)# interface gigabitEthernet 0/0  //Enter to theWAN port

Ruijie(config-if-GigabitEthernet 0/0)# ip address192.168.100.254 24
Ruijie(config-if-GigabitEthernet 0/0)# ip natoutside  //Setnat outside port

Ruijie(config-if-GigabitEthernet 0/0)# interfacegigabitEthernet 0/1  //Enter to the LAN port

Ruijie(config-if-GigabitEthernet 0/1)# ip address192.168.1.254 24   //User gateway address under 192.168.1.0/24 networksegment

Ruijie(config-if-GigabitEthernet 0/1)# ip natinside  //Setnat inside port

Ruijie(config-if-GigabitEthernet 0/1)# interfacegigabitEthernet 0/1.10  //Enter to the LAN port of VLAN 10

Ruijie(config-subif-GigabitEthernet 0/1.10)#encapsulation dot1Q 10         //Encapsulation of interface VLAN ID

Ruijie(config-subif-GigabitEthernet 0/1.10)# ipaddress 192.168.10.254 24    //User gateway address under 192.168.10.0/24 networksegment

Ruijie(config-subif-GigabitEthernet 0/1.10)# ip natinside  //Setnat inside port

Ruijie(config-subif-GigabitEthernet 0/1.10)# exit
Ruijie(config)# ip access-list standard 10   //Only thepermit network can access Internet

Ruijie(config-std-nacl)# permit 192.168.1.00.0.0.255
Ruijie(config-std-nacl)# permit 192.168.10.0 0.0.0.255
Ruijie(config-std-nacl)# exi
Ruijie(config)# ip nat inside source list 10interface GigabitEthernet 0/0 overload
Ruijie(config)# ip route 0.0.0.0 0.0.0.0192.168.100.1  //Adda default route pointed to ISP modem

Ruijije(config)# end
Ruijie# write







Welcome to Ruijie Community (https://community.ruijienetworks.com/) Powered by Discuz! X3.2