这样的拓扑中,一个路由器下来,连一台24口交换机,交换机1-8口获得172段地址,9-16获得100段,17-24获得200段,怎么操作呢?我在路由器中开启dhcp,交换机开启vlan,搭建trunk,不通
(0)
最佳答案
路由器上也要创建vlan,设置trunk,路由器型号为msr3620的话需要设备单臂路由,
路由器单臂路由配置
一、
二、
#
interface GigabitEthernet0/1
port link-mode route
#
interface GigabitEthernet0/1.1 //子接口1.1//
vlan-type dot1q vid 4 //配置其子接口Vid为4//
ip address 10.1.1.1 255.255.255.0 //设置下面vlan4内的客户端网关//
#
interface GigabitEthernet0/1.2 //子接口1.2//
vlan-type dot1q vid 2
ip address 10.1.2.1 255.255.255.0 //设置下面vlan2内的客户端网关//
#
interface GigabitEthernet0/1.3 //子接口1.3//
vlan-type dot1q vid 3
ip address 10.1.3.1 255.255.255.0 //设置下面vlan3内的客户端网关//
Return
交换机上面的配置:
#
vlan 1 to 4
#
interface Aux1/0/0
#
interface GigabitEthernet1/0/1 //和路由器互联口//
port link-type trunk //接口类型为TRUNK//
port trunk permit vlan all //允许所有vlan通过//
#
interface GigabitEthernet1/0/2
port access vlan 2
#
interface GigabitEthernet1/0/3
port access vlan 2
#
interface GigabitEthernet1/0/4
port access vlan 2
#
interface GigabitEthernet1/0/5
port access vlan 2
#
interface GigabitEthernet1/0/6
port access vlan 2
#
interface GigabitEthernet1/0/7
#
interface GigabitEthernet1/0/8
#
interface GigabitEthernet1/0/9
#
interface GigabitEthernet1/0/10
port access vlan 3
#
interface GigabitEthernet1/0/11
port access vlan 3
#
interface GigabitEthernet1/0/12
port access vlan 3
#
interface GigabitEthernet1/0/13
port access vlan 3
#
interface GigabitEthernet1/0/14
port access vlan 3
#
interface GigabitEthernet1/0/15
port access vlan 3
#
interface GigabitEthernet1/0/16
port access vlan 3
#
interface GigabitEthernet1/0/17
port access vlan 3
#
interface GigabitEthernet1/0/18
port access vlan 3
#
interface GigabitEthernet1/0/19
#
interface GigabitEthernet1/0/20
port access vlan 4
#
interface GigabitEthernet1/0/21
port access vlan 4
#
interface GigabitEthernet1/0/22
port access vlan 4
#
(0)
在路由器上开启dhcp也行,配置正确的话,也能通,但明显这样的拓扑规划不合理,建议把所有vlan和vlan接口地址建在交换机上,5820是三层交换机,且支持dhcp server,例如:
1,划分好相关vlan,将相关接口加入vlan
2,创建vlan接口地址
3,开启dhcp服务,创建dhcp地址池
dhcp enable
dhcp server ip-pool 2
gateway-list 192.168.2.1
network 192.168.2.0 mask 255.255.255.0
dns-list 114.114.114.114 8.8.8.8
4,创建互联vlan,将缺省路由指向路由接口地址,路由器设置回程路由
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论