導航:首頁 > 程序命令 > 添加路由命令

添加路由命令

發布時間:2022-01-31 00:45:56

1. 怎麼使用cmd設置添加電腦上靜態路由

1.首先在「運行」窗口輸入cmd(按WIN+R打開運行窗口),...
2.如何查看已添加的路由?輸入 route print,然後回車出...
3.那麼我們如何刪除已添加的路由?把這條命令 route add ...

2. 計算機CMD添加路由

在命令提示符「>」下,輸入 rotue add回車,看提示:
route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2
destination^ ^mask ^gateway metric^ interface

如果需要的話可以進行如下設置:
route add 192.168.15.0 MASK 255.255.255.0 192.168.15.5
route add 192.168.5.0 MASK 255.255.255.0 192.168.5.5

但通常是不需要設置即可訪問192.168.15.0和192.168.5.0兩個網段的。可以用route print命令看一下機器上的路由表即可。根據您的設置,默認網關應該是192.168.15.254

3. windows添加靜態路由的命令

添加靜態路由的命令就是route add 走誰 掩碼 下一跳。正常情況下網路規劃沒有誰會去規劃終端來添加靜態路由,反正在終端添加靜態路由的網路肯定是規劃出現了嚴重缺陷,一般做靜態路由都是在路由器側實現。

4. route add 添加路由的命令

route的命令是手動配置路由表,在本地IP路由表中顯示和修改條目,用不帶參數的routeprint可以查看本地路由表信息,詳細步驟:

1、win+R打開資源管理器輸入:cmd點擊:確定,在cmd裡面輸入:route/?來查看route命令和參數的使用。

5. 如何將添加路由的命令做成批處理 route add 192.168.5.0 mask 255.255.255.0 192.168.10.10

需要做成批處理么?
直接做成route add -p 192.168.5.0 mask 255.255.255.0 192.168.10.10
永久添加!加了個-p的參數!

6. 如何增加一條靜態路由

1.在「運行」窗口輸入cmd(按WIN+R打開運行窗口),然後回車進入命令行,輸入route add 10.253.251.0 mask 255.255.255.0 -p 192.254.1.1。其中10.253.251.0是源地址,255.255.255.0是源地址掩碼,192.254.1.1是目標地址。

3.把這條命令route add 10.253.251.0 mask 255.255.255.0 -p 192.254.1.1 中的add 改成 delete ,然後回車就可以。

7. route add 怎麼添加路由的命令

具體操作方法如下:

8. 怎麼在電腦上添加一條路由呢,命令是什麼

route add 192.10.2.0 mask 255.255.255.0 192.10.1.1

route add 192.10.3.0 mask 255.255.255.0 192.10.1.1

route add 192.10.4.0 mask 255.255.255.0 192.10.1.1

9. linux添加靜態路由命令

route add –host 192.168.40.3 gw 192.12.10.1

10. 路由配置命令

只有CISCO路由器的命令

路由器顯示命令:
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 ;點對點幀中繼用。
幀中繼命令:
router(config)#frame-relay switching ;使能幀中繼交換

router(config-s0)#encapsulation frame-relay ;使能幀中繼

router(config-s0)#fram-relay lmi-type cisco ;設置管理類型

router(config-s0)#frame-relay intf-type DCE ;設置為DCE

router(config-s0)#frame-relay dlci 16 ;

router(config-s0)#frame-relay local-dlci 20 ;設置虛電路號

router(config-s0)#frame-relay interface-dlci 16 ;

router(config)#log-adjacency-changes ;記錄鄰接變化

router(config)#int s0/0.1 point-to-point ;設置子介面點對點

router#show frame. pvc ;顯示永久虛電路

router#show frame. map ;顯示映射
基本訪問控制列表:
router(config)#access-list permit|deny

router(config)#interface ;default:deny any

router(config-if)#ip access-group in|out ;default:out
例1:

router(config)#access-list 4 permit 10.8.1.1

router(config)#access-list 4 deny 10.8.1.0 0.0.0.255

router(config)#access-list 4 permit 10.8.0.0 0.0.255.255

router(config)#access-list 4 deny 10.0.0.0 0.255.255.255

router(config)#access-list 4 permit any

router(config)#int f0/0

router(config-if)#ip access-group 4 in
擴展訪問控制列表:
access-list permit|deny icmp <DESTINATIONIP

wild>[type]

access-list permit|deny tcp <DESTINATIONIP

wild>[port]

例3:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo

router(config)#access-list 101 permit ip any any

router(config)#int s0/0

router(config-if)#ip access-group 101 in

例3:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80

router(config)#access-list 102 permit ip any any

router(config)#interface s0/1

router(config-if)#ip access-group 102 out
刪除訪問控制例表:
router(config)#no access-list 102

router(config-if)#no ip access-group 101 in
路由器的nat配置
Router(config-if)#ip nat inside ;當前介面指定為內部介面

Router(config-if)#ip nat outside ;當前介面指定為外部介面

Router(config)#ip nat inside source static [p] <私有IP><公網IP> [port]

Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1

Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80

Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0

Router(config)#ip nat inside source list 1 pool p1

Router(config)#ip nat inside destination list 2 pool p2

Router(config)#ip nat inside source list 2 interface s0/0 overload

Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary

Router#show ip nat translation

rotary 參數是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。

overload參數用於PAT 將內部IP映射到一個公網IP不同的埠上。
外部網關協議配置:
routerA(config)#router bgp 100

routerA(config-router)#network 19.0.0.0

routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP驗證:
RouterA(config)#username password

RouterA(config)#int s0

RouterA(config-if)#ppp authentication {chap|pap}
3.PIX防火牆命令
Pix525(config)#nameif ethernet0 outside security0 ;命名介面和級別

Pix525(config)#interface ethernet0 auto ;設置介面方式

Pix525(config)#interface ethernet1 100full ;設置介面方式

Pix525(config)#interface ethernet1 100full shutdown

Pix525(config)#ip address inside 192.168.0.1 255.255.255.0

Pix525(config)#ip address outside 133.0.0.1 255.255.255.252
Pix525(config)#global (if_name) natid ip-ip ;定義公網IP區間

Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句

Pix525(config)#global (outside) 1 133.0.0.1 ;例句

Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉設置
Pix525(config)#nat (if_name) nat_id local_ip [netmark]

Pix525(config)#nat (inside) 1 0 0

內網所有主機(0代表0.0.0.0)可以訪問global 1指定的外網。

Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0

內網172.16.5.0/16網段的主機可以訪問global 1指定的外網。
Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式

Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句

Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句
Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8

表示內部ip地址192.168.0.8,訪問外部時被翻譯成133.0.0.1全局地址。
Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8

中間區域ip地址172.16.0.8,訪問外部時被翻譯成133.0.0.1全局地址

閱讀全文

與添加路由命令相關的資料

熱點內容
travelboast安卓怎麼設置路線 瀏覽:51
播放解壓的圖 瀏覽:228
新建一個名為hux的文件夾 瀏覽:532
橋水基金加密貨幣 瀏覽:196
還有什麼好app 瀏覽:152
微軟最慘的源碼 瀏覽:40
上海靈意壓縮機 瀏覽:415
泰拉瑞亞2020最新伺服器ip地址 瀏覽:563
安卓機玩吃雞什麼畫質 瀏覽:873
徒步緩解壓力的視頻 瀏覽:238
圖像演算法口訣 瀏覽:860
人踩什麼解壓 瀏覽:921
php語法檢查命令 瀏覽:330
如何重設伺服器網關 瀏覽:865
世界經濟pdf 瀏覽:110
異或演算法找缺失的數 瀏覽:327
單片機flagt1 瀏覽:486
單片機清理 瀏覽:660
東風景逸空調壓縮機 瀏覽:158
天津程序員炒股 瀏覽:230