[CentOS] Centos 8 two network cards

Thu Jul 15 19:51:46 UTC 2021
Johnny Hughes <johnny at centos.org>

On 7/15/21 2:39 PM, Ken Smith via CentOS wrote:
> Hi folks, I'm a bit confused about how to set up two network cards in
> different LANS in C8. I've done this multiple times in Centos6 and
> lower, but in the NetworkManager/systemd world I'm all at sea without
> any charts. (I'm sure there's a HKLM in there somewhere -sorry ;-)) and
> my Googlefoo is failing me this evening.
> Via the GUI it will let me configure one device or the other but not
> both :-(
> Anyway I want one NIC with IP and GW
> and the other with IP and no gateway.
> I've seen a method that removes NetworkManager and installs
> network-scripts then configures the ifcfg-eth0 and ifcfg-eth1 scripts.
> Interestingly the devices seem to be still called eth0 & 1 on this
> system which happens to be a VM. When I use this method the systemctl
> start network appears not to be able to find eth1.
> Is there a recommended way to do this? I'd prefer to use 'approved'
> techniques rather than work arounds.
> Any suggestions?



Both of those go over the 3 basic ways to set up IP addresses manually
(edit the script, use command line tool called nmcli, or use the curses
based TUI tool called nmtui.

Johnny Hughes