1. 程式人生 > >juniper SRX dhcp 設定

juniper SRX dhcp 設定

 

CLI Configuration

To configure the device as a DHCP server for a subnet:
  1. 定義dhcp網段並設定範圍 (for example, 192.168.1.33). [email protected]# set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.33
  2. 定義dhcp網段並設定最高範圍 (for example, 192.168.1.64). [email protected]# set system services dhcp pool 192.168.1.0/24 address-range high 192.168.1.64
  3. 定義dhcp域名(for example, example.net). [email protected]# set system services dhcp pool 192.168.1.0/24 domain-name example.net
  4. 定義dhcp地址池的 DNS (for example, 192.168.1.1). [email protected]# set system services dhcp pool 192.168.1.0/24 name-server 192.168.1.1
  5. 定義dhcp地址池的閘道器地址(for example, 192.168.1.1).
    [email protected]
    #
    set system services dhcp pool 192.168.1.0/24 router 192.168.1.1
  6. 定義dhcp地址池的租約時間 (for example, 3600). [email protected]# set system services dhcp pool 192.168.1.0/24 default-lease-time 3600
  7. 定義dhcp服務在那個介面允許(例:在UNtrust的fe-0/0/0.5放行)

[email protected]# set security zones security-zone untrust interfaces fe-0/0/5.0 host-inbound-traffic system-services dhcp

[email protected]# set security zones security-zone untrust interfaces fe-0/0/6.0 host-inbound-traffic system-services dhcp

注意哦:介面網段要和地址池一樣哦!

[email protected]# set interfaces fe-0/0/6 unit 0 family inet address 192.168.1.1/24