LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to install an RPM on Linux (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-install-an-rpm-on-linux-518249/)

Peter John 01-10-2007 11:29 PM

How to install an RPM on Linux
 
Pardone me, for this very basic question.
I am totally new to linux. I was trying to bring up the tun0 interface, seems the kernel has no package.

modprobe tun.
lsmod | grep tun
returns device found
ifconfig tun0 10.0.0.1 255.255.255.0 says
Device not found ---

Kindly Help. How do i install an tun RPM?

Peter

b0uncer 01-11-2007 01:33 AM

RPM comes from Redhat Package Manager, and a .rpm package is a package that is installed using the program rpm. If your kernel didn't have support for your card (whatever 'tun' is), you couldn't just install some 'tun rpm', but needed to either install a kernel version that supported it or configure and compile one yourself. In this case, however, the kernel does have what you probably ask for:

Quote:

modprobe tun.
lsmod | grep tun
'modprobe' is a command that can install/'attach' modules to your running kernel. In this case you tried to install a module called 'tun' to your running kernel, and if the latter 'lsmod' command produced output, it succeeded, so no problem there if you know this 'tun' is the right module.

What kind of device is this you are trying to get working? An ethernet card, maybe? In that case try 'eth' instead of 'tun', i.e. if you already have a regular ethernet card called eth0, try
Code:

ifconfig eth1 10.0.0.1 netmask 255.255.255.0
I'm not sure if I have ever seen a device called 'tun0' or any other number, but it could just be me..anyway, if you can, tell a bit more about this device you're trying to get working, it might help.

Peter John 01-11-2007 02:21 AM

TUN/TAP provides packet reception and transmission for user space programs.
It can be viewed as a simple Point-to-Point or Ethernet device, which
instead of receiving packets from a physical media, receives them from
user space program and instead of sending packets via physical media
writes them to the user space program.

When a program opens /dev/net/tun, driver creates and registers corresponding
net device tunX or tapX. After a program closed above devices, driver will
automatically delete tunXX or tapXX device and all routes corresponding to it.

http://www.kernel.org/pub/linux/kern...ing/tuntap.txt
Peter

hansalfredche 01-11-2007 03:01 AM

Your documentation seems pretty old. Are you sure this software will still work on newer systems (assuming you are using a newer system)? For how to install rpm's: the best solution is to use the packet management system that came with your distribution (given there is any). They are usually quite easy to use. If you are using a Debian based system like Ubuntu you need .deb packages. Avoid using packages that are not build for your exact distribution (like SUSE 10.2 or whatever you have). Otherwise it is best to install from source but get some good documentation before.

Peter John 01-11-2007 03:22 AM

I have installed an new RPM.. i still face the same problem

[root@localhost root]# modprobe tun
[root@localhost root]# lsmod | grep tun
tun 5696 0 (unused)
[root@localhost root]# ifconfig tun0 10.0.0.1 netmask 255.255.255.0 up
SIOCSIFADDR: No such device
tun0: unknown interface: No such device
SIOCSIFNETMASK: No such device
tun0: unknown interface: No such device
[root@localhost root]# uname -r
2.4.20-8
[root@localhost root]#


All times are GMT -5. The time now is 06:19 AM.