PXE cross-LAN automatic installation method under Ubuntu 10.04

  
                

Before we learned PXE that can automatically install Ubuntu 10.04 system in LAN, today we will learn how to automatically install the system on different LAN clients.

First, the principle articles

1. first to achieve interoperability of the whole network that is able to ping, this is a basis for cross LAN automatically install the system.

2. Set up a dhcp server in the LAN of 192.168.2.0/24. The reason why the dhcp server is set up in the LAN where the client is located is because the dhcp server can automatically obtain the ip address and can also specify the route. And specify the tftp server. The specified route is equivalent to the default gateway so that the client can communicate with the PXE server. The specified tftp server client can download the pxelinux.0 file and the kernel boot file through the tftp protocol. Know the location of the ks.cfg file via the text.cfg file, download and follow the steps in the ks.cfg file to install the system. The ks.cfg file knows that the system installation file is in the /var/www/ubuntu directory of 192.168.0.105, requesting the installation file to be installed.

Second, the actual combat articles

1. Realize the network interconnection

Point the PXE Server gateway to 192.168.0.111, the gateway of the dhcp server points to 192.168.2.1

Make a route on the 192.168.0.111 host: #route add default gw 192.168.1.1

Do the routing on the 192.168.2.1 host: #route add default gw 192.168.1.2

At the client measured at the end of the dhcp server ping connectivity :( of course the easiest)

In this way the whole network on the exchange.

2. Client dhcp server settings:

#vim /etc/dhcp3/dhcpd.conf

subnet 192.168.2.0 netmask 255.255.255.0 {

range 192.168.2.100 192.168.2.200;

option domain-name "192.168.2.2";

option domain-name-servers 192.168.2.2;

Option routers 192.168.2.1; #This is the specified client gateway: 192.168.2.1

default-lease-time 600;

max-lease-time 7200;

Next-server 192.168.0.105; ## Specify the tftp server as 192.168.0.105

filename "pxelinux.0";

}

For the client dhcp server The setting is very important, of course, you can also use dhcp relay, routing is not introduced here.

Third, the test installation

client is assigned ip: 192.168.2.101, the gateway: 192.168.2.1

tftp server: 192.168.0.105

After this setting, the automatic installation system across the LAN is completed. Although there are not many steps, it is still necessary for users to follow the steps carefully, in order to keep this method in mind.

Copyright © Windows knowledge All Rights Reserved