ehs_ghazanfary
عضو جدید
Static Networking in Kubuntu 8.04 KDE4
April 25, 2008 — nosrednaekim
The Kde4 remix of Kubuntu Hardy Heron has one fairly bad flaw for a certain group of users:
It has no way to graphically configure static IP networks. Users are left to manually edit
their /etc/network/interfaces and /etc/resolv.conf. Thankfully this is not hard and the following
tutorial should explain how to do it.
EDIT: if you have another computer with Internet, or have Windows on the same computer and would like to configure the network with a GUI instead of via files…. please follow the instructions in the first comment
First, run “ifconfig” to find the name of your network card. It should be eth0, or similar (eth0 will be used throughout this tutorial).
Then, open up your /etc/network/interfaces file with “kdesudo ‘/usr/lib/kde4/bin/kwrite /etc/network/interfaces’”.
It should look something like:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
auto eth0
#iface eth0 inet dhcp
auto eth1
#iface eth1 inet dhcp
#iface eth2 inet dhcp
#iface ath0 inet dhcp
first, uncomment the line which says:
iface eth0 inet static
Now we have to add some lines which are highly dependant on your individual setup and network/ISP
address 192.168.0.2
put your desired address here
netmask 255.255.255.0
netmask should always be like this, unless your ISP says different or you have set it up differently(if
you’ve done that, you probably don’t need this guide.)
gateway 192.168.0.1
This is the IP of your ISP/Router
broadcast 192.168.0.255
This should be provided by your ISP, if not, it is the first 3 sections of the gateway followed by the
first section of the netmask.
the whole section should look like this:
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
Now, we need to edit our resolv.conf and add our DNS nameserver(s)
open the file with “kdesudo ‘/usr/lib/kde4/bin/kwrite /etc/resolv.conf’”
add a line like so:
nameserver 208.67.222.222
This is the line for the OpenDNS nameserver, you can use the one from your ISP
by simply replaceing the above IP with their’s.
Finally, run “sudo /etc/init.d/networking restart” and you should be connected!
April 25, 2008 — nosrednaekim
The Kde4 remix of Kubuntu Hardy Heron has one fairly bad flaw for a certain group of users:
It has no way to graphically configure static IP networks. Users are left to manually edit
their /etc/network/interfaces and /etc/resolv.conf. Thankfully this is not hard and the following
tutorial should explain how to do it.
EDIT: if you have another computer with Internet, or have Windows on the same computer and would like to configure the network with a GUI instead of via files…. please follow the instructions in the first comment
First, run “ifconfig” to find the name of your network card. It should be eth0, or similar (eth0 will be used throughout this tutorial).
Then, open up your /etc/network/interfaces file with “kdesudo ‘/usr/lib/kde4/bin/kwrite /etc/network/interfaces’”.
It should look something like:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
auto eth0
#iface eth0 inet dhcp
auto eth1
#iface eth1 inet dhcp
#iface eth2 inet dhcp
#iface ath0 inet dhcp
first, uncomment the line which says:
iface eth0 inet static
Now we have to add some lines which are highly dependant on your individual setup and network/ISP
address 192.168.0.2
put your desired address here
netmask 255.255.255.0
netmask should always be like this, unless your ISP says different or you have set it up differently(if
you’ve done that, you probably don’t need this guide.)
gateway 192.168.0.1
This is the IP of your ISP/Router
broadcast 192.168.0.255
This should be provided by your ISP, if not, it is the first 3 sections of the gateway followed by the
first section of the netmask.
the whole section should look like this:
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
Now, we need to edit our resolv.conf and add our DNS nameserver(s)
open the file with “kdesudo ‘/usr/lib/kde4/bin/kwrite /etc/resolv.conf’”
add a line like so:
nameserver 208.67.222.222
This is the line for the OpenDNS nameserver, you can use the one from your ISP
by simply replaceing the above IP with their’s.
Finally, run “sudo /etc/init.d/networking restart” and you should be connected!