Configuring dynamic local peer IP for a DHCP Client

Last Updated : Nov 06, 2012 |
Prolog information
  1. Permit DHCP packets in the ingress access control list (ACL) and the egress ACL.
    ADDITIONAL INFORMATION:
    To do so, perform the following:
    1. Use the no ip access-group command to deactivate both the ingress ACL and the egress ACL on the FastEthernet interface.
    2. Add a rule to the ingress ACL and to the egress ACL, permitting DHCP packets to pass (for information on defining ACL policy rules, see Policy rule configuration).
    3. Use the ip access-group command to activate the ingress ACL and the egress ACL on the FastEthernet interface.
    For example:
    ! Deactivate the Ingress and Egress ACLs on the FastEthernet Interface
    !
    Gxxx-001(config)# interface fastethernet 10/3
    Gxxx-001(config-if:FastEthernet 10/3)# no ip access-group in
    Done!
    Gxxx-001(config-if:FastEthernet 10/3)# no ip access-group out
    Done!
    Gxxx-001(config-if:FastEthernet 10/3)# exit
    !
    ! Add a Permit rule to the Ingress ACL for DHCP
    !
    Gxxx-001(config)# ip access-control-list 301
    Gxxx-001(config-ACL 301)# ip-rule 25
    Gxxx-001(config-ACL 301/ip rule 25)# source-ip any
    Done!
    Gxxx-001(config-ACL 301/ip rule 25)# destination-ip any
    Done!
    Gxxx-001(config-ACL 301/ip rule 25)# ip-protocol udp
    Done!
    Gxxx-001(config-ACL 301/ip rule 25)# udp source-port eq bootps
    Done!
    Gxxx-001(config-ACL 301/ip rule 25)# udp destination-port eq bootpc
    Done!
    Gxxx-001(config-ACL 301/ip rule 25)# composite-operation permit
    Done!
    Gxxx-001(config-ACL 301/ip rule 25)# exit
    Gxxx-001(config-ACL 301)# exit
    !
    ! Add a Permit rule to the Egress ACL for DHCP
    !
    Gxxx-001(config)# ip access-control-list 302
    Gxxx-001(config-ACL 302)# ip-rule 25
    Gxxx-001(config-ACL 302/ip rule 25)# source-ip any
    Done!
    Gxxx-001(config-ACL 302/ip rule 25)# destination-ip any
    Done!
    Gxxx-001(config-ACL 302/ip rule 25)# ip-protocol udp
    Done!
    Gxxx-001(config-ACL 302/ip rule 25)# udp source-port eq bootpc
    Done!
    Gxxx-001(config-ACL 302/ip rule 25)# udp destination-port eq bootps
    Done!
    Gxxx-001(config-ACL 302/ip rule 25)# composite-operation permit
    Done!
    Gxxx-001(config-ACL 302/ip rule 25)# exit
    Gxxx-001(config-ACL 302)# exit
    !
    ! Activate the Ingress and Egress ACLs on the FastEthernet Interface
    !
    Gxxx-001(config)# interface fastethernet 10/3
    Gxxx-001(config-if:FastEthernet 10/3)# ip access-group 301 in
    Done!
    Gxxx-001(config-if:FastEthernet 10/3)# ip access-group 302 out
    Done!
  2. Specify no ip address and then ip address dhcp in the context of the FastEthernet Interface.
    For example:
    Gxxx-001(config-if:FastEthernet 10/3)# no ip address
    no ip address defined on this interface
    Gxxx-001(config-if:FastEthernet 10/3)# ip address dhcp
    Done!
  3. Exit the context of the interface, and set the interface name as the next hop.
    For example:
    Gxxx-001(config-if:FastEthernet 10/3)#exit
    Gxxx-001(config)# ip route 5.0.0.0 255.0.0.0 FastEthernet 10/3
    Done!
    ADDITIONAL INFORMATION:
    Note:
    For more information on DHCP client in the Branch Gateway, see DHCP client configuration.