路由器配置
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 4
 ip address 10.10.10.1 255.255.255.0
!
interface FastEthernet0/0.2
 encapsulation dot1Q 5
 ip address 10.10.11.1 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router rip
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.2
ip route 0.0.0.0 0.0.0.0 10.10.11.2
!
!
!
!
!
line con 0
line vty 0 4
 login    
 
交换机配置
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport access vlan 4
!
interface FastEthernet0/3
 switchport access vlan 5
!
interface Vlan1
 no ip address
 shutdown
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
主机1配置   10.10.10.2/24  10.10.10.1
主机2配置   10.10.11.2/24  10.10.11.1