CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
04-13-2016, 05:29 AM
#1
Member
Registered: May 2010
Posts: 427
Rep:
Network interface is not shown in ifconfig command
I have wrote a network config file to bring up the third network controller on a server running Centos-6.1
Code:
$ cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
NETMASK=255.255.240.0
TYPE=Ethernet
HWADDR=00:e0:81:c6:d7:01
IPADDR=172.16.48.70
GATEWAY=172.16.48.1
IPV6INIT=no
ONBOOT=no
USERCTL=no
$ ls /etc/sysconfig/network-scripts/ifcfg*
/etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth2
/etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-lo
However, the ifconfig command doesn't show eth2
Code:
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:81:C6:D5:35
inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:81ff:fec6:d535/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21107 errors:0 dropped:0 overruns:0 frame:0
TX packets:11464 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2243790 (2.1 MiB) TX bytes:883788 (863.0 KiB)
Memory:fe8c0000-fe8e0000
eth1 Link encap:Ethernet HWaddr 00:E0:81:C6:D5:34
inet addr:172.20.54.10 Bcast:172.20.54.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:81ff:fec6:d534/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10879 errors:0 dropped:0 overruns:0 frame:0
TX packets:30033 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13811827 (13.1 MiB) TX bytes:3538307 (3.3 MiB)
Memory:fe7c0000-fe7e0000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:23309 errors:0 dropped:0 overruns:0 frame:0
TX packets:23309 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7275573 (6.9 MiB) TX bytes:7275573 (6.9 MiB)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:192.168.91.1 Bcast:192.168.91.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:172.16.2.1 Bcast:172.16.2.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
You may think that the third network controller is disabled through BIOS, but it is actually there
Code:
$ dmesg | grep -i intel
Intel GenuineIntel
e1000e: Intel(R) PRO/1000 Network Driver - 1.9.5-k
e1000e: Copyright(c) 1999 - 2012 Intel Corporation.
e1000e 0000:03:00.0: eth0: Intel(R) PRO/1000 Network Connection
igb: Intel(R) Gigabit Ethernet Network Driver - version 3.2.10-k
igb: Copyright (c) 2007-2011 Intel Corporation.
igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
igb 0000:02:00.1: Intel(R) Gigabit Ethernet Network Connection
I even rebooted the machine but still have this problem
04-13-2016, 05:55 AM
#2
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842
Use hwinfo or lshw to show us the network hardware, drivers, and network device nodes assigned.
Code:
lshw -class network
You may need to install one of those utilities first.
04-13-2016, 06:22 AM
#3
Member
Registered: May 2010
Posts: 427
Original Poster
Rep:
Please see the output. Why the first one is disables?
Code:
# lshw -class network
*-network DISABLED
description: Ethernet interface
product: 82574L Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth2
version: 00
serial: 00:e0:81:c6:d7:01
size: 100Mbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=1.9.5-k duplex=full firmware=1.8-0 latency=0 link=no multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:48 memory:fe9e0000-fe9fffff ioport:c800(size=32) memory:fe9dc000-fe9dffff
*-network:0
description: Ethernet interface
product: 82576 Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth1
version: 01
serial: 00:e0:81:c6:d5:34
size: 100Mbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=igb driverversion=3.2.10-k duplex=full firmware=1.4-3 ip=172.20.54.10 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:40 memory:fe7c0000-fe7dffff memory:fe780000-fe79ffff ioport:b400(size=32) memory:fe740000-fe743fff memory:fe720000-fe73ffff(prefetchable) memory:fe700000-fe71ffff memory:fe744000-fe763fff
*-network:1
description: Ethernet interface
product: 82576 Gigabit Network Connection
vendor: Intel Corporation
physical id: 0.1
bus info: pci@0000:02:00.1
logical name: eth0
version: 01
serial: 00:e0:81:c6:d5:35
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=igb driverversion=3.2.10-k duplex=full firmware=1.4-3 ip=10.10.10.1 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:41 memory:fe8c0000-fe8dffff memory:fe880000-fe89ffff ioport:b800(size=32) memory:fe840000-fe843fff memory:fe820000-fe83ffff(prefetchable) memory:fe7a0000-fe7bffff memory:fe7e0000-fe7fffff
Last edited by mahmoodn; 04-13-2016 at 06:24 AM .
04-13-2016, 09:32 AM
#4
Member
Registered: May 2010
Posts: 427
Original Poster
Rep:
My bad...
I saw that in the ifcfg-eth2 file, there is
So, I changed it to yes and restarted the network via
Code:
/etc/init.d/network restart
Still eth2 is not shown in the ifconfig. I guess that a reboot will fix it, but want to know is there any on-the-fly method which doesn't require any reboot?
04-13-2016, 11:35 AM
#5
Senior Member
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Rep:
What does the following command give you:
You will also notice that your ports are running at different speeds.
eth0=1000
eth1=100
Can you post the config file for eth2?
Last edited by lazydog; 04-13-2016 at 11:44 AM .
04-13-2016, 12:55 PM
#6
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842
@lazydug: Refer to the opening post for that info.
@mahmoodn: Yes, it should take effect next boot.
https://wiki.centos.org/FAQ/CentOS7#...dd5315906fa493
On the fly you should be able to do
04-13-2016, 01:22 PM
#7
Member
Registered: May 2010
Posts: 427
Original Poster
Rep:
OK thank you very much ferarri , that command actually activated eth2.
Many thanks.
04-13-2016, 01:35 PM
#8
Senior Member
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Rep:
Quote:
Originally Posted by
ferrari
@lazydug: Refer to the opening post for that info.
Actually no, the first post did not give what I asked for.
That command '
ifconfig ' will only give you up interfaces only.
'
ifconfig -a ' will give you all interface both up and down.
But it is neither here nor there now that the OP has activated his interface.
04-13-2016, 05:55 PM
#9
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842
The lshw output confirmed the status and node name associated with the hardware.
04-13-2016, 05:55 PM
#10
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842
Quote:
OK thank you very much ferarri, that command actually activated eth2.
Many thanks.
Happy to have been of help.
All times are GMT -5. The time now is 09:42 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News