dhcp 客户端未使用两个交换机接收 IP 地址

网络工程 转变 交换 交换机端口 切换模式
2022-02-28 02:08:10

在此处输入图像描述

1) 在路由器 4(R4) 中

我已经配置了 2 个 dhcp 池。第一个 dhcp 池的 IP 地址为 150.10.10.0/24,第二个 dhcp 池在子接口 f0/0.1 和 f0/0.2 中使用 150.20.10.1/24,并在两个不同的 VLAN 10 和 20 中使用 (R4(config)#encapsulation dot1q 10) 进行封装

2) 在开关 1 中:

我有e0和e3的后备箱

3) 在开关 2 中:

我创建了 2 个 vlan(vlan 10 和 20)我在 vlan 10 中保留了 int e0 和 e1,e2 保留在 vlan 20 中,e3 是中继

所以我的问题是:

1> 如何从我的第一台 dhcp 服务器获取 R3 和 R2 ip 地址

2> 如何从我的第二个 dhcp 服务器获取 R1 ip 地址

但我没有收到任何客户的 IP 地址

R4配置:

upgrade fpd auto
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
ip dhcp excluded-address 150.10.10.1
ip dhcp excluded-address 150.20.10.1
!
ip dhcp pool SERVER1
 network 150.10.10.0 255.255.255.0
 default-router 150.10.10.1 
!         
ip dhcp pool SERVER2
 network 150.20.10.0 255.255.255.0
 default-router 150.20.10.1 
!         
!         
!         
no ip domain lookup
ip cef    
no ipv6 cef
!         
multilink bundle-name authenticated
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
redundancy
!         
!         
ip tcp synwait-time 5
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
interface FastEthernet0/0
 no ip address
 duplex half
!         
interface FastEthernet0/0.1
 encapsulation dot1Q 10
 ip address 150.10.10.1 255.255.255.0
!         
interface FastEthernet0/0.2
 encapsulation dot1Q 20
 ip address 150.20.10.1 255.255.255.0
!         
interface FastEthernet1/0
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet1/1
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet2/0
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet2/1
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet3/0
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet3/1
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet4/0
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
interface FastEthernet4/1
 no ip address
 shutdown 
 duplex auto
 speed auto
!         
ip forward-protocol nd
no ip http server
no ip http secure-server
!         
!         
!         
no cdp log mismatch duplex
!         
!         
!         
control-plane
!         
!         
!         
mgcp profile default
!         
!         
!         
gatekeeper
 shutdown 
!         
!         
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login    
 transport input all
!         
!         
end

开关 1 配置:

  Using 1952 out of 262144 bytes, uncompressed size = 5025 bytes
!
! Last configuration change at 13:55:41 UTC Tue Sep 3 2019
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname ESW1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
!
!
vtp domain CISCO-vIOS
vtp mode transparent
!         
!         
!         
ip cef    
no ipv6 cef
!         
!         
spanning-tree mode pvst
spanning-tree extend system-id
!         
vlan internal allocation policy ascending
!         
vlan 10  
 name VLAN100
!         
vlan 10,20
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
interface Ethernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
!         
interface Ethernet0/1
 media-type rj45
 negotiation auto
!         
interface Ethernet0/2
 media-type rj45
 negotiation auto
!         
interface Ethernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
!         
ip forward-protocol nd
!         
no ip http server
no ip http secure-server
!         
!         
!         
!         
!         
!         
control-plane
!         
banner exec ^C
**************************************************************************
* IOSv - Cisco Systems Confidential                                      *
*                                                                        *
* This software is provided as is without warranty for internal          *
* development and testing purposes only under the terms of the Cisco     *
* Early Field Trial agreement.  Under no circumstances may this software *
* be used for production purposes or deployed in a production            *
* environment.                                                           *
*                                                                        *
* By using the software, you agree to abide by the terms and conditions  *
* of the Cisco Early Field Trial Agreement as well as the terms and      *
* conditions of the Cisco End User License Agreement at                  *
* http://www.cisco.com/go/eula                                           *
*                                                                        *
* Unauthorized use or distribution of this software is expressly         *
* Prohibited.                                                            *
**************************************************************************^C
banner incoming ^C
**************************************************************************
* IOSv - Cisco Systems Confidential                                      *
*                                                                        *
* This software is provided as is without warranty for internal          *
* development and testing purposes only under the terms of the Cisco     *
* Early Field Trial agreement.  Under no circumstances may this software *
* be used for production purposes or deployed in a production            *
* environment.                                                           *
*                                                                        *
* By using the software, you agree to abide by the terms and conditions  *
* of the Cisco Early Field Trial Agreement as well as the terms and      *
* conditions of the Cisco End User License Agreement at                  *
* http://www.cisco.com/go/eula                                           *
*                                                                        *
* Unauthorized use or distribution of this software is expressly         *
* Prohibited.                                                            *
**************************************************************************^C
banner login ^C
**************************************************************************
* IOSv - Cisco Systems Confidential                                      *
*                                                                        *
* This software is provided as is without warranty for internal          *
* development and testing purposes only under the terms of the Cisco     *
* Early Field Trial agreement.  Under no circumstances may this software *
* be used for production purposes or deployed in a production            *
* environment.                                                           *
*                                                                        *
* By using the software, you agree to abide by the terms and conditions  *
* of the Cisco Early Field Trial Agreement as well as the terms and      *
* conditions of the Cisco End User License Agreement at                  *
* http://www.cisco.com/go/eula                                           *
*                                                                        *
* Unauthorized use or distribution of this software is expressly         *
* Prohibited.                                                            *
**************************************************************************^C
!         
line con 0
 logging synchronous
line aux 0
line vty 0 4
 logging synchronous
 login    
line vty 5 15
 logging synchronous
 login    
!         
!         
end 

开关 2 配置:

Using 1956 out of 262144 bytes, uncompressed size = 5048 bytes
!
! Last configuration change at 14:20:30 UTC Tue Sep 3 2019
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname ESW2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
!
!
vtp domain CISCO-vIOS
vtp mode transparent
!         
!         
!         
ip cef    
no ipv6 cef
!         
!         
spanning-tree mode pvst
spanning-tree extend system-id
!         
vlan internal allocation policy ascending
!         
vlan 10  
 name VLAN10
!         
vlan 10,20 
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
!         
interface Ethernet0/0
 switchport access vlan 10
 media-type rj45
 negotiation auto
!         
interface Ethernet0/1
 switchport access vlan 10
 media-type rj45
 negotiation auto
!         
interface Ethernet0/2
 switchport access vlan 20
 media-type rj45
 negotiation auto
!         
interface Ethernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
!         
ip forward-protocol nd
!         
no ip http server
no ip http secure-server
!         
!         
!         
!         
!         
!         
control-plane
!         
banner exec ^C
**************************************************************************
* IOSv - Cisco Systems Confidential                                      *
*                                                                        *
* This software is provided as is without warranty for internal          *
* development and testing purposes only under the terms of the Cisco     *
* Early Field Trial agreement.  Under no circumstances may this software *
* be used for production purposes or deployed in a production            *
* environment.                                                           *
*                                                                        *
* By using the software, you agree to abide by the terms and conditions  *
* of the Cisco Early Field Trial Agreement as well as the terms and      *
* conditions of the Cisco End User License Agreement at                  *
* http://www.cisco.com/go/eula                                           *
*                                                                        *
* Unauthorized use or distribution of this software is expressly         *
* Prohibited.                                                            *
**************************************************************************^C
banner incoming ^C
**************************************************************************
* IOSv - Cisco Systems Confidential                                      *
*                                                                        *
* This software is provided as is without warranty for internal          *
* development and testing purposes only under the terms of the Cisco     *
* Early Field Trial agreement.  Under no circumstances may this software *
* be used for production purposes or deployed in a production            *
* environment.                                                           *
*                                                                        *
* By using the software, you agree to abide by the terms and conditions  *
* of the Cisco Early Field Trial Agreement as well as the terms and      *
* conditions of the Cisco End User License Agreement at                  *
* http://www.cisco.com/go/eula                                           *
*                                                                        *
* Unauthorized use or distribution of this software is expressly         *
* Prohibited.                                                            *
**************************************************************************^C
banner login ^C
**************************************************************************
* IOSv - Cisco Systems Confidential                                      *
*                                                                        *
* This software is provided as is without warranty for internal          *
* development and testing purposes only under the terms of the Cisco     *
* Early Field Trial agreement.  Under no circumstances may this software *
* be used for production purposes or deployed in a production            *
* environment.                                                           *
*                                                                        *
* By using the software, you agree to abide by the terms and conditions  *
* of the Cisco Early Field Trial Agreement as well as the terms and      *
* conditions of the Cisco End User License Agreement at                  *
* http://www.cisco.com/go/eula                                           *
*                                                                        *
* Unauthorized use or distribution of this software is expressly         *
* Prohibited.                                                            *
**************************************************************************^C
!         
line con 0
 logging synchronous
line aux 0
line vty 0 4
 logging synchronous
 login    
line vty 5 15
 logging synchronous
 login    
!         
!         
end
1个回答

在交换机 2 上,客户端端口位于 VLAN 100 和 200(不是 10 和 20)上。

编辑包括 Marc Luethi 的评论:

在 ESW2 上,连接 R1、R2、R3 的交换机端口没有生成树端口快速。这将使这些交换机端口在获得“线路协议启动”后至少 30 秒内处于 LIS/LRN 生成树状态。这可能足以让任何 DHCP 客户端超时并放弃