Tutorial topology:
Basic Configuration:
Route
Interface FastEthernet0/0
No ip address
Duplex auto
Speed auto
!
Interface FastEthernet0/0.1
Encapsulation dot1Q 2
Ip address 192.168.2.1 255.255.255.0
!
Interface FastEthernet0/0.2
Encapsulation dot1Q 3
Ip address 192.168.3.1 255.255.255.0
Switch1
Interface FastEthernet0/1
Channel-group 1 mode on
Switchport mode trunk
Duplex full
Speed100
!
Interface FastEthernet0/2
Switchport mode trunk
!
Interface FastEthernet0/3
Channel-group 1 mode on
Switchport mode trunk
Duplex full
Speed100
!
Interface FastEthernet0/4
Switchport access vlan 2
Switchport mode access
!
Interface FastEthernet0/5
Switchport access vlan 3
Switchport mode access
Interface Port-channel 1
Switchport mode trunk
Switch2
Interface FastEthernet0/1
Channel-group 1 mode on
Switchport mode trunk
Duplex full
Speed100
!
Interface FastEthernet0/3
Channel-group 1 mode on
Switchport mode trunk
Duplex full
Speed100
Interface FastEthernet0/6
Switchport access vlan 2
Switchport mode access
!
Interface FastEthernet0/7
Switchport access vlan 3
Switchport mode access
!
Interface Port-channel 1
Switchport mode trunk
!
Lab Verification:
Router # sh ip route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, FastEthernet0/0.1
C 192.168.3.0/24 is directly connected, FastEthernet0/0.2
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 = 156 ms TTL = 127
Reply from 192.168.3.3: bytes = 32 time = 156 ms TTL = 127
Reply from 192.168.3.3: bytes = 32 time = 157 ms TTL = 127
Reply from 192.168.3.3: bytes = 32 time = 110 ms TTL = 127
Ping statistics for 192.168.3.3:
Packets: Sent = 4, stored ED = 4, Lost = 0 (0% loss ),
Approximate round trip times in milli-seconds:
Minimum = 110 ms, Maximum = 157 ms, Average = 144 ms
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 = 188 ms TTL = 128
Reply from 192.168.2.3: bytes = 32 time = 94 ms TTL = 128
Reply from 192.168.2.3: bytes = 32 time = 93 ms TTL = 128
Reply from 192.168.2.3: bytes = 32 time = 94 ms TTL = 128
Ping statistics for 192.168.2.3:
Packets: Sent = 4, stored ED = 4, Lost = 0 (0% loss ),
Approximate round trip times in milli-seconds:
Minimum = 93 ms, Maximum = 188 ms, Average = 117 ms
This article is from Shinano blog