How can I configure a router as a DHCP server and ensure the routing function ?, Vrodhcp configuration dhcp

Source: Internet
Author: User

How can I configure a router as a DHCP server and ensure the routing function ?, Vrodhcp configuration dhcp

Dynamic Host Configuration Protocol (DHCP)

Lab Name:Configure the router as a DHCP server and ensure the routing function.

Lab requirements:

1. automatically assign IP addresses to terminal Devices

2. Have the routing function

Lab notes:This experiment requires two PCs and two 2811 vrouters.

Illustration

Experiment Configuration:

(1) configure an IP address for vrorourouter1

① Command implementation:

Router>

Enable

Router #

Config terminal

Router (config )#

Hostname R1

R1 (config )#

Interface fas 0/1

R1 (config-if )#

No shutdown

R1 (config-if )#

Ip address 192.168.1.100 255.255.255.0

R1 (config-if )#

Exit

② Enable the DHCP service:

R1 (config )#

Service dhcp

③ Configure the DHCP address pool

R1 (config )#

Ip dhcp pool dizhichi1

R1 (dhcp-config )#

Network 192.168.1.0 255.255.255.0

R1 (dhcp-config )#

Default-router 192.168.1.100

R1 (dhcp-config )#

End

④ Connect fas0/1 of the router with a crossover line and fas0/0 of the Computer pc0

⑤ Click dhcp on the computer IP address to automatically obtain the IP address. The default IP address is 192.168.1.1 255.255.0.

⑥ Verify and test show ip dhcp binding <view assigned ip addresses>

(2) Configure IP addresses for vrorourouter2

① Command implementation:

Router>

Enable

Router #

Config terminal

Router (config )#

Hostname R2

R2 (config )#

Interface fas 0/1

R2 (config-if )#

No shutdown

R2 (config-if )#

Ip address 192.168.2.100 255.255.255.0

R2 (config-if )#

Exit

② Enable the DHCP service:

R2 (config )#

Service dhcp

③ Configure the DHCP address pool

R2 (config )#

Ip dhcp pool dizhichi2

R1 (dhcp-config )#

Network 192.168.2.0 255.255.255.0

R1 (dhcp-config )#

Default-router 192.168.2.100

R1 (dhcp-config )#

End

④ Connect fas0/1 of vror2 R2 and fas0/0 of pc2.

⑤ Click dhcp in PC2 to automatically obtain the IP address. The default IP address is 192.168.2.1 255.255.255.0.

⑥ Verify and test show ip dhcp binding <view assigned ip addresses>

(3) connect the fas0/0 ports of the two routers respectively with a crossover line.

(4) configure the IP address of fas0/0 in Router R1

R1 (config )#

Inter fas0/0

R1 (config-if )#

No shutdown

R1 (config-if )#

Ip address 10.10.12.1 255.255.255.0

Configure the IP address of fas0/0 in Router R1

R1 (config )#

Inter fas0/0

R1 (config-if )#

No shutdown

R1 (config-if )#

Ip address 10.10.12.1 255.255.255.0

⑹ Configure static route entries for router R1

R1 (config )#

Ip route 192.168.2.0 255.255.255.0 10.10.12.2

Configure a static route entry for router R2.

R2 (config )#

Ip route 192.168.1.0 255.255.255.0 10.10.12.1

Verification and Testing

Show ip route <view route table>

Pc0> ping 192.168.2.1 <pc0 sends a request to pc2>

Experiment summary:The vrodhcp can be configured as a dhcp server to implement the routing function.

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.