Etherchannel là một công nghệ cho phép chúng ta ghép nhiều đường link Ethernet lại thành một đường truyền, giúp tăng đáng kể băng thông kết nối giữa hai thiết bị cũng như thực hiện rất tốt sự dự phòng về đường link giữa hai thiết bị. Thông thường, chúng ta thường cấu hình Etherchannel trên các thiết bị chuyển mạch switch, tuy nhiên trong nhiều trường hợp, chúng ta cũng có thể thiết lập Etherchannel giữa hai router. Bài viết tuần này sẽ hướng dẫn về vấn đề cấu hình Etherchannel trên Router Cisco. • Đặt IP hai đầu channel thuộc subnet 192.168.12.0/24. • Kiểm tra rằng kết nối Etherchannel thông suốt IP. Thực hiện: Đầu tiên, ta thực hiện mở các cổng trên hai router: R1(config)#interface range f0/0 - 1 R1(config-if-range)#no shutdown R1(config-if-range)#exit R2(config)#interface range f0/0 - 1 R2(config-if-range)#no shutdown R2(config-if-range)#exit Tiếp theo, ta khai báo Etherchannel trên hai router: R1(config)#interface port-channel 12 R1(config-if)#no shutdown R1(config-if)#ip address 192.168.12.1 255.255.255.0 R1(config-if)#exit R2(config)#interface port-channel 12 R2(config-if)#no shutdown R2(config-if)#ip address 192.168.12.1 255.255.255.0 R2(config-if)#exit Cuối cùng, ta thực hiện gán các cổng thành phần vào các channel. Lưu ý rằng, khác với switch, việc gán các cổng thành phần vào Etherchannel phải được thực hiện sau khi đã khai báo xong Etherchannel. Trên R1: R1(config)#interface range f0/0 - 1 R1(config-if-range)#channel-group 12 %Interface MTU set to channel-group MTU 1500. FastEthernet0/0 added as member-1 to port-channel12 %Interface MTU set to channel-group MTU 1500. %Interface MTU set to channel-group MTU 1500. FastEthernet0/1 added as member-2 to port-channel12 %Interface MTU set to channel-group MTU 1500. R1(config-if-range)# Ta thực hiện tương tự trên R2. Kiểm tra Kiểm tra rằng các cổng đều up/up: Trên R1: R1#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset up up FastEthernet0/1 unassigned YES unset up up Serial0/0/0 unassigned YES unset administratively down down Serial0/1/0 unassigned YES unset administratively down down Port-channel12 192.168.12.1 YES manual up up Thực hiện tương tự bên phía R2. Để kiểm tra thông số của Etherchannel, ta không sử dụng lệnh “show etherchannel summary” như với switch (dù rằng vẫn có lệnh này) mà sử dụng lệnh: R1#show interfaces port-channel 12 Port-channel12 is up, line protocol is up Hardware is FEChannel, address is 0021.a07d.2480 (bia 0021.a07d.2480) Internet address is 192.168.12.1/24 MTU 1500 bytes, BW 200000 Kbit/sec, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 No. of active members in this channel: 2 Member 0 : FastEthernet0/0 , Full-duplex, 100Mb/s Member 1 : FastEthernet0/1 , Full-duplex, 100Mb/s No. of Non-active members in this channel: 0 No. of PF_JUMBO supported members in this channel : 0 Last input 00:19:58, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/150/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/80 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 15 packets input, 1656 bytes Received 46 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog 0 input packets with dribble condition detected 19 packets output, 1930 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 unknown protocol drops 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out Địa chỉ MAC được sử dụng cho Etherchannel chính là địa chỉ MAC của cổng F0/0: R1#show interfaces f0/0 | include bia Hardware is MV96340 Ethernet, address is 0021.a07d.2480 (bia 0021.a07d.2480) Nếu sử dụng lệnh “show etherchannel summary” như với switch, không có kết quả nào được hiển thị: R1#show etherchannel summary Flags: D - down P - in port-channel I - stand-alone s - suspended R - Layer3 S - Layer2 U - in use Group Port-channel Ports -----+------------+----------------------------------------------------------- R1# Ta có thể thực hiện kiểm tra tương tự bên phía R2. Cuối cùng, ta kiểm tra rằng hai router đã thông suốt kết nối IP thông qua Etherchannel: R1#ping 192.168.12.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms Chúc các bạn thành công!