enable nic on virtual environment

Issues related to hardware problems
Post Reply
zio_mangrovia
Posts: 40
Joined: 2015/06/11 08:34:13

enable nic on virtual environment

Post by zio_mangrovia » 2023/05/30 14:44:47

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 ?

User avatar
TrevorH
Site Admin
Posts: 33280
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: enable nic on virtual environment

Post by TrevorH » 2023/05/30 15:07:30

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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tunk
Posts: 1216
Joined: 2017/02/22 15:08:17

Re: enable nic on virtual environment

Post by tunk » 2023/05/31 13:21:04

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.

Post Reply