路由器交換機配置
『壹』 交換機與路由器的常用配置命令
1. 交換機支持的命令:
交換機基本狀態: switch: ;ROM狀態,
路由器是rommon>hostname> ;用戶模式hostname# ;特權模式hostname(config)# ;全局配置模式hostname(config-if)# ;介面狀態
交換機口令設置: 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 ;設置登錄口令
xxswitch#exit ;返回命令
交換機VLAN設置:
switch#vlan database ;進入VLAN設置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;刪vlan 2
switch(config)#int f0/1 ;進入埠1
switch(config-if)#switchport access vlan 2 ;當前埠加入
vlan 2switch(config-if)#switchport mode trunk ;設置為干線
switch(config-if)#switchport trunk allowed vlan 1,2 ;設置允許的vlan
switch(config-if)#switchport trunk encap dot1q ;設置vlan 中繼
switch(config)#vtp domain ;設置發vtp域名
switch(config)#vtp password ;設置發vtp密碼
switch(config)#vtp mode server ;設置發vtp模式
switch(config)#vtp mode client ;設置發vtp模式
交換機設置IP地址:
switch(config)#interface vlan 1 ;進入vlan 1
switch(config-if)#ip address ;設置IP地址
switch(config)#ip default-gateway ;設置默認網關
switch#dir flash: ;查看快閃記憶體
交換機顯示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看當前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看埠信息
switch#show int f0/0 ;查看指定埠信息
2. 路由器支持的命令:
路由器顯示命令:
router#show run ;顯示配置信息
router#show interface ;顯示介面信息
router#show ip route ;顯示路由信息
router#show cdp nei ;顯示鄰居信息
router#reload ;重新起動
路由器口令設置:
router>enable ;進入特權模式
router#config terminal ;進入全局配置模式
router(config)#hostname ;設置交換機的主機名
router(config)#enable secret xxx ;設置特權加密口令
router(config)#enable password xxb ;設置特權非密口令
router(config)#line console 0 ;進入控制台口
router(config-line)#line vty 0 4 ;進入虛擬終端
router(config-line)#login ;要求口令驗證
router(config-line)#password xx ;設置登錄口令xx
router(config)#(Ctrl+z) ; 返回特權模式
router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;進入Serail介面
router(config-if)#no shutdown ;激活當前介面
router(config-if)#clock rate 64000 ;設置同步時鍾
router(config-if)#ip address ;設置IP地址
router(config-if)#ip address second ;設置第二個IP
router(config-if)#int f0/0.1 ;進入子介面
router(config-subif.1)#ip address ;設置子介面IP
router(config-subif.1)#encapsulation dot1q ;綁定vlan中繼協議
router(config)#config-register 0x2142 ;跳過配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引導
路由器文件操作:
router# running-config startup-config ;保存配置
router# running-config tftp ;保存配置到tftp
router# startup-config tftp ;開機配置存到tftp
router# tftp flash: ;下傳文件到flash
router# tftp startup-config;下載配置文件ROM狀態:
Ctrl+Break ;進入ROM監控狀態
rommon>confreg 0x2142 ;跳過配置文件
rommon>confreg 0x2102 ;恢復配置文件
rommon>reset ;重新引導
rommon> xmodem: flash: ;從console傳輸文件
rommon>IP_ADDRESS=10.65.1.2 ;設置路由器IP
rommon>IP_SUBNET_MASK=255.255.0.0 ;設置路由器掩碼
rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP伺服器IP
rommon>TFTP_FILE=c2600.bin ;指定下載的文件
rommon>tftpdnld ;從tftp下載
rommon>dir flash: ;查看快閃記憶體內容
rommon>boot ;引導IOS
靜態路由:
ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;
靜態路由舉例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默認路由舉例
動態路由:
router(config)#ip routing ;啟動路由轉發
router(config)#router rip ;啟動RIP路由協議。
router(config-router)#network ;設置發布路由
router(config-router)#negihbor ;點對點幀中繼用。
最好是去官方網站參考手冊。
『貳』 怎麼將路由器設置成交換機。
先用網線連接好電腦跟路由器,然後給路由器通上電、同時打開電腦,確保電腦自動獲取到IP地址和DNS伺服器地址。
然後打開電腦裡面的瀏覽器,在瀏覽器地址輸入框輸入「192.168.1.1」,此時路由器會提示設置密碼,設置之後再輸入一次,如圖所示
『叄』 路由器與交換機之間的配置
你能說的清楚一點嗎?什麼是之間的ip地址?給交換機和路由器配置地址,都是進入對應埠,為對應埠配置ip地址
『肆』 路由器,交換機連接配置
方法/步驟
『伍』 交換機和路由器一起用怎麼配置
1、從光貓出來網線插入到主路由器的WAN網口,並進行網路設置;一樓、二樓、三樓直接使用網線連接到牆壁的網路壁盒上。每一層的路由器如客廳配置一樣,能連接有線盡量用有線,其它的數碼網路設備用無線。
『陸』 交換機路由器及其配置
多條寬頻接入,保證客戶上網體驗,辦公區劃分vlan,隔離沖突域和廣播域
兩辦公區專通過OSPF互通,1.防止環路,減弱屬帶寬2.隔離LSA泛洪量,減少路由器消耗
這里有個疑問,不明白為什麼要OSPF互通,給自己找事情做嗎,你這單位網路里還有很多路由器嗎?還有客戶終端多少,有沒有無線網路?路由器的帶機量搞明白。別到時候做完上不去。
你問的這些應該是考試題目吧,具體案例做起來可不是這么考慮的