实验要求:让PC获取地址,拓扑图如下:
1、对DS1,DS2,AS部署trunk
DS1:
int range f0/1 , f0/2 , f0/3
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20,1002-1005
switchport mode trunk
DS2:
int range f0/1 , f0/2 , f0/3
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20,1002-1005
switchport mode trunk
AS:
int range f0/0 , f0/1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20,1002-1005
switchport mode trunk
2、对DS1,DS2的直连,进行捆绑技术
DS1:
int range f0/1 , f0/2
channel-group 1 modce on
DS2:
int range f0/1 , f0/2
channel-group 1 modce on
3、在DS1,DS2,AS部署vtp&vlan划分
DS1:
vlan database
Vtp domain pl
Vtp password ccie
Vtp server
Exit
DS2:
vlan database
Vtp domain pl
Vtp password ccie
Vtp server
Exit
AS:
vlan database
Vtp domain pl
Vtp password ccie
Vtp client
Exit
DS1:
Vlan database
Vlan 10
Vlan 20
exit
AS:
int f0/2
switchport mode access
switchport access vlan 10
int f0/3
switchport mode access
switchport access vlan 20
验证:AS:sh vlan-switch brief
查看AS是否学到vlan 10,vlan 20
4、对DS1,DS2,CS1直连配置地址并ping通,对DS1,DS2部署DHCP中继指向CS1
DS1:
int f0/0
no switchport
ip address 172.16.23.3 255.255.255.0
DS2:
int f0/0
no switchport
ip address 172.16.24.4 255.255.255.0
CS1:
int f0/1
no switchport
ip address 172.16.23.2 255.255.255.0
int f0/2
no switchport
ip address 172.16.24.2 255.255.255.0
5、在CS1部署DHCP池
CS1:
ip dhcp pool VLAN10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.253
dns-server 8.8.8.8 114.114.114.114
ip dhcp pool VLAN20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.252
dns-server 8.8.8.8 114.114.114.114
6、对DS1或DS2设置网关
DS1/DS2:
interface Vlan10
ip address 192.168.10.253 255.255.255.0
ip helper-address 172.16.23.2
interface Vlan20
ip address 192.168.20.252 255.255.255.0
ip helper-address 172.16.23.2
7、部署OPSF
CS1:
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
DS1:
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
DS2:
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
8、在PC设置DHCP地址
PC1、PC2:
Int f0/0
No sh
Ip add dhcp
验证:PC是否自动获取IP,是否能ping通CS1的loopback(8.8.8.8/32)
注意:如有错误,感谢大佬指教!!!
上述实验,亲身实践,效果已经实现。