LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2014, 08:04 AM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Rep: Reputation: Disabled
Where is ifcfg-wlan0?


Where should ifcfg-wlan0 be located?

http://wiki.centos.org/HowTos/Laptops/WpaSupplicant describes editing it, but it does not exist on my server.

Code:
[root@michales network-scripts]# find / -name "ifcfg*"
/sbin/ifcfg
/usr/share/man/man8/ifcfg.8.gz
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-lo
[root@michales network-scripts]#
It does, however, appear under ifconfig or iwconfig.
Code:
[root@michales network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 88:51:FB:51:DF:70
          inet addr:192.168.0.200  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::8a51:fbff:fe51:df70/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1055 errors:0 dropped:0 overruns:0 frame:0
          TX packets:403 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:85750 (83.7 KiB)  TX bytes:70562 (68.9 KiB)

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

wlan0     Link encap:Ethernet  HWaddr B8:76:3F:69:31:95
          UP BROADCAST 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:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@michales network-scripts]#
I could get wireless working by using the following, but want to know why I can't find ifcfg-wlan0.
Code:
ifconfig wlan0 up
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
dhclient wlan0
Thanks
 
Old 04-03-2014, 03:59 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,688

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
It is a configuration file in /etc/sysconfig/network-scripts. The -wlan0 simply names the network device being initialized. Used most often like "ifup wlan0" and "ifdown wlan0", as the command uses the configuration file to identify the physical device.
 
Old 04-03-2014, 10:46 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
It is a configuration file in /etc/sysconfig/network-scripts. The -wlan0 simply names the network device being initialized. Used most often like "ifup wlan0" and "ifdown wlan0", as the command uses the configuration file to identify the physical device.
Yes, that is what I thought as well, and expected it exactly as you indicated. But as seen by my original post, it isn't there. Typically, these configuration files are pre-existing and just need to be modified. Is this not the case? Am I supposed to create it from scratch?
 
Old 04-03-2014, 11:19 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by NotionCommotion View Post
Yes, that is what I thought as well, and expected it exactly as you indicated. But as seen by my original post, it isn't there.
Presumably becuase you didn't create it yet.
Quote:
Typically, these configuration files are pre-existing and just need to be modified. Is this not the case? Am I supposed to create it from scratch?
It's up to you. Do want to configure it that way? Or perhaps you'd rather use network-manager?

Evo2.
 
Old 04-03-2014, 11:49 PM   #5
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Original Poster
Rep: Reputation: Disabled
Ah ha!

Maybe makes sense.

But why does /etc/sysconfig/network-scripts/ifcfg-eth0 exist?

Per the documentation I read, NetworkManager is not enabled by default for a Centos basic server. It is a little misleading as files like "vi /etc/resolv.conf" say something like "modified by networkmanager"
 
Old 04-04-2014, 12:04 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by NotionCommotion View Post

Maybe makes sense.

But why does /etc/sysconfig/network-scripts/ifcfg-eth0 exist?
Presumably you told the installer to use dhcp for eth0, so it would have been setup since then.
Quote:
Per the documentation I read, NetworkManager is not enabled by default for a Centos basic server.
Assuming this is a notebook/laptop that will move between networks, then if probably makes sense to use network-manager (or similar) for wlan0. Eg
Code:
yum install NetworkManager NetworkManager-gnome
chkconfig --level 345 NetworkManager on
service NetworkManager start
Quote:
It is a little misleading as files like "vi /etc/resolv.conf" say something like "modified by networkmanager"
Curious. Have you ever used the wireless on that machine?

Evo2.
 
Old 04-04-2014, 06:13 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,688

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
NetworkManager does make various modifications - and /etc/resolv.conf is one of them. another that makes changes is DHCP.
 
Old 04-04-2014, 08:15 AM   #8
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Original Poster
Rep: Reputation: Disabled
Thanks evo2 and jpollard,

NetworkManager is not installed, however, now I know why /etc/resolv.conf refers to NetworkManager.

When doing the initial Centos install, there is a screen which says "Configure TCP/IP". I selected "Enable IP4support/DHCP" and "Enable IPv6 support/Automatic". It then says "Waiting for NetworkManager to configure eth0", so Centos must use it for initial configuration, however, not install it.

And no, I've never used wireless on this machine.
 
Old 04-04-2014, 12:38 PM   #9
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Original Poster
Rep: Reputation: Disabled
I am still struggling with /etc/sysconfig/network-scripts/ifcfg-wlan0. I followed http://wiki.centos.org/HowTos/Laptops/WpaSupplicant. As I indicated, I originally didn't have ifcfg-wlan0, so I copied ifcfg-eth0 and slightly modified it as shown below. I can ping 192.168.0.201 if I am wired, however, cannot do so if I am not wired. Please provide any recommendations.

PS. I am sorry evo2, I just realized I ignored your comment. No, I don't want to use NetworkManager permanently, however, I would be open to using it for setting up ifcfg-wlan0 if possible.

Code:
[root@michaels ~]# cat /etc/sysconfig/network-scripts/ifcfg-wlan0
DEVICE="wlan0"
BOOTPROTO="static"
#HWADDR="88:51:FB:51:DF:70"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Wireless"
#UUID="66a08e55-b25f-4e95-aee2-6dff72aa8b6d"
IPADDR=192.168.0.201
NETMASK=255.255.255.0
[root@michaels ~]#
Code:
[root@michaels ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 88:51:FB:51:DF:70
          inet addr:192.168.0.200  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::8a51:fbff:fe51:df70/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:561 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42328 (41.3 KiB)  TX bytes:21743 (21.2 KiB)

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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:672 (672.0 b)  TX bytes:672 (672.0 b)

wlan0     Link encap:Ethernet  HWaddr B8:76:3F:69:31:95
          inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::ba76:3fff:fe69:3195/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:958 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:180974 (176.7 KiB)  TX bytes:1549 (1.5 KiB)

[root@michaels ~]# iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"wired"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:18:E7:F0:85:CE
          Bit Rate=1 Mb/s   Tx-Power=27 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-37 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:8   Missed beacon:0

eth0      no wireless extensions.

[root@michaels ~]#
 
Old 04-05-2014, 08:40 AM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,688

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
Try using "system-config-network-tui" (or just "system-config-network").

It should be run from a terminal window and will go through the creation of the file you want.

Last edited by jpollard; 04-05-2014 at 08:42 AM.
 
Old 04-05-2014, 12:15 PM   #11
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Original Poster
Rep: Reputation: Disabled
Thank you jpollard, Worked perfectly! Unfortunately, wireless is still not working, and since another topic, will post another post.
 
Old 04-05-2014, 12:41 PM   #12
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 687

Original Poster
Rep: Reputation: Disabled
Desparately trying to set up WiFi network

Sorry, accidental post

Last edited by NotionCommotion; 04-05-2014 at 12:43 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please POst a working ifcfg-wlan0 file superbnerb Linux - Wireless Networking 2 06-09-2006 01:31 PM
editing ifcfg-wlan0 (WG111v2 usb) DanBallance SUSE / openSUSE 0 11-10-2005 06:35 AM
can anyone post their /etc/sysconfig/network-scripts/ifcfg-wlan0? Dooberdoink Linux - Wireless Networking 1 03-27-2005 09:49 AM
ifcfg-wlan0 NEED HELP PLEASE yohan77 Linux - Wireless Networking 2 03-04-2005 08:49 PM
no ifcfg-wlan0 ehawk Linux - Wireless Networking 2 03-28-2004 10:42 PM


All times are GMT -5. The time now is 06:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration