<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
3550交换
机上的配置:
vlan database(划分VLAN)
vlan 2
vlan 3
interface FastEthernet0/2(将端口f0/2划分入vlan2)
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/3(将端口f0/3划分入vlan3)
switchport access vlan 3
switchport mode access
no ip address
......
interface Vlan1
ip address 192.168.1.2 255.255.255.0
ip helper-address 192.168.1.1 (将DHCP请求的广播数据包转化为单播请求,路由器才会响应 )
!
interface Vlan2
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.1
路由器2621上的配置 :
ip dhcp pool tyl-01(配置第一个VLAN的地址池)
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1 (配置PC网关 )
dns-server 202.96.134.133(配置DNS服务器)
ip dhcp pool tyl-02(配置第二个VLAN的地址池)
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 202.96.134.133
ip dhcp pool tyl-03(配置第三个VLAN的地址池)
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
dns-server 202.96.134.133
ip route 192.168.2.0 255.255.255.0 192.168.1.2(配置静态路由)
ip route 192.168.3.0 255.255.255.0 192.168.1.2
ip dhcp excluded-address 192.168.1.1 192.168.1.2 (将路由器F0/0和3550 VLAN1的IP 地址排除 )
ip dhcp excluded-address 192.168.2.1 (3550 VLAN1的IP 地址排除 )
ip dhcp excluded-address 192.168.3.1 (3550 VLAN1的IP 地址排除)
vlan database(划分VLAN)
vlan 2
vlan 3
interface FastEthernet0/2(将端口f0/2划分入vlan2)
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/3(将端口f0/3划分入vlan3)
switchport access vlan 3
switchport mode access
no ip address
......
interface Vlan1
ip address 192.168.1.2 255.255.255.0
ip helper-address 192.168.1.1 (将DHCP请求的广播数据包转化为单播请求,路由器才会响应 )
!
interface Vlan2
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.1
路由器2621上的配置 :
ip dhcp pool tyl-01(配置第一个VLAN的地址池)
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1 (配置PC网关 )
dns-server 202.96.134.133(配置DNS服务器)
ip dhcp pool tyl-02(配置第二个VLAN的地址池)
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 202.96.134.133
ip dhcp pool tyl-03(配置第三个VLAN的地址池)
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
dns-server 202.96.134.133
ip route 192.168.2.0 255.255.255.0 192.168.1.2(配置静态路由)
ip route 192.168.3.0 255.255.255.0 192.168.1.2
ip dhcp excluded-address 192.168.1.1 192.168.1.2 (将路由器F0/0和3550 VLAN1的IP 地址排除 )
ip dhcp excluded-address 192.168.2.1 (3550 VLAN1的IP 地址排除 )
ip dhcp excluded-address 192.168.3.1 (3550 VLAN1的IP 地址排除)
解决方案:
一,如果不用交换机的DHCP功能而是利用PC的DHCP功能!
1.在交换机上配置DHCP服务器:
ip dhcp-server 192.168.0.69
2.在交换机中为每个VLAN设置同样的DHCP服务器的IP地址:
interface Vlan11
ip address 192.168.1.254 255.255.255.0
ip helper-address 192.168.0.69 DHCP Server IP
interface Vlan12
ip address 192.168.2.254 255.255.255.0
ip helper-address 192.168.0.69 DHCP Server IP
3.在DHCP服务器上设置网络地址分别为192.168.1.0、192.168.2.0的作用域,并将这些作用域的“路由器“选项设置为对应VLAN的接口IP地址。(不能建立超级作用域当时就是这个原因 耗费好多时间)
转载于:https://blog.51cto.com/dong926/105681