Adding a new interface?

Issues related to configuring your network
Post Reply
saur0
Posts: 44
Joined: 2009/11/09 13:59:14
Location: London

Adding a new interface?

Post by saur0 » 2012/08/06 13:49:53

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?

Gleylancer
Posts: 34
Joined: 2012/08/02 14:53:55
Location: Hannover, Germany
Contact:

Re: Adding a new interface?

Post by Gleylancer » 2012/08/06 14:13:42

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]

saur0
Posts: 44
Joined: 2009/11/09 13:59:14
Location: London

Re: Adding a new interface?

Post by saur0 » 2012/08/06 14:30:36

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?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Adding a new interface?

Post by gerald_clark » 2012/08/06 14:32:18

Because you have DEVICE="eth0"

Gleylancer
Posts: 34
Joined: 2012/08/02 14:53:55
Location: Hannover, Germany
Contact:

Re: Adding a new interface?

Post by Gleylancer » 2012/08/06 14:32:34

Your new file contains DEVICE="eth0", might want to change that.

saur0
Posts: 44
Joined: 2009/11/09 13:59:14
Location: London

Re: Adding a new interface?

Post by saur0 » 2012/08/06 14:40:30

Ok fair one i'm an idiot for missing that :oops:

saur0
Posts: 44
Joined: 2009/11/09 13:59:14
Location: London

Re: Adding a new interface?

Post by saur0 » 2012/08/06 14:52:03

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

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Adding a new interface?

Post by gerald_clark » 2012/08/06 15:07:03

Have you been fooling around with the udev rules?
Your interface appears to be rename3.

Post Reply