LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > peonuser
User Name
Password

Notices

Rate this Entry

Learning again.

Posted 09-21-2012 at 04:24 PM by peonuser

Finally was able to order a rpi. Believe it when I see it. One nice thing about the units is using several memory cards each with a specific purpose. No need to have a zillion units to do what you want. A touch pad is probably the first order of the day. Seen all the rpi diy articles, but none seem to really take advantage of it. Might do my own.

Debugging networking can be so much fun. Set up two virtual machines using Virtual Bbx. One was Debian Wheezy that I wanted to set up an rdp server and the other was just a clean install of Centos 6 to get ready for the RH exam. Neither of them would connect to the network. .Being new to Virtual box, I did not know you had to set up the network cards as a bridged adapter. made that modification and then to try the networking again.

The Debian install was a pre-made file. Of course the network card was set up as eth0 and I am sure it worked when the image was first set. Debian has a quirk that, if you use a network adapter, other than the original nic, the device name changes. If you do not know about that quirk, it can eat your lunch. So you have to go through the good old debugging technique. First you want to see what inberfaces (nics) are enabled. If all you get is the loopback interface or lo, then no nic is set up.

$ sudo 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:2954 errors:0 dropped:0 overruns:0 frame:0
TX packets:2954 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:328148 (320.4 KiB) TX bytes:328148 (320.4 KiB)

That is what I saw. Then I wanted to see if even the network card was detected.

$ dmesg | grep eth

[ 1.880657] eth0: Some companie's Ethernet Adapter
[ 1.880663] eth0: Ethernet Address: 00:00:00:00:00:00

Good we have an ethernet adapter. Generally if you are using a windowed environment, the Desktop configuration will over ride the config files. Sine we not using a desktop per se, we can modify the file with the network settings.

$ sudo vim /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Hmmm. We found that our system was using eth1 instead of eth0.

# The replacement primary network interface
auto eth1
iface eth1 inet dhcp

Then all we have to do is just restart the networking.

$ sudo service networking restart

For Centos 6, it was a bit different. You still use ifconfig and dmesg, but the configuration files are different..

Centos the network card was not enabled on boot, so that is why it did not connect to the network. You need to tell it to start up the networking.

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:191:2A:BA:A8
ONBOOT=no

Change ONBOOT= no to ONBOOT=yes.

Then you can restart the networking.

# /etc/init.d/network restart
You are doing the same thing, but it is a bit different the way you do it.
Posted in Uncategorized
Views 394 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



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

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration