当前位置: 首页 > news >正文

综合实验配置

这上面是老师网络拓扑图,下面是我的

首先我们先要吧三个主机配置上静态IP,虽然这个实验需要配置DHCP,配置静态IP方便我们检查配置过程中的错误,在配置过程中可以吧不用的端口down掉,方便观看拓扑

第一步 配置vlan

现在可以吧LSW3的,002,003,005,006都down掉,其他的交换机也一样,down掉没用的

LSW1

interface Ethernet0/0/1
 port link-type access
 port default vlan 10

interface Ethernet0/0/2
 port link-type access
 port default vlan 20

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30

LSW3(这里把链路聚合一起配了)

vlan batch 10 20 30

interface Vlanif10
 ip address 10.0.10.254 255.255.255.0

interface Vlanif20
 ip address 10.0.20.254 255.255.255.0

interface Vlanif30
 ip address 10.0.30.254 255.255.255.0

interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30
 mode lacp-static

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30

LSW2

vlan batch 10 20 30


interface Ethernet0/0/1
 port link-type access
 port default vlan 10


interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20 30

LSW4

vlan batch 10 20 30

interface Vlanif10
 ip address 10.0.10.254 255.255.255.0

interface Vlanif20
 ip address 10.0.20.254 255.255.255.0

interface Vlanif30
 ip address 10.0.30.254 255.255.255.0


interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30
 mode lacp-static


interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20 30

第二步配置链路聚合

(上面已经配完了)

第三步配置STP

LSW4

stp mode stp
stp priority 4096

LSW1

stp mode stp

LSW2

stp mode stp

LSW3

stp mode stp
stp priority 0

第四步配置DHCP

LSW3

dhcp enable

interface Vlanif10
 dhcp select interface

interface Vlanif20
 dhcp select interface

第五步配置服务

LSW3

interface GigabitEthernet0/0/6
 port link-type trunk
 port trunk allow-pass vlan 10 20 30

LSW6

vlan batch 10 20 30

interface Ethernet0/0/1
 port link-type access
 port default vlan 30

interface Ethernet0/0/2
 port link-type access
 port default vlan 30

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20 30

第六步配置OSPF

AR1

interface Serial1/0/0
 link-protocol ppp
 ip address 100.0.12.1 255.255.255.252 

interface GigabitEthernet0/0/0
 ip address 100.0.1.2 255.255.255.252 

interface GigabitEthernet0/0/1
 ip address 100.0.1.6 255.255.255.252 

interface GigabitEthernet2/0/0
 ip address 100.0.23.1 255.255.255.252 

ospf 1 
 area 0.0.0.0 
  network 100.0.1.0 0.0.0.3 
  network 100.0.1.4 0.0.0.3 
  network 100.0.12.0 0.0.0.3 
  network 100.0.23.0 0.0.0.3 

AR2

interface Serial2/0/0
 link-protocol ppp
 ip address 100.0.12.2 255.255.255.252 

interface GigabitEthernet0/0/0
 ip address 100.0.24.1 255.255.255.252

ospf 1 
 area 0.0.0.0 
  network 100.0.12.0 0.0.0.3 
  network 100.0.24.0 0.0.0.3 

AR3

interface GigabitEthernet0/0/0
 ip address 100.0.23.2 255.255.255.252 

interface GigabitEthernet0/0/1
 ip address 100.0.34.1 255.255.255.252 


ospf 1 
 area 0.0.0.0 
  network 100.0.23.0 0.0.0.3 
  network 100.0.34.0 0.0.0.3 

AR4

interface GigabitEthernet0/0/0
 ip address 100.0.34.2 255.255.255.252 

interface GigabitEthernet0/0/1
 ip address 100.0.24.2 255.255.255.252 

interface GigabitEthernet2/0/0
 ip address 192.168.1.1 255.255.255.0 

interface GigabitEthernet2/0/1
 ip address 192.168.2.1 255.255.255.0 

ospf 1 
 area 0.0.0.0 
  network 100.0.24.0 0.0.0.3 
  network 100.0.34.0 0.0.0.3 
  network 192.168.1.0 0.0.0.255 
  network 192.168.2.0 0.0.0.255 

第七步配置三层交换机和路由器相连

LSW4

interface Vlanif1
 ip address 100.0.1.5 255.255.255.252

ip route-static 0.0.0.0 0.0.0.0 100.0.1.6

LSW3

interface Vlanif1
 ip address 100.0.1.1 255.255.255.252

ip route-static 0.0.0.0 0.0.0.0 100.0.1.2

http://www.dtcms.com/a/86169.html

相关文章:

  • 开源链动2+1模式、AI智能名片与S2B2C商城小程序源码在社交电商渠道拓宽中的协同应用研究
  • Linux 账号和权限管理命令选项解释
  • 深度学习——图像相似度评价指标
  • busybox的终端图形化界面菜单
  • 电缆接地电流监测系统,为电力稳定运行保驾护航
  • Linux进程间通信
  • 《Java到Go的平滑转型指南》
  • HTML CSS JS官方文档
  • Camera2 实现重力感应四个方向调试相机预览
  • [学习笔记] VM虚拟机安装Ubuntu系统
  • SpringMVC_day02
  • 【清华大学】AIGC发展研究(3.0版)
  • ROS导航工具包Navigation
  • Scikit-learn模型评估全流程解析:从数据划分到交叉验证优化
  • Java-模块二-2
  • 【MySQL】从零开始:掌握MySQL数据库的核心概念(三)
  • 音视频学习(三十):fmp4
  • 深入浅出JVM性能优化:从理论到实践
  • string kmp java
  • 高频SQL50题 第四天 | 1251. 平均售价、620. 有趣的电影、1075. 项目员工 I、1633. 各赛事的用户注册率
  • Ubuntu修改Swap交换空间大小
  • 2.创建Collection、添加索引、加载内存、预览和搜索数据
  • 【动态规划】按摩师
  • 蓝桥杯嵌入式备赛记录—CubeMX配置
  • 传统行业的思维惯性之困:评论列表
  • Linux系统中Crontab的用法详解
  • 深入理解 JVM 的垃圾收集器:CMS、G1、ZGC
  • 二叉树的学习
  • Altium Designer数模电学习笔记
  • 2025-03-23 吴恩达机器学习3——多维特征