Cisco's DHCP and VLAN synthesis experiment

Source: Internet
Author: User

Cisco's DHCP and VLAN synthesis experiment


Experimental content:

PC1 and PC2 need to obtain an IP address through DHCP Server . R1 do one-arm routing and DHCP Relay,R2 interface f2/0 IP address is 192.168.3.1. and PC1 belongs to Vlan10,PC2 belongsto Vlan20,R3(DHCP Server ) belongs to VLAN30.

PC1 belongs to 192.168.1.0 network segment, Gateway is 192.168.1.254 PC2 belongs to 192.168.2.0 network segment, Gateway is 192.168.2.254


Experimental extension Map:

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/14/7ffbf9d129e9c0ba1e2e7245c579c421.png-wh_500x0-wm_3 -wmp_4-s_127943898.png "title=" topology map. png "alt=" 7ffbf9d129e9c0ba1e2e7245c579c421.png-wh_ "/>

Experimental ideas:

    1. VLAN 10,20,30 is configured on S1 and the E0/2 port is trunk port

    2. R1 to create a sub-interface for the VLAN30. And each sub-interface specifies the encapsulation mode and the IP address of the specified DHCP server.

    3. The default route to the host needs to be configured on the DHCP server


Experiment Configuration:

S1 (config) #vlan  10 s1 (Config-vlan) #vlan  20s1 (Config-vlan) #vlan  30s1 (Config-vlan) #do   show vlan   to see if it has been created and is active S1 (config) #interface  ethernet 0/0s1 (config-if) #switchport  ACCESS VLAN 10S1 (config-if) #inter  e0/1s1 (config-if) #swi  acc vlan 20s1 ( CONFIG-IF) #inter  e0/3s1 (config-if) #swi  ac vlan 30s1 (config-if) #inter  e0/2s1 (config-if ) #switchport  trunk encapsulation dot1q s1 (config-if) #switchport  mode trunk  S1 (config-if) #do  show inter e0/2 switchport   See if Port 0/2 is a trunk port R1 (config) #interface  FASTETHERNET 0/0.1R1 (config-subif) #encapsulation  dot1q 10r1 (config-subif) #ip  add  192.168.1.254 255.255.255.0R1 (config-subif) #ip  helper-address 192.168.3.1  r1 ( Config) #interface  fastethernet 0/0.2r1 (config-subif) #encapsulation  dot1q 20r1 (config-subif ) #ip  add 192.168.2.254 255.255.255.0R1 (config-subif) #ip  helper-address 192.168.3.1  r1 (config) # INTERFACE FA0/0.3R1 (config-subif) #encapsulation  dot1q 30r1 (config-subif) #ip  add  192.168.3.254 255.255.255.0R1 (config-subif) #inter  fa0/0 r1 (config-if) #no  shutdown r2 ( Config) #ip  dhcp excluded-address 192.168.1.200 192.168.1.255r2 (config) #ip  dhcp  Excluded-address 192.168.2.200 192.168.2.255r2 (config) #ip  dhcp pool pc1 r2 ( Dhcp-config) #network  192.168.1.0 255.255.255.0r2 (dhcp-config) #default-router 192.168.1.254r2 ( Dhcp-config) #dns-server 8.8.8.8r2 (dhcp-config) #lease  2 3 4r2 (config) #ip  dhcp  POOL PC2R2 (dhcp-config) #network  192.168.2.0 255.255.255.0r2 (dhcp-config) #default-router  192.168.2.254R2 (dhcp-config) #dns-server 8.8.8.8r2 (dhcp-config) #lease  2 3 4r2 (config) #ip  route 0.0.0.0 0.0.0.0 192.168.3.254r2 (config) #inter  fa2/0r2 (config-if) #ip  add 192.168.3.1  255.255.255.0R2 (config-if) #no  sh

Experimental validation:

start PC1 no IP address

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/14/f87219808995edcb89636a28acc98b39.png-wh_500x0-wm_3 -wmp_4-s_205816602.png "title=" no Ip.png "alt=" F87219808995edcb89636a28acc98b39.png-wh_ "/>

PC1 using DCHP request IP

650) this.width=650; "Src=" Https://s4.51cto.com/oss/201711/14/5f772b4e316d1f6d21b401a39fca8036.png-wh_500x0-wm_3 -wmp_4-s_3446676455.png "style=" Float:none; "title=" Request Ip.png "alt=, 5f772b4e316d1f6d21b401a39fca8036.png-wh_"/>

PC1 successful request to IP.

650) this.width=650; "Src=" Https://s2.51cto.com/oss/201711/14/c6e74243f700f30642947800c2e4afc2.png-wh_500x0-wm_3 -wmp_4-s_2939161581.png "style=" Float:none; "title=" validates the result. png "alt=" C6e74243f700f30642947800c2e4afc2.png-wh_ "/>


This article is from the "New Network Society Blog" blog, please be sure to keep this source http://xwxhvip.blog.51cto.com/13020757/1981723

Cisco's DHCP and VLAN synthesis experiment

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.