Yêu cầu: Cấu hình Etherchannel cho sơ đồ này
en
conf t
int e0/0
ip add dhcp
no shut
exit
int e1/0
ip add 192.168.1.254 255.255.255.0
no shut
exit
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.10.0 0.0.0.255
access-list 1 permit 192.168.20.0 0.0.0.255
access-list 1 permit 192.168.30.0 0.0.0.255
access-list 1 permit 192.168.40.0 0.0.0.255
ip nat inside source list 1 interface e0/0 overload
int e0/0
ip nat outside
exit
int e1/0
ip nat inside
exit
ip domain-lookup
ip name-server 8.8.8.8
int e1/0.10
encapsulation dot1Q 10
ip address 192.168.10.254 255.255.255.0
ip helper-address 192.168.1.100
ip nat inside
exit
int e1/0.20
encapsulation dot1Q 20
ip address 192.168.20.254 255.255.255.0
ip helper-address 192.168.1.100
ip nat inside
exit
int e1/0.30
encapsulation dot1Q 30
ip address 192.168.30.254 255.255.255.0
ip helper-address 192.168.1.100
ip nat inside
exit
int e1/0.40
encapsulation dot1Q 40
ip address 192.168.40.254 255.255.255.0
ip helper-address 192.168.1.100
ip nat inside
exit
do wr
en
conf t
int e0/0
no sh
ip add 192.168.1.100 255.255.255.0
exit
ip route 0.0.0.0 0.0.0.0 192.168.1.254
ip dhcp pool POOL10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
dns-server 8.8.8.8
exit
ip dhcp excluded-address 192.168.10.1 192.168.10.100
ip dhcp pool POOL20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.254
dns-server 8.8.8.8
exit
ip dhcp excluded-address 192.168.20.1 192.168.20.100
ip dhcp pool POOL30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.254
dns-server 8.8.8.8
exit
ip dhcp excluded-address 192.168.30.1 192.168.30.100
ip dhcp pool POOL40
network 192.168.40.0 255.255.255.0
default-router 192.168.40.254
dns-server 8.8.8.8
exit
ip dhcp excluded-address 192.168.40.1 192.168.40.100
ip dhcp pool vlan1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
dns-server 8.8.8.8
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.100
ip dhcp excluded-address 192.168.1.200 192.168.1.254
do wr
en
conf t
vlan 10
name p10
vlan 20
name p20
vlan 30
name p30
vlan 40
name p40
int vlan 1
no shutdown
ip address 192.168.1.1 255.255.255.0
exit
interface vlan 10
no shutdown
ip address 192.168.10.1 255.255.255.0
exit
interface vlan 20
no shutdown
ip address 192.168.20.1 255.255.255.0
exit
interface vlan 30
no shutdown
ip address 192.168.30.1 255.255.255.0
exit
interface vlan 40
no shutdown
ip address 192.168.40.1 255.255.255.0
exit
int e0/0
switchport trunk encapsulation dot1q
switchport mode trunk
exit
int e1/1
switchport trunk encapsulation dot1q
switchport mode trunk
exit
ip routing
ip route 0.0.0.0 0.0.0.0 192.168.1.254
int range e0/2-3
channel-group 1 mode active
exit
int port-channel 1
sw trunk encapsulation dot1q
sw mode trunk
sw trunk allowed vlan all
exit
int range e1/1-2
channel-group 2 mode active
exit
int port-channel 2
sw trunk encapsulation dot1q
sw mode trunk
sw trunk allowed vlan all
exit
int range e0/2-3
channel-group 1 mode active
exit
int port-channel 1
sw trunk encapsulation dot1q
sw mode trunk
sw trunk allowed vlan all
exit
int e0/0
sw mode acces
sw access vlan 10
exit
int e0/1
sw mode access
sw acces vlan 20
exit
int range e1/1-2
channel-group 2 mode active
exit
int port-channel 2
sw trunk encapsulation dot1q
sw mode trunk
sw trunk allowed vlan all
exit
int e0/0
sw mode access
sw acces vlan 30
exit
int e0/1
sw mode access
sw acces vlan 40
exit
Pc: vlan10
ip dhcp
show ip
Pc: vlan20
ip dhcp
show ip
Pc: vlan30
ip dhcp
show ip
Pc: vlan40
ip dhcp
show ip
7. TEST MẠNG
» Các tin khác: