华为ensp小实验(路由下发+Easy IP+单臂路由+OSPF+Rip)

小实验(路由下发+Easy IP+单臂路由+OSPF+Rip)

  • 前言
  • 一、实验及需求
    • 1、实验题
    • 2、需求
  • 二、思维想法
  • 三、实验步骤
    • 1、配置
      • R1
      • R2
      • R3
      • R4
      • R5
      • LSW1
      • LSW2
      • LSW3
      • LSW4
      • LSW5
      • LSW6
      • LSW7
    • 2.连通性(太多了,只能举例说明了)
      • Server连通PC1及PC6
      • PC1连通PC6及Server
      • PC6连通PC1及Server
  • 总结


前言

老样子,复习下网络基础知识点,顺便串联起来。

一、实验及需求

1、实验题

华为ensp小实验(路由下发+Easy IP+单臂路由+OSPF+Rip)_第1张图片

2、需求

  • 内网全通及内网通信外网
  • 外网不能ping内网PC及Server

二、思维想法

  • 先配置好所有端口的IP及交换机/PC机/路由器之间的连接模式
  • 然后配置好R1和R2的互相之间的默认路由
  • 再配置好内网的OSPF及RIP
  • 接着配置好默认路由下发和OSPF与RIP之间的互相注入
  • 最后配置ACL访问控制列表,完成外网不能ping内网的需求

三、实验步骤

1、配置

R1

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 202.2.2.1 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 202.2.12.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int loop 0
[Huawei-LoopBack0]ip add 1.1.1.1 32
[Huawei-LoopBack0]q
[Huawei]ip route-s 0.0.0.0 0 202.2.12.2

R2

 <Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user- con 0
[Huawei-ui-console0]id 0 0
[Huawei-ui-console0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 202.2.12.2 24
[Huawei-GigabitEthernet0/0/1]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 10.1.113.1 24
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 10.1.111.2 24
[Huawei-GigabitEthernet0/0/2]int g2/0/0
[Huawei-GigabitEthernet2/0/0]ip add 10.1.112.2 24
[Huawei-GigabitEthernet2/0/0]int loop 0
[Huawei-LoopBack0]ip add 2.2.2.2 32
[Huawei-LoopBack0]q
[Huawei]ospf 1 router-id 2.2.2.2	
[Huawei-ospf-1]default-route-advertise 
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 2.2.2.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]net 10.1.113.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 10.1.111.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 10.1.112.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]acl 3000
[Huawei-acl-adv-3000]rule 5 permit ip source 10.1.0.0 0.0.255.255 
[Huawei-acl-adv-3000]interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1]nat outbound 3000
[Huawei-GigabitEthernet0/0/1]q
[Huawei]ip route-s 0.0.0.0 0 202.2.12.1
[Huawei]acl 3002
[Huawei-acl-adv-3002]rule deny icmp source 202.2.0.0 0.0.255.255 destination 10.
1.0.0 0.0.255.255
[Huawei-acl-adv-3002]int g0/0/1
[Huawei-GigabitEthernet0/0/1]traffic-filter inbound acl 3002

R3

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.1.113.2 255.255.255.0 
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.1.134.1 255.255.255.0
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int loop 0
[Huawei-LoopBack0]ip add 3.3.3.3 32
[Huawei-LoopBack0]q
[Huawei]ospf 1 router-id 3.3.3.3
[Huawei-ospf-1]import-route rip 1 type 1 cost 1
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 10.1.113.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]rip
[Huawei-rip-1]default-route originate
[Huawei-rip-1]undo summary 
[Huawei-rip-1]v 2
[Huawei-rip-1]net 10.0.0.0
[Huawei-rip-1]net 3.0.0.0
[Huawei-rip-1]import-route ospf 1 cost 14

R4

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]interface GigabitEthernet0/0/2
[Huawei-GigabitEthernet0/0/2] ip address 10.1.134.2 255.255.255.0
[Huawei-GigabitEthernet0/0/2]interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1] ip address 10.1.135.1 255.255.255.0 
[Huawei-GigabitEthernet0/0/1]int loop 0
[Huawei-LoopBack0]ip add 4.4.4.4 32
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]undo shutd
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/0.21
[Huawei-GigabitEthernet0/0/0.21]dot1q termination vid 21
[Huawei-GigabitEthernet0/0/0.21] ip address 10.1.21.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0.21]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.21]int g0/0/0.22
[Huawei-GigabitEthernet0/0/0.22]dot1q termination vid 22
[Huawei-GigabitEthernet0/0/0.22] ip address 10.1.22.1 255.255.255.0 
[Huawei-GigabitEthernet0/0/0.22]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.22]q
[Huawei]rip
[Huawei-rip-1]undo summary 
[Huawei-rip-1]v 2
[Huawei-rip-1]net 10.0.0.0
[Huawei-rip-1]net 4.0.0.0 

R5

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.1.135.2 255.255.255.0 
[Huawei-GigabitEthernet0/0/1]interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.1.100.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0]int loop 0
[Huawei-LoopBack0]ip add 5.5.5.5 32
[Huawei-LoopBack0]q
[Huawei]rip 
[Huawei-rip-1]undo summary 
[Huawei-rip-1]v 2
[Huawei-rip-1]network 10.0.0.0
[Huawei-rip-1]network 5.0.0.0 

LSW1

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 11 12 1001
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int vlan 11
[Huawei-Vlanif11]ip add 10.1.11.1 24
[Huawei-Vlanif11]int vlan 12
[Huawei-Vlanif12]ip add 10.1.12.1 24
[Huawei-Vlanif12]int vlan 1001
[Huawei-Vlanif1001]ip add 10.1.111.1 24
[Huawei-Vlanif1001]int loop 0
[Huawei-LoopBack0]ip add 11.11.11.11 32
[Huawei-LoopBack0]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
[Huawei-Eth-Trunk1]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 11
[Huawei-GigabitEthernet0/0/1]int g 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 12
[Huawei-GigabitEthernet0/0/2]int g 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 1001
[Huawei-GigabitEthernet0/0/3]int g 0/0/4
[Huawei-GigabitEthernet0/0/4]Eth-Trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/4]int g 0/0/5
[Huawei-GigabitEthernet0/0/5]Eth-Trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/5]q
[Huawei]ospf 1 router-id 11.11.11.11
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 10.1.111.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 11.11.11.11 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]net 10.1.11.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 10.1.12.0 0.0.0.255 

LSW2

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 13 14 1002
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int vlan 13
[Huawei-Vlanif13]ip add 10.1.13.1 24
[Huawei-Vlanif13]int vlan 14
[Huawei-Vlanif14]ip add 10.1.14.1 24
[Huawei-Vlanif14]int vlan 1002
[Huawei-Vlanif1002]ip add 10.1.112.1 24
[Huawei-Vlanif1002]int loop 0
[Huawei-LoopBack0]ip add 22.22.22.22 32
[Huawei-LoopBack0]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
[Huawei-Eth-Trunk1]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 13
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 14
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 1002
[Huawei-GigabitEthernet0/0/3]int g0/0/4
[Huawei-GigabitEthernet0/0/4]Eth-Trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/4]int g0/0/5
[Huawei-GigabitEthernet0/0/5]Eth-Trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/5]q
[Huawei]ospf 1 router-id 22.22.22.22
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 10.1.112.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 22.22.22.22 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]net 10.1.13.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 10.1.14.0 0.0.0.255

LSW3

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan 11
[Huawei-vlan11]interface Ethernet0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 11
[Huawei-Ethernet0/0/1]interface Ethernet0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 11

LSW4

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan 12
[Huawei-vlan12]q
[Huawei]interface Ethernet0/0/1
[Huawei-Ethernet0/0/1] port link-type access
[Huawei-Ethernet0/0/1] port default vlan 12
[Huawei-Ethernet0/0/1]interface Ethernet0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 12

LSW5

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan 13
[Huawei-vlan13]q
[Huawei]interface Ethernet0/0/1
[Huawei-Ethernet0/0/1] port link-type access
[Huawei-Ethernet0/0/1]port default vlan 13
[Huawei-Ethernet0/0/1]interface Ethernet0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 13
 

LSW6

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan 14
[Huawei-vlan14]q
[Huawei]interface Ethernet0/0/1
[Huawei-Ethernet0/0/1] port link-type access
[Huawei-Ethernet0/0/1]port default vlan 14
[Huawei-Ethernet0/0/1]interface Ethernet0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 14

LSW7

 <Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 21 22
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]interface Ethernet0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 21
[Huawei-Ethernet0/0/1]interface Ethernet0/0/2
[Huawei-Ethernet0/0/2]port link-type trunk
[Huawei-Ethernet0/0/2] port trunk allow-pass vlan all
[Huawei-Ethernet0/0/2]interface Ethernet0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 22

2.连通性(太多了,只能举例说明了)

我们就拿Server、PC1及PC6之间的通信举例

Server连通PC1及PC6

华为ensp小实验(路由下发+Easy IP+单臂路由+OSPF+Rip)_第2张图片

华为ensp小实验(路由下发+Easy IP+单臂路由+OSPF+Rip)_第3张图片

PC1连通PC6及Server

PC>ping 202.2.2.100

Ping 202.2.2.100: 32 data bytes, Press Ctrl_C to break
From 202.2.2.100: bytes=32 seq=1 ttl=125 time=47 ms
From 202.2.2.100: bytes=32 seq=2 ttl=125 time=47 ms
From 202.2.2.100: bytes=32 seq=3 ttl=125 time=63 ms
From 202.2.2.100: bytes=32 seq=4 ttl=125 time=62 ms
From 202.2.2.100: bytes=32 seq=5 ttl=125 time=94 ms

--- 202.2.2.100 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 47/62/94 ms

PC>ping 10.1.100.100

Ping 10.1.100.100: 32 data bytes, Press Ctrl_C to break
From 10.1.100.100: bytes=32 seq=1 ttl=250 time=62 ms
From 10.1.100.100: bytes=32 seq=2 ttl=250 time=109 ms
From 10.1.100.100: bytes=32 seq=3 ttl=250 time=79 ms
From 10.1.100.100: bytes=32 seq=4 ttl=250 time=63 ms
From 10.1.100.100: bytes=32 seq=5 ttl=250 time=78 ms

--- 10.1.100.100 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 62/78/109 ms

PC6连通PC1及Server

PC>ping 10.1.11.100

Ping 10.1.11.100: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!

--- 10.1.11.100 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss

PC>ping 10.1.100.100

Ping 10.1.100.100: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!

--- 10.1.100.100 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss

总结

实际上,题目很简单,只要思维条理清晰,一步一步顺着思维来做,不仅能顺利完成实验需求,而且哪怕出了问题,也能轻松的排障,所以说,思维很重要,清晰的思维能更好的完成现实中繁重的工作。
简单的来说,就是化一个繁为多个简,轻松完成工作。

你可能感兴趣的:(网络基础,华为,ensp,网络,拓扑学,ospf,acl)