我试图让 DHCP 在这两个设备之间工作。任何提示都会很棒!
开关配置
Switch#show run
Building configuration...
Current configuration : 1596 bytes
!
! Last configuration change at 00:45:35 UTC Mon Mar 1 1993
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
username nick secret 5
no aaa new-model
system mtu routing 1500
!
!
ip dhcp-server 10.1.1.1
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface GigabitEthernet0/3
!
interface GigabitEthernet0/4
!
interface GigabitEthernet0/5
!
interface GigabitEthernet0/6
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
!
interface GigabitEthernet0/10
!
interface GigabitEthernet0/11
!
interface GigabitEthernet0/12
!
interface GigabitEthernet0/13
!
interface GigabitEthernet0/14
!
interface GigabitEthernet0/15
!
interface GigabitEthernet0/16
!
interface GigabitEthernet0/17
!
interface GigabitEthernet0/18
!
interface GigabitEthernet0/19
!
interface GigabitEthernet0/20
!
interface GigabitEthernet0/21
!
interface GigabitEthernet0/22
!
interface GigabitEthernet0/23
!
interface GigabitEthernet0/24
!
interface GigabitEthernet0/25
!
interface GigabitEthernet0/26
!
interface GigabitEthernet0/27
!
interface GigabitEthernet0/28
!
interface Vlan1
ip address 10.1.1.100 255.255.255.0
ip helper-address 10.1.1.1
!
ip default-gateway 10.1.1.1
ip http server
ip http secure-server
!
!
logging esm config
!
!
line con 0
line vty 5 15
!
end
路由器配置
cisco2821#show run
Building configuration...
Current configuration : 1749 bytes
!
! Last configuration change at 18:05:40 AEST Sat May 19 2018 by nick
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cisco2821
!
boot-start-marker
boot-end-marker
!
!
! card type command needed for slot/vwic-slot 0/1
enable secret 5
!
no aaa new-model
!
clock timezone AEST 10 0
no network-clock-participate wic 2
!
dot11 syslog
ip source-route
!
!
ip cef
!
ip dhcp excluded-address 10.1.1.1
ip dhcp excluded-address 10.1.1.1 10.1.1.255
ip dhcp excluded-address 10.1.1.1 10.1.1.100
ip dhcp excluded-address 10.1.1.2
!
ip dhcp pool VLAN50
network 10.1.1.0 255.255.255.0
default-router 10.1.1.1
dns-server 4.4.4.4 8.8.8.8
lease 3 12 15
!
ip dhcp pool lab
network 10.1.2.0 255.255.255.0
default-router 10.1.1.1
dns-server 4.4.4.4 8.8.8.8
lease 3 12 15
!
!
ip domain name nick.com
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
voice-card 0
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO2821 sn FH
username nick password 0
!
redundancy
!
!
controller E1 0/2/0
!
ip ssh version 2
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address dhcp
ip helper-address 192.168.20.1
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 10.1.1.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 10.1.1.1
network 10.1.1.1 0.0.0.0 area 0
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp profile default
!
!
!
!
!
gatekeeper
shutdown
!
!
!
line con 0
line aux 0
line vty 0 4
login local
transport input all
!
scheduler allocate 20000 1000
ntp server 192.168.20.1
end
cisco2821#show ip dhcp 池
Pool VLAN50 :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 0
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
0.0.0.0 10.1.1.1 - 10.1.1.254 0
Pool lab :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 0
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
10.1.2.1 10.1.2.1 - 10.1.2.254 0