Network Interface Card (NIC) or Ethernet in linux, who the name are etho, eth1, eth2, etc. And for local interface. Loopback name is lo. Than, to know all interfaces are used in your debian. You can use this command (to do all step bellow, you must login as root) :
# ifconfig
Then will be appear :
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:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3036 (2.9 KiB) TX bytes:3036 (2.9 KiB)
Look at this, The Interface is active only loopback interfaces. I recomend to you, don't make loopback interfaces nonactive. Because it was used by many applications. If you want to connect your computer to computer network. You must know your Ethernet Card name, it's usually call eth0.
To activate eth0, use this command :
# ifconfig eth0 up
Then will be appear :
eth0 Link encap:Ethernet HWaddr 00:0c:29:58:cf:68
inet addr:10.122.1.99 Bcast:10.122.1.1 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe58:cf68/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1610 errors:0 dropped:0 overruns:0 frame:0
TX packets:1419 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:189305 (184.8 KiB) TX bytes:198940 (194.2 KiB)
Interrupt:18 Base address:0x1080
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:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3036 (2.9 KiB) TX bytes:3036 (2.9 KiB)
IP Configuration
Before you start to set IP in Debian, you must know about your editor aplication in your computer like Vim, Gedit, Vi, Nano, and etc. Then open the configuration file in Debian. To open it, use this command :
# vim /etc/network/interfaces
Then will be appear :
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The local network interface
auto eth0
iface eth0 inet static
address 10.122.1.99
netmask 255.255.255.0
gateway 10.122.1.1
dns-nameservers 10.122.1.1
In that example, I used Vim editor to edit my IP configuration. You can edit all addreess such as IP address, Netmask, Gateaway, Dns-nameservers accordance with your Computer Network configuration.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The local network interface
auto eth0
iface eth0 inet static
address (Your IP Address)
netmask (Your Netmask Address)
gateway (Your Gateaway)
dns-nameservers (Your DNS Address)
If you use Vim or Vi to edit, I will give you some example about it. If you want to edit, press "Insert". You want to quit without save, press ":q!". You want to save and quit, press ":wq". If you can't use Vim or vi, you can use Gedit, it's work like notepad in Windows.
Add DNS
If you want to connect to the internet, you must setting your DNS. To set the configuration, please follow this step below :
# vim /etc/resolv.conf
Then will be appear :
search computer.ee.its.ac.id
nameserver 10.122.1.1
nameserver 202.64.129.3
That are part to edit like your network configuration :
search (Your DNS Name)
nameserver (Your DNS Address)
nameserver (Your Alternate DNS Address)
After do all steps above, you must restart to apply all configuration :
# /etc/init.d/networking restart
No comments:
Post a Comment