我想让 4 台 PC 获得 DHCP IP 地址 左侧没有问题,但右侧 2 台 PC 无法自动获得 IP。我认为问题是DHCP中继。如何将 ip helper-address 用于 R2 的子接口?
s1
interface FastEthernet0/1
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 11
switchport mode access
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
s2
interface FastEthernet0/1
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
interface FastEthernet0/3
switchport access vlan 30
switchport mode access
R1-DHCP
1.建筑配置...
Current configuration : 1593 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
ip dhcp pool Area-1
network 192.168.11.0 255.255.255.0
default-router 192.168.11.1
ip dhcp pool Area-2
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool Area-3
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
ip dhcp pool Area-4
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
ip address 190.168.50.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface GigabitEthernet0/0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/1.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface GigabitEthernet0/0/1.11
encapsulation dot1Q 11
ip address 192.168.11.1 255.255.255.0
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 192.168.20.0
network 192.168.30.0
network 192.168.50.0
no auto-summary
!
ip classless
ip route 192.168.20.0 255.255.255.0 192.168.50.2
ip route 192.168.30.0 255.255.255.0 192.168.50.2
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
R2
Building configuration...
Current configuration : 1151 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
ip address 192.168.50.2 255.255.255.0
ip helper-address 192.168.50.1
duplex auto
speed auto
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/1.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
ip helper-address 192.168.50.1
!
interface GigabitEthernet0/0/1.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
ip helper-address 192.168.50.1
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 192.168.10.0
network 192.168.11.0
network 192.168.50.0
no auto-summary
!
ip classless
ip route 192.168.10.0 255.255.255.0 192.168.50.1
ip route 192.168.11.0 255.255.255.0 192.168.50.1
!
ip flow-export version 9