三层交换机物理接口做路由案例(思科系列)

2025-10-19 17:34:06

1、三层交换机与二层交换机(桥梁的作用)连接,二层交换机下面连接PC,拓扑图如下。注:端口一定要连接正确,否则会不通,(怎么查看端口前面讲过)。

三层交换机物理接口做路由案例(思科系列)

2、配置PC0 IP地址,子网掩码,网关

三层交换机物理接口做路由案例(思科系列)

3、配置PC1 IP地址,子网掩码,网关

三层交换机物理接口做路由案例(思科系列)

4、配置PC2 IP地址,子网掩码,网关

三层交换机物理接口做路由案例(思科系列)

5、配置PC3 IP地址,子网掩码,网关

三层交换机物理接口做路由案例(思科系列)

1、Switch>enable

Switch#conf

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#interface fastethernet0/1

Switch(config-if)#no switchport

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch(config-if)#ip add 192.168.1.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface fastethernet0/2

Switch(config-if)#no switchport

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

Switch(config-if)#ip add 192.168.2.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#ip routing

Switch(config)#exit

三层交换机物理接口做路由案例(思科系列)

2、注意,在配置三层交换机时,一定要输入ip routing才能开启路由功能。

前后对比。

三层交换机物理接口做路由案例(思科系列)

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢