交换机和路由器的高级配置
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://guanzi.blog.51cto.com/307328/84981 |
16章 ipv6概述
1: ipv6 unicast-routing 再路由器上打开接口之间的ipv6数据转发功能。
2: ipv6 address fec0:0:0:1001::1/64配置接口ip地址
3: ipv6 router rip aaa 配置ipv6的rip路由协议
int e0/0
ipv6 rip aaa enable
4: 在pc机上配置ip地址和默认网关地址
cmd
netsh
interface ipv6
add address ”本地连接2“fec0:0:0:1005::2 配置ip地址
add route ::/0 “本地连接
add dns“本地连接
5: ipv6 router ospf 1 配置ospf
router-id
exit
int e0/0
ipv6 ospf 1 area 0
6: ipv6 route fec0:0:0:1001::0/64 fec0:0:0:1001::2 配置静态的路由信息
15章 wlan 和voip
在router上配置 voip
1 int e 0/1
ip add 192.168.2.1 255.255.255.0
no sh
exit
2 dial-peer voice 1 pots 指明要为语音端口开始配置电话
3 destination-pattern 1001 指明voip的电话号码
4 port 1/0/0 将1001绑定到指定的语音端口
exit
5 dial-peer voice 10 voip 指明要进行的voip的配置
6 destination-pattern 2002 指明对方的电话号码
7 session target ipv4:192.168.2.2 将电话号码映射到对方接口上的ip地址
14章虚拟专用网 vpn
1: crypto isakmp enable 启用ike
2 crypto isakmp policy 1 建立ike协商策略
3 group 2 设置ike所用的dh算法的复杂度
4 hash sha 设置密钥验证所用的算法
5 encryption 3des 设置加密所用的算法
6 authentication pre-share 设置router要使用预先共享的密钥
7 lifetime 3600 设置sa的生存时间
exit
8 crypto isakmp key aaa add
9 crypto ipsec transform-set my ah-sha-hmac esp-3des 配置ipsec传输模式
mode tunnel
10 access-list 111 permit ip 172.16.0.0 0.0.255.255
11 crypto map yuan 1 ipsec-isakmp 创建crypto Map
12 match add 111 指定crypto Map 使用的访问控制列表
13 set peer
14 set transform-set my 指定crypto所使用的传输模式
15 int e0/0
crypto map yuan 指定crypto Map 到端口
exit
13章网络地址转换nat
1 ip nat inside/outside 再端口上启用nat
2 ip nat inside source static 192.168.2.2 102.0.0.1 设置静态nat
3 access-list 1 permit 192.168.2.0
4 设置pat
ip nat pool benet 102.0.0.1 102.0.0.1 netmask 255.255.255.252
ip nat inside source list 1 pool benet overload
5 设置动态nat
ip nat pool benet 102.0.0.1 102.0.0.240 netmask 255.255.255.252
ip nat inside source list 1 pool benet
6 tcp负载均衡配置
access-list 2 permit
ip nat pool real-host
ip nat inside destination list 2 pool real-host 设置访问控制表与nat地址集之间的映射
12访问控制列表 acl
1 access-list 11 permit|deny 172.16.0.0 0.0.255.255
2 access-list 110 permit|deny icmp 172.16.0.0 0.0.255.255 192.168.1.0
access-list 110 permit any any
11章热备份路由协议 hsrp
1 interface Ethernet0/0
ip address 192.168.0.1 255.255.255.0
no sh
2 standby 10 ip 192.168.0.3 配置路由器加入备份组 10
3 standby 10 priority 150 配置端口优先级别为 150
4 standby 10 preempt 配置占先权
5 standby 10 track e0/1 60 配置端口跟踪
6 standby 20 ip 192.168.0.4 配置路由器加入备份组 20
7 standby 20 preempt 配置占先权
exit
10 章 ospf的高级配置
1 router ospf 2
2 net 172.16.0.0 0.0.255.255 area 1
3 area 3 nssa | no-summary 配置某区域为nssa区域
4 辅助地址
int e 0/0
ip add
5 配置地址汇总
1:区域间的路由汇总 area 3 range 192.168.0.0 255.255.255.248
2: 外部路由汇总 summary-address 192.168.0.0 255.255.255.248
6 配置路由重分发
router rip
redistribute ospf 109 metric 10 将ospf注入到rip中
router ospf 10
redistribute rip metric 200 subnets 将rip注入到ospf网络中
7 虚链路
r3
area 3 virtual-link
r2
area 3 virtual-link
8 配置r1成为一台dr,r2永远不做为dr
r2
en
conf t
int e 0/0
ip ospf priority 0
no sh
exit
9 重分发静态和默认的路由信息
redistribute static metric 200
default-information originate
9章ospf的多区域配置
1 配置stub area
area 3 stub | no-summary
show ip route 查看路由表信息
show ip route ospf 查看ospf学习到的路由
show ip protocol 查看ospf协议配置信息
show ip ospf 查看在路由器上ospf是如何配置的和abr
show ip ospf database 查看lsdb内的所有lsa数据信息
show ip ospf interface 接口上ospf的配置信息
show ospf neighbor 查看ospf 邻居和邻接的状态
show ospf neighbor 查看详细信息
debug ip ospf adj 查看每个router的整个过程
clear ip route 清空路由器
7章 dsl技术
再路由器上配置pppoe拨号
ena
conf t
vpdn enable
vpdn-group 1
request-dialin
protocol pppoe
exit
exit
interface FastEthernet0/1
no sh
pppoe enable
pppoe-client dial-pool-number 1
no cdp enable
exit
interface Dialer1
mtu 1492
ip address negotiated
encapsulation ppp
dialer pool 1
dialer-group 1
ppp authentication pap chap callin
ppp chap hostname 290131110
ppp chap password 0 769209
ppp pap sent-username 290131110 password 0 769209
exit
ip route
int f0/0
ip add 172.16.0.254 255.255.0.0
no sh
ip nat inside
exit
interface Dialer1
ip nat outside
exit
ip nat inside source list 1 interface Dialer1 overload
access-list 1 permit 172.16.0.0 0.0.255.255
第一章VTP协议
VTP –VLAN Trunk Protocol 虚拟局域网中继协议
1创建VTP域名:vtp domain domain-name
2配置交换机的VTP模式:vtp mode server/client/transparent
3配置VTP口令:vtp password password
4配置VTP修剪:vtp pruning
5配置VTP的版本:vtp version 2/1
6查看VTP的配置信息: show vtp status
7查看VLAN的配置信息:show vlan brief
8查看接口的配置信息: show ip int brief
9.Line cons 0
Logg syn 取消同步
No ip dom loo 取消解析
第二章STP 协议
STP---spanning tree protocol 生成树协议
PVST配置命令:
1启用生成树:spanning-tree vlan vlan-list
2指定根网桥:
spanning-tree vlan vlan-list root primary/secondary
3修改网桥的优先级:
Spanning-tree vlan vlan-list priority 4096的倍数
4修改端口成本:Spanning-tree vlan vlan-list cost cost
5修改端口优先级:
spanning-tree vlan vlan-list port-priority priority
6配置上行速链路:Spanning-tree uplinkfast
7配置速端口:spanning-tree portfast
8查看生成树的配置: show spanning-tree brief
9.以太网通道的配置:
Int range f0/1 – 2
Channel-group 1 mode on
第三章 三层交换
1.启动路由功能: ip routing
2.配置VLAN的IP地址:
Int vlan vlan-id
Ip address ip-address subnet-mask
No shut
3.查看FIB表 show ip cef
4.查看邻接关系表 show adjacency detail
5.在三层交换机上配置路由接口: no switchport
6.在三层交换机上配置静态或动态路由:
在三层交换机上配置静态路由或动态路由的方法与在路由器上配置路由的方法相同。
7.配置DHCP中继转发:
Int vlan vlan-id
Ip helper-address Dhcpserver-add
8.查看路由表: show ip route
9.释放IP:ipconfig /release
重新获取IP:ipconfig /renew
10.在路由器上配置DHCP服务器
全局模式:service dhcp 启用DHCP服务
全局模式:ip dhcp pool pool-name 创建DHCP池
全局模式:network 192.168.1.0 255.255.255.0 指定DHCP池网段
全局模式:default-router 192.168.1.1 指定地址池网关
全局模式:dns-server 61.232.202.158 指定地址池的DNS
11.取消发放的IP地址:
Ip dhcp excluded-add 192.168.1.1
第五章 广域网技术
专用连接:DDN数字数据网 ,PPP(数据链路层协议)
电路交换连接:ISDN连接 ,PPP(数据链路层协议),PSTN(公共交换电话网)
分组交换连接:侦中继 ,ATM,X.25,SMDS(交换式多兆比数据服务)
宽带接入:XDSL ,Cable Modem
广域网封装协议:HDLC协议(路由器广域网默认设置),PPP协议(LCP子层,NCP子层),侦中继协议,ATM协议
重新给接口封装协议:
Int s1/0
Enca ppp
No sh
DCE为DTE提供时钟,所以要给DCE端设置时钟速率:
Sh contr se 0查看
Int s0
Clock rate 64000(64k)
第六章 PPP协议
PPP协议 Point to point protocol 点对点协议
1.多链路捆绑:
Int s0/0
Enca ppp
Ppp multilink group 1
2.设置地址池:
Ip local pool pool-name 192.168.1.1 192.168.1.254
Int s0/0
Peer default ip add pool pool-name
3.封装协议
int serial slot/port
Enca ppp
4.配置PAP认证
主认证端PAP配置:
Username user-name password 0 pass-word
Ppp authentication pap
被认证端PAP配置:
Ppp pap sent-username user-name password 0 pass-word
5.配置CHAP认证:
主认证端CHAP配置:
Username 对端的主机号 password 0 pass-word
Ppp chap hostname 认证的主机名
Ppp chap password 密码
被认证端CHAP配置:
Username 对端的主机号 password 0 pass-word
Ppp chap hostname 认证的主机名
Ppp chap password 密码
6.配置IP地址协商:
服务器端配置:Peer default ip address ip-address
客户端配置:ip address negotiated
7.配置PPP压缩:
配置stac压缩:
接口模式:compress predictor/stac
第七章 DSL技术
目前存在的接入方式: 拨号接入方式,ISDN接入方式,以太网接入方式,光纤接入,无线接入方式,Cable Modem 接入方式,DSL接入方式。
HDSL,SDSL,SHDSL 对称型
VDSL,ADSL,G.ADSL 非对称型 本文出自 “guanxingwu125.blog.163.com” 博客,请务必保留此出处http://guanzi.blog.51cto.com/307328/84981 本文出自 51CTO.COM技术博客 |


guanzi118
博客统计信息
热门文章
最新评论
友情链接
