輕松完成Cisco 路由器VLAN的設(shè)置功能
在接觸Cisco 路由器VLAN的過程中會(huì)遇到很多的問題,關(guān)于Cisco 路由器VLAN的設(shè)置問題,一直是大家關(guān)注的熱點(diǎn),所以今天主要就是為了解決這個(gè)問題的,希望下面的文章能夠幫到大家。
CISCO 路由器VLAN的實(shí)現(xiàn)
1.實(shí)驗(yàn)環(huán)境:一臺(tái)3560三層交換機(jī),fa0/1端口連接A電腦,fa0/2端口連接B電腦.
2.實(shí)驗(yàn)?zāi)康模篈電腦與B電腦能夠互相訪問
3.實(shí)驗(yàn)原理:利用3560交換機(jī)的三層端口配置不同網(wǎng)段的IP地址,啟動(dòng)路由,不同網(wǎng)段的主機(jī)能夠?qū)崿F(xiàn)互相訪問
4.實(shí)驗(yàn)步驟:定義三層端口,并給Cisco 路由器VLAN端口配置IP地址
switch(config)#int fa0/1
switch(config-if)#no switchport
switch(config-if)#ip address 192.168.1.1 255.255.255.0
switch(config-if)#no shut
switch(config)#int fa0/2
switch(config-if)#no switchport
switch(config-if)#ip address 192.168.2.1 255.255.255.0
switch(config-if)#no shut,啟動(dòng)路由:switch(config)#ip routing
1.三層交換機(jī)在二層端口不能配置IP地址,只能在端口加入Cisco 路由器VLAN后,給VLAN配置IP地址。三層交換機(jī)可以在三層端口上配置IP地址,并啟動(dòng)路由功能。
2.二層/三層交換機(jī)不能直接給物理端口配置IP地址。只能在VLAN虛接口下配置IP地址。
3.二層交換機(jī)默認(rèn)有個(gè)VLAN1,二層就在上面配個(gè)IP用于管理。
Cisco 路由器VLAN設(shè)置:
switch>enable ;進(jìn)入特權(quán)模式
switch#config terminal ;進(jìn)入全局配置模式
switch(config)#hostname ;設(shè)置交換機(jī)的主機(jī)名
switch(config)#enable secret xxx ;設(shè)置特權(quán)加密口令
switch(config)#enable password xxa ;設(shè)置特權(quán)非密口令
switch(config)#line console 0 ;進(jìn)入控制臺(tái)口
switch(config-line)#line vty 0 4 ;進(jìn)入虛擬終端
switch(config-line)#login ;允許登錄
switch(config-line)#password xx ;設(shè)置登錄口令xx
switch#exit ;返回命令