1:Vlan的划分

1.1 问题

VLAN(虚拟局域网)是对连接到的第二层交换机端口的网络用户的逻辑分段,不受网络用户的物理位置限制而根据用户需求进行网络分段。一个VLAN可以在一个交换机或者跨交换机实现。VLAN可以根据网络用户的位置、作用、部门或者根据网络用户所使用的应用程序和协议来进行分组。基于交换机的虚拟局域网能够为局域网解决冲突域、广播域、带宽问题。

  • 按企业部门规划vlan

1.2 方案

在交换机上创建vlan2、vlan3,参照如下网络拓扑如图-1所示:

图-1

1.3 步骤

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

步骤一:客户端与交换机相连

1)为了使同vlan在交换机上可以通信,需要给同vlan客户端配置同网段IP地址,如图-2、图-3所示

图-2

图-3

分别配置为192.168.1.1、192.169.1.2;192.168.2.1、192.168.2.2;192.168.3.1、192.168.3.2;

2)在交换机上创建vlan2 和vlan3并将指定的接口划分到相对应的vlan下

copytextpop-up

  1. Switch >enable
  2. Switch#configure terminal
  3. Switch(config)#vlan 2
  4. Switch(config-vlan)#exit
  5. Switch(config)#vlan 3
  6. Switch(config-vlan)#exit
  7. Switch(config)#interface fastEthernet 0/3
  8. Switch(config-if)#switchport access vlan 2
  9. Switch(config-if)#exit
  10. Switch(config)#interface fastEthernet 0/4
  11. Switch(config-if)#switchport access vlan 2
  12. Switch(config-if)#exit
  13. Switch(config)#interface fastEthernet 0/5
  14. Switch(config-if)#switchport access vlan 3
  15. Switch(config-if)#exit
  16. Switch(config)#interface fastEthernet 0/6
  17. Switch(config-if)#switchport access vlan 3

Switch >enable

Switch#configure terminal

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#vlan 3

Switch(config-vlan)#exit

Switch(config)#interface fastEthernet 0/3

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/4

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/5

Switch(config-if)#switchport access vlan 3

Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/6

Switch(config-if)#switchport access vlan 3

3)在交换机上查看vlan信息,可以看到创建的vlan以及vlan下的接口

copytextpop-up

  1. Switch>enable
  2. Switch#show vlan
  3. VLAN Name Status Ports
  4. ----------------------------------------------------------------------------
  5. 1defaultactive Fa0/1, Fa0/2, Fa0/7, Fa0/8
  6. Fa0/9,Fa0/10,Fa0/11,Fa0/12
  7. Fa0/13,Fa0/14,Fa0/15,Fa0/16
  8. Fa0/17,Fa0/18,Fa0/19,Fa0/20
  9. Fa0/21,Fa0/22,Fa0/23,Fa0/24
  10. 2VLAN0002 active Fa0/3, Fa0/4
  11. 3VLAN0003 active Fa0/5, Fa0/6
  12. 1002fddi-default act/unsup
  13. 1003token-ring-default act/unsup
  14. 1004fddinet-default act/unsup
  15. 1005trnet-default act/unsup
  16. VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
  17. --------------------------------------------------------------------
  18. 1enet 100001 1500 - - - - - 0 0
  19. 2enet 100002 1500 - - - - - 0 0
  20. 3enet 100003 1500 - - - - - 0 0
  21. 1002fddi 101002 1500 - - - - - 0 0
  22. 1003tr 101003 1500 - - - - - 0 0
  23. 1004fdnet 101004 1500 - - - ieee - 0 0
  24. 1005trnet 101005 1500 - - - ibm - 0 0
  25. Remote SPAN VLANs
  26. ------------------------------------------------------------------------------
  27. Primary Secondary Type Ports
  28. ---------------------------------------------------------------------------

Switch>enable

Switch#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/7, Fa0/8

Fa0/9, Fa0/10, Fa0/11, Fa0/12

Fa0/13, Fa0/14, Fa0/15, Fa0/16

Fa0/17, Fa0/18, Fa0/19, Fa0/20

Fa0/21, Fa0/22, Fa0/23, Fa0/24

2 VLAN0002 active Fa0/3, Fa0/4

3 VLAN0003 active Fa0/5, Fa0/6

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0

2 enet 100002 1500 - - - - - 0 0

3 enet 100003 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs

------------------------------------------------------------------------------

Primary Secondary Type Ports

------- --------- ----------------- ------------------------------------------

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

在192.168.1.0/24的客户机上测试1.0网段的连通性

copytextpop-up

  1. PC1>ping 192.168.1.2
  2. Pinging 192.168.1.2 with 32 bytes of data:
  3. Reply from 192.168.1.2: bytes=32 time=11ms TTL=128
  4. Reply from 192.168.1.2: bytes=32 time=1ms TTL=128
  5. Reply from 192.168.1.2: bytes=32 time=1ms TTL=128
  6. Reply from 192.168.1.2: bytes=32 time=4ms TTL=128
  7. Ping statistics for 192.168.1.2:
  8. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  9. Approximate round trip times in milli-seconds:
  10. Minimum = 1ms, Maximum = 11ms, Average = 4ms

PC1>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Reply from 192.168.1.2: bytes=32 time=11ms TTL=128

Reply from 192.168.1.2: bytes=32 time=1ms TTL=128

Reply from 192.168.1.2: bytes=32 time=1ms TTL=128

Reply from 192.168.1.2: bytes=32 time=4ms TTL=128

Ping statistics for 192.168.1.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 1ms, Maximum = 11ms, Average = 4ms

5)在192.168.2.0/24的客户机上测试2.0网段的连通性

copytextpop-up

  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=1ms TTL=128
  4. Reply from 192.168.2.2: bytes=32 time=0ms TTL=128
  5. Reply from 192.168.2.2: bytes=32 time=0ms TTL=128
  6. Reply from 192.168.2.2: bytes=32 time=0ms TTL=128
  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

PC>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=1ms TTL=128

Reply from 192.168.2.2: bytes=32 time=0ms TTL=128

Reply from 192.168.2.2: bytes=32 time=0ms TTL=128

Reply from 192.168.2.2: bytes=32 time=0ms TTL=128

Ping statistics for 192.168.2.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

6)在192.168.3.0/24的客户机上测试3.0网段的连通性

copytextpop-up

  1. PC>ping 192.168.3.2
  2. Pinging 192.168.3.2 with 32 bytes of data:
  3. Reply from 192.168.3.2: bytes=32 time=1ms TTL=128
  4. Reply from 192.168.3.2: bytes=32 time=0ms TTL=128
  5. Reply from 192.168.3.2: bytes=32 time=0ms TTL=128
  6. Reply from 192.168.3.2: bytes=32 time=1ms TTL=128
  7. Ping statistics for 192.168.3.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

PC>ping 192.168.3.2

Pinging 192.168.3.2 with 32 bytes of data:

Reply from 192.168.3.2: bytes=32 time=1ms TTL=128

Reply from 192.168.3.2: bytes=32 time=0ms TTL=128

Reply from 192.168.3.2: bytes=32 time=0ms TTL=128

Reply from 192.168.3.2: bytes=32 time=1ms TTL=128

Ping statistics for 192.168.3.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

2 案例2:配置trunk中继链路

2.1 问题

在两台交换机上分别创建vlan2、vlan3,参照如下网络拓扑图-4将端口加入到指定的vlan并配置IP址,实现跨交换机的同vlan主机的通信。

图-4

2.2 方案

分别在sw1和sw2上创建vlan2和vlan3并把相应的接口划分到对应的vlan并为客户端配置IP地址,IP地址具有唯一性所以同一局域网络中不能存在相同的IP,另所有的接口默认为vlan1,所以不配置trunk中继链路vlan1也是可以跨交换机通信的。

2.3 步骤

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

步骤一:为客户端配置IP,分别为交换机sw1和sw2创建vlan并把相应的接口划到相对应的vlan下

1)参照图-4为客户端分别配置相对应网段的IP

2)为交换机创建vlan2、vlan3 并把相应的接口划到vlan下

copytextpop-up

  1. Switch >enable
  2. Switch#configure terminal
  3. Switch(config)#hostname SW1
  4. SW1(config)#Switch(config-vlan)#exit
  5. SW1(config)#vlan 3
  6. SW1(config-vlan)#exit
  7. SW1(config)#interface fastEthernet 0/3
  8. SW1(config-if)#switchport access vlan 2
  9. SW1(config-if)#exit
  10. SW1(config)#interface fastEthernet 0/4
  11. SW1(config-if)#switchport access vlan 2
  12. SW1(config-if)#exit
  13. SW1(config)#interface fastEthernet 0/5
  14. SW1(config-if)#switchport access vlan 3
  15. SW1(config-if)#exit
  16. SW1(config)#interface fastEthernet 0/6
  17. SW1(config-if)#switchport access vlan 3
  18. Switch >enable
  19. Switch#configure terminal
  20. Enter configuration commands, one per line. End with CNTL/Z.
  21. Switch(config)#hostname SW2
  22. SW2(config)#Switch(config-vlan)#exit
  23. SW2(config)#vlan 3
  24. SW2(config-vlan)#exit
  25. SW2(config)#interface fastEthernet 0/3
  26. SW2(config-if)#switchport access vlan 2
  27. SW2(config-if)#exit
  28. SW2(config)#interface fastEthernet 0/4
  29. SW2(config-if)#switchport access vlan 2
  30. SW2(config-if)#exit
  31. SW2(config)#interface fastEthernet 0/5
  32. SW2(config-if)#switchport access vlan 3
  33. SW2(config-if)#exit
  34. SW2(config)#interface fastEthernet 0/6
  35. SW2(config-if)#switchport access vlan 3

Switch >enable

Switch#configure terminal

Switch(config)#hostname SW1

SW1 (config)#Switch(config-vlan)#exit

SW1 (config)#vlan 3

SW1 (config-vlan)#exit

SW1 (config)#interface fastEthernet 0/3

SW1 (config-if)#switchport access vlan 2

SW1 (config-if)#exit

SW1 (config)#interface fastEthernet 0/4

SW1 (config-if)#switchport access vlan 2

SW1 (config-if)#exit

SW1 (config)#interface fastEthernet 0/5

SW1 (config-if)#switchport access vlan 3

SW1 (config-if)#exit

SW1 (config)#interface fastEthernet 0/6

SW1 (config-if)#switchport access vlan 3

Switch >enable

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname SW2

SW2 (config)#Switch(config-vlan)#exit

SW2 (config)#vlan 3

SW2 (config-vlan)#exit

SW2 (config)#interface fastEthernet 0/3

SW2(config-if)#switchport access vlan 2

SW2 (config-if)#exit

SW2 (config)#interface fastEthernet 0/4

SW2 (config-if)#switchport access vlan 2

SW2 (config-if)#exit

SW2 (config)#interface fastEthernet 0/5

SW2 (config-if)#switchport access vlan 3

SW2 (config-if)#exit

SW2 (config)#interface fastEthernet 0/6

SW2 (config-if)#switchport access vlan 3

3)分别查看SW1和SW2交换机上的vlan信息

copytextpop-up

  1. SW1#show vlan
  2. VLAN Name Status Ports
  3. ----------------------------------------------------------------------------
  4. 1defaultactive Fa0/1, Fa0/2, Fa0/8, Fa0/9
  5. Fa0/10,Fa0/11,Fa0/12,Fa0/13
  6. Fa0/14,Fa0/15,Fa0/16,Fa0/17
  7. Fa0/18,Fa0/19,Fa0/20,Fa0/21
  8. Fa0/22,Fa0/23,Fa0/24
  9. 2VLAN0002 active Fa0/3, Fa0/4
  10. 3VLAN0003 active Fa0/5, Fa0/6
  11. 1002fddi-default act/unsup
  12. 1003token-ring-default act/unsup
  13. 1004fddinet-default act/unsup
  14. 1005trnet-default act/unsup
  15. VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
  16. --------------------------------------------------------------------
  17. 1enet 100001 1500 - - - - - 0 0
  18. 2enet 100002 1500 - - - - - 0 0
  19. 3enet 100003 1500 - - - - - 0 0
  20. 1002fddi 101002 1500 - - - - - 0 0
  21. 1003tr 101003 1500 - - - - - 0 0
  22. 1004fdnet 101004 1500 - - - ieee - 0 0
  23. 1005trnet 101005 1500 - - - ibm - 0 0
  24. Remote SPAN VLANs
  25. ------------------------------------------------------------------------------
  26. Primary Secondary Type Ports
  27. ---------------------------------------------------------------------------
  28. SW1#
  29. SW2#show vlan
  30. VLAN Name Status Ports
  31. ----------------------------------------------------------------------------
  32. 1defaultactive Fa0/1, Fa0/2, Fa0/8, Fa0/9
  33. Fa0/10,Fa0/11,Fa0/12,Fa0/13
  34. Fa0/14,Fa0/15,Fa0/16,Fa0/17
  35. Fa0/18,Fa0/19,Fa0/20,Fa0/21
  36. Fa0/22,Fa0/23,Fa0/24
  37. 2VLAN0002 active Fa0/3, Fa0/4
  38. 3VLAN0003 active Fa0/5, Fa0/6
  39. 1002fddi-default act/unsup
  40. 1003token-ring-default act/unsup
  41. 1004fddinet-default act/unsup
  42. 1005trnet-default act/unsup
  43. VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
  44. --------------------------------------------------------------------
  45. 1enet 100001 1500 - - - - - 0 0
  46. 2enet 100002 1500 - - - - - 0 0
  47. 3enet 100003 1500 - - - - - 0 0
  48. 1002fddi 101002 1500 - - - - - 0 0
  49. 1003tr 101003 1500 - - - - - 0 0
  50. 1004fdnet 101004 1500 - - - ieee - 0 0
  51. 1005trnet 101005 1500 - - - ibm - 0 0
  52. Remote SPAN VLANs
  53. ------------------------------------------------------------------------------
  54. Primary Secondary Type Ports
  55. ---------------------------------------------------------------------------
  56. SW2#

SW1#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/8, Fa0/9

Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14, Fa0/15, Fa0/16, Fa0/17

Fa0/18, Fa0/19, Fa0/20, Fa0/21

Fa0/22, Fa0/23, Fa0/24

2 VLAN0002 active Fa0/3, Fa0/4

3 VLAN0003 active Fa0/5, Fa0/6

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0

2 enet 100002 1500 - - - - - 0 0

3 enet 100003 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs

------------------------------------------------------------------------------

Primary Secondary Type Ports

------- --------- ----------------- ------------------------------------------

SW1#

SW2#show vlan

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 default active Fa0/1, Fa0/2, Fa0/8, Fa0/9

Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14, Fa0/15, Fa0/16, Fa0/17

Fa0/18, Fa0/19, Fa0/20, Fa0/21

Fa0/22, Fa0/23, Fa0/24

2 VLAN0002 active Fa0/3, Fa0/4

3 VLAN0003 active Fa0/5, Fa0/6

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0

2 enet 100002 1500 - - - - - 0 0

3 enet 100003 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

1003 tr 101003 1500 - - - - - 0 0

1004 fdnet 101004 1500 - - - ieee - 0 0

1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs

------------------------------------------------------------------------------

Primary Secondary Type Ports

------- --------- ----------------- ------------------------------------------

SW2#

步骤二:为交换机配置trunk中继链接路

1)分别进入两台交换机相连接的f0/7接口配置trunk中继链路

copytextpop-up

  1. SW1>enable
  2. SW1#configure terminal
  3. SW1(config)#interface fastEthernet 0/7
  4. SW1(config-if)#switchport mode trunk
  5. SW2#enable
  6. SW2#configure terminal
  7. SW2(config)#interface fastEthernet 0/7
  8. SW2(config-if)#switchport mode trunk
  9. SW2(config-if)#

SW1>enable

SW1#configure terminal

SW1(config)#interface fastEthernet 0/7

SW1(config-if)#switchport mode trunk

SW2#enable

SW2#configure terminal

SW2(config)#interface fastEthernet 0/7

SW2(config-if)#switchport mode trunk

SW2(config-if)#

2)测试2.0网段和3.0网段跨交换机通信

copytextpop-up

  1. PC>ping 192.168.2.3
  2. Pinging 192.168.2.3 with 32 bytes of data:
  3. Reply from 192.168.2.3: bytes=32 time=1ms TTL=128
  4. Reply from 192.168.2.3: bytes=32 time=0ms TTL=128
  5. Reply from 192.168.2.3: bytes=32 time=0ms TTL=128
  6. Reply from 192.168.2.3: bytes=32 time=0ms TTL=128
  7. Ping statistics for 192.168.2.3:
  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 192.168.3.3
  12. Pinging 192.168.3.3 with 32 bytes of data:
  13. Reply from 192.168.3.3: bytes=32 time=1ms TTL=128
  14. Reply from 192.168.3.3: bytes=32 time=0ms TTL=128
  15. Reply from 192.168.3.3: bytes=32 time=0ms TTL=128
  16. Reply from 192.168.3.3: bytes=32 time=0ms TTL=128
  17. Ping statistics for 192.168.3.3:
  18. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  19. Approximate round trip times in milli-seconds:
  20. Minimum = 0ms, Maximum = 1ms, Average = 0ms

PC>ping 192.168.2.3

Pinging 192.168.2.3 with 32 bytes of data:

Reply from 192.168.2.3: bytes=32 time=1ms TTL=128

Reply from 192.168.2.3: bytes=32 time=0ms TTL=128

Reply from 192.168.2.3: bytes=32 time=0ms TTL=128

Reply from 192.168.2.3: bytes=32 time=0ms TTL=128

Ping statistics for 192.168.2.3:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

PC>ping 192.168.3.3

Pinging 192.168.3.3 with 32 bytes of data:

Reply from 192.168.3.3: bytes=32 time=1ms TTL=128

Reply from 192.168.3.3: bytes=32 time=0ms TTL=128

Reply from 192.168.3.3: bytes=32 time=0ms TTL=128

Reply from 192.168.3.3: bytes=32 time=0ms TTL=128

Ping statistics for 192.168.3.3:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

3 案例3:以太通道配置

3.1 问题

企业需要增加带宽和网络可用性,以太通道可以同时满足这两个条件,而又无需购买新设备。

3.2 方案

在某些环境下,为了在现有条件下增加带宽而不增加额外的设备,以太通道是可用技术之一。以太通道为交换机提供了端口捆绑的技术,允许两个交换机之间通过两个或多个端口并行连接,同时传输数据,以提供更高的带宽。

企业网络模拟拓扑环境如图-5所示:

图-5

3.3 步骤

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

步骤一:在交换机A上分别配置以太通道

太通道的配置模式与Trunk类似,也有开启、企望等。同样的,在生产环境下都是强制设置以太通道处于on的状态,而不是让它们自动协商。

copytextpop-up

  1. sw1(config)# interface range fastEthernet 0/7 – 9
  2. Switch(config-if-range)#switchport mode trunk
  3. sw1(config-if-range)#channel-group 1 mode on
  4. sw1(config-if-range)#

sw1(config)# interface range fastEthernet 0/7 – 9

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

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

sw1(config-if-range)#

步骤二:在交换机B上分别配置以太通道

copytextpop-up

  1. sw2(config)# interface range fastEthernet 0/7 – 9
  2. Switch(config-if-range)#switchport mode trunk
  3. sw2(config-if-range)#channel-group 1 mode on
  4. sw2(config-if-range)#

sw2(config)# interface range fastEthernet 0/7 – 9

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

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

sw2(config-if-range)#

步骤三:在交换机A上查看以太通通道配置

copytextpop-up

  1. sw1# show etherchannel 1 summary
  2. Flags: D - down P - in port-channel
  3. I - stand-alone s - suspended
  4. H - Hot-standby (LACP only)
  5. R - Layer3 S - Layer2
  6. U - in use f - failed to allocate aggregator
  7. u - unsuitable for bundling
  8. w - waiting to be aggregated
  9. d - default port
  10. Numberof channel-groups in use: 1
  11. Numberof aggregators: 1
  12. Group Port-channel Protocol Ports
  13. ------+-------------+-----------+---------------------------------
  14. 1Po1(SU) - Fa0/7(P) Fa0/8(P) Fa0/9(P)

sw1# show etherchannel 1 summary

Flags:  D - down        P - in port-channel

I - stand-alone s - suspended

H - Hot-standby (LACP only)

R - Layer3      S - Layer2

U - in use      f - failed to allocate aggregator

u - unsuitable for bundling

w - waiting to be aggregated

d - default port

Number of channel-groups in use: 1

Number of aggregators:           1

Group  Port-channel  Protocol    Ports

------+-------------+-----------+---------------------------------

1      Po1(SU)          -        Fa0/7(P)   Fa0/8(P)    Fa0/9(P)

根据输出最后一行小括号中的提示,可以获知以太通道是二层的(S)、正在被使用的(U),端口Fa0/7、Fa0/8和Fa09在以太通道中(P)。

步骤四:创建以太通道后,系统会增加一个名称为Port-channel 1的端口,可以通过show running-config命令查看到其信息

copytextpop-up

  1. sw2#show running-config
  2. Building configuration...
  3. Current configuration : 1308 bytes
  4. !
  5. version 12.2
  6. no service timestamps log datetime msec
  7. no service timestamps debug datetime msec
  8. no service password-encryption
  9. !
  10. hostname tarena-sw2
  11. !
  12. !
  13. ....
  14. interfacePort-channel 1 //以太通道信息
  15. switchport mode trunk
  16. !
  17. ....

sw2#show running-config

Building configuration...

Current configuration : 1308 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname tarena-sw2

!

!

.. ..

interface Port-channel 1      //以太通道信息

switchport mode trunk

!

.. ..

4 案例4:DHCP服务配置

4.1 问题

大型企业网络客户机数量较多,客记机IP地址配置如果都为静态配置存在如下问题:

  • 增加网络管理员工作量
  • 静态手动配置容易输入错误
  • 静态手动配置容易冲突

4.2 方案

在路由器上配置DHCP服务为客户端自动分配IP地址如图-6所示:

图-6

  • VLAN 1:192.168.1.0/24
  • 网关192.168.1.254
  • 首选DNS为202.106.0.20
  • 预留IP地址打印服务器:192.168.1.1
  • 预留IP地址文件服务器:192.168.1.100

4.3 步骤

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

步骤一:路由器R1配置DHCP服务

1)配置路由器接口IP

copytextpop-up

  1. R1(config)#interface fastEthernet 0/0
  2. R1(config-if)#ip address 192.168.1.254 255.255.255.0
  3. R1(config-if)#no shutdown

R1(config)#interface fastEthernet 0/0

R1(config-if)#ip address 192.168.1.254 255.255.255.0

R1(config-if)#no shutdown

2)DHCP服务配置

copytextpop-up

  1. R1(config)#ip dhcp pool vlan11)
  2. R1(dhcp-config)#network 192.168.1.0 255.255.255.0
  3. R1(dhcp-config)#default-router 192.168.1.254
  4. R1(dhcp-config)#dns-server 202.106.0.20
  5. R1(config)#ip dhcp excluded-address 192.168.1.1
  6. R1(config)#ip dhcp excluded-address 192.168.1.100

R1(config)#ip dhcp pool vlan11)

R1(dhcp-config)#network 192.168.1.0 255.255.255.0

R1(dhcp-config)#default-router 192.168.1.254

R1(dhcp-config)#dns-server 202.106.0.20

R1(config)#ip dhcp excluded-address 192.168.1.1

R1(config)#ip dhcp excluded-address 192.168.1.100

3)设置主机A的IP配置为自动获取如图-7所示:

图-7

Vlan的划分;配置trunk中继链路;以太通道配置;DHCP服务配置相关推荐

  1. 【H3C V7路由器实战视频课程系列-3】DHCP服务配置与管理-王达-专题视频课程

    [H3C V7路由器实战视频课程系列-3]DHCP服务配置与管理-428人已学习 课程介绍         本课程系统.深入地介绍了H3C V7版本中DHCP服务器.DHCP中继.DHCP Snoop ...

  2. DHCP服务配置-Cisco模拟器

    DHCP服务配置(Cisco模拟器) 方法一. 利用三层交换机配置DHCP服务 1.拓扑图规划 2. 配置二层交换机vlan 3. 配置三层交换机vlan 4. 配置DHCP服务 5. 测试 方法二. ...

  3. 【树莓派】服务配置相关3:基于Ubuntu Server的服务配置

    该文接续之前写过的两篇: [树莓派]服务配置相关 [树莓派]服务配置相关2:基于RPi Desktop的服务配置 这是我个人用来进行树莓派盒子安装配置的脚本,对于外部其他博友,可以部分参考,但不需要逐 ...

  4. vlan trunk中继链路(讲解+配置)

    目录 简介+作用: 配置一: 配置二: 简介+作用: vlan隔离了广播域,所以交换机之间不能相互通信,为了处于不同交换机上的相同VLAN之间能够相互通信,因此我们使用中继(VLAN TRUNK)链路 ...

  5. 思科交换机 DHCP 服务配置

    说明:有 3 个 VLAN,VLAN2 与 VLAN3 是用户 VLAN,而 VLAN 88 则是 DHCP 服务器的 VLAN,在实验演示一中,DHCP 服务器不会使用,因为实验一是演示的,部署在交 ...

  6. Android DHCP服务配置

    在android 10后,dhcp服务提供两种配置 1.想要使用dnsmasq作为dhcp服务,需要配置如下 frameworks/base/packages/Tethering/res/values ...

  7. 基于Windows server 2003的DHCP服务配置

    实验环境:虚拟机VMWare.Windows server 2003.win7或xp系统 实验步骤: 首先我们需要关闭虚拟机的本地DHCP服务器,这样做使客户机不受本地DHCP服务器的干扰,可以直接从 ...

  8. trunk中继链路,以太网通道

    实验目的:通过划分VLAN从逻辑上将一个网络划分成若干小的虚拟局域网,并在交换机之间做以太网通道让其负载均衡,带宽提高. C1可以和C3实现互通其他则不能,C2和C4实现互通其他则不能 1.配置SW1 ...

  9. 实验二 配置Trunk和链路汇聚

    目录 一.实验内容 二.实验环境 三.实验步骤 一.实验内容 按照拓扑图规划好网络.

  10. 华为设备如何将接口配置为中继模式_华为eNSP——DHCP中继配置

    实验拓扑图 实验环境 R4作为DHCP服务器,R1,R2上做中继服务,实现不同网段的pc获取地址 1,配置sw交换机 sys ##进入系统视图模式 [Huawei]sysname SW1 ##修改名字 ...

最新文章

  1. Flutter 项目开发指导 从基础入门到精通使用目录
  2. JS-DOM-节点-获取元素-文档结构-元素的属性
  3. 移除Kubeadm部署的kubernetes环境
  4. android4.2.2飞歌导航,智能车机新典范 飞歌G6S荣耀版导航鉴赏
  5. windows7 内部版本7601 此windows副本不是正版 ---解决方案
  6. 玩客云安装linux系统的好处,玩客云armbian安装aria2+ariaNG过程记录
  7. 简易猜数1~100数字小游戏ovo
  8. 歪解单片机的时钟系统--关于内外时钟切换及时钟超频测试
  9. md5碰撞Java_2 MD5加密 java实现
  10. TIA博途中触摸屏仿真时画面字体变大,超出范围的处理方法
  11. OS20190301
  12. 严格模式和标准模式的区别(附严格模式实战实例)
  13. 面向自动驾驶的高精地图及数据采集生产体系
  14. 【游戏介绍】aiwi体感游戏滑雪
  15. php跨域解决办法,PHP跨域问题解决方案
  16. 中国省份城市json数据
  17. 简单到令人发指的插画制作方法
  18. Windows电脑SMB共享设置方法
  19. 安卓反编译就这么简单
  20. 深度学习玩LOL-游戏助手-概述

热门文章

  1. spring boot-Soap协议客户端集成(根据WSDL文档调用WebService、maven的jaxb2插件)
  2. 使用CAD手机看图软件打开图纸压缩包的方法技巧
  3. 常微分方程在计算机的应用,简述计算机数学软件在常微分方程中的应用
  4. 高通骁龙200、400、600、800处理器规格分享
  5. 闪存类型测试软件,一芯U盘闪存测试工具(DieSorting)
  6. 冰点还原精灵如何安装
  7. 电脑安装Chrome OS
  8. java jdom 类_JDOM 介绍及使用指南
  9. 白噪声的matlab程序,matlab产生白噪声信号
  10. revit二次开发创建标高