萬盛學電腦網

 萬盛學電腦網 >> 網絡應用技術 >> 應用教程 >> Cisco路由配置基礎講解

Cisco路由配置基礎講解

  Cisco路由配置基礎 剛剛接觸cisco路由配置,下面是學習的筆記,感覺命令還是多敲才能熟悉 一、 所處狀態各類 router> 用戶處於用戶命令狀態,可以查看網絡和主機 router# 用戶處於特權模式,可以查看狀態,還可以看到和更改路由器的設置內容 router(config)# 全局配置狀態,可以設置路由的全局參數 router(config-if)#;router(config-line)#;router(config-router)#..... 處於局部配置狀態,可以設置路由的局部參數 二、配置端口ip 命令 en config t   //全局模式 interface f0/0 ip address 192.168.1.1 255.255.255.0 //設置端口ip no shu   //生效 exit interface f0/1 ip address 192.168.10.1 255.255.255.0   no shu exit end disable 三、配置靜態路由 命令 en config t   //全局模式 ip route 192.168.100.0 255.255.255.0 192.168.10.2    //到192.168.100.0/24通過192.168.10.2接口 end show ip route //可以看到前面標明S,即為靜態路由 四、配置動態路由(RIP) 命令 en config t   //全局模式 no route rip      //禁止rip協議 route rip network 192.168.1.0      //network參數為路由的兩個端口對應的網絡地址 network 192.168.10.0 exit end disable 五、配置DHCP 命令 en config t   //全局模式 ip dhcp excluded-address 192.168.1.1   //需要排除的ip地址 ip dhcp pool gr-dhcp-pool   //ip地址池名 default-server   192.168.1.1  //指定dhcp服務器 network  192.168.1.0 255.255.255.0   //配置網絡 dns-server 61.177.7.1   //配置dns服務器 exit end disable 可以通過 ip helper-address指定 DHCP中繼代理 interface FastEthernet0/1 ip address 192.168.1.1 255.255.255.0 ip helper-address 192.168.10.2                 \\配置DHCP中繼代理,DHCP 六、配置NAT           命令 en config t   //全局模式 interface f0/0 ip address 192.168.1.1 255.255.255.0 ip nat inside   //內部端口 no shu exit interface f0/1 ip address 192.168.10.1 255.255.255.0 ip nat outside   //外部端口 no shu exit access-list 1 permit any   //設置一個可訪問列表 ip nat pool gr-nat-pool  192.168.10.3 192.168.10.254 netmask 255.255.255.0  //設置分配池 ip nat inside resource list 1 pool gr-nat-pool overload show ip nat traslations clear ip nat traslation * 七、其它 sh running-config    //顯示當前運行配置 sh startup-config     //顯示開機配置 sh ip route             //顯示路由 sh nat traslations    //顯示nat當前情況
copyright © 萬盛學電腦網 all rights reserved