简单的三层交换

一、实验拓扑图:

二、PC 设置IP地址、子网掩码及网关:

三、配置三层交换机3SW1:

[3SW1]vlan batch 10 20 		创建vlan10和20
Info: This operation may take a few seconds. Please wait for a moment...done.
[3SW1]port-group group-member g0/0/1 g0/0/2	端口组的成员是g0/0/1和g0/0/2
[3SW1-port-group]port link-type access		端口链路类型为接入
[3SW1-GigabitEthernet0/0/1]port link-type access	
[3SW1-GigabitEthernet0/0/2]port link-type access
[3SW1-port-group]port default vlan 10		端口接入vlan10
[3SW1-GigabitEthernet0/0/1]port default vlan 10
[3SW1-GigabitEthernet0/0/2]port default vlan 10
[3SW1-port-group]quit
[3SW1]interface g0/0/3			进入g0/0/3接口
[3SW1-GigabitEthernet0/0/3]port link-type access	端口链路类型为接入
[3SW1-GigabitEthernet0/0/3]port default vlan 20		端口接入vlan20
[3SW1-GigabitEthernet0/0/3]quit
[3SW1]interface vlanif 10		进入vlan10的虚接口 (三层是虚接口:IP是网关地址)
[3SW1-Vlanif10]ip address 192.168.1.254 24			IP地址192.168.1.254 子网掩码24
[3SW1-Vlanif10]quit
[3SW1]interface vlanif 20		进入vlan20的虚接口
[3SW1-Vlanif20]ip address 192.168.2.254 24			IP地址192.168.2.254 子网掩码24
[3SW1-Vlanif20]quit

四、查看IP接口的详细信息

[3SW1]display ip interface brief 查看IP接口的详细信息
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
MEth0/0/1                         unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Vlanif1                           unassigned           down       down      
Vlanif10                          192.168.1.254/24     up         up        看这个,vlan虚接口IP也是网关地址
Vlanif20                          192.168.2.254/24     up         up        看这个,vlan虚接口IP也是网关地址

五、验证三层交换是否全网互通:

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇