三层交换机实验_第1张图片
实验说明:
 IP地址分配情况:
r1
lookback0 :1.1.1.1
f0/0  10.0.0.1
f0/1  10.0.0.2
 
sw1
f0/0 10.0.0.2
vlan2 192.168.1.1
vlan3 192.168.2.1
pc1 192.168.1.2
pc2 192.168.2.2
在2层交换机上建2个vlan ,vlan2,vlan3 实现pc1,pc2 ,lo0,ping 互通
 
sw2 配置:
interface FastEthernet0/0
 switchprot trunk encapsulation dot1q
 switchport mode trunk
          
interface FastEthernet0/2
 switchport access vlan 2
        
interface FastEthernet0/3
 switchport access vlan 3
三层交换机sw1上的配置:
interface FastEthernet0/0
  switchprot trunk encapsulation dot1q
 switchport mode trunk
     
interface FastEthernet0/1
 no switchport
 ip address 10.0.0.1 255.0.0.0
interface Vlan2
 ip address 192.168.1.1 255.255.255.0
     
interface Vlan3
 ip address 192.168.2.1 255.255.255.0
        


ip route 1.0.0.0 255.0.0.0 10.0.0.2
 
r1上的配置:
interface Loopback0
 ip address 1.1.1.1 255.0.0.0
 
interface FastEthernet0/0
 ip address 10.0.0.2 255.0.0.0

ip route 0.0.0.0 0.0.0.0 10.0.0.1