当前位置:网站首页>DHCP&OSPF combined experimental demonstration (Huawei routing and switching equipment configuration)
DHCP&OSPF combined experimental demonstration (Huawei routing and switching equipment configuration)
2022-08-04 18:01:00 【51CTO】
一、背景介绍
该实验通过DHCP与OSPFThe combination simulates small and medium-sized network deployment environments.
二、The purpose of small and medium network experiments
PC1和PC2实现IPDynamic management of addresses;
Can and egress routerRouter连通.
三、实验拓扑
四、实验配置
(1)PC1,PC2选择为DHCP自动获取.
(2)DHCP配置——接入交换机acsw配置
<Huawei>sys
#进入系统视图
[Huawei]sysname acsw
#修改交换机名称为acsw
[acsw]vlan batch 10 20
#创建vlan10和20
[acsw]un in en
#关闭日志提示
[acsw]interface g0/0/1
#进入接口
[acsw-GigabitEthernet0/0/1]port link-type access
#接口配成access模式
[acsw-GigabitEthernet0/0/1]port default vlan 10
#配置接口VLAN 10
[acsw-GigabitEthernet0/0/1]int g0/0/2
[acsw-GigabitEthernet0/0/2]port link-type access
[acsw-GigabitEthernet0/0/2]port default vlan 20
[acsw-GigabitEthernet0/0/2]q
[acsw]int g0/0/3
[acsw-GigabitEthernet0/0/3]port link-type trunk
#接口配成trunk模式
[acsw-GigabitEthernet0/0/3]port trunk allow-pass vlan all
#允许所有vlan通过
[acsw-GigabitEthernet0/0/3]q
#退出
(3)DHCP——核心交换机coresw配置
<Huawei>system-view
[Huawei]sysname coresw
[coresw]un in en
[coresw]vlan batch 10 20 30
[coresw]interface g0/0/3
[coresw-GigabitEthernet0/0/3]port link-type trunk
[coresw-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[coresw-GigabitEthernet0/0/3]q
[coresw]int Vlanif 10
[coresw-Vlanif10]ip add 192.168.10.254 24
#配置vlan10的网关
[coresw-Vlanif10]int Vlanif 20
[coresw-Vlanif20]ip add 192.168.20.254 24
#配置vlan20的网关
[coresw-Vlanif20]q
[coresw]dhcp enable
#开启DHCP功能
[coresw]ip pool vlan10
#创建地址池名字是vlan10
[coresw-ip-pool-vlan10]network 192.168.10.0 mask 24
#地址池下发网段
[coresw-ip-pool-vlan10]gateway-list 192.168.10.254
#地址池下发网关
[coresw-ip-pool-vlan10]dns-list 8.8.8.8
#地址池下发dns地址
[coresw-ip-pool-vlan10]excluded-ip-address 192.168.10.2 192.168.10.253
#地址不下发范围
[coresw-ip-pool-vlan10]lease day 3
#租期为3天
[coresw-ip-pool-vlan10]q
[coresw]int Vlanif 10
[coresw-Vlanif10]dhcp select global
[coresw]ip pool vlan20
[coresw-ip-pool-vlan20]network 192.168.20.0 mask 24
[coresw-ip-pool-vlan20]gateway-list 192.168.20.254
[coresw-ip-pool-vlan20]dns-list 114.114.114.114
[coresw-ip-pool-vlan20]excluded-ip-address 192.168.20.2 192.168.20.253
[coresw-ip-pool-vlan20]lease day 5
[coresw-ip-pool-vlan20]q
[coresw]int Vlanif 20
[coresw-Vlanif20]dhcp select global
[coresw-Vlanif20]q
#DHCP功能配置完成,下面开始配置OSFP
[coresw]ospf 1
#配置OSPF
[coresw-ospf-1]area 0
#Configured as a region0
[coresw-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
#宣告网段
[coresw-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
#宣告网段
[coresw-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
#宣告网段
(4)出口路由器Router配置
<Huawei>sy
[Huawei]sy Router
[Router]un in en
[Router]int g0/0/1
[Router-GigabitEthernet0/0/1]ip add 192.168.30.3 24
[Router]ospf 1
[Router-ospf-1]area 0
[Router-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
[Router-ospf-1-area-0.0.0.0]q
[Router-ospf-1]q
(5)验证实验
[Router]dis ospf peer brief
#查看邻居,状态已经是Full
用PC1和PC2 ping 出口路由器Router,可以ping,实验成功.
边栏推荐
猜你喜欢
Matlab drawing 1
Flink / Scala - 使用 RedisSink 存储数据
报道称任天堂在2023年3月前不会推出任何新硬件产品
Kotlin挂起函数原理是什么
Cholesterol-PEG-Maleimide,CLS-PEG-MAL,胆固醇-聚乙二醇-马来酰亚胺一种修饰性PEG
《机器学习理论到应用》电子书免费下载
Documentary on Security Reinforcement of Network Range Monitoring System (1)—SSL/TLS Encrypted Transmission of Log Data
About the two architectures of ETL (ETL architecture and ELT architecture)
mysqlbinlog 超过500g自动删除,保留7个,求大深给个版本
框架整合(二)- 使用Apache ShardingSphere实现数据分片
随机推荐
CAS:474922-26-4,DSPE-PEG-NH2,DSPE-PEG-amine,磷脂-聚乙二醇-氨基供应
谁能解答?从mysql的binlog读取数据到kafka,但是数据类型有Insert,updata,
Thrift IDL Sample File
解决错误:The package-lock.json file was created with an old version of npm
Matlab画图1
巴比特 | 元宇宙每日必读:微博动漫将招募全球各类虚拟偶像并为其提供扶持...
【技术笔记】树莓派4B开机流程整理(无显示器安装)
荣耀发布开发者服务平台,智慧生态合作提速
基于层次分析法的“内卷”指数分析
2022年五一数学建模C题讲解
微信jsApi调用失效的相关问题
DHCP&OSPF组合实验演示(Huawei路由交换设备配置)
Go 言 Go 语,一文看懂 Go 语言文件操作
LVS+Keepalived群集
企业调查相关性分析案例
斯坦福:未来的RGB LED可以贴在你的皮肤上
【日记】mysql数据库连接池
2019年海淀区青少年程序设计挑战活动小学组复赛试题详细答案
flink-cdc支持并行读取一张mysql表的binlog不?
【日记】高并发下的DB分库分表分区策略