zxr10 1809路由器詳細配置
配置前需要弄清幾個地方
1)首先需要登陸路由器,無論是採用何種方法登陸(telnet or console port )
2)路由器的Gigabit口的缺省IP爲192.168.1.1,所以將本地IP設置與Gigabit處於同一網段,能ping通則可以通過telnet的方式,登陸設備,並修改相關數據
3)路由器的帳戶與密碼
zxr10 1809用戶名與密碼分別爲
username:zxr10
password:zsr
enable password:zxr10
4)路由器的幾種模式
zxr10> //用戶模式 只能使用很少一部分功能,一般需要進一步登陸到全局模式下面
zxr10# //全局模式 能查看數據,或者進入其它的模式
zxr10(config)# //全局配置模式 能修改路由器相關配置的數據
配置步驟
1)首先需要成功登陸路由器並進入用戶模式。
enable //進入全局模式
提示輸入密碼:zxr10 //這裏輸入的密碼不會顯示出來
configure terminal //進入全局配置模式
ip dhcp enable//開啓DHCP
ip nat start //開啓NAT
ip local pool dhcp 192.168.2.2 192.168.2.200 255.255.255.0 //設定DHCP地址池
ip dhcp server leasetime 90 //DHCP租約時間
ip local pool confict 10 //DHCP衝突時間
ip dhcp server update arp //更新ARP
interface fei_1/1
port l3 //將端口更改爲三層
description wan //描述該端口的用途,不是必須
ip nat outside //nat對外
ip address 211.143.1.11 255.255.255.224 //給該端口指定IP
exit
interface fei_1/2
port l3
description lan
ip nat inside //nat對內
ip address 192.168.2.1 255.255.255.0
ip dhcp mode server //DHCP服務器模器
peer defaul ip pool dhcp //綁定DHCP地址池
ip dhcp server gateway 192.168.2.1 //指定DHCP網關
exit
acl standard number 10 //創建ACL(access control list) 訪問控制列表,後面的數字可以從1-99
permit 192.168.2.0 0.0.0.255 //允許哪一段IP上網,後面的必須爲反掩碼
exit
ip nat inside source list 10 interface fei_1/1 //NAT轉換,前面的10爲ACL,後面的fei_1/1是指數據從哪個口出去
ip route 0.0.0.0 0.0.0.0 211.143.1.1 //指定缺省靜態路由,所有數據報文發向網關