hyperv 发表于 2013-3-7 11:19:38

单臂路由和DHCP集成实验

网络拓扑图:

路由器配置:
Current configuration : 1351 bytes   
!   
version 12.2   
no service timestamps log datetime msec   
no service timestamps debug datetime msec   
no service password-encryption   
!   
hostname Router   
!   
ip dhcp excluded-address 192.168.20.1   
ip dhcp excluded-address 192.168.20.2   
ip dhcp excluded-address 192.168.20.4   
ip dhcp excluded-address 192.168.20.3   
ip dhcp excluded-address 192.168.30.1   
ip dhcp excluded-address 192.168.30.2   
ip dhcp excluded-address 192.168.30.3   
ip dhcp excluded-address 192.168.30.4   
!   
ip dhcp pool vlan20   
network 192.168.20.0 255.255.255.0   
default-router 192.168.20.1   
dns-server 202.96.134.133   
ip dhcp pool vlan30   
network 192.168.30.0 255.255.255.0   
default-router 192.168.30.1   
dns-server 202.96.134.133   
!   
interface FastEthernet0/0   
no ip address   
duplex auto   
speed auto   
!   
interface FastEthernet0/0.1   
encapsulation dot1Q 20   
ip address 192.168.30.1 255.255.255.0   
!   
interface FastEthernet0/0.2   
encapsulation dot1Q 30   
ip address 192.168.20.1 255.255.255.0   
!   
interface FastEthernet1/0   
no ip address   
duplex auto   
speed auto   
shutdown   
!   
interface Serial2/0   
no ip address   
clock rate 2000000   
shutdown   
!   
interface Serial3/0   
no ip address   
clock rate 2000000   
shutdown   
!   
interface FastEthernet4/0   
no ip address   
shutdown   
!   
interface FastEthernet5/0   
no ip address   
shutdown   
!   
ip classless   
!   
line con 0   
line vty 0 4   
login   
!   
end   
交换机配置:   
Current configuration : 1260 bytes   
!   
version 12.2   
no service timestamps log datetime msec   
no service timestamps debug datetime msec   
no service password-encryption   
!   
hostname Switch   
!   
!   
spanning-tree mode pvst   
!   
interface FastEthernet0/1   
switchport mode trunk   
!   
interface FastEthernet0/2   
switchport access vlan 20   
switchport mode access   
!   
interface FastEthernet0/3   
switchport access vlan 20   
switchport mode access   
!   
interface FastEthernet0/4   
switchport access vlan 30   
switchport mode access   
!   
interface FastEthernet0/5   
switchport access vlan 30   
switchport mode access   
!   
line con 0   
!   
line vty 0 4   
login   
line vty 5 15   
login   
!   
end   
实现效果:PC0,PC1自动从路由器获得VLAN 30网段的IP地址;PC2,PC3自动从路由器获得VLAN 20网段的IP地址。




TOUVE 发表于 2013-3-18 20:29:21

看帖回帖是美德!:lol

fdhfgh 发表于 2013-5-17 08:06:21

不知该说些什么。。。。。。就是谢谢

帝王 发表于 2013-5-19 17:37:36

怀揣两块,胸怀500万!

iyth888 发表于 2013-5-22 18:00:09

路过,学习下

jjfjjj 发表于 2013-5-26 23:27:09

男人偷腥时的智商仅次于爱因斯坦!

asfsd 发表于 2013-5-31 15:19:48

相当不错,感谢无私分享精神!
页: [1]
查看完整版本: 单臂路由和DHCP集成实验