JUNIPER MX DHCP 實驗1.0

"""ide

    實驗:MX DHCP local server/static vlan/without AAA
flex

    版本:1.0
spa

    日期:03/25/20193d

"""router

 

實驗拓撲:server

拓撲DHCP.png

實驗配置:blog

1.開啓DHCP服務:
接口

services {ip

        dhcp-local-server {路由

            group summer-dhcp-access {

                interface ge-0/0/2.100;    #指定本地DHCP server須要偵聽的接口

2.配置接口:

interfaces {

    ge-0/0/2 {

        flexible-vlan-tagging;    #開啓vlan-tagging 對端交換機配置trunk接口;

        unit 100 {

            vlan-id 100;    #Static vlan-id 100

            family inet {

                unnumbered-address lo0.0;    #以此地址爲網關獲取POOL地址;

        }

    }

    lo0 {

        unit 0 {

            family inet {

                address 1.1.1.2/32;

            }

        }

    }

}

3.地址池:

        pool p2 {

            family inet {

                network 1.1.1.0/24;

                range r1 {

                    low 1.1.1.10;

                    high 1.1.1.99;

                }

                dhcp-attributes {

                    maximum-lease-time 60;

                    name-server {

                        192.168.1.1;

                        192.168.1.2;

                    }

                    router {

                        1.1.1.2    #指定本地POOL的網關,這個地址一樣須要出如今被調用的lo0接口上,出現多個lo0地址和多個pool的時候,依據這個網關地址來決斷分配POOL。

3.實驗驗證:

root# run show subscribers  #查看用戶                  

Interface           IP Address/VLAN ID                      User Name                      LS:RI

ge-0/0/2.100        1.1.1.10                                                          default:default      

ge-0/0/2.100        1.1.1.11                                                          default:default      

ge-0/0/2.100        1.1.1.12                                                          default:default      


[edit]

root# run show subscribers address 1.1.1.10 detail  #查看用戶細節

Type: DHCP

IP Address: 1.1.1.100   #ip地址

IP Netmask: 255.255.255.0   #掩碼

Logical System: default

Routing Instance: default   #路由實例和邏輯系統

Interface: ge-0/0/2.100    #接口

Interface type: Static  #接口類型(目前的實驗沒有調用dynamic profile 接口vlan是靜態的)

Underlying Interface: ge-0/0/2.100  #物理接口

MAC Address: 50:00:00:0f:00:00  #MAC信息

State: Active

Radius Accounting ID: jnpr :1   #Radius 認證ID     #目前實驗是without AAA;

Session ID: 1   #回話ID

VLAN Id: 100  #VLAN

Login Time: 2019-03-25 02:47:33 UTC  #登陸時間

DHCP Options: len 51    #這個什麼鬼 暫時還不知道

35 01 01 74 01 01 3d 07 01 50 00 00 0f 00 00 0c 07 63 6c 69

65 6e 74 31 3c 08 4d 53 46 54 20 35 2e 30 37 0b 01 0f 03 06

2c 2e 2f 1f 21 f9 2b 2b 02 dc 00


[edit]

root# run show dhcp server binding  #對應的清除命令 clear dhcp server binding _


IP address        Session Id  Hardware address   Expires     State      Interface

1.1.1.11          2           50:00:00:0a:00:00  53          BOUND      ge-0/0/2.100        

1.1.1.12          3           50:00:00:0c:00:00  41          BOUND      ge-0/0/2.100        

1.1.1.10          1           50:00:00:0f:00:00  54          BOUND      ge-0/0/2.100        


[edit]

root# run show dhcp server binding detail   #查看DHCP信息


Client IP Address:  1.1.1.11

     Hardware Address:             50:00:00:0a:00:00 

     State:                        BOUND(LOCAL_SERVER_STATE_BOUND)

     Lease Expires:                2019-03-25 03:10:28 UTC

     Lease Expires in:             30 seconds   #租期

     Lease Start:                  2019-03-25 02:47:46 UTC

     Last Packet Received:         2019-03-25 03:09:28 UTC

     Incoming Client Interface:    ge-0/0/2.100

     Client Interface Vlan Id:     100

     Server Identifier:            1.1.1.2

     Session Id:                   2

     Client Pool Name:             p2   #POOL的名字;

Client IP Address:  1.1.1.12

     Hardware Address:             50:00:00:0c:00:00

     State:                        BOUND(LOCAL_SERVER_STATE_BOUND)

     Lease Expires:                2019-03-25 03:10:50 UTC

     Lease Expires in:             52 seconds

     Lease Start:                  2019-03-25 02:51:29 UTC

     Last Packet Received:         2019-03-25 03:09:50 UTC

     Incoming Client Interface:    ge-0/0/2.100

     Client Interface Vlan Id:     100

     Server Identifier:            1.1.1.2

     Session Id:                   3    

     Client Pool Name:             p2

Client IP Address:  1.1.1.10

     Hardware Address:             50:00:00:0f:00:00

     State:                        BOUND(LOCAL_SERVER_STATE_BOUND)

     Lease Expires:                2019-03-25 03:10:29 UTC

     Lease Expires in:             31 seconds

     Lease Start:                  2019-03-25 02:47:33 UTC

     Last Packet Received:         2019-03-25 03:09:29 UTC

     Incoming Client Interface:    ge-0/0/2.100

     Client Interface Vlan Id:     100

     Server Identifier:            1.1.1.2

     Session Id:                   1

     Client Pool Name:             p2

相關文章
相關標籤/搜索