会计考友 发表于 2012-8-3 20:28:11

CCNA指导:交换机链路聚合

下面是局域网的焦点交流机(三层交流)和二层交流之间的端口聚合的操作实例:

  2950
  Switch>en
  Switch#conf t
  Enter configuration commands, one per line. End with CNTL/Z.
  Switch(config)#int f0/1
  Switch(config-if)#channel-group 1 mode on
  %LINK-5-CHANGED: Interface Port-channel 1, changed state to up
  %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to upSwitch(config-if)#int f0/2
  Switch(config-if)#channel-group 1 mode on
  3560
  Switch(config)#int port-channel 1
  Switch(config-if)#exit
  Switch(config)#ip routing(默认已经启用了路由功能)
  Switch(config)#int port-channel 1
  Switch(config-if)#no switchport
  Switch(config-if)#ip add 1.1.1.1 255.0.0.0
  Switch(config-if)#no shut
  Switch(config-if)#exit
  Switch(config)#int f0/1
  Switch(config-if)#no switchport
  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#
  Switch(config-if)#no ip add
  Switch(config-if)#channel-group 1 mode ?
  active Enable LACP unconditionally
  auto Enable PAgP only if a PAgP device is detected
  desirable Enable PAgP unconditionally
  on Enable Etherchannel only
  passive Enable LACP only if a LACP device is detected
  Switch(config-if)#channel-group 1 mode on
  %LINK-5-CHANGED: Interface Port-channel 1, changed state to up
  %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to upSwitch(config-if)#
  Switch(config-if)#int f0/2
  Switch(config-if)#no switchport
  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#no ip add
  Switch(config-if)#no ip address
  Switch(config-if)#channel-group 1 mode on
  Switch(config-if)#exit
  Switch(config)#int f0/3
  Switch(config-if)#no switchport
  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#ip add 2.2.2.1 255.0.0.0
  Switch(config-if)#no shut
  端口聚合可使流量在多条物理链路上负载平衡,同时也起到了链路的备份浸染。可是在某些设备里,应注重聚合链路两头接口的速度,工作模式,例如在快以中,可将各个端口设置为speed 100,duplex full。

  line con 0
  line aux 0
  line vty 0 4
  login
  !
  endRouterB#sh run
  Building configuration...Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers
  !
  hostname RouterB
  !
  !
  !
  interface Ethernet0
  ip address 172.16.30.1 255.255.255.0
  !
  interface Serial0
  ip address 172.16.20.2 255.255.255.0
  clockrate 56000
  !
  interface Serial1
  ip address 172.16.40.1 255.255.255.0
  clockrate 56000
  !
  no ip classless
  ip route 172.16.10.0 255.255.255.0 172.16.20.1
  ip route 172.16.50.0 255.255.255.0 172.16.40.2
  !
  !
  line con 0
  line aux 0
  line vty 0 4
  login
  !
  end
  RouterC#sh run
  Building configuration...Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers
  !
  hostname RouterC
  !
  !
  !
  interface Ethernet0
  ip address 172.16.50.1 255.255.255.0
  !
  interface Serial0
  ip address 172.16.40.2 255.255.255.0
  no fair-queue
  !
  interface Serial1
  no ip address
  shutdown
  !
  !
  no ip classless
  ip route 172.16.10.0 255.255.255.0 172.16.40.1
  ip route 172.16.20.0 255.255.255.0 172.16.40.1
  ip route 172.16.30.0 255.255.255.0 172.16.40.1
  !
  !
  line con 0
  line aux 0
  line vty 0 4
  login
  !
  endDefault IP Routing Running-configRouterA#sh run
  Building configuration...Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers </p> !
  hostname RouterA
  !
  !
  !
  interface Ethernet0
  ip address 172.16.10.1 255.255.255.0
  !
  interface Serial0
  ip address 172.16.20.1 255.255.255.0
  no fair-queue
  !
  interface Serial1
  no ip address
  shutdown
  !!
  ip classless
  ip route 0.0.0.0 0.0.0.0 172.16.20.2
  !
  !
  line con 0
  line aux 0
  line vty 0 4
  login
  !
  endRouterB#sh run
  Building configuration...Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers
  !
  hostname RouterB
  !
  !
  !
  interface Ethernet0
  ip address 172.16.30.1 255.255.255.0
  !
  interface Serial0
  ip address 172.16.20.2 255.255.255.0
  clockrate 56000
  !
  interface Serial1
  ip address 172.16.40.1 255.255.255.0
  clockrate 56000
  !
  no ip classless
  ip route 172.16.10.0 255.255.255.0 172.16.20.1
  ip route 172.16.50.0 255.255.255.0 172.16.40.2
  !
  !
  line con 0
  line aux 0
  line vty 0 4
  login
  !
  endRouterC#sh run
  Building configuration...Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers
  !
  hostname RouterC
  !
  !
  !
  interface Ethernet0
  ip address 172.16.50.1 255.255.255.0
  !
  interface Serial0
  ip address 172.16.40.2 255.255.255.0
  no fair-queue
  !
  interface Serial1
  no ip address
  shutdown
  !
  !
  ip classless
  ip route 0.0.0.0 0.0.0.0 172.16.40.1
  !
  !
  line c
页: [1]
查看完整版本: CCNA指导:交换机链路聚合