Assignment 4


SPPU CN-Practicals (TE-Comp)


Installing and configure DHCP server and write a program (C++\Python\Java) to install the software on remote machine.


We will require to Python Codes 
1 . dhcp_client
2 . dhcp_server



Following are the Python codes for above problem

1 . dhcp_client


import os
#Install DHCP Package
os.system("dhclient -r")
os.system("dhclient -r -v")
os.system("dhclient -v")



2. dhcp_server



import os
#Install DHCP Package
os.system("yum install dhcp")
#Change Subnet mask ip address to 192.169.5.0
os.system("gedit /etc/dhcp/dhcpd.conf")
#Starting DHCP Service
os.system("systemctl start dhcpd.service")
os.system("systemctl enable dhcpd.service")
os.system("systemctl status dhcpd.service")



No comments:

Post a Comment