我需要帮助。我不知道我做错了什么,因为我已经配置了 dhcp 池、子接口和 dhcp 中继代理。网关 pc 使用静态 IP 地址,而分支 pc 通过作为网关路由器的 dhcp 服务器获取其 IP 地址。现在唯一的问题是 Branch 端的 pc 没有获取 ip 地址。
--网关路由器--
ip dhcp 排除地址 192.168.1.0 192.168.1.5 ip dhcp 排除地址 202.188.1.0 202.188.1.5 ip dhcp 排除地址 172.16.1.0 172.16.1.5 ! ip dhcp 池管理员 网络 192.168.1.0 255.255.255.0 默认路由器 192.168.1.1 ip dhcp 池 STAFF 网络 202.188.1.0 255.255.255.0 默认路由器 202.188.1.1 ip dhcp 池 GUEST 网络 172.16.1.0 255.255.255.0 默认路由器 172.16.1.1 ! ! ! 没有ip cef 没有ipv6 cef ! ! ! ! ! ! ! ! ! ! ! ! 生成树模式 pvst ! ! ! ! ! ! 接口千兆以太网0/0/0 没有IP地址 双面自动 速度自动 ! 接口 GigabitEthernet0/0/0.10 封装dot1Q 10 ip地址192.168.1.1 255.255.255.0 ! 接口 GigabitEthernet0/0/0.20 封装dot1Q 20 ip地址202.188.1.1 255.255.255.0 ! 接口千兆以太网0/0/0.30 封装dot1Q 30 ip地址172.16.1.1 255.255.255.0 ! 接口 GigabitEthernet0/0/1 没有IP地址 双面自动 速度自动 关闭 ! 接口 GigabitEthernet0/0/2 没有IP地址 双面自动 速度自动 关闭 ! 接口 Serial0/1/0 ip地址10.0.0.1 255.255.255.252 时钟频率 128000 ! 接口 Serial0/1/1 没有IP地址 时钟频率 2000000 关闭 ! 接口 Vlan1 没有IP地址 关闭 ! 路由器 ospf 1 路由器 ID 1.1.1.1 日志邻接变化 网络 10.0.0.0 0.0.0.3 区域 0 网络 192.168.1.0 0.0.0.255 区域 0 网络 202.188.1.0 0.0.0.255 区域 0 网络 172.16.1.0 0.0.0.255 区域 0 ! ip 无类 !
--GWSwitch--
生成树模式 pvst 生成树扩展系统 ID ! 接口 FastEthernet0/1 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/2 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/3 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/4 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/5 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/6 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/7 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/8 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/9 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/10 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/11 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/12 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/13 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/14 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/15 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/16 ! 接口 FastEthernet0/17 ! 接口 FastEthernet0/18 ! 接口 FastEthernet0/19 ! 接口 FastEthernet0/20 ! 接口 FastEthernet0/21 ! 接口 FastEthernet0/22 ! 接口 FastEthernet0/23 ! 接口 FastEthernet0/24 ! 接口 GigabitEthernet0/1 交换机端口中继本机 vlan 99 交换端口模式中继 ! 接口 GigabitEthernet0/2 ! 接口 Vlan1 没有IP地址 关闭 ! ! ! ! 线路连接 0 ! 线 vty 0 4 登录 线 vty 5 15 登录 ! ! ! ! 结尾
--分支路由器--
ip dhcp 排除地址 192.168.1.0 192.168.1.5 ip dhcp 排除地址 202.188.1.0 202.188.1.5 ip dhcp 排除地址 172.16.1.0 172.16.1.5 ! ip dhcp 池管理员 ! ! ! 没有ip cef 没有ipv6 cef ! ! ! ! ! ! ! ! ! ! ! ! 生成树模式 pvst ! ! ! ! ! ! 接口千兆以太网0/0/0 没有IP地址 双面自动 速度自动 ! 接口 GigabitEthernet0/0/0.10 封装dot1Q 10 ip地址192.168.1.2 255.255.255.0 ip 助手地址 10.0.0.1 ! 接口 GigabitEthernet0/0/0.20 封装dot1Q 20 ip地址202.188.1.2 255.255.255.0 ip 助手地址 10.0.0.1 ! 接口千兆以太网0/0/0.30 封装dot1Q 30 ip地址172.16.1.2 255.255.255.0 ip 助手地址 10.0.0.1 ! 接口 GigabitEthernet0/0/1 没有IP地址 双面自动 速度自动 关闭 ! 接口 GigabitEthernet0/0/2 没有IP地址 双面自动 速度自动 关闭 ! 接口 Serial0/1/0 ip地址 10.0.0.2 255.255.255.252 ! 接口 Serial0/1/1 没有IP地址 时钟频率 2000000 关闭 ! 接口 Vlan1 没有IP地址 关闭 ! 路由器 ospf 1 路由器 ID 2.2.2.2 日志邻接变化 网络 10.0.0.0 0.0.0.3 区域 0 网络 192.168.1.0 0.0.0.255 区域 0 网络 202.188.1.0 0.0.0.255 区域 0 网络 172.16.1.0 0.0.0.255 区域 0 !
--BSwitch--
接口 FastEthernet0/1 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/2 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/3 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/4 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/5 交换机端口访问 vlan 10 交换端口模式访问 ! 接口 FastEthernet0/6 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/7 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/8 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/9 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/10 交换机端口访问 VLAN 20 交换端口模式访问 ! 接口 FastEthernet0/11 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/12 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/13 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/14 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/15 交换机端口访问 vlan 30 交换端口模式访问 ! 接口 FastEthernet0/16 ! 接口 FastEthernet0/17 ! 接口 FastEthernet0/18 ! 接口 FastEthernet0/19 ! 接口 FastEthernet0/20 ! 接口 FastEthernet0/21 ! 接口 FastEthernet0/22 ! 接口 FastEthernet0/23 ! 接口 FastEthernet0/24 ! 接口 GigabitEthernet0/1 交换端口模式中继 ! 接口 GigabitEthernet0/2 !
