Fedora Network Manger(고정IP사용)

from Info/Tools 2009/02/27 12:27 view 54097
cmd #1

/etc/init.d/NetworkManager stop
ntsysv
(NetworkManager 해지, network 체크)
system-config-network-tui
(고정아이피및, DNS추가)
(network 사용 체크, 사용하고자 하는 고정IP 체크)
service network restart
init 6

cmd #2
ping sendto: Network is unreachable 이 발생했을 때 이런 방법으로 해결..

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 (or whatever device)

DEVICE=eth0
IPADDR=*insert IP address here"
NETMASK=*insert netmask here*
NETWORK=*insert network address here*
BROADCAST=*insert broadcast address here*
GATEWAY=_insert gateway address here*
ONBOOT="yes" = interface will be active at boot time.
       "no"  = interface will NOT be active at boot time.

.If you have X-Windows set up, you can also use RH's "Network Configurator" (/usr/bin/netcfg) which actually writes to these files.
Additionally, after editing the file, do a "ifup eth0" to activate it and ifdown eth0 to deactivate it.


NetworkManager #1

NetworkManager provides automatic network detection and configuration for the system. Once enabled, the NetworkManager service also monitors the network interfaces, and may automatically switch to the best connection at any given time. Applications that include NetworkManager support may automatically switch between on-line and off-line modes when the system gains or loses network connectivity.

These facilities are most useful for modern laptops, where the user may move between wireless networks, and plug in to a variety of wired networks, but NetworkManager also provides features that are relevant to workstations. Current versions of NetworkManager support modem connections, and certain types of VPN. Development of these features is ongoing.

NetworkManager requires Fedora to have drivers for the wired and wireless interfaces on the computer. Many manufacturers of modems and wireless devices provide limited support for Linux. You may need to install additional drivers or firmware on your Fedora system in order to activate these interfaces.

Drivers first
NetworkManager may only work with network interfaces once the relevant drivers are correctly installed on your system. Reboot your system after installing a new firmware or a new driver in order to ensure that the changes take effect.

Enabling NetworkManager on Fedora

Command line way

The installation process for Fedora automatically provides NetworkManager. To enable it, enter the following commands in a terminal window:

1. Set the main service to automatically start on boot: su -c '/sbin/chkconfig --level 345 NetworkManager on' 1. Start the service: su -c '/sbin/service NetworkManager start

For each su command, enter the root password at the prompt.

Graphical Way

Start the system-config-services program, enter your root password and activate the NetworkManager service for runlevel 5.

Gnome-specific information

The NetworkManager tray icon automatically appears on your desktop once the services are started. If the NetworkManager service is active, then the tray icon appears each time that you log in to your desktop.

NetworkManager also stores any encryption keys in the gnome-keyring manager. If your are prompted to enter the keyring password after login, then keep reading. If your login password & the keyring password are the same, then there is a tool built to open the keyring for you on login. The package is called pam_keyring. To configure your system first install pam_keyring with yum:

su -c 'yum -y install pam_keyring'

Second you'll need to modify your /etc/pam.d/gdm file.

su -c 'gedit /etc/pam.d/gdm'

Add the following lines

auth    optional    pam_keyring.so try_first_pass
session optional pam_keyring.so

The order in which this lines are placed in this file are important, here is a copy from a working system

#%PAM-1.0
auth required pam_env.so
auth optional pam_keyring.so try_first_pass <---
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
session optional pam_keyring.so <---

Now reboot your computer. After login the keyring will be unlocked for you. If your keyring password is different from your login password, don't worry, there is a tool available to change it.

su -c 'yum -y install gnome-keyring-manager gnome-keyring pam_keyring

Once you have installed pam_keyring and gnome-keyring, you will need to log out and back on. Then you can run

/usr/libexec/pam-keyring-tool -c

to change the default password. Alternatively you can now change a password through gnome-keyring-manager. Download and install gnome-keyring-manager. Then highlight the keyring and select Change Keyring Password from the Keyring menu of gnome-keyring-manager.

KDE specific information

To control NetworkManager by a system tray applet you need to install and start the program knetworkmanager of the same named package. The keys to the different networks are stored automatically in KDE's password storage system kwalletmanager.

Further Information


Retrieved from "https://fedoraproject.org/wiki/Tools/NetworkManager"

NetworkManager #2

Fedora 10 uses NetworkManager by default. The primary settings for any network devices will be automatically selected at installation time. Since there is no screen for selecting networking options, most devices will default to using DHCP.

Using NetworkManager has greatly improved networking for many wireless and some less common devices (mobile broadband, GSM, etc.), it may still have problems with some configurations. NetworkManager development and integration into Fedora is still an ongoing effort.

NOTE: The following steps do NOT apply to all users. NetworkManager is highly recommended for Laptop users, especially using wireless with security.

Disabling NetworkManager and Enabling network Service

On machines with a fixed networking device and a fixed IP address (e.g. desktop, server, appliance), it might be more practical to disable NetworkManager and use the older network service. Additionally users requiring virtual device types (bridging, bonding, or VLANs) will also need to use the network service.

Note that the Fedora 10 installer disables the network service by default. To switch to using the network service:

First disable NetworkManager and prevent it from automatically loading:

[mirandam@charon ~]$ sudo /etc/init.d/NetworkManager stop
Stopping NetworkManager daemon: [ OK ]

[mirandam@charon ~]$ sudo /sbin/chkconfig --level 35 NetworkManager off

Next, configure your network settings:

[mirandam@charon ~]$ sudo system-config-network

You should have an eth0 device already showing. To configure the IP settings click on Edit. Do not forget to set DNS on the DNS tab (if you're using fixed IP's). Make sure the eth0 is selected as Active. Then File > Save and quit.

Next, enable the service and make sure it loads at next boot:

[mirandam@charon ~]$ sudo /etc/init.d/network start
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]

[mirandam@charon ~]$ sudo /sbin/chkconfig --level 35 network on

While it may be possible to re-activate your network without a reboot, it may be recommended to reboot.

Startup Applications Requiring Network

Some applications require the network to be initialized during boot. If you are using NetworkManager and having these problems, edit /etc/sysconfig/network as 'root' and add the following line:
NETWORKWAIT=1. Or run:

[mirandam@charon ~]$ sudo su -c 'echo NETWORKWAIT=1 >> /etc/sysconfig/network'

Some related information can be found on the Fedora Wiki.

Trackback Address :: 이 글에는 트랙백을 보낼 수 없습니다