码迷,mamicode.com
首页 > 其他好文 > 详细

三层交换配置不同VLAN、不同网段之间通信、配置DHCP客户机自动获取

时间:2017-05-02 13:43:38      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:access   通信   客户机   接口   三层交换dhcp   自动获取   

技术分享

switch 0上配置:

vlan 10

exit

interface range f0/1-2

switchport access vlan 10

exit

interface gigabitEthernet 1/1

switchport trunk allowed vlan all  允许所有VLAN通过

exit

interface gigabitEthernet 1/1

switchport mode trunk      配置该接口为trunk模式

exit

switch 1上配置:

vlan 20

exit

interface range f0/1-2

switchport access vlan 20

exit

interface gigabitEthernet 1/1

switchport trunk allowed vlan all   允许所有VLAN通过

exit

interface gigabitEthernet 1/1

switchport mode trunk

exit

核心交换配置:

vlan 10

exit

vlan 20

exit

interface fastEthernet f0/1

switchport trunk allowed vlan all  允许所有VLAN通过

switchport mode trunk

exit

interface fastEthernet f0/2

switchport trunk allowed vlan all  允许所有VLAN通过

switchport mode trunk

exit


ip routing   开启路由功能 


interface vlan 10

ip address 192.168.1.1 255.255.255.0  配置模式虚拟端口

exit

interface vlan 20

ip address 192.168.2.1 255.255.255.0  配置模式虚拟端口

exit


service  dhcp

ip dhcp pool 10

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server x.x.x.x

ip dhcp pool 20

network 192.168.2.0 255.255.255.0

default-router 192.168.2.1

dns-server x.x.x.x

客户机查看IP获取情况

技术分享


本文出自 “随心所欲” 博客,请务必保留此出处http://yrqsxsy.blog.51cto.com/10248815/1921065

三层交换配置不同VLAN、不同网段之间通信、配置DHCP客户机自动获取

标签:access   通信   客户机   接口   三层交换dhcp   自动获取   

原文地址:http://yrqsxsy.blog.51cto.com/10248815/1921065

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!