单臂路由概述
1. 链路类型
- 交换机连接主机的端口是access
- 交换机连接路由器的额端口是trunk
2. 子接口
- 路由器的物理接口可以被划分成多个逻辑接口
- 每一个子接口对应一个VLAN网段的网关
3. 配置
3.1 端口配置
sw(config)# int f0/1
sw(config-if)# sw acc vlan 10
sw(config)# int f0/2
sw(config-if)# sw acc vlan 20
sw(config)# int f0/3
sw(config-if)# sw mode trunk
3.2 子端口配置
int fa0/0.1
(config-subif)# encapulation dot1Q 10 //写封装协议
(config-subif)# 192.168.1.254 255.255.255.0
int fa0/0
no sh
3.3 DHCP服务配置
route(config)# ip dhcp pool zoe
route(dhcp-config)# network @网段 @子网
route(dhcp-config)# defaut-router @默认网关
route(dhcp-config)# dns-server @dns服务器地址
#全局配置去设置保留IP地址#
route(config)# ip dhcp excluded-address @ip-@ip