LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   failed to execute command : ifconfig <interface> create (http://www.linuxquestions.org/questions/linux-networking-3/failed-to-execute-command-ifconfig-interface-create-725348/)

summersgone 05-12-2009 01:25 AM

failed to execute command : ifconfig <interface> create
 
Hi guys,
I've just followed this tutorial :
http://blogs.23.nu/disLEXia/2004/08/antville-4485/

And when i executed the command 'ifconfig disc0 create' under centOS 5.2 , it returned with :
create : No address associated with name

What's wrong with it ? how do i create interface under centOS ?

Thank you ..

rylan76 05-12-2009 02:42 AM

Quote:

Originally Posted by summersgone (Post 3537876)
Hi guys,
I've just followed this tutorial :
http://blogs.23.nu/disLEXia/2004/08/antville-4485/

And when i executed the command 'ifconfig disc0 create' under centOS 5.2 , it returned with :
create : No address associated with name

What's wrong with it ? how do i create interface under centOS ?

Thank you ..

Hmm - disc0 is an interface name, and your system is unable to provide that interface.

This most likely means that a specific driver for your LAN chip / card is not loaded, or is set to come up as a differently named interface.

Have you tried substituting "disc0" with "eth0" or "eth1"?

I. e. on my FC10 system, I can do this:

Code:

/sbin/ifconfig eth0 169.254.255.20 netmask 255.255.255.0 broadcast 169.254.255.255 up
which means "on the eth0 interface, set the IP adress to 169.254.255.20, the netmask to 255.255.255.0, the broadcast to 169.254.255.255, and activate (up) the interfce"

Note that the eth0 is an ethernet device - which is provided by a "kernel module" (LAN card driver) that I have loaded. Usually, if you do not pass the driver / kernel module it a startup parameter, or it is automatically loaded by your startup scripts, your ethernet device will be eth0 - if there are other ethernet cards, they are usually enumerated in order - i. e. eth0, eth1, etc.

From what you posted, you do not have "disc0" device available in your system. The tut you posted seems pretty extensive, maybe this is a software loopback or something created seperately as a step before the one you tried?

No idea... but the gist is that it appears that your system does not have a "disc0" networking device... or it does, but you need to provide an address?

What does

Code:

ifconfig disc0 192.168.0.11 up
do?

Or a mixture of the above (with disc0 substituted for eth0) relative to my

Code:

/sbin/ifconfig eth0 169.254.255.20 netmask 255.255.255.0 broadcast 169.254.255.255 up
?

I. e.

Code:

/sbin/ifconfig disc0 192.168.0.11 netmask 255.255.255.0 broadcast 192.254.255.255 up
or

Code:

/sbin/ifconfig disc0 192.168.0.11 up
??

summersgone 05-12-2009 02:55 AM

it didn't work. Btw , I forgot to tell you that I'm running the host (centOS 5.2) under User Mode Linux. And i need to create a new interface inside the host.

Thank you :)

chitambira 05-12-2009 03:59 AM

Quote:

ifconfig disc0 create
This is NOT a linux command (man ifconfig) rather a BSD command. So it will not work with Centos.
You can achieve what you want by using aliased interfaces (eth0:1) or by creating virtual interfaces.
Might also want to consider VIPA.

summersgone 05-12-2009 09:38 AM

I have successfully created eth1:0 on my centOS using this command:

Quote:

ifconfig eth1:0 192.168.1.135 up
and now how can I redirect traffic to the interface just like in the tutorial?(http://blogs.23.nu/disLEXia/2004/08/antville-4485/) :

Quote:

route add -host a.b.c.130 -interface disc0
I run that command and it said it has no -interface parameter in it. Does anybody know how to fix this problem ?
Thanks a lot before..

chitambira 05-12-2009 09:46 AM

Linux uses dev instead of -interface. You would better be reading man pages.
You do:
Quote:

route add -host 192.168.1.130 dev eth1:0

summersgone 05-12-2009 11:04 AM

Thank you.. :) now it works :)


All times are GMT -5. The time now is 09:18 AM.