

en
conf t
int g0/0
ip add 192.168.10.2 255.255.255.0
no sh
int g0/1
ip add 192.168.20.2 255.255.255.0
no sh
int g0/2
ip add 192.168.11.1 255.255.255.0
no sh
en
conf t
int g0/0
ip add 192.168.30.1 255.255.255.0
no sh
int g0/1
ip add 192.168.21.2 255.255.255.0
no sh
en
conf t
int g0/0
ip add 192.168.11.2 255.255.255.0
no sh
int g0/1
ip add 192.168.21.1 255.255.255.0
no sh
int g0/2
ip add 192.168.40.1 255.255.255.0
no sh
en
conf t
ip route 192.168.40.0 255.255.255.0 192.168.11.2
ip route 192.168.30.0 255.255.255.0 192.168.11.2
en
conf t
ip route 192.168.10.0 255.255.255.0 192.168.21.1
ip route 192.168.20.0 255.255.255.0 192.168.21.1
ip route 192.168.40.0 255.255.255.0 192.168.21.1
en
conf t
ip route 192.168.10.0 255.255.255.0 192.168.11.1
ip route 192.168.20.0 255.255.255.0 192.168.11.1
ip route 192.168.30.0 255.255.255.0 192.168.21.2

经过测试,PC2能与其它的PC通信
