If I had this problem I'd probably be inclined to attempt to switch off the integrated NIC completely via the BIOS and then see whether I could control the 10GB NIC.
Does the 10GB interface work if the integrated NIC is disabled?
Maybe your problem is that CentOS uses network manager.
Then you must define a connection with nmcli or nmtui command, and you should not directly assign an IP with the ip command.
If the network cards are not managed by NetworkManager, and are still using the old RHEL network interface configuration system, then it may be worth looking at the per-interface configuration files in /etc/sysconfig/network-scripts/ to see if each ifcfg-<interface name> file has the correct DEVICE and HWADDR entries set, just in case the MAC address or device name has gotten mixed up or duplicated in the interface configuration files.
The server was being used with a 1G network card. When I looked at the server, I saw that there was a separate 10g card installed and I wanted to use it.
But when I gave the ip, it received the ip, but when I disable the network interface of the 1G card, the ip I gave to the network interface of the 10G card also goes.
I have to up the internet interface of the 1g card via idrac
I don't use NetworkManager, I do everything through network interface files.
Thanks for sharing the interface configuration files. The only two things I'd note are that p2p1 is currently set to not come up on boot (ONBOOT is set to "no" for this interface, but is set to "yes" for the on-board em1), and that there does not appear to be any UUID specified in the config for p2p1. Generally I always ensure that every interface I'm using has either a valid HWADDR or UUID line on a RHEL system, to be absolutely sure that the system can correctly tell the NICs apart.
Is there anything interesting in the output of either ip addr show dev <interface name> and ethtool <interface name> ? When you bring the interfaces up and down, do you see anything in the output of dmesg that might explain this strange behaviour ? And lastly, if you do a grep <interface name> /var/log/dmesg, were there any unusual messages at boot time for either or both interfaces ?
ip addr show dev em1
2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether ******** brd ff:ff:ff:ff:ff:ff
inet *******/16 brd ******** scope global em1
valid_lft forever preferred_lft forever
inet6 **********/64 scope link
valid_lft forever preferred_lft forever
Thanks - do you have the output of the ethtool checks, as welll as the ip command for p2p1 ? Also, whilst I appreciate you don't want to post potentially identifying information here, can you confirm that the MAC addresses displayed for each NIC are in fact different, and are (as far as you know) correct ?