DHCP relay NAT allows clients to automatically obtain IP addresses and ping the extranet

Source: Internet
Author: User
Tags config

First, the C1 and C2 VLAN are set on the switch R5

r5>en

R5#conf T

R5 (config) #vlan 10

R5 (Config-vlan) #vlan 20

R5 (Config-vlan) #inter FA1/1

R5 (config-if) #switchport Access VLAN 10

R5 (config-if) #inter FA1/2

R5 (config-if) #switchport Access VLAN 20

R5 (config-if) #inter fa1/0

R5 (config-if) #switchport mode trunk

R5 (config-if) #switchport Trunk Encapsulation D

R5 (config-if) #switchport trunk Encapsulation dot1q

Then set the DHCP address pool

dhcp>en

Dhcp#conf T

DHCP (config) #ip DHCP p

DHCP (config) #ip DHCP pool

DHCP (config) #ip DHCP pool v10

DHCP (dhcp-config) #netw

DHCP (dhcp-config) #network 192.168.10.0 255.255.255.0

DHCP (dhcp-config) #de

DHCP (dhcp-config) #default-router 192.168.10.1

DHCP (dhcp-config) #ip DHCP pool V20

DHCP (dhcp-config) #default-router 192.168.20.1

DHCP (dhcp-config) #network 192.168.20.0 255.255.255.0

DHCP (dhcp-config) #inter fa0/0

DHCP (config-if) #ip add

DHCP (CONFIG-IF) #ip address 192.168.100.100 255.255.255.0

DHCP (config-if) #no shut

DHCP (CONFIG-IF) #end

DHCP (config) #ip Route 0.0.0.0 0.0.0.0 192.168.100.10

DHCP (config) #do Ping 192.168.100.10

Sending 5, 100-byte ICMP Echos to 192.168.100.10, timeout is 2 seconds:

.!!!!

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.