LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   eth0: error fetching interface information: Device not found (https://www.linuxquestions.org/questions/linux-networking-3/eth0-error-fetching-interface-information-device-not-found-708061/)

sungirl 02-27-2009 02:49 PM

eth0: error fetching interface information: Device not found
 
I want Allowing VPN clients to access VPN server local network with debian

Quote:

ifconfig eth0 | grep inet | \
sed -e 's/.*:\([0-9\.]*\)[0-9]\{1,3\} .*:\([0-9\.]*\) .*:\([0-9\.]*\).*/push "route \10 \3"/g' \
>> /etc/openvpn/server.conf
eth0: error fetching interface information: Device not found

What's this error?

kentyler 02-27-2009 03:15 PM

Did you try eth1?

sungirl 02-27-2009 03:22 PM

Quote:

Originally Posted by kentyler (Post 3459786)
Did you try eth1?

Thanks for replay.

Yes but same problem!

ifconfig eth1
Quote:

eth1: error fetching interface information: Device not found

alan_ri 02-27-2009 03:41 PM

Did you removed or add any network device recently?
MAC address needs to be entered in the **_persistent-net.rules file for your interface which is in the /etc/udev/rules.d/ directory or similar,depends on the distro.
(** are random numbers.)

sungirl 02-27-2009 03:53 PM

Quote:

cd /etc/udev/rules.d/
-bash: cd: /etc/udev/rules.d/: No such file or directory
How i should add it?

alan_ri 02-27-2009 04:06 PM

Search for udev,it should be in /etc then find the rules.You're using Debian right?

sungirl 02-27-2009 04:36 PM

Quote:

Originally Posted by alan_ri (Post 3459828)
Search for udev,it should be in /etc then find the rules.You're using Debian right?

i searched for udev but i can't find it!
yes i using debian!!

sungirl 02-27-2009 04:38 PM

Quote:

Originally Posted by alan_ri (Post 3459828)
Search for udev,it should be in /etc then find the rules.You're using Debian right?

i searched for udev but i can't find it!
yes i using debian!!

alan_ri 02-27-2009 09:12 PM

Go here.You'll see that they say that there should be /etc/udev/rules.d/ in Debian.Try
Code:

whereis udev
or
Code:

find / -name'70_persistent-net.rules' 2>errors.txt
or try
Code:

find /rules.d 2>errors.txt
Code:

find /udev 2>errors.txt
Post errors from errors.txt files if any.
Anyway if you follow instructions on the link above you should be able to set things (if you find udev directory),if not,post back.

sungirl 02-28-2009 12:43 AM

Quote:

Originally Posted by alan_ri (Post 3460047)
Go here.You'll see that they say that there should be /etc/udev/rules.d/ in Debian.Try
Code:

whereis udev
or
Code:

find / -name'70_persistent-net.rules' 2>errors.txt
or try
Code:

find /rules.d 2>errors.txt
Code:

find /udev 2>errors.txt
Post errors from errors.txt files if any.
Anyway if you follow instructions on the link above you should be able to set things (if you find udev directory),if not,post back.

# whereis udev
udev:

errors.txt:
find: /udev: No such file or directory

linuxlover.chaitanya 02-28-2009 12:57 AM

Its not /udev.
Use this command

find / -name udev

You will find it in /etc.

Also just paste output of "ifconfig"

sungirl 02-28-2009 03:49 AM

output ifconfig:

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:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:42026 (41.0 KiB) TX bytes:42026 (41.0 KiB)

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:10.23.213.1 P-t-P:10.23.213.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP 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:500
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255. 255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:87164 errors:0 dropped:0 overruns:0 frame:0
TX packets:102640 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9226555 (8.7 MiB) TX bytes:16398951 (15.6 MiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:87.118.56.171 P-t-P:87.118.56.171 Bcast:0.0.0.0 Mask:255. 255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
inet addr:87.118.56.171 P-t-P:87.118.56.171 Bcast:0.0.0.0 Mask:255. 255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

sungirl 02-28-2009 04:42 AM

any ideas??

sungirl 02-28-2009 12:23 PM

I Install the udev package
# apt-get install udev

now i have /etc/udev/rules.d/

What's next step?

alan_ri 02-28-2009 12:25 PM

As I said there shouldn't be
Quote:

HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 -00
There should be your MAC address.You didn't post the output from all commands that I've suggested.Did you try to follow the guide that I suggested?You can create a new file,for example
Code:

/etc/udev/rules.d/010_netinterfaces.rules
then add to it;
Code:

KERNEL="oldnameprefix*", SYSFS{address}=="MACaddress",NAME="newname"
with correct values.It's all in the guide.
EDIT:Look at my post no.4.


All times are GMT -5. The time now is 01:17 AM.