三层交换VLAN路由配置技巧解析

时间:2021-05-21

PC1配置:

No ip routing

interface FastEthernet0/0

ip address 172.16.20.254 255.255.255.0

No shutdown

PC2配置:

No ip routing

interface FastEthernet0/0

ip address 172.16.30.254 255.255.255.0

No shutdown

Switch配置:

Ip routing

interface FastEthernet0/1

switchport access VLAN 20

no ip address

!

interface FastEthernet0/2

switchport access VLAN 30

no ip address

!

VLAN database

VLAN 20

VLAN 30

Exit

!

interface VLAN20

ip address 172.16.20.1 255.255.255.0

No shutdown

!

interface VLAN30

ip address 172.16.30.1 255.255.255.0

No shutdown

===========================

验证:

PC1#ping 172.16.30.254 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.30.254, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 44/100/196 ms

PC2#ping 172.16.20.254 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.20.254, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/80/120 ms

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章