![](https://i-blog.csdnimg.cn/blog_migrate/987b12c2f3f960c4b918bee68fca3097.png)
![](https://i-blog.csdnimg.cn/blog_migrate/bcc606cb402aadaae004b735dfa2f46d.png)
一.配置VLAN
SW1:
![](https://i-blog.csdnimg.cn/blog_migrate/dab2d2d57d15b63d1ece3ddfaa250857.png)
![](https://i-blog.csdnimg.cn/blog_migrate/d44317d4d57251d6086aadd1ba8ea689.png)
![](https://i-blog.csdnimg.cn/blog_migrate/41d0516fe79a1875da3a1b63732167dd.png)
![](https://i-blog.csdnimg.cn/blog_migrate/9f098dd2f4b77ed725da869faef6fb99.png)
![](https://i-blog.csdnimg.cn/blog_migrate/b8154e612228d602bc0561d7b61a7ef6.png)
![](https://i-blog.csdnimg.cn/blog_migrate/9b2d71795c0495f77ef3f42cc19851d6.png)
![](https://i-blog.csdnimg.cn/blog_migrate/bd64b502fe02935b2ae5d86fbf1a02a0.png)
![](https://i-blog.csdnimg.cn/blog_migrate/4a72dc01c1c7db2c7ef7acf25054e309.png)
![](https://i-blog.csdnimg.cn/blog_migrate/2101cf805249108d414464b4f4b79b66.png)
SW2:
![](https://i-blog.csdnimg.cn/blog_migrate/5f84d3bbeeedd7ed8924dd867354c923.png)
![](https://i-blog.csdnimg.cn/blog_migrate/56c38134e7fa33fbd3d4ec4f2d708992.png)
![](https://i-blog.csdnimg.cn/blog_migrate/025db7d9de1bf1f108c55df0390ca846.png)
![](https://i-blog.csdnimg.cn/blog_migrate/4915753caabcf31fb188e7de236f7e29.png)
![](https://i-blog.csdnimg.cn/blog_migrate/114efdbec41bf0b06ad883cfd0f9e9e1.png)
![](https://i-blog.csdnimg.cn/blog_migrate/21f738a631d0a975da81330143c61b57.png)
![](https://i-blog.csdnimg.cn/blog_migrate/77c0bdbe784cd6818053a264d0beb5b3.png)
![](https://i-blog.csdnimg.cn/blog_migrate/6366ee06fbefdd3603a6926397da35fd.png)
![](https://i-blog.csdnimg.cn/blog_migrate/b3bf91967bb1b891d197eb6d863c3b49.png)
SW3:
![](https://i-blog.csdnimg.cn/blog_migrate/cd4d5c26b311ed5256a98ef89764b0ff.png)
![](https://i-blog.csdnimg.cn/blog_migrate/22a48e3089bb5fb8c363af361d797a17.png)
![](https://i-blog.csdnimg.cn/blog_migrate/c03b60b4e606c7fa3c7583bdfd0f8567.png)
![](https://i-blog.csdnimg.cn/blog_migrate/b8fc0e4ce73654d53cd21087ee2f9341.png)
![](https://i-blog.csdnimg.cn/blog_migrate/66e31576b9f07524d8087083d583fa61.png)
![](https://i-blog.csdnimg.cn/blog_migrate/30b9c028c62bbd6ee6cbee9ff161f70a.png)
![](https://i-blog.csdnimg.cn/blog_migrate/fe89a9912208137425b4d05d244a8282.png)
二.配置DHCP及子接口
- 地址规划
PC1,PC3: 192.168.1.0/24
PC2.PC4.PC5.PC6:192.168.2.0/24
2.相关配置
![](https://i-blog.csdnimg.cn/blog_migrate/57489897a1ace8fb4881fcc9aef8449a.png)
![](https://i-blog.csdnimg.cn/blog_migrate/157aacfdbfb1e25492fecc86a609628f.png)
![](https://i-blog.csdnimg.cn/blog_migrate/5360d1598d081e3e4d9e4aff23af7eee.png)
![](https://i-blog.csdnimg.cn/blog_migrate/1fd0e5d204777b11ef3260615789733a.png)
![](https://i-blog.csdnimg.cn/blog_migrate/cfd6e8dcf4f2272a15a323862f038883.png)
![](https://i-blog.csdnimg.cn/blog_migrate/93c4482a67fa47fd35e8c0e535a18bd3.png)
![](https://i-blog.csdnimg.cn/blog_migrate/b072c9218948d9709a9388f821708b2e.png)
![](https://i-blog.csdnimg.cn/blog_migrate/ee87b6d9e95bf4a00412437970c20976.png)
![](https://i-blog.csdnimg.cn/blog_migrate/db2bef5657bb1a2fec18a9c797e0879f.png)
![](https://i-blog.csdnimg.cn/blog_migrate/7dc2e5f03f39b25baffd44f78352b840.png)
![](https://i-blog.csdnimg.cn/blog_migrate/896bac639eadc906ee65c176efa89b9b.png)
![](https://i-blog.csdnimg.cn/blog_migrate/645c14047fa543beb79d6129de38d187.png)
![](https://i-blog.csdnimg.cn/blog_migrate/1f6c71ad64908db474e1ba46b3dbbc99.png)
![](https://i-blog.csdnimg.cn/blog_migrate/9216faee6db85605dc316486fed1c121.png)
三:验证及结果:
- DHCP获取的ip
pc1
![](https://i-blog.csdnimg.cn/blog_migrate/9534475922b1a1f2ecf249fcd237b663.png)
pc2
![](https://i-blog.csdnimg.cn/blog_migrate/b94ad69a551b6db7eab7a6d21eafecea.png)
pc3
![](https://i-blog.csdnimg.cn/blog_migrate/3b3e3fa19faf8b1b947dc7e22bb18036.png)
pc4
![](https://i-blog.csdnimg.cn/blog_migrate/6e149ad36f8bf300eda1b36888f84959.png)
pc5
![](https://i-blog.csdnimg.cn/blog_migrate/1a31eea125f24815403e9c7f4732cb9a.png)
pc6
![](https://i-blog.csdnimg.cn/blog_migrate/7594d25e69845cd5706de41b51c5e359.png)
- 测试:
pc2 ping pc4
![](https://i-blog.csdnimg.cn/blog_migrate/ebbadc3ad8b24bf3265a99ccbbf7a7eb.png)
pc2 ping pc5
![](https://i-blog.csdnimg.cn/blog_migrate/0bd76b9323922abcb4bd728e772afde4.png)
pc2 ping pc6
![](https://i-blog.csdnimg.cn/blog_migrate/a15f32cf0186a0d1c1469f44cb7dfc69.png)
pc4 ping pc5
![](https://i-blog.csdnimg.cn/blog_migrate/94fd6a7835e49221944eb40228106f86.png)
pc4 ping pc6
![](https://i-blog.csdnimg.cn/blog_migrate/92bf8b6a210231a38629cec0b1c7cc5d.png)
pc5 ping pc6
![](https://i-blog.csdnimg.cn/blog_migrate/1545bfc0153147eb6dc07f734a955537.png)
pc1 ping pc2
![](https://i-blog.csdnimg.cn/blog_migrate/bc0994eae35cce188313bdeddeace4fe.png)
pc1 ping pc4
![](https://i-blog.csdnimg.cn/blog_migrate/c84ee92dde4f5a99db810deb7309fc16.png)
pc1 ping pc5
![](https://i-blog.csdnimg.cn/blog_migrate/db0d3735a9cff1351864b8c3557cb377.png)
pc1 ping pc6
![](https://i-blog.csdnimg.cn/blog_migrate/e6deee30ef7b5dbf2e548bc62af2ae95.png)
pc3 ping pc4
![](https://i-blog.csdnimg.cn/blog_migrate/fe9fa0353aa67155d4707e9ac8db7237.png)
pc3 ping pc5
![](https://i-blog.csdnimg.cn/blog_migrate/d3ed606b065b58348dfcc70a22afe6fc.png)
pc3 ping pc6
![](https://i-blog.csdnimg.cn/blog_migrate/5b90d35684a70b533c6e5faf8b2dd72f.png)