Page 1 of 1

Adding a new interface?

Posted: 2012/08/06 13:49:53
by saur0
I have recently added a new network card, but I can't work out how to configure it.

ifconfig -a shows
[code]eth1 Link encap:Ethernet HWaddr 68:05:CA:07:DD:8D
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:16 Memory:f7ec0000-f7ee0000
[/code]

but there is no config file in /etc/sysconfig/network-scripts. Can I simply copy the eth0 script and edit it?

Re: Adding a new interface?

Posted: 2012/08/06 14:13:42
by Gleylancer
Yes, you can do that. After editing, bring it up with "ifup eth1"

[url=http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-s390info-addnetdevice.html]http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-s390info-addnetdevice.html[/url]

Re: Adding a new interface?

Posted: 2012/08/06 14:30:36
by saur0
Thanks but I seem to be getting in a muddle now..

ifconfig -a now shows...
[code]eth0 Link encap:Ethernet HWaddr 10:BF:48:7F:61:CF
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::12bf:48ff:fe7f:61cf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1137 errors:0 dropped:0 overruns:0 frame:0
TX packets:527 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103374 (100.9 KiB) TX bytes:76803 (75.0 KiB)
Interrupt:20 Memory:f7f00000-f7f20000

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

rename3 Link encap:Ethernet HWaddr 68:05:CA:07:DD:8D
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:16 Memory:f7ec0000-f7ee0000
[/code]

I have created a ifcfg-eth1 file that contains the following..

[code]
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="68:05:CA:07:DD:8D"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
NETMASK=255.255.255.0
IPADDR=10.1.1.1
[/code]

when I run ifup eth1, I get the following message...

[code]
Device eth0 has different MAC address than expected, ignoring.
[/code]

I don't understand why it suddenly seems to have a problem with eth0?

Adding a new interface?

Posted: 2012/08/06 14:32:18
by gerald_clark
Because you have DEVICE="eth0"

Re: Adding a new interface?

Posted: 2012/08/06 14:32:34
by Gleylancer
Your new file contains DEVICE="eth0", might want to change that.

Re: Adding a new interface?

Posted: 2012/08/06 14:40:30
by saur0
Ok fair one i'm an idiot for missing that :oops:

Re: Adding a new interface?

Posted: 2012/08/06 14:52:03
by saur0
Ok so i'm now getting the following message...

[code]Device eth1 does not seem to be present, delaying initialization.[/code]

I can see the card with lspci
[code]00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 04)
01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
[/code]

and ifconfig -a still shows...
[code]
rename3 Link encap:Ethernet HWaddr 68:05:CA:07:DD:8D
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:16 Memory:f7ec0000-f7ee000
[/code]

:edit: removing /etc/udev/rules.d/70-persistent-net.rules and rebooting has sorted :D thanks for your help

Re: Adding a new interface?

Posted: 2012/08/06 15:07:03
by gerald_clark
Have you been fooling around with the udev rules?
Your interface appears to be rename3.