Cisco 特殊VLAN划分之一个VLAN多个网段IP

1.拓扑如图所示.

2.连线示意如下:

Switch1 F0/1 <----> Router1 F0/0
Switch1 F0/2 <----> Router2 F0/0
Switch1 F0/3 <----> Router3 F0/0
Switch1 F0/4 <----> Router4 F0/0

3.r01,r02,r03模拟PC。ip地址分别为:192.168.1.1;192.168.2.2;192.168.3.3;网关分别为192.168.1.254;192.168.2.254;192.168.3.254;它们均属于VLAN 123.

4.需求:各个PC能相互通讯。

5.解决方案:单臂路由器,辅助IP地址。

6.具体实现如下:

R01#sh run

Building configuration...

Current configuration : 1221 bytes

!

version 12.4

!

hostname R01

!

no ip routing

!        

!

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.0

no ip route-cache

speed 100

full-duplex

!

!

ip default-gateway 192.168.1.254

!

!

end

 

 

 

/////////////////////////////////////////////////////////////////////////////////////////////////////

 

 

SW_01#sh run

Building configuration...

Current configuration : 1582 bytes

!

version 12.3

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname SW_01

!

!

interface FastEthernet0/1

switchport access vlan 123

no ip address

duplex full

speed 100

!

interface FastEthernet0/2

switchport access vlan 123

no ip address

duplex full

speed 100

!

interface FastEthernet0/3

switchport access vlan 123

no ip address

duplex full

speed 100

!

interface FastEthernet0/4

switchport mode trunk

no ip address

duplex full

speed 100

!

!

End

 

 

//////////////////////////////////////////////////////////////////////////////////////////////////////

 

R04#sh run

Building configuration...

Current configuration : 877 bytes

!

version 12.4

!

hostname R04

!

!

interface FastEthernet0/0.1

encapsulation dot1Q 123

ip address 192.168.2.254 255.255.255.0 secondary

ip address 192.168.3.254 255.255.255.0 secondary

ip address 192.168.1.254 255.255.255.0

!

!

end

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

6.说明:不可以在R04上配置另一个子接口为vlan123进行vlan间路由。会弹出如下提示,因此只能使用辅助地址来完成需求。

 

你可能感兴趣的:(Cisco,多,IP地址,特殊,如图所示)