Configuration of cross-network segment DHCP

Source: Internet
Author: User


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/9F/wKioL1cl5ESjbWl2AAA00MjVT9E728.png "title="!3.png "alt=" Wkiol1cl5esjbwl2aaa00mjvt9e728.png "/>




Scenario: analog PC with Router and dhcp_server,dhcp_client and dhcp_server are not on the same network segment. Dhcp_client will broadcast Dhcp_discover packet Discovery Dhcp_server, because not the same network segment and the router does not forward the broadcast packet by default, so configure Dhcp_relay to help forward the broadcast packet to Dhcp_server.

Operation Steps:

Step One: Build the experimental environment according to the topology

Step two: Simulate the PC with the router, turn off the routing function and configure the interface to get the IP dynamically

PC (config) #no iprouting// Turn off the routing feature

PC (config) #intf0/0

PC (config-if) #ipaddress DHCP// Configure the interface to obtain IP dynamically

Step Three: Configure the interface address, DHCP address pool, and lease information in Dhcp_server

Dhcp_server (config) #intf1/0

Dhcp_server (config-if) #ipadd 172.16.10.254 255.255.255.0

Dhcp_server (config-if) #nosh

dhcp_server (config) #ipdhcp pool dhcp_pool_1// Configure the address pool name for DHCP

dhcp_server (Dhcp-config) #network192.168.10.0 255.255.255.0// Configuring DHCP address ranges

dhcp_server (dhcp-config) #default-router192.168.10.254// Configure the gateway assigned to the host

dhcp_server (dhcp-config) #lease0 8 0// the rental period is 0 days, 8 hours, 0 minutes .

Dhcp_server (Dhcp-config) #ex

dhcp_server (config) #ipdhcp excluded-address 192.168.10.250 192.168.10.254// in the address pool

Addresses that need to be excluded

dhcp_server (config) #iproute 0.0.0.0 0.0.0.0 f1/0// Configure default Routes

Step four: Configure DHCP Relay

Dhcp_relay (config) #intf0/0

Dhcp_relay (config-if) #ipadd 192.168.10.254 255.255.255.0

Dhcp_relay (config-if) #nosh

Dhcp_relay (config-if) #iphelper-address 172.16.10.254

Dhcp_relay (config) #intf1/0

Dhcp_relay (config-if) #ipadd 172.16.10.1 255.255.255.0

Dhcp_relay (config-if) #nosh

Step five: Observe the process of DHCP relay using Wireshark

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/9F/wKioL1cl5FTwXOWpAAA_xLQKD_U276.png "title=" 4.png " alt= "Wkiol1cl5ftwxowpaaa_xlqkd_u276.png"/>

Step Six: View interface address availability

pc#sh IP int b

Interface ip-address OK? Method Status Protocol

fastethernet0/0 192.168.10.1 YES DHCP up up

fastethernet1/0 Unassigned YES unset administratively down

Configuration file

------------------------------------------------------------------------------

Pc#sh Run

!

Hostname PC

!

No IP routing

!

!

......

!

!

interfacefastethernet0/0

IP address DHCP

No IP route-cache

Duplex Auto

Speed auto

!

interfacefastethernet1/0

No IP address

No IP route-cache

Shutdown

Duplex Auto

Speed auto

!

!

......

!

Line con 0

Line aux 0

Line vty 0 4

!

!

End

------------------------------------------------------------------------------

Dhcp_relay#sh Run

Buildingconfiguration ...

currentconfiguration:628 bytes

!

Version 12.4

!

Hostname Dhcp_relay

!

!

!

interfacefastethernet0/0

IP address 192.168.10.254 255.255.255.0

IP helper-address 172.16.10.254

Duplex Auto

Speed auto

!

interfacefastethernet1/0

IP address 172.16.10.1 255.255.255.0

Duplex Auto

Speed auto

!

......

!

Line con 0

Line aux 0

Line vty 0 4

!

!

End

-----------------------------------------------------------------------------

Dhcp_server#sh Run

Buildingconfiguration ...

!

Hostname dhcp_server

!

!

!

IP CEF

No IP dhcp use vrfconnected

IP dhcpexcluded-address 192.168.10.250 192.168.10.254

!

IP DHCP Pooldhcp_pool_1

Network 192.168.10.0 255.255.255.0

Default-router 192.168.10.254

Lease 0 8

!

!

!

interfacefastethernet0/0

No IP address

Shutdown

Duplex Auto

Speed auto

!

interfacefastethernet1/0

IP address 172.16.10.254 255.255.255.0

Duplex Auto

Speed auto

!

!

IP Route 0.0.0.00.0.0.0 fastethernet1/0

!

!

!

Line con 0

Line aux 0

Line vty 0 4

!

!

End

-------------------------------------------------------------------------------


This article is from "the synthesizer, the United States Tiancheng" blog, please be sure to keep this source http://kidjang.blog.51cto.com/9975340/1769365

Configuration of cross-network segment DHCP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.