Monday, June 16, 2008

How to enable wireless under Fedora 8

Using Linux system, although you are not a computer developer, you always need DIY to make your operating system more personalized and more comfortable. However, without internet DIY is not so easy. Where there is a problem, there is a solution, and internet makes it shared .
For the goodness of internet, I need wireless connection.
The problem is wireless may not be enable automatically by NetworkManager under Fedora 8. Depending on which wireless chip card you are using, you need to install wireless driver.
Firstly, get information of your wireless card.
-------------------------------------------------------------------
command line$ lspci | grep Wireless
02:00.0 Network controller: Atheros Communications, Inc. AR5418 802.11a/b/g/n Wireless PCI Express Adapter (rev 01)
-------------------------------------------------------------------
my macbook uses Atheros AR5418 .
Madwifi is a good choice for Atheros chip, but AR5418 in Atheros AR5008 family is not supported in the currently official released version. However, the one built from the trunk works for AR5418.
Here is an article interpreting step by step instructions: "How to checkout and install madwifi experimental driver for AR5008". It works for me!

Todo: how to connected to a selected encrypted Access point ?

Setting static IP on Fedora 8 (zz)

Posted on by matt_cempreng

Setting IP is very important due to able to work in the networking area, such as: file sharing, file printing, remote login, remote administration (or hacking?), etc.

Setting IP in LINUX environment either permanent or temporary is simple. It can be done by few ways, usually by editing directly to the config-file, by using the cmd-tool, or by using the graphical (GUI) tool. Just remember that all changes of the configuration needs root privilege.

Editing the Configuration File

There are files related to the networking system especially related to the IP address of the own host or other hosts. The configuration can be changed by editing the file (that needs root privilege), and then restarting the network service.

1. Editing the file: /etc/sysconfig/network-scripts/ifcfg-eth0

The file: /etc/sysconfig/network-scripts/ifcfg-eth0 contains the information about the configuration of ethernet card (NIC). If the file doesn’t exist, don’t worry because you still can write a new file with the text editor. Just make sure the format is correct. The ‘#’ character will be intepreted as a comment.

The name of the first netwok card is eth0, the second one is eth1, the third eth2, eth3, ….. and so on.

This is the example output of editing the file using ‘nano’ text editor.

ifcfg-eth0

I’ll describe it if you can’t see the picture correctly. Once again, the ‘#’ in the file character will be interpreted as comment, so I’ll use this advantage to explain the file as comments without damaging the config-file itself. Or, if you want just simply copy this text and use it directly after you paste it and save to the /etc/sysconfig/network-scripts/ifcfg-eth0 file to your machine.

Don’t forget to do the administration of the system, you must login as root.


[login@domain path]#nano /etc/sysconfig/network-scripts/ifcfg-eth0

# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
DEVICE=eth0
BOOTPROTO=static
# Refer to basic IP assignment rules
IPADDR=192.168.254.4
NETMASK=255.255.255.0
NETWORK=192.168.254.0
BROADCAST=192.168.254.255
GATEWAY=192.168.254.254
# I really don't enven think about changing this line
# I changed this once and everything messed up
HWADDR=00:17:31:65:98:3B
# Your DNS name
DNS1=202.134.0.155
DNS2=202.134.2.5
# This will bring ethernet card up every booting
ONBOOT=yes
# My NIC type on PCI slot
TYPE=Ethernet

[login@domain path]#_

2. Editing the file: /etc/resolv.conf

The file /etc/resolv.conf contains the information about DNS. This is the resolver’s configuration file. The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information. Refer to ‘man resolv.conf‘.


[login@domain path]#cat /etc/resolv.conf
search MyDomainName
nameserver 202.134.0.155
nameserver 202.134.2.5
[login@domain path]#_

3. Editing the file: /etc/sysconfig/network

The file /etc/sysconfig/network contains information about gateway, hostname and network connection. This is the example of the file in my Linux Box.


[login@domain path]#cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=cempreng.net
[login@domain path]#_

The line: NETWORKING=yes tells wether the computer will connect to the network. If you wish not to join your machine to the network just make change to NETWORKING=no.

The line: HOSTNAME=cempreng.net will gives you the host name of your machine. We can easily make change of our host name by editing this line. Alternatively we can use the command hostname to set the system’s host name. More information refer to ‘man hostname‘.

NOTE:
Don’t forget to restart the network service after the configuration changed. On Fedora system just simply by typing command like this:

[login@domain path]#service network restart
or
[login@domain path]#/etc/rc.d/init.d/network restart

Using Command Line Tool

1. Command Line: ifconfig

Command : ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. If no arguments are given, it displays the status of currently active interfaces. Refer to ‘man ifconfig‘.

Format:

ifconfig [interface]
ifconfig interface [aftype] options | address

ifconfig

This is an example from my machine:


[login@domain path]#ifconfig

eth0 Link encap:Ethernet HWaddr 00:17:31:65:98:3B
inet addr:192.168.254.4 Bcast:192.168.254.255 Mask:255.255.255.0
inet6 addr: fe80::217:31ff:fe65:983b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:186357 errors:0 dropped:0 overruns:0 frame:0
TX packets:127850 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:213616062 (203.7 MiB) TX bytes:14120057 (13.4 MiB)
Interrupt:17 Base address:0x2000

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:7787 errors:0 dropped:0 overruns:0 frame:0
TX packets:7787 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2576283 (2.4 MiB) TX bytes:2576283 (2.4 MiB)

[login@domain path]#

As we can see the eth0 is the name of the first ethernet card (NIC). I only have one ethernet card so the name will be eth0, assigned as the first (and the only) one. And so is the lo, it is the loopback connection, usually 127.0.0.1.

A loopback is a communications channel with only one endpoint. Any message transmitted through such a channel is immediately received by the same channel.
From:
http://en.wikipedia.org/wiki/Loopback

To change IP address as desired just follow the syntax of ifconfig. This is an example changing IP address to 192.168.254.3 (C-Class). By default the netmask will be automatically given.


[login@domain path]#ifconfig eth0 inet address 192.168.254.3

2. Command Line: ip

Actually I never use this command line, and I don’t want to write about this one to decrease the risk soo…. please learn it by yourself and please tell me after you mastering this command line.

Using GUI Tool

Alternatively, we can change IP address from GUI tool placed in:
System -> Administration -> Network
or using command
system-config-network by typing on console terminal (such as xterm, gnome-terminal, etc) like this:

[login@domain path]#system-config-network

system-config-network

To make changes, simply highlight the preferred devices and then click on the edit tab. Then the new window will be displayed like this:

system-config-network-edit

On the General tab of that new window, we can edit the configuration as desired. We can set the IP address manually (static IP adress) or automatically by DHCP. And don’t forget to click OK otherwise the changes won’t be saved. The window will be closed and back to Network Configuration window. Save your most recent configuration by clicking File -> Save or either by pressing the shortcut Ctrl+S. It’s so easy, eh…???

Wednesday, June 11, 2008

Mac is back!

My little macbook is back with Leopard and Fedora 8 dual booting .

I tried to install the newly released Fedora 9, but I got a big problem with GNOME desktop missing. I am not a skilled Linuxer, and Fedora 9 is not so stable a version considering for me, so I shifted to Fedora 8. Hope it will gave me a nice experience.