For the OS to apply the routing the created routing file route-xxxxx needs to match the interface config filename ifcfg-xxxx ,not the interface alias name used in the nic config menu like "ssg_eth0 , ssg_eth1".
Release : 10.0
Component : API GATEWAY
To apply the routing from the the restricted shell we need to make sure the routing file created by the add route command is matching the OS interface script file.
The nic configuration menu shows the NIC alias name which is not the same as the interface script file
To find the correct name from the restricted shell you can do the following
Run the following command in the restricted shell to determine the script file names.
head -n 1 /etc/sysconfig/network-scripts/ifcfg-*
[email protected]()>head -n 1 /etc/sysconfig/network-scripts/ifcfg-*
==> /etc/sysconfig/network-scripts/ifcfg-ens160 <==
==> /etc/sysconfig/network-scripts/ifcfg-lo <==
This shows the network config files for each nic configured in the system .
To check which config file is for which nic interface , you can show the content of the ifcfg-xxxx file using cat from the restricted shell
The NAME or DEVICE shows the nic alias used in the nic configuration menu .
[email protected]()>[email protected]()>cat /etc/sysconfig/network-scripts/ifcfg-ens160
# Per CCE: Set ZONE=public in /etc/sysconfig/network-scripts/ifcfg-ens160
If you need to add a route for this NIC with the device alias name ssg_eth0 you need to create a routing file with the name route-ens160
Only then the OS will run the route-ens160 script when the interface is started.
To do this from the restricted shell menu "route:add" specify the interface name as ens160 not ssg_eth0 the route:add will create a routing file named route-<interfacename> where interface name is the name specified in the command .
[email protected](route)>add ens160 10.10.10.10 255.255.255.0 10.10.10.254
static route for '10.10.10.10' was added to 'ens160' successfully.
To check the configuration
use the route:show command in the restricted shell
To verify the correct route-xxx files are created use the following command.
head -n 1 /etc/sysconfig/network-scripts/route-*
[email protected](route)>head -n 1 /etc/sysconfig/network-scripts/route-*
==> /etc/sysconfig/network-scripts/route-ens160 <==
To check the content of the route-ens160 file you can use
[email protected](route)>cat /etc/sysconfig/network-scripts/route-ens160
### WARNING: ###
### This file is auto generated by the Layer 7 System Configuration wizard. ###
### This file will be overwritten if the utility is re-run ###
### /etc/sysconfig/network-scripts/route-%s ###
To apply the routing you have to restart the network interface or reboot the appliance