CCNP 路由第七天内容,共七天
路由day7
? 第六部分:VPN(续) ? XX
配置site-to-site VPN R1上使用SDM配置
R2上使用以下命令配置 R2(config)#!
R2(config)#crypto isakmp policy 1 R2(config-isakmp)# encr aes
R2(config-isakmp)# authentication pre-share R2(config-isakmp)# group 2 R2(config-isakmp)#!
R2(config-isakmp)#crypto isakmp key cisco address 100.100.100.1 R2(config)#! R2(config)#!
R2(config)#crypto ipsec transform-set ccnp esp-aes esp-sha-hmac R2(cfg-crypto-trans)#! R2(cfg-crypto-trans)#!
R2(cfg-crypto-trans)#crypto map to-R1 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. R2(config-crypto-map)# set peer 100.100.100.1 R2(config-crypto-map)# set transform-set ccnp R2(config-crypto-map)# match address 101 R2(config-crypto-map)#! R2(config-crypto-map)#!
R2(config-crypto-map)#interface FastEthernet0/0 R2(config-if)# crypto map to-R1 R2(config-if)#! R2(config-if)#!
R2(config-if)#ip route 192.168.80.0 255.255.255.0 100.100.100.1 R2(config)#! R2(config)#!
R2(config)#$ 101 permit ip 192.168.30.0 0.0.0.255 192.168.80.0 0.0.0.255 *Mar 1 00:14:32.947: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
R2(config)#$ 101 permit ip 192.168.30.0 0.0.0.255 192.168.80.0 0.0.0.255 R2(config)#
*Mar 1 00:17:09.695: %CRYPTO-4-RECVD_PKT_NOT_IPSEC: Rec'd packet not an IPSEC packet. (ip) vrf/dest_addr= /192.168.30.98, src_addr= 192.168.80.107, prot= 1 R2(config)#
*Mar 1 00:18:10.175: %CRYPTO-4-RECVD_PKT_NOT_IPSEC: Rec'd packet not an IPSEC packet. (ip) vrf/dest_addr= /192.168.30.98, src_addr= 192.168.80.107, prot= 1 R2(config)#
*Mar 1 00:19:10.647: %CRYPTO-4-RECVD_PKT_NOT_IPSEC: Rec'd packet not an IPSEC packet. (ip) vrf/dest_addr= /192.168.30.98, src_addr= 192.168.80.107, prot= 1
第1页 共4页
CCNP 路由第七天内容,共七天
配置一端后不能通信,两端都配置好后能通信 删除静态路由后不通(不支持动态路由),使用GRE.
? GRE概述:cisco开发,第三层隧道(封装)协议,无安全性,加24字节头(IP头20,GRE头4) ? 配置GRE
1.创建隧道:int tunnel 号 2.ip地址
3.源:tunnel soure [本地物理接口IP或号] 4.目标:tunnel destination [远离物理接口IP] 5.mode(默认为GRE模式):tunnel mode gre ip show run int tunnel号(接口号);show ip int brief 配置实例:
R1(config)#interface t0
R1(config-if)#ip add 10.1.1.1 255.255.255.0 R1(config-if)#tunnel source f0/0
R1(config-if)#tunnel destination 100.100.100.2
R1(config-if)#tunnel mode gre ip #默认,不用配置该条命令
R2(config)#int tunnel 0 R2(config-if)#
*Mar 1 00:50:48.411: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to down R2(config-if)#ip add 10.1.1.2 255.255.255.0 R2(config-if)#tunnel source f0/0
R2(config-if)#tunnel destination 100.100.100.1
*Mar 1 00:52:13.443: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to up R2(config-if)#tunnel mode gre ip #默认,不用配置该条命令
? GRE特性:①创建隧道;②提供虚拟P2P(实际为多点);③支持动态路由 ? GRE OVER IPsec(安全GRE通告,为GRE提供加密):对比IPsec配置 1.Tunnel接口中预留80字节头(ip mtu 1420),优化性能,防止超出MTU(1500),重新拼装包。 2. Tunnel接口和物理接口都应用map(cry map 映射名) 3.动态路由(删除静态路由) 4. 兴趣流量变为GRE,ACL定义,(要删除原来的ACL)
access-list 号 permit gre host [本地物理接口IP] host [远端物理IP] 实例配置:
R1上使用SDM配置
R1(config)#no access-list 101 permit ip 192.168.80.0 0.0.0.255 192.168.30.0 0.0.0.255 R1(config)#access-list 101 permit gre host 100.100.100.1 host 100.100.100.2 R1(config)#no ip route 192.168.30.0 255.255.255.0 100.100.100.2
R2(config)#int t0
R2(config-if)# crypto map to-R1 R2(config-if)# ip mtu 1420 R2(config-if)#
R2(config-if)#router eigrp 100
R2(config-router)# passive-interface FastEthernet1/0 R2(config-router)# network 10.1.1.0 0.0.0.255 R2(config-router)# network 192.168.30.0 R2(config-router)# no auto-summary
第2页 共4页
CCNP 路由第七天内容,共七天
R2(config-router)#
R2(config-router)#no access-list 101
R2(config)#access-list 101 permit gre host 100.100.100.2 host 100.100.100.1 R2(config)#no ip route 192.168.80.0 255.255.255.0 100.100.100.1
? IPsec VPN类型
1.Remote Access:client发起访问server,也叫easy vpn 2.site-to-site
? easy vpn:简化client配置,从server向client推(push)配置 组建:server:可用IOS Router,PIX,ASA remote(client):可用IOS router,PIX,ASA,pc软件client ? easy vpn的连接过程:7步 1.client发起IKE阶段1
2.client建立ISAKMP 的SA:发送多个proposal(提议),包含多个安全参数(如加密算法等)的组合 3.server接受proposal:按ISAKMP policy优先级从高至低依次匹配,匹配则建立SA
4.sever发起用户名和密码challenge:弹出了对话框,IKE阶段1.5之Xauth,用AAA认证用户 5.mode config开始:IKE阶段1.5,server向client推配置,包含地址池和IP,DNS等;PC client上查看:ipconfig -all 6.RRI(反向路由注入):在server上自动产生指向client公网的静态路由(S表项),该表项为IP地址池IP,应将其重分发进入IGP(re st) 的静态host route(/32), 7.ipsec(IKE阶段2)完成连接
? 配置easy VPN server:用SDM 配置router IOS 1.特权模式认证:enable secret 密码 2.创建特权15级用户(管理员),SDM?其他任务?路由器访问?用户账户 3.启用AAA,用SDM向导
4.SDM向导:组授权和用户组策略-添加;
①一般选项中:预共享密钥(PSK)是client的组密码 ②切分通道(split tunnel):client在transport页中,要勾选allow local lan access;默认未使用,所有traffic都通过server被加密(包括访问internet的),如果使用切分通道(split tunnel)后,只有受保护的子网(地址池中的IP)的traffic才被加密,
? 第七部分IPV6
? IPv6地址:128位二进制,表示为32位16进制,分为8段,段间用:(冒号)分隔,可去掉前置0,多段连
续0可用::(双冒号)表示,但只能使用一次 ::1相当于IPV4 127.0.0.1 :: 相当于IPV4 0.0.0.0
Winxp上:ipv6 install 安装ipv6
? IPv6地址类型:无广播,3类 1.单播(unicast):2种
①全局(global):2部分,前64位为层次化的网络ID,后64位为接口ID 2种接口ID: 方法①静态(static):接口ID手工配置
方法②动态(dynamic):接口ID用EUI-64格式,在48位(二进制)MAC地址中间填充FFFE(16进制),前8位(二进制)为U/L bit(000000u0),u=1表示全局唯一,此时U/L bit为02(00000010)去掉前置0为2;u=0 表示本地唯一
②link-local:FE80开头,用于路由表中的下一跳地址,路由协议或邻居地址
第3页 共4页
CCNP 路由第七天内容,共七天
2.组(多)播(multicast):FF开头,用于video和路由协议等。 如:RIPng用ff02::9
3.任意播(anycast):即全局单播地址,将全局单播地址分配到一组功能相同设备,如服务器群(server farm),可实现负载均衡 ? 自动配置
1.PC向router发RS(请求) 2.Router用R4应答(通告)
? 配置IPv6路由:
1.启用:ipv6 uniast-routing
2.接口地址及激活接口:①静态(手工):if)#ipv6 add 前缀/长度 ②动态(EUI-64):if)#ipv6 add 前置/长度evi-64 show ipv6 int brief
注意:ipv6支持接口多IP(多地址),相互之间不覆盖 show ipv6 route
? RIPng:基于RIPV2
1.启用:IPV6 router rip 标记(进程标记,用于本地区分多个RIPV6进程,可以是字符或数字) 2.接口启用:con-if>#ipv6 rip 标记 enable show ipv6 router,show ipv6 pro
? OSPFv3:基于OSPFv2
1.启用:ipv6 router ospf 进程号 2.router ID:router-id x.x.x.x
3.接口启用:-if)#ipv6 ospf 进程ID area号
? EIGRP for ipv6
1. 启用:ipv6 router eigrp AS号 2. 激活:no sh
3. router-id:router-id x.x.x.x
4. 接口启用:-if)#ipv6 eigrp AS号 静态:ipv6 route 前缀/长度 网关 AD值
? ipv4-to-ipv6过渡 双栈(DUAL STACK):支持ipv4和ipv6
Tunnel:将IPV6的包封装在ipv4的包中,使其跨越ipv4主干 隧道:GRE、手工、6to4等
NAT-PT Ipv6 nat ? Sh ipv6 nat tra
第4页 共4页