sample dhcp

Upload: ciscolifeguard

Post on 14-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Sample Dhcp

    1/2

    huawei AR19/

    DHCP config

    Posted on January 4, 2012

    Lets assume that we have a t

    1. IP addresses of ETH 0/respectively.

    2. Router B (dhcp client)from DHCP server (rout

    01FC.

    3. DHCP server assigns172.16.1.1/25 and 172.1

    4. DNS server address arespectively.

    5. For subnet 172.16.1.12address and address lea

    6. For subnet 172.16.1.1/2duration for 10 days.

    dhcp configuration

    Assign IP addresses to interfa

    [RouterA] interface ethe

    [RouterA-Ethernet0/1] ip

    [RouterA-Ethernet0/1]qui

    [RouterA] interface ethe

    [RouterA-Ethernet0/2] ip

    ConfigureDHCP server:

    [RouterA] dhcp enable

    CreateDHCP address pool 1

    [RouterA] dhcp server ip

    [RouterA-dhcp-pool-1] st

    9/49 router

    ration

    pology like in the picture:

    and ETH 0/2 on Router A are 172.16.1.128/2

    btains static IP address, gateway address and

    r A). A MAC address of interface ETH 0/0 of ro

    IP addresses to clients in subnet 172.16.1

    6.1.128/25.

    d WINS server address are 172.16.1.10/25

    /25 configure DNS server address, WINS serv

    e duration for 6 days and 6 hours.

    5 configure DNS server address, gateway addre

    es of router A:

    rnet 0/1

    address 172.16.1.128 25

    t

    rnet 0/2

    address 172.16.1.1 25

    ith configured static binding,DNSand gate

    -pool 1

    atic-bind ip-address 172.16.1.150

    5 and 172.16.1.1/25

    DNS server address

    uter B is 0800-6902-

    .0/24 subnetted to

    nd 172.16.1.200/25

    er address, gateway

    ss and address lease

    way addresses:

  • 7/27/2019 Sample Dhcp

    2/2

    [RouterA-dhcp-pool-1] static-bind mac-address 0800-6902-01FC

    [RouterA-dhcp-pool-1] dns-list 172.16.1.10

    [RouterA-dhcp-pool-1] gateway-list 172.16.1.254

    Exclude IP addresses of gateways, DNS and WINS servers from dynamic allocation:

    [RouterA] dhcp server forbidden-ip 172.16.1.10

    [RouterA] dhcp server forbidden-ip 172.16.1.200

    [RouterA] dhcp server forbidden-ip 172.16.1.126

    [RouterA] dhcp server forbidden-ip 172.16.1.254

    Configure DHCP address pool 2 with address range and DNS server address:

    [RouterA] dhcp server ip-pool 2

    [RouterA-dhcp-pool-2] network 172.16.1.0 mask 255.255.255.0

    [RouterA-dhcp-pool-2] dns-list 172.16.1.10

    Configure DHCP address pool 3 with address range, gateway and lease duration (DNS

    address is inherited from ip-pool 2):

    [RouterA] dhcp server ip-pool 3

    [RouterA-dhcp-pool-3] network 172.16.1.1 mask 255.255.255.128

    [RouterA-dhcp-pool-3] expired day 10

    [RouterA-dhcp-pool-3] gateway-list 172.16.1.126

    Configure DHCP address pool 4 with address range, WINS server address, gateway and lease

    duration (DNS address is inherited from ip-pool 2):

    [RouterA] dhcp server ip-pool 4

    [RouterA-dhcp-pool-4] network 172.16.1.128 mask 255.255.255.128[RouterA-dhcp-pool-4] expired day 6 hour 6

    [RouterA-dhcp-pool-4] gateway-list 172.16.1.254

    [RouterA-dhcp-pool-4] nbns-list 172.16.1.200

    After the whole configuration is completed Router B gets 172.16.1.150 IP address from

    DHCP server. All remaining DHCP clients obtain IP addresses and other network parameters

    from either 172.16.1.1/25 or 172.16.1.128/25 networks (depends on subnet which they reside

    in).

    display dhcp server ip-in-use command shows IP addresses assigned to DHCP clients.

    IP address allocation sequence:

    The IP address manually bound to the clients MAC address or ID The IP address that was ever assigned to the client The IP address designated by the Option 50 field in a DHCP-DISCOVER message The first assignable IP address found in an extended or a common address pool The IP address that was a conflict or passed its lease duration