概述
三层交换机的配置
配置如下:
三层交换机上的配置
ip routing
interface FastEthernet0/1
no switchport
ip address 172.16.1.1 255.255.255.252
interface FastEthernet0/3
switchport mode trunk
interface FastEthernet0/4
switchport mode trunk
interface Vlan2
ip address 192.168.2.1 255.255.255.0
interface Vlan3
ip address 192.168.3.1 255.255.255.0
interface Vlan4
ip address 192.168.4.254 255.255.255.0
interface Vlan5
ip address 192.168.5.254 255.255.255.0
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.1.2
路由器上的配置是
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
no shut
interface FastEthernet0/1
ip address 172.16.1.2 255.255.255.252
no shut
ip route 0.0.0.0 0.0.0.0 172.16.1.1
左边两层交换机配置
interface FastEthernet0/1
switchport access vlan 2
no shut
interface FastEthernet0/2
switchport access vlan 3
no shut
interface FastEthernet0/3
switchport mode trunk
右边交换机的配置
interface FastEthernet0/1
switchport access vlan 4
no shut
interface FastEthernet0/2
switchport access vlan 5
no shut
interface FastEthernet0/4
switchport mode trunk
ip routing
interface FastEthernet0/1
no switchport
ip address 172.16.1.1 255.255.255.252
interface FastEthernet0/3
switchport mode trunk
interface FastEthernet0/4
switchport mode trunk
interface Vlan2
ip address 192.168.2.1 255.255.255.0
interface Vlan3
ip address 192.168.3.1 255.255.255.0
interface Vlan4
ip address 192.168.4.254 255.255.255.0
interface Vlan5
ip address 192.168.5.254 255.255.255.0
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.1.2
路由器上的配置是
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
no shut
interface FastEthernet0/1
ip address 172.16.1.2 255.255.255.252
no shut
ip route 0.0.0.0 0.0.0.0 172.16.1.1
左边两层交换机配置
interface FastEthernet0/1
switchport access vlan 2
no shut
interface FastEthernet0/2
switchport access vlan 3
no shut
interface FastEthernet0/3
switchport mode trunk
右边交换机的配置
interface FastEthernet0/1
switchport access vlan 4
no shut
interface FastEthernet0/2
switchport access vlan 5
no shut
interface FastEthernet0/4
switchport mode trunk
配置完成
实现内网与外网的互通。
转载于:https://blog.51cto.com/2010guo/315872
最后
以上就是清爽银耳汤为你收集整理的三层交换机的配置的全部内容,希望文章能够帮你解决三层交换机的配置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复