单臂路由和VTP
1.单臂路由
作用:实现不同vlan之间的通信
工作原理:利用子接口对标签进行识别,利用子接口直连路由进行路由转发
2.单臂路由的配置
配置链路类型
int f0/1
switchport mode access
switchport access vlan 10
int f0/2
swirchport mode access
switchport access vlan 20
int f0/24
switchport mode trunk
配置vlan标签的封装类型并且配置地址
int f0/0.1
encapsulation dot1q 10
ip add 192.168.10.254 255.255.255.0
int f0/0.2
encapsulation dot1q 20
ip add 192.168.20.254 255.255.255.0
3.路由器上配置dhcp服务
service dhcp #开启dhcp服务(全局模式)
ip dhcp pool pool-name #定义地址池名称(全局模式–>自动进入dhcp接口模式)
network network-id mask #宣告要分配的地址段
default-router gataway-ip #配置网关
dns-server dns-ip #指定DNS—ip