1、先对PC1,PC2采用DHCP获取地址
PC1:
int f0/0
no shutdown
ip address dhcp
PC2:
int f0/0
no shutdown
ip address dhcp
2、在AS1的f0/1–VLAN10,f0/20–VLAN20,划分对应的VLAN区域
AS1:
int f0/1
switchport mode access
switchport access vlan 10
int f0/2
switchport mode access
swichport access vlan 20
3、对DS1的f0/1,AS的f0/0配置trunk技术
DS1:
int f0/1
switchport trunk encapsulation dot1q
switchport mode trunk
AS1:
int f0/0
switchport trunk encapsulation dot1q
switchport mode trunk
4、对DS1,AS1部署VTP技术
DS1:
vlan database
vtp server
vtp domain pl
vtp password ccie
AS1:
vlan database
vtp client
vtp domain pl
vtp password ccie
DS1:
vlan database
vlan 10
vlan 20
exit
验证:AS1:show vlan-switch brief
AS1学到vlan 10,vlan 20
5、对CS1,DS1的e0/1,e0/0设置地址
CS1:
int e0/0
no shutdown
ip address 172.16.24.1 255.255.255.0
DS1:
int e1/0
no shutdown
ip address 172.16.24.2 255.255.255.0
验证:确保CS1,DS1互相ping通
6、对DS1设置网关—vlan 10 ,vlan 20
DS1:
int vlan 10
no shutdown
ip address 192.168.10.254 255.255.255.0
ip helper-address 172.16.24.1 //指向CS1的e0/0-->dhcp relay
int vlan 20
no shutdown
ip address 192.168.20.254 255.255.255.0
ip helper-address 172.16.24.1 //指向CS1的e0/0-->dhcp relay
7、对CS1,DS1部署OSPF
CS1:
router ospf 100
router-id 1.1.1.1
network 0.0.0.0 0.0.0.0 area 0//此处是通告全网,仅在实验中使用,现实中,需要区分内外网的情况而定来通告
DS1:
router ospf 100
router-id 2.2.2.2
network 0.0.0.0 0.0.0.0 area 0//此处是通告全网,仅在实验中使用,现实中,需要区分内外网的情况而定来通告
8、对CS1部署地址池
CS1:
ip dhcp pool VLAN 10
network 192.168.10.0 /24
default-router 192.168.10.254 //可写成 冗余实验 的虚拟地址
ip dhcp pool VLAN 20
network 192.168.20.0 /24
default-router 192.168.20.254 //可写成 冗余实验 的虚拟地址
ip dhcp excluded-address 192.168.10.254//排除其它地址
ip dhcp excluded-address 192.168.20.254//排除其它地址
验证:PC1,CP2是否学到地址
上述所述的 冗余实验----->参考网关冗余实验 地址如下:
https://blog.youkuaiyun.com/pointer_NULL/article/details/123430415
注意:
初学网络,如有错误,感谢来访。
上述实验,亲身实践,效果已经实现。