其他的不说了,给出配置文档
1.交换机SW1做服务器
!
en
conf t
host Server
vlan 10
vlan 20
exit
int vlan 20
ip address 10.1.1.1 255.255.255.0
exit
int f0/24
switchport mode trunk
ip dhcp pool vlan10
network 192.168.1.0 255.255.255.0
default-route 192.168.1.254
lease 1
exit
ip dhcp excluded-address 192.168.1.254
end
!
2.交换机SW2做DHCP中继配置:
!
en
conf t
host Relay
vlan 10
vlan 20
exit
int vlan 20
ip address 10.1.1.2 255.255.255.0
exit
int vlan 10
ip address 192.168.1.254 255.255.255.0
ip helper-address 10.1.1.1
exit
int f0/24
switchport mode trunk
exit
int f0/1
switchport mode access
switchport access vlan 10
service dhcp
ip dhcp relay information option
end
!
3.拓扑:SW1的F0/24(TRUNK)-----SW2的F0/24(TRUNK)|SW2的F0/1(VLAN 10)-----PC
4.提出的问题:
配置后PC机没办法自动获取IP地址,配置是不是有错?错在那儿?