Router>en:passwd:******(输入超级口令)全局配置:(A、B网相同)
Router#conf terminal(切换到配置状态)Router(config)#enable secret my-root-password(定义超级口令)Router(config)#ip host Router-A(定义路由器名,B网为Router-B)Router(config)#ip domain-name xxx.com(定义所属域名称,B网为yyy.com)Router(config)#nameserver 202.96.199.2(定义主域名服务器)Router(config)#nameserver 202.96.199.3(定义备域名服务器)Router(config)#ip classlessRouter(config)#line vty 0 4(定义5个telnet虚终端,即可以同时有5个人登录本路由器)Router(config-line)#password my-telnet-password(定义telnet口令)Router(config-line)#exitRouter(config)#exit地址和路由配置:
/****** A网路由器 ******/Router-A#conf t(切换到配置状态)Router-A(config)#int e0(配置Ethernet 0口)Router-A(config-if)#description the LAN port link to my local network(端口说明)Router-A(config-if)#ip add 202.96.199.1 255.255.255.0(定义以太网IP地址,子网掩码表示为C类网络)Router-A(config-if)#no shutdown(激活端口)Router-A(config-if)#exitRouter-A(config)#int s0(配置Serial 0口)Router-A(config-if)#description the WAN port link to Router-B(端口说明)Router-A(config-if)#ip add 202.98.0.1 255.255.255.252(定义互联广域网IP地址)Router-A(config-if)#bandwidth 128(定义端口速率,单位:kbps)Router-A(config-if)#no shutdown(激活端口)Router-A(config-if)#exitRouter-A(config)#ip route 202.97.76.0 255.255.255.224 202.98.0.2(定义静态路由,通过网关到达对端局域网络,IP为对端广域网IP地址)Router-A(config)#exitRouter-A#wr m(保存配置)/****** B网路由器 ******/Router-B#conf tRouter-B(config)#int e0Router-B(config-if)#description the LAN port link to my local network(端口说明)Router-B(config-if)#ip add 202.97.76.1 255.255.255.224(定义以太网IP地址,子网掩码表示为拥有32个地址的子网)Router-B(config-if)#no shutdownRouter-B(config-if)#exitRouter-B(config)#int s0Router-B(config-if)#description the WAN port link to Router-A(端口说明)Router-B(config-if)#ip add 202.98.0.2 255.255.255.252Router-B(config-if)#bandwidth 128Router-B(config-if)#no shutdownRouter-B(config-if)#exitRouter-B(config)#ip route 202.96.199.0 255.255.255.0 202.98.0.1(定义静态路由,通过网关到达对端局域网络,IP为对端广域网IP地址)Router-B(config)#exitRouter-B#wr m(保存配置)[/list]配置完成。 这里是A网、B网路由器配置清单。 Router A:
Router-A#sh run Building Configuration... Current configuration version 11.2 service udp-small-servers service tcp-small-servers hostname Router-A enable secret test-a ip subnet-zero interface Ethernet0 description the LAN port link to my local network ip address 202.96.199.1 255.255.255.0 interface Serial0 description the WAN port link to Router-B ip address 202.98.0.1 255.255.255.252 bandwidth 128 interface Serial1 no ip address shutdown ip domain-name xxx.com ip name-server 202.96.199.2 ip name-server 202.96.199.3 ip classless ip route 202.97.76.0 255.255.255.224 202.98.0.2 line con 0 line aux 0 line vty 0 4 password telnet-a login end Router-A# Rouer B:
Router-B#sh run Building Configuration... Current configuration version 11.2 service udp-small-servers service tcp-small-servers hostname Router-B enable secret test-b ip subnet-zero interface Ethernet0 description the LAN port link to my local network ip address 202.97.76.1 255.255.255.224 interface Serial0 description the WAN port link to Router-A ip address 202.98.0.2 255.255.255.252 bandwidth 128 interface Serial1 no ip address shutdown ip domain-name yyy.com ip name-server 202.96.199.2 ip name-server 202.96.199.3 ip classless ip route 202.96.199.0 255.255.255.0 202.98.0.1 line con 0 line aux 0 line vty 0 4 password telnet-b login end Router-B#实例2:通过Cisco 2501将你的局域网接入Internet [center]
Router>en:passwd:全局配置:
Router#conf tRouter(config)#ip host RouterRouter(config)#nameserver 202.96.202.96Router(config)#nameserver 202.96.96.202Router(config)#exit其他项目同“例一”。地址配置:
Router#conf tRouter(config)#int e0Router(config-if)#description the LAN port link to my local network(端口说明)Router(config-if)#ip add 202.96.199.1 255.255.255.0Router(config-if)#no shutdown(激活端口)Router(config-if)#exitRouter(config)#int s0Router(config-if)#description the WAN port link to Internet(端口说明)Router(config-if)#ip add 202.98.0.2 255.255.255.252Router(config-if)#no shutdown(激活端口)Router(config-if)#exit路由配置:
Router(config)#ip route 0.0.0.0 0.0.0.0 202.98.0.1(定义默认静态路由,所有的远程访问通过网关,IP为对端广域网IP地址)Router(config)#exitRouter#wr m[/list]配置完成。 这里是本网路由器配置清单。 Router#sh run Building Configuration... Current configuration version 11.2 service udp-small-servers service tcp-small-servers hostname Router enable secret test ip subnet-zero interface Ethernet0 description the LAN port link to my local network ip address 202.96.199.1 255.255.255.0 interface Serial0 description the WAN port link to Internet ip address 202.98.0.2 255.255.255.252 bandwidth 128 interface Serial1 no ip address shutdown ip domain-name xxx.com ip name-server 202.96.202.96 ip name-server 202.96.96.202 ip classless ip route 0.0.0.0 0.0.0.0 202.98.0.1 line con 0 line aux 0 line vty 0 4 password telnet login end Router# 实例3:使用Cisco路由器对大型网络(例如ISP网络)进行扩容 [center]
Router(config)#router ospf 100(配置OSPF路由)Router(config-router)#summary-address 202.96.199.0 255.255.255.0Router(config-router)#redistribute connnected metric-type 1 subnetsRouter(config-router)#redistribute static(通过OSPF协议广播静态路由)Router(config-router)#network 202.96.192.0 0.0.15.255 area 0.0.0.0Router(config-router)#area 0.0.0.0 authentiication message-digestRouter(config-router)#exitRouter(config)#router rip(配置RIP路由)Router(config-router)#redistribute ospf 100 metric 1(通过RIP协议广播OSPF路由)Router(config-router)#passive-interface Serial 0(不在Serial 0上使用)Router(config-router)#network 202.101.199.0(定义本网络)Router(config-router)#exitRouter(config)exit同时,采用OSPF协议时应该在广域网端口上加入授权机制:
Router(config)#int s0Router(config-if)#ip ospf message-digest-key keywordRouter(config-if)#exitRouter(config)#exitRouter#wr m[/list] 更大型的网络会采用BGP边缘路由协议,假设具体网络参数如下: [list]项目 本地网络 远程网络 AS(自治域) 20000 4000 本地BGP网络 202.96.192.0——202.96.207.255,16个C 202.97.0.0——202.97.15.255,16个C 202.98.128.0——202.98.159.255,32个C 互联地址 202.100.4.2 202.100.4.1 [/list] 则本地路由器配置方法为: [list]
Router(config)#router bgp 20000(定义本BGP管理的AS--自治域编号)Router(config-router)#no synchronizationRouter(config-router)#network 202.96.192.0 mask 255.255.240.0(定义本AS--自治域包含的网络)Router(config-router)#network 202.97.0.0 mask 255.255.240.0Router(config-router)#network 202.98.128.0 mask 255.255.224.0Router(config-router)#neighbor 202.100.4.1 remote-as 4000(定义到远端AS--自治域的网关IP)Router(config-router)#exitRouter(config)#exitRouter#wr m[/list] 配置完成。 实用技术 [center]
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-3 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2026 源码网商城 (www.yuanmawang.com) 版权所有