Ubuntu

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

1.

Setarea ip-ului ca static / dynamic


ifconfig
- afiseaza datele de retea atat pentru loop cat si pentru eth
( ifconfig eth0 )
sudo nano /etc/network/interfaces
Ca ip-ul sa fie - static : iface eth0 inet static
- dinamic: iface eth0 inet dhcp
Ca setarile sa aibe efect trebuie restartata interfata de retea :
sudo /etc/init.d/networking restart (nu merge pe UBUNTU 14.)
sudo ifdown eth0 apoi sudo ifup eth0
Se verifica daca setarile s-au incarcat cu comanda ifconfig
Pentru a sterge fereastra se foloseste comanda clear

2. Setarea unui server DHCP


cd /etc

ls

cd dhcp

ls ( -l )

sudo nano dhcpd.conf

sau direct
sudo nano /etc/dhcp/dhcpd.conf

- deschide fisierul cu configuratia

Pentru a iesi crtl + x si se salveaza modificarile


sudo /etc/init.d/isc-dhcp-server start ( stop , restart ) - pentru a porni/ opri/ restarta serverul
sudo tail /var/lib/dhcp/dhcpd.leases
Pentru a sterge fereastra se foloseste comanda clear

3. IP aliasing
IP aliasing is the process of adding more than one IP address to a network interface. Typical uses of IP
aliasing are virtual hosting of Web and FTP servers. It is fairly simple to set up an IP alias. You merely
have to configure the network interface on the system to listen for the additional IP address.
Below are the steps for configuring IP alias under Ubuntu Linux:
If you want to put IP alias on an interface, first find the interface, use command
ifconfig
Open the file - /etc/network/interfaces and add the following entries (here we are adding 2 IP aliases)
auto eth0:1
iface eth0:1 inet static
address 192.168.1.10
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1
auto eth0:2
iface eth0:2 inet static
address 192.168.1.11
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1
You need to enter all the details like address,netmask,network,broadcast and gateways values after
entering all the values save this file and exit.
Read more: http://linuxpoison.blogspot.ro/2011/09/configuring-ip-aliases-underubuntu.html#ixzz3NnBdbn3l

You might also like