设为首页 收藏本站
查看: 2283|回复: 0

[经验分享] cisco 2811路由器详细配置

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-1-12 09:35:46 | 显示全部楼层 |阅读模式
Router>enable
Router#configure terminal
Router(config)#hostname cisco2811          //定义路由器名称
2811(config)#enable password 124563831    //设置登陆密码
2811(config)#line vty 0 4
2811(config-line)#password 124563831    //设置telnet密码
2811(config-line)#login
2811(config-line)#exit
2811(config)#interface fastEthernet 0/0       //设置内网接口
2811(config-if)#ip address 192.168.1.254 255.255.255.0
2811(config-if)#no shutdown
2811(config-if)#exit
2811(config)#interface fastEthernet 0/1           //设置外网接口
2811(config-if)#ip address 125.89.61.94 255.255.255.0
2811(config-if)#no shutdown
2811(config-if)#exit
2811(config)#ip route 0.0.0.0 0.0.0.0 125.89.61.1    //配置缺省路由
2811(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.1
2811(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.1
2811(config)#ip route 192.168.4.0 255.255.255.0 192.168.1.1
2811(config)#ip route 192.168.5.0 255.255.255.0 192.168.1.1
2811(config)#access-list 10 permit 192.168.1.0 0.0.0.255  //访问控制列表设置
2811(config)#access-list 20 permit 192.168.2.0 0.0.0.255  //访问控制列表设置
2811(config)#access-list 30 permit 192.168.3.0 0.0.0.255  //访问控制列表设置
2811(config)#access-list 40 permit 192.168.4.0 0.0.0.255  //访问控制列表设置
2811(config)#access-list 50 permit 192.168.5.0 0.0.0.255  //访问控制列表设置
2811(config)#ip nat inside source list 10 interface f0/1 overload
2811(config)#ip nat inside source list 20 interface f0/1 overload
2811(config)#ip nat inside source list 30 interface f0/1 overload
2811(config)#ip nat inside source list 40 interface f0/1 overload
2811(config)#ip nat inside source list 50 interface f0/1 overload
2811#configure terminal
2811(config)#interface fastEthernet 0/0
2811(config-if)#ip nat inside
2811(config-if)#exit
2811(config)#interface fastEthernet 0/1
2811(config-if)#ip nat outside
2811(config-if)#exit
2811(config)#ip nat inside source static tcp 192.168.1.13 21 125.89.61.92 21 //osg ftp
2811(config)#ip nat inside source static tcp 192.168.1.10 80 125.89.61.92 80 //ca证书申请
2811(config)#ip nat inside source static tcp 192.168.1.12 21 125.89.61.93 21 //ftp port
2811(config)#ip nat inside source static tcp 192.168.1.21 80 125.89.61.93 8080 //oa http port
2811(config)#ip nat inside source static tcp 192.168.1.21 1935 125.89.61.93 1935 //oa video port
2811(config)#ip nat inside source static tcp 192.168.1.21 2397 125.89.61.93 2397 //oa dingshi task port
2811(config)#ip nat inside source static udp 192.168.1.21 1188 125.89.61.93 1188 //oa im port
2811(config)#ip nat inside source static tcp 192.168.1.21 25 125.89.61.93 25 //oa mail port
2811(config)#ip nat inside source static tcp 192.168.1.21 110 125.89.61.93 110 //oa mail port
2811(config)#ip nat inside source static tcp 192.168.1.21 8000 125.89.61.93 8000 //oa RTX port
2811(config)#ip nat inside source static tcp 192.168.1.102 80 125.89.61.93 80 //XX办公网页监控
2811(config)#ip nat inside source static tcp 192.168.1.102 37777 125.89.61.93 37777 //XX办公实时监控
2811(config)#ip nat inside source static tcp 192.168.1.189 25 125.89.61.94 25 //exchange smtp port
2811(config)#ip nat inside source static tcp 192.168.1.189 110 125.89.61.94 110 //exchange pop3 port
2811(config)#ip nat inside source static tcp 192.168.1.189 80 125.89.61.94 80 //exchange http port
2811(config)#ip nat inside source static tcp 192.168.1.189 143 125.89.61.94 143 //exchange imap port
2811(config)#ip nat inside source static tcp 192.168.1.189 993 125.89.61.94 993 //exchange IMAP4/SSL port
2811(config)#ip nat inside source static tcp 192.168.1.189 995 125.89.61.94 995 //exchange POP3/SSL port
2811(config)#ip nat inside source static tcp 192.168.1.189 443 125.89.61.94 443 //exchange rpc port
2811(config)#ip nat inside source static tcp 192.168.1.189 587 125.89.61.94 587 //exchange SMTP/SSL port
2811(config)#ip nat inside source static tcp 192.168.1.150 80 125.89.61.95 80 //crm http port
2811(config)#ip nat inside source static tcp 192.168.1.13 80 125.89.61.190 80 //瑞友天翼远程接入
2811(config)#ip nat inside source static tcp 192.168.1.13 5872 125.89.61.190 5872 //瑞友天翼远程接入
2811(config)#ip nat inside source static tcp 192.168.1.150 21 125.89.61.190 21 //ftp port
routerconfig #no ip dhcp conflict logging 取消地址冲突记录日志
routerconfig #ip dhcp excluded-address 192.168.1.1 192.168.1.99 //设置不能用于动态分配的IP地址
routerconfig #ip dhcp pool dhcp_pool1 // 配置一个地址池
  routerdhcp-config #network 192.168.1.0 255.255.255.0//动态分配的地址段
  routerdhcp-config #domain-name trsa.com.cn//为客户机配置域后缀
  routerdhcp-config #dns-server 192.168.1.10 192.168.1.30  为客户机配置DNS服务器
  routerdhcp-config #netbios-name-server 192.168.1.10 192.168.1.30  为客户机配置wins服务器
  routerdhcp-config #netbios-node-type h-node  为客户机配置节点模式(影响名称解释的顺利,如h-node是先通过wins服务器解释)
  routerdhcp-config #lease 15      地址租用期为15天
routerdhcp-config #default-router 192.168.1.1  为客户机配置默认的网关,即VLAN1的IP地址
routerconfig #ip dhcp pool dhcp_pool2 // 配置一个地址池
  routerdhcp-config #network 192.168.2.0 255.255.255.0//动态分配的地址段
  routerdhcp-config #domain-name trsa.com.cn//为客户机配置域后缀
  routerdhcp-config #dns-server 192.168.1.10 192.168.1.30  为客户机配置DNS服务器
  routerdhcp-config #netbios-name-server 192.168.1.10 192.168.1.30  为客户机配置wins服务器
  routerdhcp-config #netbios-node-type h-node  为客户机配置节点模式(影响名称解释的顺利,如h-node是先通过wins服务器解释)
  routerdhcp-config #lease 15      地址租用期为15天
routerdhcp-config #default-router 192.168.2.1  为客户机配置默认的网关,即VLAN2的IP地址
routerconfig #ip dhcp pool dhcp_pool3 // 配置一个地址池
  routerdhcp-config #network 192.168.3.0 255.255.255.0//动态分配的地址段
  routerdhcp-config #domain-name trsa.com.cn//为客户机配置域后缀
  routerdhcp-config #dns-server 192.168.1.10 192.168.1.30  为客户机配置DNS服务器
  routerdhcp-config #netbios-name-server 192.168.1.10 192.168.1.30  为客户机配置wins服务器
  routerdhcp-config #netbios-node-type h-node  为客户机配置节点模式(影响名称解释的顺利,如h-node是先通过wins服务器解释)
  routerdhcp-config #lease 15      地址租用期为15天
routerdhcp-config #default-router 192.168.3.1  为客户机配置默认的网关,即VLAN3的IP地址
routerconfig #ip dhcp pool dhcp_pool4 // 配置一个地址池
  routerdhcp-config #network 192.168.4.0 255.255.255.0//动态分配的地址段
  routerdhcp-config #domain-name trsa.com.cn//为客户机配置域后缀
  routerdhcp-config #dns-server 192.168.1.10 192.168.1.30  为客户机配置DNS服务器
  routerdhcp-config #netbios-name-server 192.168.1.10 192.168.1.30  为客户机配置wins服务器
  routerdhcp-config #netbios-node-type h-node  为客户机配置节点模式(影响名称解释的顺利,如h-node是先通过wins服务器解释)
  routerdhcp-config #lease 15      地址租用期为15天
routerdhcp-config #default-router 192.168.4.1  为客户机配置默认的网关,即VLAN4的IP地址
routerconfig #ip dhcp pool dhcp_pool5 // 配置一个地址池
  routerdhcp-config #network 192.168.5.0 255.255.255.0//动态分配的地址段
  routerdhcp-config #domain-name trsa.com.cn//为客户机配置域后缀
  routerdhcp-config #dns-server 192.168.1.10 192.168.1.30  为客户机配置DNS服务器
  routerdhcp-config #netbios-name-server 192.168.1.10 192.168.1.30  为客户机配置wins服务器
  routerdhcp-config #netbios-node-type h-node  为客户机配置节点模式(影响名称解释的顺利,如h-node是先通过wins服务器解释)
  routerdhcp-config #lease 15      地址租用期为15天
routerdhcp-config #default-router 192.168.5.1  为客户机配置默认的网关,即VLAN5的IP地址
vpn pptp
interface Virtual-Template1
nat ip inside
peer default ip address pool vpndhcp
ppp encrypt mppe auto
ppp authentication ms-chap
ip address 192.168.0.100 255.255.255.0
ip local pool vpndhcp 192.168.1.200 192.168.1.250
2811#copy running-config startup-config   //保存配置


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-40548-1-1.html 上篇帖子: RouterOS配置端口映射的方法 下篇帖子: CISCO6509交换机做QOS限速 路由器
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表