eNSP的静态路由综合实验

实现下图功能:

在这里插入图片描述

IP地址分配:

在这里插入图片描述

信息注释:

在这里插入图片描述

各路由器和交换机上的命令展示:

r1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int loop	
[r1]int LoopBack 0
[r1-LoopBack0]ip add 192.168.1.65 27
[r1-LoopBack0]int loop 1
[r1-LoopBack1]ip  add 192.168.1.97 27
[r1-LoopBack1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Aug  1 2023 21:15:06-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]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[r1-GigabitEthernet0/0/1]
Aug  1 2023 21:15:21-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]

[r1]ip route-static 192.168.1.128 26 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.20 30 192.168.1.2
[r1]ip route-static 192.168.1.24 30 192.168.1.2
[r1]ip route-static 192.168.1.48 29  192.168.1.2
[r1]ip route-static 192.168.1.32 28 192.168.1.2
[r1]ip route-static 192.168.1.32 28 192.168.1.6
[r1]ip route-static 192.168.1.48 29 192.168.1.6
[r1]ip route-static 192.168.1.24 30 192.168.1.6
[r1]ip route-static 192.168.1.20 30 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.192 26 192.168.1.6
[r1]ip route- 0.0.0.0 0 192.168.1.2
[r1]ip route- 0.0.0.0 0 192.168.1.6
[r1]
[r1]ip route-static 192.168.1.64 26 null 0

[r1]aaa
[r1-aaa]local-user yuan privilege level 15 password cipher 123456
Info: Add a new user.
[r1-aaa]local-user yuan service-type telnet
[r1-aaa]q
[r1]user-interface vty 0 4
[r1-ui-vty0-4]authentication-mode aaa
[r1-ui-vty0-4]

r2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
Aug  1 2023 21:17:43-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]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
Aug  1 2023 21:18:03-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r2-GigabitEthernet0/0/1]int loop 0
[r2-LoopBack0]ip add 192.168.1.129 27
[r2-LoopBack0]int loop 1
[r2-LoopBack1]ip add 192.168.1.161 27
[r2-LoopBack1]

[r2]ip route-static 192.168.1.64 26 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.192 26 192.168.1.1
[r2]ip route-static 192.168.1.192 26 192.168.1.10
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.32 28 192.168.1.10
[r2]ip route-static 192.168.1.20 30 192.168.1.10
[r2]ip route-static 192.168.1.24 30 192.168.1.10
[r2]ip route-static 192.168.1.48 29 192.168.1.10
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[r2]ip route-static 192.168.1.128 26 null 0
[r2]

r3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
Aug  1 2023 21:19:26-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]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
Aug  1 2023 21:20:02-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3]int g 0/0/2.1
[r3-GigabitEthernet0/0/2.1]ip add 192.168.1.193 27 
[r3-GigabitEthernet0/0/2.1]int g 0/0/2.2
[r3-GigabitEthernet0/0/2.2]ip add 192.168.1.226 27
[r3-GigabitEthernet0/0/2.2]q
[r3]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[r3]ip pool yuan
Info: It's successful to create an IP address pool.
[r3-ip-pool-yuan]network 192.168.1.192 mask 27
[r3-ip-pool-yuan]gateway-list 192.168.1.193
[r3-ip-pool-yuan]q
[r3]ip pool zhaowei
Info: It's successful to create an IP address pool.
[r3-ip-pool-zhaowei]network 192.168.1.225 mask 27
[r3-ip-pool-zhaowei]gateway-list 192.168.1.226

[r3-GigabitEthernet0/0/2.2]dhcp select global 
[r3-GigabitEthernet0/0/2.2]int g 0/0/2.1
[r3-GigabitEthernet0/0/2.1]dhcp select global 
[r3-GigabitEthernet0/0/2.1]

[r3]int g 0/0/2.1
[r3-GigabitEthernet0/0/2.1]dot1q termination vid 2
[r3-GigabitEthernet0/0/2.1]arp broadcast enable 
[r3-GigabitEthernet0/0/2.1]int g 0/0/2.2
[r3-GigabitEthernet0/0/2.2]dot1q termination vid 3
[r3-GigabitEthernet0/0/2.2]arp broadcast  enable 
[r3-GigabitEthernet0/0/2.2]

[r3]ip route-static 192.168.1.64 26 192.168.1.5
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.128 26 192.168.1.5
[r3]ip route-static 192.168.1.128 26 192.168.1.14
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14
[r3]ip route-static 192.168.1.24 30 192.168.1.14
[r3]ip route-static 192.168.1.48 29 192.168.1.14
[r3]ip route-static 192.168.1.32 28 192.168.1.14
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[r3]ip route-static 192.168.1.192 26 null 0
[r3]

r4:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int loop 0
[r4-LoopBack0]ip add 192.168.1.33 29
[r4-LoopBack0]int loop 1
[r4-LoopBack1]ip add 192.168.1.41 29
[r4-LoopBack1]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.14 30
Aug  1 2023 21:21:15-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]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.10 30
[r4-GigabitEthernet0/0/1]
Aug  1 2023 21:21:37-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.21 30
[r4-GigabitEthernet0/0/2]
Aug  1 2023 21:22:05-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r4-GigabitEthernet0/0/2]int e 4/0/0
[r4-Ethernet4/0/0]ip add 192.168.1.25 30
[r4-Ethernet4/0/0]
Aug  1 2023 21:22:37-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface Ethernet4/0/0 has entered the UP state. 
[r4-Ethernet4/0/0]

[r4]ip route-static 192.168.1.64 26 192.168.1.9
[r4]ip route-static 192.168.1.64 26 192.168.1.13
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.128 26 192.168.1.9
[r4]ip route-static 192.168.1.192 26 192.168.1.13
[r4]ip route-static 192.168.1.48 29 192.168.1.22	
[r4]ip route-static 192.168.1.48 29 192.168.1.26 preference 61
[r4]ip route-static 0.0.0.0 0 192.168.1.22
[r4]ip route-static 0.0.0.0 0 192.168.1.26 preference 61
[r4]ip route-static 192.168.1.32 28 null 0
[r4]

r5:

[Huawei]sys r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.22 30
Aug  1 2023 21:23:30-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]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip add 5.5.5.5 30
Aug  1 2023 21:30:26-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]int loop 0
[r5-LoopBack0]ip add 192.168.1.49 29

[r5]ip route-static 192.168.1.64 26 192.168.1.21
[r5]ip route-static 192.168.1.0 30 192.168.1.21
[r5]ip route-static 192.168.1.8 30 192.168.1.21
[r5]ip route-static 192.168.1.128 26 192.168.1.21
[r5]ip route-static 192.168.1.192 26 192.168.1.21
[r5]ip route-static 192.168.1.12 30 192.168.1.21
[r5]ip route-static 192.168.1.4 30 192.168.1.21
[r5]ip route-static 192.168.1.32 28 192.168.1.21
[r5]ip route-static 192.168.1.64 26 192.168.1.25 pr 61
[r5]ip route-static 192.168.1.0 30 192.168.1.25 pr 61 
[r5]ip route-static 192.168.1.8 30 192.168.1.25 pr 61
[r5]ip route-static 192.168.1.128 26 192.168.1.25 pr 61
[r5]ip route-static 192.168.1.192 26 192.168.1.25 pr 61
[r5]ip route-static 192.168.1.12 30 192.168.1.25 pr 61
[r5]ip route-static 192.168.1.4 30 192.168.1.25 pr 61
[r5]ip route-static 192.168.1.32 28 192.168.1.25 pr 61
[r5]ip route-static 0.0.0.0 0 5.5.5.6

[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]q
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000
[r5-GigabitEthernet0/0/1]

r6:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r6
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]ip add 5.5.5.6 30
Aug  1 2023 21:32:08-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r6-GigabitEthernet0/0/0]int loop 0
[r6-LoopBack0]ip add 6.6.6.6 24
[r6-LoopBack0]

[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]nat static protocol tcp global current-interface 23 inside 192.168.1.1 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
[r5-GigabitEthernet0/0/1]

swt:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys swt
[swt]vlan batch 2 to 3
[swt]int e 0/0/2
[swt-Ethernet0/0/2]port link-type access 
[swt-Ethernet0/0/2]port default vlan 2
[swt-Ethernet0/0/2]int e 0/0/3
[swt-Ethernet0/0/3]port link-type access 
[swt-Ethernet0/0/3]port default vlan 3
[swt-Ethernet0/0/3]
[swt-Ethernet0/0/3]int e 0/0/1
[swt-Ethernet0/0/1]port link-type trunk 
[swt-Ethernet0/0/1]port trunk allow-pass vlan 2 to 3
[swt-Ethernet0/0/1]

效果部分展示:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值