Issues related to configuring your network
3 posts • Page 1 of 1
ok so i have a virtual machine set up for a school assignement where i need to allow forwarding using iptables. the only issue i am having is whenever i try to have a second network interface there is never a second config file in /etc/sysconfig/network-scripts/ my first card that was setup automatically on install has the file ifcfg-ens33, my second network card doesn't have a file called ifcfg-ens37 to configure it. how to i get my operating system to create this file or how to i create it so the system uses the file and load up the settings? I can do it via gui but would like to kow how to do it via command line for future reference.
One way is to copy the existing one and edit it, changing MAC address, and mentions of one device name to the other.
CentOS 7 has two services that can configure network settings: NetworkManager.service and network.service.
Only one of them can manage any given interface/connection and it is usually better, if only one service is enabled.
NetworkManager.service is the default. Its command line tool is nmcli.
One does not "edit a file" for NetworkManager. One uses NM tools (GUI applet, nmtui, nmcli) that modify files for you.
Code: Select all
man nmcli man nmcli-examples