Author Topic: How To - Setup a Wired NIC and remove WICD  (Read 6126 times)

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
How To - Setup a Wired NIC and remove WICD
« on: January 25, 2013, 04:10:31 AM »
This How To will detail setting up your ethx in /etc/network/interfaces as either a static IP or DHCP and the removal of WICD

Audience - Anyone with a wired connection who wants to get rid of WICD and 40-50 MiB it uses on boot

First lets determine what ethx is your NIC (Network Interface Card)

Code: [Select]
ip link show
will show you something like this

Code: [Select]
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 00:1f:c6:6f:a8:71 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:16:44:b4:aa:43 brd ff:ff:ff:ff:ff:ff

You see in that example on Line 2 shows I am running eth0

Next lets edit the interface

Code: [Select]
sudo medit /etc/network/interfaces
This is what you would need for a dhcp setup

Code: [Select]
#auto lo
#iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

That is all you would need for DHCP

For static, there is a little more involved

This is my example of a static setup.  You would need to change it to match your network

Code: [Select]
#auto lo
#iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.40.66
netmask 255.255.255.0
network 192.168.40.0
broadcast 192.168.40.255
gateway 192.168.40.10
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.40.10

Now that you have finished choosing and setting up your interface you can disable wicd and reboot to make sure you have a network.  Right click on the wicd icon in the systray or start WICD from either right click menu and disable your ethx card from starting

Reboot and verify you have a network and wicd is not running

Once verified it is running fine, do this from terminal

Code: [Select]
prg wicd
or  (Note prg is an alias for this:)

Code: [Select]
sudo apt-get purge wicd
Profit!

Challenge - Anyone with wireless to complete this so the wifi people can do the same thing
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #1 on: January 25, 2013, 05:01:01 AM »
And along come Sector11 who never gets anything right.  >:(
Code: [Select]
sector11 @ sector11
 25 Jan 13 | 01:50:33 ~
         $ ip link show
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 10:78:d2:20:d7:9a brd ff:ff:ff:ff:ff:ff
 sector11 @ sector11
 25 Jan 13 | 01:50:35 ~
         $

/etc/network/interfaces
Code: [Select]
#auto lo
#iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

I "purged" WICD ... but I need one extra step:


sudo apt-get autoremove

Code: [Select]
sector11 @ sector11
 25 Jan 13 | 01:56:49 ~
         $ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libmozjs19d python-wicd rfkill wicd-daemon wicd-gtk
0 upgraded, 0 newly installed, 5 to remove and 2 not upgraded.
After this operation, 7,669 kB disk space will be freed.
Do you want to continue [Y/n]?

(Reading database ... 169611 files and directories currently installed.)
Removing libmozjs19d ...
Removing wicd-gtk ...
Removing wicd-daemon ...
[ ok ] Stopping Network connection manager: wicd.
Removing python-wicd ...
Removing rfkill ...
Processing triggers for desktop-file-utils ...
Processing triggers for menu ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
 sector11 @ sector11
 25 Jan 13 | 01:57:51 ~
         $

Now I have to reboot.  Be right back.

WICD gone!
YES!!!  199MB on boot.

Thank you VastOne - 10000 Gold Nuggets!
Stay Home

lwfitz

  • DEFCON 1
  • Posts: 1761
  • sudo rm -rf /
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #2 on: January 25, 2013, 05:33:29 AM »
Very nice VastOne! Ill boot up my laptop and see if I can get this finished for wireless for you!

Edit:

Well this is being a pain in the butt. Not really sure why its not working right now but here is where Im at:

/etc/networks/interfaces
Code: [Select]
auto wlan0
iface wlan0 inet dhcp
        wireless-ssid Vius.exe
        wireless-key b8831971
        wireless-mode Managed

iwcofig
Code: [Select]
luke@ASUS-Laptop:~$ iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:"Virus.exe" 
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated   
          Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

ifconfig
Code: [Select]
luke@ASUS-Laptop:~$ ifconfig
wlan0     Link encap:Ethernet  HWaddr 00:23:15:36:d8:68 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:526 errors:0 dropped:0 overruns:0 frame:0
          TX packets:352 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:498053 (486.3 KiB)  TX bytes:60287 (58.8 KiB)


and scanning with

Code: [Select]
sudo iwlist scan

sees my network just fine

Code: [Select]
Cell 02 - Address: 20:AA:4B:25:F5:82
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=70/70  Signal level=-24 dBm 
                    Encryption key:on
                    ESSID:"Virus.exe"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=000002116ace095b
                    Extra: Last beacon: 52ms ago
                    IE: Unknown: 000956697275732E657865
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 03010B
                    IE: Unknown: 2A0100
                    IE: Unknown: 2F0100
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 32040C121860
                    IE: Unknown: 2D1A7C181BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: 3D160B001700000000000000000000000000000000000000
                    IE: Unknown: 4A0E14000A002C01C800140005001900
                    IE: Unknown: 7F0101
                    IE: Unknown: DD760050F204104A0001101044000102103B000103104700102A42550DEEF00354717F1724EB742E4D102100074C696E6B7379731023000545313230301024000776322E302E30311042000234321054000800060050F2040001101100054531323030100800022688103C0001011049000600372A000120
                    IE: Unknown: DD090010180202F0280000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK

When I run

Code: [Select]
sudo ifup wlan0
I get

Code: [Select]
luke@ASUS-Laptop:~$ sudo ifup wlan0
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit [url]https://www.isc.org/software/dhcp/[/url]

Listening on LPF/wlan0/00:23:15:36:d8:68
Sending on   LPF/wlan0/00:23:15:36:d8:68
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
Unable to obtain a lease on first try.  Exiting.
Failed to bring up wlan0.


Ill try to get this figured out tomorrow

mrneilypops

  • Posts: 106
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #3 on: February 01, 2013, 06:22:04 PM »
DHCPDISCOVER slow...since removing WICD  :(
I have this in etc/network.interfaces;
Code: [Select]
#auto lo
#iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Boot process is delayed by;
DHCPDISCOVER...eth0...(maybe 2 seconds)
DHCPDISCOVER...eth0...(maybe 1 second)
and then boot continues as normal.

How might I get rid of this delay?

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: How To - Setup a Wired NIC and remove WICD
« Reply #4 on: February 01, 2013, 06:29:42 PM »
I have seen this when I was up north on a different router... It was a Crapple router that provided the DHCP

What type of router are you using?  Can you setup static IP?
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

mrneilypops

  • Posts: 106
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #5 on: February 01, 2013, 07:34:49 PM »
^http://www.fritzbox.eu/en/products/FRITZBox_Fon_WLAN_7360/index.php

Fibre connection @ 30Mb/s down / 10Mb/s up;
http://www.pt.lu/portal/lang/en/telecom/pid/4059

I will try and set up static IP...

mrneilypops

  • Posts: 106
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #6 on: February 02, 2013, 12:01:44 PM »
Static ip setup as per howto and now I have a nice fast smooth boot again  8)

Sector11

  • Posts: 870
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #7 on: February 02, 2013, 01:00:49 PM »
Always nice to see a happy contented person.   8)
Stay Home

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: How To - Setup a Wired NIC and remove WICD
« Reply #8 on: February 02, 2013, 04:22:18 PM »
Good to hear that mrneilypops.   :)

DHCP serves it's purposes in large network environments, but I cannot stand it!
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #9 on: February 02, 2013, 05:05:46 PM »
Say what?

You advocate not using a network manager to use DHCP and now you say you hate it?

What did I miss?
Stay Home

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: How To - Setup a Wired NIC and remove WICD
« Reply #10 on: February 02, 2013, 05:12:31 PM »
I have always used and suggested static via /etc/network/interfaces. DHCP is for people who do not know how to set up static or is just too lazy to learn it or do it

By turning DHCP off on my wireless router also eliminates those rogue neighbors who steal my bandwidth so security plays a big role in static IP's as well
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: How To - Setup a Wired NIC and remove WICD
« Reply #11 on: February 02, 2013, 05:13:50 PM »
The only reason a network manager (WICD) is part of VSIDO is for wireless users to easily setup and get connected
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: How To - Setup a Wired NIC and remove WICD
« Reply #12 on: February 02, 2013, 07:10:03 PM »
@ VastOne

I knew why WICD was installed in VSIDO, a smart move on your part to get wireless people up and running.

But, I had no idea that anyone could drop a "network manager", be it GNOME Network Manager or WICD and still get connected until recently.  So it wasn't a case of "not knowing how to" or "to lazy to".  Simple case of 'not knowing'.

I don't think I can set up "static" here as my ISP may/might change my IP addy on occasion.

I do not have a 'router' let alone a 'wireless router' so I'm guessing that static IP isn't an option for me.

Correct me if I'm wrong, I'm up for learning.

Since deleting WICD "it seems like" I get a faster cleaner connection, it might be all in my mind though.
Stay Home