dhcp server and client in ubuntu12.04

来源:互联网 发布:log4cpp linux编译 编辑:程序博客网 时间:2024/05/16 05:52
1. client
1)modify /etc/dhcp/dhclient.conf
Insert
send vendor-class-identifier "SUNW";
dhcp6.sntp6-server, vendor-encapsulated-options;

2)run this command:
dhclient -cf /etc/dhcp/dhclient.conf -v -d -s 10.0.0.1 eth1

2. server
1)modify /etc/dhcp/dhcpd.conf

class "foo1" {
  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}

subnet 10.0.0.0 netmask 255.255.255.0 {
  pool {
    allow members of "foo1";
    option vendor-encapsulated-options 1:4:49:50:51:52;
    range 10.0.0.30 10.0.0.250;
  }

  pool {
    deny members of "foo1";
    range 10.0.0.10 10.0.0.20;
  }
}

2.run this command
service isc-dhcp-server restart

run tcpdump -ni eth1 host 10.0.0.1 -vvv

You will find the following:

Vendor-Option Option 43, length 6: 1.4.73.80.81.82

0 0
原创粉丝点击