当前位置:网站首页>HCIA配置实例(eNSP)
HCIA配置实例(eNSP)
2022-07-29 00:33:00 【1ta-chi】
实验要求
- 全网可达
- 拓扑中所需地址全部基于
192.168.0.0/24
划分所得 - 全部使用静态路由
- RB环回需要汇总
分析
全网所需网段为9段,则向主机位借4位
192.168.0.0/28
192.168.0.16/28
192.168.0.32/28
192.168.0.48/28
192.168.0.64/28
192.168.0.80/28
192.168.0.96/28
192.168.0.112/28
192.168.0.128/28
其中将192.168.0.0/28
化为三个环回网段
192.168.0.0/30
192.168.0.4/30
192.168.0.8/30
配置
IP地址配置
R1
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 192.168.0.1 30
[R1-LoopBack0]q
[R1]interface LoopBack 1
[R1-LoopBack1]ip address 192.168.0.5 30
[R1-LoopBack1]q
[R1]interface LoopBack 2
[R1-LoopBack2]ip address 192.168.0.9 30
[R1-LoopBack2]q
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.0.17 28
Jul 17 2022 20:42:39-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.0.98 28
Jul 17 2022 20:43:23-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
R2
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.0.18 28
Jul 17 2022 20:48:10-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]q
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.0.33 28
Jul 17 2022 20:48:26-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
R3
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.0.34 28
Jul 17 2022 20:50:40-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]q
[R3]interface g0/0/2
[R3-GigabitEthernet0/0/2]ip address 192.168.0.49 28
Jul 17 2022 20:52:13-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state.
[R3-GigabitEthernet0/0/2]q
[R3]interface g4/0/0
[R3-GigabitEthernet4/0/0]ip address 192.168.0.65 28
Jul 17 2022 20:52:50-08:00 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface GigabitEthernet4/0/0 has entered the UP state.
[R3-GigabitEthernet4/0/0]q
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.0.81 28
Jul 17 2022 20:53:15-08:00 R3 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
R5
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R5
[R5]interface g0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.0.50 28
Jul 17 2022 20:55:28-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R5-GigabitEthernet0/0/0]q
[R5]interface g0/0/2
[R5-GigabitEthernet0/0/2]ip address 100.1.1.1 24
Jul 19 2022 13:04:25-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state.
[R5-GigabitEthernet0/0/2]q
[R5]interface g0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.0.66 28
Jul 17 2022 20:55:44-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
R6
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname ISP
[ISP]interface g0/0/0
[ISP-GigabitEthernet0/0/0]ip address 100.1.1.2 24
R4及虚拟子接口,dhcp
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.0.82 28
Jul 17 2022 20:30:26-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[R4-GigabitEthernet0/0/0]q
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.0.99 28
//虚拟子接口
[R4]interface g0/0/2.1
[R4-GigabitEthernet0/0/2.1]dot1q termination vid 2
[R4-GigabitEthernet0/0/2.1]ip address 192.168.0.113 28
Jul 17 2022 20:31:16-08:00 R4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP on the interface GigabitEthernet0/0/2.1 has entered the UP state.
[R4-GigabitEthernet0/0/2.1]arp broadcast enable
[R4-GigabitEthernet0/0/2.1]q
[R4]int g0/0/2.2
[R4-GigabitEthernet0/0/2.2]dot1q termination vid 3
[R4-GigabitEthernet0/0/2.2]ip address 192.168.0.129 28
Jul 17 2022 20:31:38-08:00 R4 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP on the interface GigabitEthernet0/0/2.2 has entered the UP state.
[R4-GigabitEthernet0/0/2.2]arp broadcast enable
[R4-GigabitEthernet0/0/2.2]q
//dhcp池
[R4]ip pool xixi
Info: It is successful to create an IP address pool.
[R4-ip-pool-xixi]network 192.168.0.112 mask 255.255.255.240
[R4-ip-pool-xixi]gateway-list 192.168.0.113
[R4-ip-pool-xixi]dns-list 8.8.8.8
[R4-ip-pool-xixi]q
[R4]ip pool haha
Info: It's successful to create an IP address pool.
[R4-ip-pool-haha]network 192.168.0.128 mask 255.255.255.240
[R4-ip-pool-haha]gateway-list 192.168.0.129
[R4-ip-pool-haha]dns-list 8.8.8.8
[R4-ip-pool-haha]q
//先开启DHCP
[R4]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R4]interface g0/0/2.1
[R4-GigabitEthernet0/0/2.1]dhcp select global
[R4-GigabitEthernet0/0/2.1]q
[R4]interface g0/0/2.2
[R4-GigabitEthernet0/0/2.2]dhcp select global
VLAN 划分
//SW1
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan batch 2 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]interface g0/0/4
[SW1-GigabitEthernet0/0/4]port link-type trunk
[SW1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/4]q
[SW1]int
[SW1]interface g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type trunk
[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/3]q
[SW1]interface g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 2
[SW1-GigabitEthernet0/0/1]q
[SW1]interface g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 3
//SW2
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]vlan batch 2 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]interface g0/0/3
[SW2-GigabitEthernet0/0/3]port link-type trunk
[SW2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/3]q
[SW2]interface g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type access
[SW2-GigabitEthernet0/0/1]port default vlan 2
[SW2-GigabitEthernet0/0/1]q
[SW2]interface g0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access
[SW2-GigabitEthernet0/0/2]port default vlan 3
静态路由
//R1
[R1]ip route-static 192.168.0.32 28 192.168.0.18
[R1]ip route-static 192.168.0.48 28 192.168.0.18
[R1]ip route-static 192.168.0.64 28 192.168.0.18
[R1]ip route-static 192.168.0.80 28 192.168.0.99
[R1]ip route-static 192.168.0.112 28 192.168.0.99
[R1]ip route-static 192.168.0.128 28 192.168.0.99
//R2
[R2]ip route-static 192.168.0.96 255.255.255.240 192.168.0.17
[R2]ip route-static 192.168.0.48 255.255.255.240 192.168.0.34
[R2]ip route-static 192.168.0.64 255.255.255.240 192.168.0.34
[R2]ip route-static 192.168.0.80 255.255.255.240 192.168.0.34
[R2]ip route-static 192.168.0.112 255.255.255.240 192.168.0.34
[R2]ip route-static 192.168.0.128 255.255.255.240 192.168.0.34
//R3
[R3]ip route-static 192.168.0.96 255.255.255.240 192.168.0.82
[R3]ip route-static 192.168.0.16 255.255.255.240 192.168.0.33
[R3]ip route-static 192.168.0.112 255.255.255.240 192.168.0.82
[R3]ip route-static 192.168.0.128 255.255.255.240 192.168.0.82
//R4
[R4]ip route-static 192.168.0.32 255.255.255.240 192.168.0.81
[R4]ip route-static 192.168.0.16 255.255.255.240 192.168.0.98
[R4]ip route-static 192.168.0.48 255.255.255.240 192.168.0.81
[R4]ip route-static 192.168.0.64 255.255.255.240 192.168.0.81
//R5
[R5]ip route-static 192.168.0.96 255.255.255.240 192.168.0.49
[R5]ip route-static 192.168.0.16 255.255.255.240 192.168.0.49
[R5]ip route-static 192.168.0.32 255.255.255.240 192.168.0.49
[R5]ip route-static 192.168.0.80 255.255.255.240 192.168.0.49
[R5]ip route-static 192.168.0.112 255.255.255.240 192.168.0.49
[R5]ip route-static 192.168.0.128 255.255.255.240 192.168.0.49
R1上的汇总
//R1(空接口防环路由)
[R1]ip route-static 192.168.0.0 28 NULL 0
//R2
[R2]ip route-static 192.168.0.0 28 192.168.0.17
//R3
[R3]ip route-static 192.168.0.0 28 192.168.0.33
[R3]ip route-static 192.168.0.0 28 192.168.0.82
//R4
[R4]ip route-static 192.168.0.0 28 192.168.0.98
//R5
[R5]ip route-static 192.168.0.0 28 192.168.0.49
[R5]ip route-static 192.168.0.0 28 192.168.0.65
指向公网的缺省
//R1
[R1]ip route-static 0.0.0.0 0 192.168.0.18
[R1]ip route-static 0.0.0.0 0 192.168.0.99
//R2
[R2]ip route-static 0.0.0.0 0 192.168.0.34
//R3
[R3]ip route-static 0.0.0.0 0 192.168.0.50
[R3]ip route-static 0.0.0.0 0 192.168.0.66 preference 80 //浮动静态路由
Jul 19 2022 13:31:39-08:00 R3 %%01RM/4/IPV4_DEFT_RT_CHG(l)[0]:IPV4 default Route is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=GigabitEthernet4/0/0, Nexthop=192.168.0.66, Neighbour=0.0.0.0, Preference=1342177280, Label=NULL, Metric=0)
Info: Succeeded in modifying route.
//R4
[R4]ip route-static 0.0.0.0 0 192.168.0.81
//R5
[R5]ip route-static 0.0.0.0 0 100.1.1.2
NAT
[R5]acl 2000
[R5-acl-basic-2000]r
[R5-acl-basic-2000]ru
[R5-acl-basic-2000]rule 1 p
[R5-acl-basic-2000]rule 1 permit s
[R5-acl-basic-2000]rule 1 permit source a
[R5-acl-basic-2000]rule 1 permit source any
[R5-acl-basic-2000]q
[R5]int
[R5]interface g0/0/2
[R5-GigabitEthernet0/0/2]n
[R5-GigabitEthernet0/0/2]nat o
[R5-GigabitEthernet0/0/2]nat outbound 2000
连通性测试:PC3 --> ISP
边栏推荐
- Flash reports an error: type object 'news' has no attribute' query 'the view name is duplicate with the model name
- uniapp createSelectorQuery(). Select get returns null error
- Expression evaluation
- [SQL's 18 dragon subduing palms] 01 - Kang long regrets: introductory 10 questions
- Linux redis source code installation
- 一篇万字博文带你入坑爬虫这条不归路 【万字图文】
- 20220728 sorting strings that are not pure numbers
- SQL question brushing: find the current salary details and department number Dept_ no
- C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)
- Synchronized keyword details
猜你喜欢
Openpyxl merge cells
一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
Behind the second round of okaleido tiger sales is the strategic support of ecological institutions
测试/开发程序员靠技术渡过中年危机?提升自己本身的价值......
SQL injection of DVWA
Intel带你初识视觉识别--OpenVINO
Read the recent trends of okaleido tiger and tap the value and potential behind it
【SQL之降龙十八掌】01——亢龙有悔:入门10题
Linux Redis 源码安装
Flink Postgres CDC
随机推荐
Third party login process of flask Weibo
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
【SQL之降龙十八掌】01——亢龙有悔:入门10题
Nacos installation guide on win system
Expression evaluation
Linux redis source code installation
LeTax记录\documentclass{},authoryear属性使用
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
Cloud native application comprehensive exercise
Canal实时解析mysql binlog数据实战
Closures and decorators
AlphaFold揭示了蛋白质结构宇宙-从近100万个结构扩展到超过2亿个结构
[idea] where to use the query field
Numpy 常见函数及使用
北京护照西班牙语翻译推荐
时间复杂度、空间复杂度的学习总结
RHCE command practice (II)
MySQL time is formatted by hour_ MySQL time format, MySQL statement queried by time period [easy to understand]
body中基本标签
Docker compose install MySQL