mardi 12 juillet 2011

Configuration DHCP




[user@server1 ~]$ su
Mot de passe :
1-
[user@server1 ~]$ ifconfig eth0
Link encap:Ethernet HWaddr 08:00:27:6E:81:18



adr inet6: fe80::a00:27ff:fe6e:8118/6?4 Scope:Lien



UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1



RX packets:0 errors:0 dropped:0 overruns:0 frame:0



TX packets:48 errors:0 dropped:0 overruns:0 carrier:0



collisions:0 lg file transmission:1000



RX bytes:0 (0.0 b) TX bytes:7447 (7.2 KiB)
2-
[root@server1 user]# ifconfig eth0 192.168.10.1/24
3-
[root@server1 user]# vi /etc/sysconfig/network-scr?ipts/ifcfg-eth0
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
HWADDR=08:00:27:6E:81:18
ONBOOT=yes

TYPE=Ethernet
IPADDR=192.168.10.1
PREFIX=24
NAME="System eth0"
4-
[root@server1 user]# rpm -q dhcp
le paquetage dhcp n'est pas installé
5-
[root@server1 user]# rpm -ivh '/home/user/Bureau/dhcp-?4.1.1-15.fc13.i686.rpm'
Préparation... ##########################?################# [100%]
1:dhcp ##########################?################# [100%]
6-
[root@server1 user]# cp /usr/share/doc/dhcp*/dhcpd?.conf.sample /etc/dhcp/dhcpd.conf
cp : voulez-vous écraser « /etc/dhcp/dhcpd.conf » ? oui

[root@server1 user]# vi /etc/dhcp/dhcpd.conf

subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.11 192.168.10.200;
option domain-name-servers 192.168.10.10;
option domain-name "organisme7.ma";
option routers 192.168.10.1;
option broadcast-address 192.168.10.255;
default-lease-time 600;
max-lease-time 7200;
}

host ns1 {
hardware ethernet 00:0E:A6:40:1E:8E;
fixed-address 192.168.10.10;
}
7-
[root@server1 user]# service dhcpd start
Démarrage de dhcpd : [ OK ]

8-
[root@server1 user]# chkconfig --level 3 dhcpd on
[root@server1 user]# chkconfig --level 5 dhcpd on

9-
[root@server1 dhcpd]# vi /var/lib/dhcpd/dhcpd.lease?s

10-
[root@server1 dhcpd]# vi /var/lib/dhcpd/dhcpd.lease?s~

0 commentaires:

Enregistrer un commentaire