config file for second network device
-
- Posts: 1
- Joined: 2020/09/13 20:57:57
config file for second network device
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.
Re: config file for second network device
One way is to copy the existing one and edit it, changing MAC address, and mentions of one device name to the other.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke
Re: config file for second network device
CentOS 7 has two services that can configure network settings: NetworkManager.service and network.service.silentbirdie wrote: ↑2020/09/13 21:03:27I can do it via gui but would like to kow how to do it via command line for future reference.
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.
Code: Select all
man nmcli
man nmcli-examples