輕松完成Cisco 路由器VLAN的設置功能
在接觸Cisco 路由器VLAN的過程中會遇到很多的問題,關于Cisco 路由器VLAN的設置問題,一直是大家關注的熱點,所以今天主要就是為了解決這個問題的,希望下面的文章能夠幫到大家。
CISCO 路由器VLAN的實現
1.實驗環境:一臺3560三層交換機,fa0/1端口連接A電腦,fa0/2端口連接B電腦.
2.實驗目的:A電腦與B電腦能夠互相訪問
3.實驗原理:利用3560交換機的三層端口配置不同網段的IP地址,啟動路由,不同網段的主機能夠實現互相訪問
4.實驗步驟:定義三層端口,并給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,啟動路由:switch(config)#ip routing
1.三層交換機在二層端口不能配置IP地址,只能在端口加入Cisco 路由器VLAN后,給VLAN配置IP地址。三層交換機可以在三層端口上配置IP地址,并啟動路由功能。
2.二層/三層交換機不能直接給物理端口配置IP地址。只能在VLAN虛接口下配置IP地址。
3.二層交換機默認有個VLAN1,二層就在上面配個IP用于管理。
Cisco 路由器VLAN設置:
switch>enable ;進入特權模式
switch#config terminal ;進入全局配置模式
switch(config)#hostname ;設置交換機的主機名
switch(config)#enable secret xxx ;設置特權加密口令
switch(config)#enable password xxa ;設置特權非密口令
switch(config)#line console 0 ;進入控制臺口
switch(config-line)#line vty 0 4 ;進入虛擬終端
switch(config-line)#login ;允許登錄
switch(config-line)#password xx ;設置登錄口令xx
switch#exit ;返回命令