三层交换机的配置

三层交换机的配置
配置如下:
三层交换机上的配置
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
配置完成
实现内网与外网的互通。

你可能感兴趣的:(职场,休闲,三层交换机)