总结:

问题分析

项目需求

项目技术

技术内容

命令操作

1.一层技术

2.二层技术

3.三层技术

1.中继

2.生成树协议

3.以太通道

4.三层交换

5.HSRP

6.RIP协议

7.NAT

网络结构层次

接入层:用于将终端设备接入网络

汇聚层:用于VLAN间通信,路由用户数据到外网

核心层:连接外网

  1. 案例1:配置目前网络环境
  2. 案例2:项目阶段练习

1 案例1:配置目前网络环境

1.1 问题

一家新创建的IT公司,公司位于北京有80多台服务器

目前网络环境使用技术,通过端口映射技术将web服务器发布给Internet:

  • 三层交换:汇聚接入层交换机
  • 默认路由:实现到互联网数以万计网络访问的简化配置
  • 静态路由:实现公司内部网络互通
  • NAT端口映射:实现企业内部Web服务器的发布

1.2 方案

通过端口映射技术将web服务器发布给Internet,公司现有网络环境拓扑如图-1所示:

图-1

现有网络连接说明如表-1所示:

表-1 网络连接说明

1.3 步骤

实现此案例需要按照如下步骤进行。

步骤一:根据表-1为设备配置IP地址,并为三层交换机开启路由功能

1)MS1配置vlan1与f0/1接口的IP地址并开启路由功能

  1. Switch(config)#hostname MS1
  2. MS1(config)#ip routing
  3. MS1(config)#interface vlan 1
  4. MS1(config-if)#ip address 192.168.1.252 255.255.255.0
  5. MS1(config-if)#no shutdown
  6. MS1(config-if)#exit
  7. MS1(config-if)#interface fastEthernet 0/1
  8. MS1(config-if)#no switchport
  9. MS1(config-if)#ip address 192.168.2.1 255.255.255.0
  10. MS1(config-if)#no shutdown

步骤二:为路由器配置IP地址,添加接口模块

1)为路由器添加接口模块并进入路由器接口配置IP地址

  1. Router(config)#hostname R1
  2. R1(config)#interface fastEthernet 0/0
  3. R1(config-if)#ip address 192.168.2.2 255.255.255.0
  4. R1(config-if)#no shutdown
  5. R1(config-if)#exit
  6. R1(config)#interface fastEthernet 1/0
  7. R1(config-if)#ip address 61.159.62.129 255.255.255.248
  8. R1(config-if)#no shutdown

步骤三:配置MS1和路由器的静态路由

  1. MS1(config-if)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
  2. R1(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1

步骤四:测试server1与R1接口IP的连通性

  1. PC>ping 192.168.2.2
  2. Pinging 192.168.2.2 with 32 bytes of data:
  3. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
  4. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
  5. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
  6. Reply from 192.168.2.2: bytes=32 time=1ms TTL=254
  7. Ping statistics for 192.168.2.2:
  8. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  9. Approximate round trip times in milli-seconds:
  10. Minimum = 0ms, Maximum = 1ms, Average = 0ms
  11. PC>ping 61.159.62.129
  12. Pinging 61.159.62.129 with 32 bytes of data:
  13. Reply from 61.159.62.129: bytes=32 time=1ms TTL=254
  14. Reply from 61.159.62.129: bytes=32 time=0ms TTL=254
  15. Reply from 61.159.62.129: bytes=32 time=2ms TTL=254
  16. Reply from 61.159.62.129: bytes=32 time=0ms TTL=254
  17. Ping statistics for 61.159.62.129:
  18. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  19. Approximate round trip times in milli-seconds:
  20. Minimum = 0ms, Maximum = 2ms, Average = 0ms

步骤五:R1配置端口映射

  1. R1(config)#ip nat inside source static tcp 192.168.1.8 80 61.159.62.131 80
  2. R1(config)#interface fastEthernet 0/0
  3. R1(config-if)#ip nat inside
  4. R1(config)#interface f1/0
  5. R1(config-if)#ip nat outside

步骤六:在PC7上查看是映射结果,如图-2所示

图-2

2 案例2:项目阶段练习

2.1 问题

现有网络问题分析:

  • 接入层交换机只与同一个三层交换机相连,存在单点故障而影响网络通信。
  • 互联网连接单一服务商

现有网络需求:

  • 随着企业发展,为了保证网络的高可用性,需要使用很多的冗余技术。
  • 保证局域网络不会因为线路故障而导致的网络故障。
  • 保证客户端机器不会因为使用单一网关而出现的单点失败。
  • 保证到互联网的高可用接入使用冗余互联网连接。
  • 提高网络链路带宽。

2.2 方案

基于项目的需求,需要用到如下技术:

  • STP:解决二层环路带来的广播风暴并链路冗余问题
  • 以太网通道:提高网络链路带宽
  • RIP路由协议:实现网络路径的自动学习
  • HSRP:实现网关冗余

重新规划后的网络拓扑如图-3:

图-3

重新规划后网络连接说明如表-2与表-3所示:

表-2 网络连接说明

表-3 网络连接说明(续)

2.3 步骤

实现此案例需要按照如下步骤进行。

步骤一:静态路由升级动态路由。

1)R1删除静态路由并配置rip

  1. R1(config)#no ip route 192.168.1.0 255.255.255.0 192.168.2.1
  2. R1(config)#router rip
  3. R1(config-router)#version 2
  4. R1(config-router)#no auto-summary
  5. R1(config-router)#network 192.168.2.0
  6. R1(config-router)#default-information originate

2)MS1上删除静态路由并配置rip

  1. MS1(config)#no ip route 0.0.0.0 0.0.0.0 192.168.2.2
  2. MS1(config)#router rip
  3. MS1(config-router)#version 2
  4. MS1(config-router)#no auto-summary
  5. MS1(config-router)#network 192.168.1.0
  6. MS1(config-router)#network 192.168.2.0

3)在MS1上查看路由表

  1. MS1#show ip route
  2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
  3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
  6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
  7. * - candidate default, U - per-user static route, o - ODR
  8. P - periodic downloaded static route
  9. Gateway of last resort is 192.168.2.2 to network 0.0.0.0
  10. C 192.168.1.0/24 is directly connected, Vlan1
  11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
  12. R* 0.0.0.0/0 [120/1] via 192.168.2.2, 00:00:01, FastEthernet0/1

步骤二:配置SW1、SW2、SW3、SW4与MS1的接口为Trunk模式并做以太网通道。

1)SW1、SW2、SW3、SW4上做与MS1之间的trunk与以太网通道

  1. Switch(config)#hostname SW1
  2. SW1(config)#interface range fastEthernet 0/5-6
  3. SW1(config-if-range)#switchport mode trunk
  4. SW1(config-if-range)#channel-group 1 mode on
  5. Switch(config)#hostname SW2
  6. SW2(config)#interface range fastEthernet 0/7-8
  7. SW2(config-if-range)#switchport mode trunk
  8. SW2(config-if-range)#channel-group 2 mode on
  9. Switch(config)#hostname SW3
  10. SW3(config)#interface range fastEthernet 0/9-10
  11. SW3(config-if-range)#switchport mode trunk
  12. SW3(config-if-range)#channel-group 3 mode on
  13. Switch(config)#hostname SW4
  14. SW4(config)#interface range fastEthernet 0/11-12
  15. SW4(config-if-range)#switchport mode trunk
  16. SW4(config-if-range)#channel-group 4 mode on

2)MS1与SW1、SW2、SW3、SW4之间做以太网通道并启用trunk

MS1(config)#interface range fastEthernet 0/5-6

MS1(config-if-range)#switchport trunk encapsulation dot1q

MS1(config-if-range)#switchport mode trunk

MS1(config-if-range)#channel-group 1 mode on

MS1(config-if-range)#exit

MS1(config-if-range)#interface range fastEthernet 0/7-8

MS1(config-if-range)#switchport trunk encapsulation dot1q

MS1(config-if-range)#channel-group 2 mode on

MS1(config-if-range)#switchport mode trunk

MS1(config-if-range)#exit

MS1(config-if-range)#interface range fastEthernet 0/9-10

MS1(config-if-range)#switchport trunk encapsulation dot1q

MS1(config-if-range)#switchport mode trunk

MS1(config-if-range)#channel-group 3 mode on

MS1(config-if-range)#exit

MS1(config-if-range)#interface range fastEthernet 0/11-12

MS1(config-if-range)#switchport trunk encapsulation dot1q

MS1(config-if-range)#switchport mode trunk on

MS1(config-if-range)#channel-group 4 mode on

步骤三:添加MS2并配置与MS1、SW1、SW2、SW3、SW4之间的太网通道。

1)在MS1上配置与MS2的以太网通道

  1. MS1(config)#interface range fastEthernet 0/13-15
  2. MS1(config-if-range)#channel-group 5 mode on
  3. MS1(config-if-range)#switchport trunk encapsulation dot1q
  4. MS1(config-if-range)#switchport mode trunk

2)在MS2并配置与MS1、SW1、SW2、SW3、SW4之间的太网通道

  1. MS2(config)#interface range fastEthernet 0/10-12
  2. MS2(config-if-range)#channel-group 5 mode on
  3. MS2(config-if-range)#switchport trunk encapsulation dot1q
  4. MS2(config-if-range)#switchport mode trunk
  5. MS2(config-if-range)#exit
  6. MS2(config)#interface range fastEthernet 0/2-3
  7. MS2(config-if-range)#channel-group 1 mode on
  8. MS2(config-if-range)#switchport trunk encapsulation dot1q
  9. MS2(config-if-range)#switchport mode trunk
  10. MS2(config-if-range)#exit
  11. MS2(config)#interface range fastEthernet 0/4-5
  12. MS2(config-if-range)#channel-group 2 mode on
  13. MS2(config-if-range)#switchport mode trunk
  14. MS2(config-if-range)#exit
  15. MS2(config)#interface range fastEthernet 0/6-7
  16. MS2(config-if-range)#channel-group 3 mode on
  17. MS2(config-if-range)#switchport trunk encapsulation dot1q
  18. MS2(config-if-range)#switchport mode trunk
  19. MS2(config-if-range)#exit
  20. MS2(config)#interface range fastEthernet 0/8-9
  21. MS2(config-if-range)#channel-group 4 mode on
  22. MS2(config-if-range)#switchport trunk encapsulation dot1q
  23. MS2(config-if-range)#switchport mode trunk

3)在MS1上查看以太网通道

  1. MS1>show etherchannel port-channel
  2. Channel-group listing:
  3. ----------------------
  4. Group: 1
  5. ----------
  6. Port-channels in the group:
  7. ---------------------------
  8. Port-channel: Po1
  9. ------------
  10. Age of the Port-channel = 00d:00h:05m:21s
  11. Logical slot/port = 2/1 Number of ports = 2
  12. GC = 0x00000000 HotStandBy port = null
  13. Port state = Port-channel
  14. Protocol = PAGP
  15. Port Security = Disabled
  16. Ports in the Port-channel:
  17. Index Load Port EC state No of bits
  18. ------+------+------+------------------+-----------
  19. 0 00 Fa0/5 On 0
  20. 0 00 Fa0/6 On 0
  21. Time since last port bundled: 00d:00h:05m:21s Fa0/6
  22. Group: 2
  23. ----------
  24. Port-channels in the group:
  25. ---------------------------
  26. Port-channel: Po2
  27. ------------
  28. Age of the Port-channel = 00d:00h:05m:21s
  29. Logical slot/port = 2/2 Number of ports = 2
  30. GC = 0x00000000 HotStandBy port = null
  31. Port state = Port-channel
  32. Protocol = PAGP
  33. Port Security = Disabled
  34. Ports in the Port-channel:
  35. Index Load Port EC state No of bits
  36. ------+------+------+------------------+-----------
  37. 0 00 Fa0/7 On 0
  38. 0 00 Fa0/8 On 0
  39. Time since last port bundled: 00d:00h:05m:21s Fa0/8
  40. Group: 3
  41. ----------
  42. Port-channels in the group:
  43. ---------------------------
  44. Port-channel: Po3
  45. ------------
  46. Age of the Port-channel = 00d:00h:05m:21s
  47. Logical slot/port = 2/3 Number of ports = 2
  48. GC = 0x00000000 HotStandBy port = null
  49. Port state = Port-channel
  50. Protocol = PAGP
  51. Port Security = Disabled
  52. Ports in the Port-channel:
  53. Index Load Port EC state No of bits
  54. ------+------+------+------------------+-----------
  55. 0 00 Fa0/9 On 0
  56. 0 00 Fa0/10 On 0
  57. Time since last port bundled: 00d:00h:05m:21s Fa0/10
  58. Group: 4
  59. ----------
  60. Port-channels in the group:
  61. ---------------------------
  62. Port-channel: Po4
  63. ------------
  64. Age of the Port-channel = 00d:00h:05m:21s
  65. Logical slot/port = 2/4 Number of ports = 2
  66. GC = 0x00000000 HotStandBy port = null
  67. Port state = Port-channel
  68. Protocol = PAGP
  69. Port Security = Disabled
  70. Ports in the Port-channel:
  71. Index Load Port EC state No of bits
  72. ------+------+------+------------------+-----------
  73. 0 00 Fa0/11 On 0
  74. 0 00 Fa0/12 On 0
  75. Time since last port bundled: 00d:00h:05m:21s Fa0/12
  76. Group: 5
  77. ----------
  78. Port-channels in the group:
  79. ---------------------------
  80. Port-channel: Po5
  81. ------------
  82. Age of the Port-channel = 00d:00h:08m:11s
  83. Logical slot/port = 2/5 Number of ports = 3
  84. GC = 0x00000000 HotStandBy port = null
  85. Port state = Port-channel
  86. Protocol = PAGP
  87. Port Security = Disabled
  88. Ports in the Port-channel:
  89. Index Load Port EC state No of bits
  90. ------+------+------+------------------+-----------
  91. 0 00 Fa0/13 On 0
  92. 0 00 Fa0/14 On 0
  93. 0 00 Fa0/15 On 0
  94. Time since last port bundled: 00d:00h:08m:11s Fa0/15

步骤四:MS1与MS2配置STP

1)在MS1和MS2上配置stp

  1. MS1(config)#spanning-tree vlan 1 root primary
  2. MS2(config)#spanning-tree vlan 1 root secondary

2)在MS1和MS2上查看stp

  1. MS1# show spanning-tree vlan 1
  2. VLAN0001
  3. Spanning tree enabled protocol ieee
  4. Root ID Priority 24577
  5. Address 0004.9A70.6B06
  6. This bridge is the root
  7. Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
  8. Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
  9. Address 0004.9A70.6B06
  10. Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
  11. Aging Time 20
  12. Interface Role Sts Cost Prio.Nbr Type
  13. ---------------- ---- --- --------- -------- --------------------------------
  14. Po1 Desg FWD 9 128.27 Shr
  15. Po2 Desg FWD 9 128.28 Shr
  16. Po3 Desg FWD 9 128.29 Shr
  17. Po4 Desg FWD 9 128.30 Shr
  18. Po5 Desg FWD 8 128.31 Shr
  19. MS2#show spanning-tree vlan 1
  20. VLAN0001
  21. Spanning tree enabled protocol ieee
  22. Root ID Priority 24577
  23. Address 0004.9A70.6B06
  24. Cost 8
  25. Port 31(Port-channel 5)
  26. Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
  27. Bridge ID Priority 28673 (priority 28672 sys-id-ext 1)
  28. Address 0006.2A05.A2BA
  29. Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
  30. Aging Time 20
  31. Interface Role Sts Cost Prio.Nbr Type
  32. ---------------- ---- --- --------- -------- --------------------------------
  33. Po1 Desg FWD 9 128.27 Shr
  34. Po2 Desg FWD 9 128.28 Shr
  35. Po3 Desg FWD 9 128.29 Shr
  36. Po4 Desg FWD 9 128.30 Shr
  37. Po5 Root FWD 8 128.31 Shr

步骤五:HSRP配置

1)MS1配置HSRP

  1. MS1(config)#interface vlan 1
  2. MS1(config-if)#standby 1 ip 192.168.1.254
  3. MS1(config-if)#standby 1 priority 200
  4. MS1(config-if)#standby 1 preempt

2)MS2配置HSRP开启路由功能

  1. MS2(config)#ip routing
  2. MS2(config)#interface vlan 1
  3. MS2(config)#ip address 192.168.1.253 255.255.255.0
  4. MS2(config)#no shutdown
  5. MS2(config-if)#standby 1 ip 192.168.1.254
  6. MS2(config-if)#standby 1 priority 195
  7. MS2(config-if)#standby 1 preempt

3)配置MS1交换机的HSRP的端口跟踪,关闭跟踪接口,并在MS1和MS2上查看HSRP状态

  1. MS1(config)# MS1(config)#interface vlan 1
  2. MS1(config-if)#standby 1 track fastEthernet 0/1
  3. MS1(config-if)#exit
  4. MS1(config)#interface fastEthernet 0/1
  5. MS1(config-if)#shutdown
  6. MS1#show standby brief
  7. P indicates configured to preempt.
  8. |
  9. Interface Grp Pri P State Active Standby Virtual IP
  10. Vl1 1 190 P Standby 192.168.1.253 local 192.168.1.254
  11. MS2#show standby brief
  12. P indicates configured to preempt.
  13. Interface Grp Pri P State Active Standby Virtual IP
  14. Vl1 1 195 P Active local 192.168.1.252 192.168.1.254

步骤六:MS2连接R1并配置rip

1)为R1与MS2相连接的接口配置IP地址 并配置rip

  1. R1(config)#interface fastEthernet 0/24
  2. R1(config-if)#ip address 192.168.3.2 255.255.255.0
  3. R1(config-if)#exit
  4. R1(config)#router rip
  5. R1(config-router)# version 2
  6. R1(config-router)#network 192.168.3.0
  7. MS2(config-if)#exit
  8. MS2(config)#router rip
  9. MS2(config-router)#version 2
  10. MS2(config-router)#no auto-summary
  11. MS2(config-router)#network 192.168.1.0

步骤七:添加路由器R2, 为R2配置默认路由,R2与MS1、MS2、Internet相连并为配置IP与动态路由

1)配置R2的IP地址、rip、默认路由。

  1. Router(config)hostname R2
  2. R2(config)#interface fastEthernet 0/0
  3. R2(config-if)#ip address 192.168.4.2 255.255.255.0
  4. R2(config-if)#no shutdown
  5. R2(config-if)#exit
  6. R2(config)#interface fastEthernet 0/1
  7. R2(config-if)#ip address 192.168.5.2 255.255.255.0
  8. R2(config-if)#no shutdown
  9. R2(config-if)#exit
  10. R2(config)#interface fastEthernet 1/0
  11. R2(config-if)#ip address 61.159.62.130 255.255.255.248
  12. R2(config-if)#no shutdown
  13. R2(config-if)#exit
  14. R2(config)ip route 0.0.0.0 0.0.0.0 fastEthernet 1/0
  15. R2(config)#router rip
  16. R2(config-router)#version 2
  17. R2(config-router)#no auto-summary
  18. R2(config-router)#network 192.168.4.0
  19. R2(config-router)#network 192.168.5.0
  20. R2(config-router)#default-information originate

2)MS2配置IP地址添加动态路由条目

  1. MS2(config)#interface fastEthernet 0/1
  2. MS2(config-if)#no switchport
  3. MS2(config-if)#ip address 192.168.4.1 255.255.255.0
  4. MS2(config-if)#no shutdown
  5. MS2(config-if)#exit
  6. MS2(config)#router rip
  7. R2(config-router)#version 2
  8. MS2(config-router)#network 192.168.4.0

3)MS1配置IP地址添加动态路由条目

  1. MS1(config)#interface fastEthernet 0/24
  2. MS1(config-if)#no switchport
  3. MS1(config-if)#ip address 192.168.5.1 255.255.255.0
  4. MS1(config-if)#no shutdown
  5. MS1(config-if)#exit
  6. MS1(config)#router rip
  7. R2(config-router)#version 2
  8. MS1(config-router)#network 192.168.5.0

4)在客户端测试网络的联通性

  1. SERVER>ipconfig
  2. FastEthernet0 Connection:(default port)
  3. Link-local IPv6 Address.........: FE80::201:96FF:FEA8:404B
  4. IP Address......................: 192.168.1.1
  5. Subnet Mask.....................: 255.255.255.0
  6. Default Gateway.................: 192.168.1.254
  7. SERVER>ping 192.168.2.1
  8. Pinging 192.168.2.1 with 32 bytes of data:
  9. Reply from 192.168.2.1: bytes=32 time=0ms TTL=255
  10. Reply from 192.168.2.1: bytes=32 time=0ms TTL=255
  11. Reply from 192.168.2.1: bytes=32 time=0ms TTL=255
  12. Reply from 192.168.2.1: bytes=32 time=0ms TTL=255
  13. Ping statistics for 192.168.2.1:
  14. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  15. Approximate round trip times in milli-seconds:
  16. Minimum = 0ms, Maximum = 0ms, Average = 0ms
  17. SERVER>ping 192.168.3.1
  18. Pinging 192.168.3.1 with 32 bytes of data:
  19. Reply from 192.168.3.1: bytes=32 time=0ms TTL=255
  20. Reply from 192.168.3.1: bytes=32 time=0ms TTL=255
  21. Reply from 192.168.3.1: bytes=32 time=0ms TTL=255
  22. Reply from 192.168.3.1: bytes=32 time=0ms TTL=255
  23. Ping statistics for 192.168.3.1:
  24. Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
  25. Approximate round trip times in milli-seconds:
  26. Minimum = 0ms, Maximum = 0ms, Average = 0ms
  27. SERVER>ping 192.168.4.1
  28. Pinging 192.168.4.1 with 32 bytes of data:
  29. Reply from 192.168.4.1: bytes=32 time=1ms TTL=255
  30. Reply from 192.168.4.1: bytes=32 time=0ms TTL=255
  31. Reply from 192.168.4.1: bytes=32 time=0ms TTL=255
  32. Reply from 192.168.4.1: bytes=32 time=0ms TTL=255
  33. Ping statistics for 192.168.4.1:
  34. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  35. Approximate round trip times in milli-seconds:
  36. Minimum = 0ms, Maximum = 1ms, Average = 0ms
  37. SERVER>ping 192.168.5.1
  38. Pinging 192.168.5.1 with 32 bytes of data:
  39. Reply from 192.168.5.1: bytes=32 time=1ms TTL=255
  40. Reply from 192.168.5.1: bytes=32 time=1ms TTL=255
  41. Reply from 192.168.5.1: bytes=32 time=1ms TTL=255
  42. Reply from 192.168.5.1: bytes=32 time=0ms TTL=255
  43. Ping statistics for 192.168.5.1:
  44. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  45. Approximate round trip times in milli-seconds:
  46. Minimum = 0ms, Maximum = 1ms, Average = 0ms
  47. SERVER>ping 192.168.2.2
  48. Pinging 192.168.2.2 with 32 bytes of data:
  49. Reply from 192.168.2.2: bytes=32 time=1ms TTL=254
  50. Reply from 192.168.2.2: bytes=32 time=1ms TTL=254
  51. Reply from 192.168.2.2: bytes=32 time=11ms TTL=254
  52. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
  53. Ping statistics for 192.168.2.2:
  54. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  55. Approximate round trip times in milli-seconds:
  56. Minimum = 0ms, Maximum = 11ms, Average = 3ms
  57. SERVER>ping 192.168.3.2
  58. Pinging 192.168.3.2 with 32 bytes of data:
  59. Reply from 192.168.3.2: bytes=32 time=0ms TTL=254
  60. Reply from 192.168.3.2: bytes=32 time=0ms TTL=254
  61. Reply from 192.168.3.2: bytes=32 time=1ms TTL=254
  62. Reply from 192.168.3.2: bytes=32 time=0ms TTL=254
  63. Ping statistics for 192.168.3.2:
  64. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  65. Approximate round trip times in milli-seconds:
  66. Minimum = 0ms, Maximum = 1ms, Average = 0ms

5)关闭MS1

  1. MS1(config)#interface range fastEthernet 0/1-24
  2. MS1(config-if-range)#shutdown

6)在外网测试是否可以访问web服务器如图-4所示

图-4

步骤八:在R2上配置端口映射

1)在R2上配置端口映射,指定NAT进口

  1. R2(config)#ip nat inside source static tcp 192.168.1.8 80 61.159.62.131 80
  2. R2(config)#interface fastEthernet 0/0
  3. R2(config-if)#ip nat inside
  4. R2(config-if)#exit
  5. R2(config)#interface fastEthernet 0/1
  6. R2(config-if)#ip nat inside
  7. R2(config-if)#exit
  8. R2(config)#interface fastEthernet 1/0
  9. R2(config-if)#ip nat outside

2)关闭R1(如图-5所示)测试外网是否可以正常访问web服务器(因为模拟器有BUG所以需要填加一台Internet主机IP:61.159.62.133测试如图-6所示)

图-5

图-6

可以访问web服务器证明项目升级成功。

运维之思科篇 -----6.思科项目练习相关推荐

  1. mongodb 监控权限_运维监控产品分析篇

    开源运维监控系统篇 1.zabbix 用户群:85%以上的泛互联网企业. 优点:支持多平台的企业级分布式开源监控软件 安装部署简单,多种数据采集插件灵活集成 功能强大,可实现复杂多条件告警, 自带画图 ...

  2. Linux运维-服务器系统篇

    Linux运维-服务器系统篇 开篇导读: 本篇博文是此系列教程的第二课,在这一课中将大概的介绍一下服务器上的操作系统,了解一下它的基本概念和发展历程. 服务器系统的概念和作用 如何理解服务器操作系统? ...

  3. linux重新启动某一个项目,Linux运维知识之supervisor更改某项目配置后 需要重新启动才有效...

    本文主要向大家介绍了Linux运维知识之supervisor更改某项目配置后 需要重新启动才有效,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助. 在linux服务器上部署了nod ...

  4. python cmdb_python自动化运维之CMDB篇-大米哥

    python自动化运维之CMDB篇 视频地址:复制这段内容后打开百度网盘手机App,操作更方便哦 链接:https://pan.baidu.com/s/1Oj_sglTi2P1CMjfMkYKwCQ  ...

  5. python开发web运维工具_【实战小项目】python开发自动化运维工具--批量操作主机...

    有很多开源自动化运维工具都很好用如ansible/salt stack等,完全不用重复造轮子.只不过,很多运维同学学习Python之后,苦于没小项目训练,本篇演示用Python写一个批量操作主机的工具 ...

  6. 数据库的运维策略脚本篇(内附脚本,无私分享)

    数据库运维中盛传一个小段子,我误删除了数据库,改怎么办?有备份还原备份,没有备份就准备简历!听起来有趣但发生在谁身上,谁都笑不起来.接触了很多的客户发现90%客户的运维策略都不是很完善.本篇就分享一些 ...

  7. 【运维面试】一个电商项目需要了解哪些知识点?

    作为一个运维,在你写的运维项目里,不单单要知道运维的知识点,还应该去了解与这个项目相关的其他岗位的知识点. 我们今天以电商项目为例,来探讨一下 电商项目包含哪些知识点? 前台 后台 订单 登陆 购物车 ...

  8. 计算机运维相关专业知识考试,计算机项目运维人员考什么证书

    计算机项目是一种属于典型项目的科技工程.在计算机项目有许多的分支,包括软件.系统集成.计算机系统等.在一个计算机项目中,项目运维人员是一个项目的末端,承担着项目的最终测试工作,对于一个项目也是有一定的 ...

  9. 【运维知识进阶篇】手把手教你搭建OpenVPN(保姆级教程)

    VPN就是虚拟专用通道,是提供给企业之间或者公司个人与公司之间安全数据传输的隧道,OpenVPN是Linux下开源VPN的先锋,提供了良好的性能和友好的用户GUI(图形用户界面).本篇文章包含Open ...

  10. scrapy python3.8_银狐DevNet-网络运维Python初篇(四)netmiko抓取华为网络配置并存入本地...

    1.训练场景:读取excel中设备IP地址,通过Netmiko抓取设备配置,并存入本地 上一小节我们通过excel得到设备IP地址,并用Netmiko批量抓取设备配置并打印出来,真实运维场景我们需要把 ...

最新文章

  1. 什么是POM maven
  2. 美团Java面试154道题分享!
  3. 第十章—DOM(0)—NODE类型
  4. VMware虚拟机不能联网的解决办法
  5. 深度学习分割json_to_data报错Too many dimensions: 3 > 2
  6. Html5移动开发之Localstorage(本地存储)
  7. 每天一杯C_Visual Studio各个版本的区别和总结
  8. cf不能全屏win7的解决方法_win10玩cf不能全屏的解决方法教程
  9. Swift 新建 APP 黑屏问题
  10. 优秀图片标注工具 推荐
  11. PS打造电影金属字体
  12. C语言的lsb算法bmp信息隐藏,C-LSB C语言信息隐藏数字水印LSB算法 - 下载 - 搜珍网...
  13. vue3.0导出excel带格式
  14. 55.网页设计规则#3_图片和插图
  15. nginx解决微信头像canvas跨域问题
  16. EPC电子标签的一些基本知识
  17. 网页版百度地图突然要键盘才能移动地图_怎样才能让自己的网站容易被百度收录?...
  18. HDU 6169 Senior PanⅡ 数论+DP
  19. iframe详细用法
  20. MATLAB Runtime 安装方法

热门文章

  1. x86 ME PSP检测工具
  2. 哪个行业最难逃35岁危机?看看大数据怎么说!
  3. 类脑计算机可治疗精分吗,青春期精神分裂症能治好吗?怎样治疗
  4. python动态数组实现_利用python实现动态数组
  5. 带你走进缓存世界(2):缓存入门
  6. springboot+mysql+微信小程序点餐系统-计算机毕业设计源码65933
  7. 李斌、李想、何小鹏的性格与宿命
  8. c++实现霍夫曼编码
  9. ffmpeg编译支持h265的rtmp windown版本
  10. 戴了一天口罩,头晕、胸闷、浑身难受怎么办?