没腿的鸟 发表于 2025-3-30 19:12:16

二层综合实验

 拓扑图

https://i-blog.csdnimg.cn/direct/c13568a2eea24b129447a5ef3323d21b.png
实验要求

1.内网IP地址使用172.16.6.0/16分配
2.sw1和sW2之间互为备份
3.VRRP/STP/VLAN/Eth-trunk均使用
4.所有Pc均通过DHCP获取IP地址
5.ISP只能设置IP地址
6.所有电脑可以正常访问IsP路由器环回 
实验思路

 这是一个二层综合实验每当拿到一个实验看清楚要求之后都有统一的实验步骤
1.IP地址规划

创建 VLAN 2 3 4 5 
vlan2使用172.16.6.32 27 网段  vlan3使用172.16.6.64 27 网段 ----vlan 2 3 给交换机和PC端之间使用
vlan4使用14.14.14.0 24 vlan5使用15.15.15.0 24 ---这一个网段重要是让路由器和交换机通讯使用必须单独出来不能使用vlan 2 3  
LSW1-- ip设置
vlan 5
q
interface Vlanif 5
ip address 15.15.15.1 24
q
in g 0/0/5
po       
port link-type access
port default v 5
https://i-blog.csdnimg.cn/direct/e8634b0dc5be4ffb9b072b4cc5c324d3.png
LSW2--IP设置
https://i-blog.csdnimg.cn/direct/5d92cafa348c4d80a56cf7aad653d925.png 
 R1和R2之间使用12.12.12.0 24 在R2上面创建一个环回1.1.1.0 24
R1---ip设置
https://i-blog.csdnimg.cn/direct/44e6b86aeaa74f199a346084e877b10a.png
 R2---ip设置
https://i-blog.csdnimg.cn/direct/77ae0597466a49a79a0e440a96edada6.png
2.交换机设置
 2.1 创建VLAN同时要不要创建Eth - trunk
 LSW1上面Eth - trunk LSW2同样操纵
displaythis
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 3 ------创建eth-trunk 1 同时设置为trunk
#
return
display this
#
interface GigabitEthernet0/0/3
eth-trunk 1      ---- 将接口0/0/3划入eth-trunk 1 还有接口2不展示了
#
return
2.2 设置端口链路范例及 VLAN 划分
除了交换机与PC 路由器之间是ACCESS接口其他都是TRUNK
展示一个access和trunk接口设置
display this
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 2
#
return
display this
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
3.设置STP
display this
#
stp region-configuration
region-name 1
revision-level 1
instance 1 vlan 2 to 3
active region-configuration
#
return
4.设置看环境要不要设置VRRP
这里展示一个交换机的设置
interface Vlanif 2       
display this
#
interface Vlanif2
ip address 172.16.6.33 255.255.255.224
vrrp vrid 1 virtual-ip 172.16.6.34
vrrp vrid 1 priority 110
dhcp select global
#
5.设置DHCP服务
这里只展示了vlan2的地址池
display this
#
ip pool vlan2
gateway-list 172.16.6.33
network 172.16.6.32 mask 255.255.255.224
#
return
6.设置路由做到全网可达
ip route-static 1.1.1.0 255.255.255.0 15.15.15.2
ip route-static 12.12.12.0 255.255.255.0 15.15.15.2
ip route-static 14.14.14.0 255.255.255.0 15.15.15.2
使用的是静态路由技术 前面写要到达的网段后面为下一跳接口ip
实验效果

 vlan2全网可达

https://i-blog.csdnimg.cn/direct/401032e98fda42fab65a7005bdbd399b.png
vlan3全网可达

https://i-blog.csdnimg.cn/direct/2e64a74a42f0419a8a0ebaf424d8dcc3.png


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 二层综合实验