Page 1 of 1

enable nic on virtual environment

Posted: 2023/05/30 14:44:47
by zio_mangrovia
I add 2nd NIC to cents 7 server when It's already running and It detected.
Now I need to configure it (/etc/sysconfig/networks-scripts/ifcfg-eth1) and to startup it any breakdown because server is production.
I tried to run ifconfig eth1 up but nothing!
It works only if I configure temporarily NIC with ifconfig eth1 xxx.yyy.www.zzz/kk up
I'd like to startup 2nd NIC without restarting network service because this would occur issue to 1st nic is up even if for any seconds.
I need to add static route for only 2nd nic to reach a.b.c.d network so I have to create route-eth1 file ?

Re: enable nic on virtual environment

Posted: 2023/05/30 15:07:30
by TrevorH
You want ifup not ifconfig.
I need to add static route for only 2nd nic to reach a.b.c.d network so I have to create route-eth1 file ?
Yes. You may also need a rule-eth1 file too. And make sure your new ifcfg file does not contain GATEWAY= or it will become the default route.

Re: enable nic on virtual environment

Posted: 2023/05/31 13:21:04
by tunk
Do you use NetworkManager? If you do, I think you have to use
e.g. nmtui to set it up. If not, you have to edit ifcfg-eth1 with the
correct settings.