I constructed dhcp server on centOS6 (which has a ipaddress 192.168.0.0) to allocate ip address, 192.168.0.5, to other local node.
When i use "service network restart" on client node and type ifconfig
, the client node show their allocated ip (192.168.0.5) and subnetmask (255.255.255.0)
However When i try to access dhcp server from client node using ssh (hostname)@192.168.0.5
, the terminal just show "ssh: connect to host 192.168.0.0 port 22: Network is unreachable".
what's wrong with my concept? I can't even guess. Below are my configuration files.
/etc/sysconfig/network-script/ifcfg-eth0 on server
TYPE="Ethernet"
BOOTPROTO=static
NAME="eth0"
UUID=(UUID on server)
ONBOOT="yes"
IPADDR0=192.168.0.0
NETMASK=255.255.255.0
HWADDR=(MAC address on server)
/etc/sysconfig/network-script/ifcfg-eth0 on client
TYPE="Ethernet"
BOOTPROTO=dhcp
NAME="eth0"
UUID=(UUID on client ethernet)
ONBOOT="yes"
HWADDR=(MAC address on client ethernet)
/etc/dhcp/dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 {
host node2 {
hardware ethernet (Mac address on client ethernet);
fixed-address 192.168.0.5;
}
}