三层交换机如何设置

如何设置能让PC0能ping通service0且经过router0上网,PC1,2,3能经过router0上网,PC4,5能ping通service0 感谢万分

第1个回答  2018-07-18
ip地址都改成192.168.0.xxx追答

也就是是哦吧你所有的电脑都组成同一个ip段的局域网

第2个回答  2018-07-18
假设你的PC0、PC1、PC2、PC3分别接3560的10/11/12/13口,server0接3560的2口,路由器的1口接3560的24口(路由器端地址为10.10.10.1/30,核心端地址为10.10.10.2/30),2950的1口接3560的1口,所有业务网段的网关都是 .1,
PC4接2950的4口,PC5接5口
路由器0口接公网,公网地址为100.100.100.2,掩码255.255.255.252,网关100.100.100.1,那么,设备配置如下:
2950配置:
vlan 14
vlan 15
interface fastEthernet 0/1
switchport mode trunk
interface fastEthernet 0/4
switchport access vlan 14
switchport mode access
interface fastEthernet 0/5
switchport access vlan 15
switchport mode access
3560配置:
vlan 11
vlan 12
vlan 13
vlan 14
vlan 15
vlan 100
ip routing
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 100
switchport mode access
interface FastEthernet0/10
switchport access vlan 10
switchport mode access
interface FastEthernet0/11
switchport access vlan 11
switchport mode access
interface FastEthernet0/12
switchport access vlan 12
switchport mode access
interface FastEthernet0/13
switchport access vlan 13
switchport mode access
interface FastEthernet0/24
no switchport
ip address 10.10.10.2 255.255.255.252
no shutdowm
interface Vlan10
ip address 192.168.10.1 255.255.255.0
no shutdowm
interface Vlan11
ip address 192.168.1.1 255.255.255.0
no shutdowm
interface Vlan12
ip address 192.168.2.1 255.255.255.0
no shutdowm
interface Vlan13
ip address 192.168.3.1 255.255.255.0
no shutdowm
interface Vlan14
ip address 192.168.4.1 255.255.255.0
no shutdowm
interface Vlan15
ip address 192.168.5.1 255.255.255.0
no shutdowm
interface Vlan100
ip address 192.168.100.1 255.255.255.0
no shutdowm
ip route 0.0.0.0 0.0.0.0 10.10.10.1
路由器配置:
interface FastEthernet0/0
ip address 100.100.100.2 255.255.255.252
ip nat outside
no shutdowm
interface FastEthernet0/1
ip address 10.10.10.1 255.255.255.252
ip nat inside
no shutdowm
ip route 0.0.0.0 0.0.0.0 100.100.100.1
ip route 192.168.0.0 255.255.0.0 10.10.10.2
ip nat inside source list 10 interface FastEthernet0/0 overload
access-list 10 permit 192.168.0.0 0.0.255.255本回答被网友采纳
相似回答