分类目录归档:走向CCIE之路-RS

在不中断邻接关系的情况下更换OSPF密钥

两台路由器R1 R2通过e0口直接相连,要求在不中断OSPF邻接关系的情况下更换OSPF密钥。

更换前:
R1#sh run int e0
Building configuration…
Current configuration : 100 bytes
!
interface Ethernet0
 ip address 1.1.1.1 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
end

R2#sh run int e0
Building configuration…
Current configuration : 140 bytes
!
interface Ethernet0
 ip address 1.1.1.2 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 ip ospf message-digest-key 2 md5 PASS
end

更换时在R1上执行命令:
ip ospf message-digest-key 2 md5 PASS
no  ip ospf message-digest-key 1

R1#sh run int e0
Building configuration…
Current configuration : 100 bytes
!
interface Ethernet0
 ip address 1.1.1.1 255.255.255.0
 ip ospf message-digest-key 2 md5 PASS
end

R2#sh run int e0
Building configuration…
Current configuration : 140 bytes
!
interface Ethernet0
 ip address 1.1.1.2 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 ip ospf message-digest-key 2 md5 PASS
end

 切换过程中debug ip ospf event可以看到如下信息:
R1(config-if)#ip ospf message-digest-key 2 md5 PASS
R1(config-if)#no  ip ospf message-digest-key 1
*Mar  1 19:47:54.487: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:47:54.491: OSPF: End of hello processing
*Mar  1 19:47:54.499: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:47:54.499: OSPF: End of hello processing
*Mar  1 19:47:59.323: OSPF: Send with youngest Key 2
*Mar  1 19:47:59.323: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0 from 1.1.1.1
*Mar  1 19:48:04.503: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:48:04.507: OSPF: End of hello processing
R1(config-if)#
R1#
*Mar  1 19:48:09.327: OSPF: Send with youngest Key 2
*Mar  1 19:48:09.327: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0 from 1.1.1.1
*Mar  1 19:48:09.475: %SYS-5-CONFIG_I: Configured from console by consolesh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.2           1   FULL/BDR        00:00:31    1.1.1.2         Ethernet0
R1#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.2           1   FULL/BDR        00:00:30    1.1.1.2         Ethernet0
R1#
*Mar  1 19:48:14.511: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:48:14.515: OSPF: End of hello processing
*Mar  1 19:48:19.331: OSPF: Send with youngest Key 2
*Mar  1 19:48:19.331: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0 from 1.1.1.1
*Mar  1 19:48:24.511: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:48:24.515: OSPF: End of hello processingsh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.2           1   FULL/BDR        00:00:36    1.1.1.2         Ethernet0
R1#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.2           1   FULL/BDR        00:00:35    1.1.1.2         Ethernet0
R1#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.2           1   FULL/BDR        00:00:35    1.1.1.2         Ethernet0
R1#
*Mar  1 19:48:29.335: OSPF: Send with youngest Key 2
*Mar  1 19:48:29.335: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0 from 1.1.1.1
*Mar  1 19:48:34.519: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:48:34.523: OSPF: End of hello processing
*Mar  1 19:48:39.339: OSPF: Send with youngest Key 2
*Mar  1 19:48:39.339: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0 from 1.1.1.1
*Mar  1 19:48:44.523: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2
*Mar  1 19:48:44.527: OSPF: End of hello processing
*Mar  1 19:48:49.343: OSPF: Send with youngest Key 2
*Mar  1 19:48:49.343: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0 from 1.1.1.1
*Mar  1 19:48:54.531: OSPF: Rcv hello from 1.1.1.2 area 0 from Ethernet0 1.1.1.2

开始研究multicast

根据老师的建议,今天晚上拿着TCP/IP routing Vol 2研究组播,发现自己对于PIM的很多概念其实是很模糊的。比如某个设备上启用了spase mode,并且默认启用了autorp功能,但是show ip pim rp根本看不到预期应该出现的rp。这实际上是由于有问题的不完全的配置造成的。我们的网络其实还是有一些细小的bug需要去修正,尽管不会影响使用。

在准备CCIE的过程中,对于校园园区网络的理解似乎更加深入了……有种拿着探宝图去寻宝的感觉,学习的知识越多发现自己能看到的东西和思考的东西也就越多,这样的感觉真好!Cool

特殊的让RIPv2使用单播更新路由的方法?

今天下班的时候PP给我出了个题目,大体内容是要求两个运行RIPv2的路由器直接通过以太口连接,要求不使用neighbor命令实现单播方式更新路由。

听到题目当时感觉脑袋就大了……开始想用特殊的netmask实现,后来又想用2层技术实现。

晚饭后回106的路上想出用GRE  tunnel或许可以把组播的数据送过去。

配置如下:

hostname r3
interface Loopback0
 ip address 192.168.1.1 255.255.255.0
!
interface Loopback1
 ip address 3.3.3.3 255.255.255.0
!
interface Tunnel0
 ip address 192.168.2.1 255.255.255.252
 tunnel source Ethernet0
 tunnel destination 192.168.0.2
!
interface Ethernet0
 ip address 192.168.0.1 255.255.255.0
!
router rip
 version 2
 network 3.0.0.0
 network 192.168.2.0

另外一个路由器配置:
hostname r4
interface Loopback0
 ip address 192.168.1.2 255.255.255.0
!
interface Tunnel0
 ip address 192.168.2.2 255.255.255.252
 tunnel source Ethernet0
 tunnel destination 192.168.0.1
!
interface Ethernet0
 ip address 192.168.0.2 255.255.255.0!
!
router rip
 version 2
 network 192.168.2.0

但是刚才看了答案,书上的答案是使用NAT来实现的。我的理解是否有问题呢?

OSPF中default-information orignate是否有always的区别

两台路由器直接相连,都启用了OSPF协议。

如果在某一台上写了default-information orignate,但是它的路由表上没有通向0.0.0.0的路由的话,那么就不会向他的邻居注入一条默认路由下去。

需要特别注意的是,必须是通向0.0.0.0/0.0.0.0的路由出现才能向下注入,如果只是通过ip default-network产生一条带*的路由,那么仍然不会向邻居注入。

默认路由只要出现在路由表中即可,不一定非要在OSPF中通告,或者redistribute。

如果想在没有0.0.0.0/0.0.0.0的路由的情况下向邻居注入默认路由,则可以用default-information orignate always。但是我觉得使用always关键字需要特别慎重,尤其在多出口的情况下,稍不留神就可能会造成潜在的路由环路。

约到了CCIE LAB

刚才在PP的帮助下,终于预约到了CCIE R&S lab的座位,预计12月11日考。不过我希望能更换到早一些的座位,比如9月或者10月份的。

呵呵,这个世界很公平,有一失必有一得。Penguin这次又成为真正的CCIE  Candidate了。

暂时忘记那些曾经让我迷茫的事情吧,CCIE, I’m coming~

ccie-lab-061211 

No Lab, No CCIE

5-18 Beijing Lab

liyinghao和我已经连续2周多在想办法约CCIE lab考试了,今天忽然看到了可以约5月18日的考试,只有2天的时间准备,我最终没有勇气选择预约这样的时间。 不知道为什么,最近的CCIE lab考试如此的火爆,似乎大家都拼了命一样去考LAB一样。我也该抓紧时间努力了,少想一些事情,让自己的生活简单一些吧,比如少些刚才些的那样的莫名其妙伤感的文章……

顺利通过了笔试

今天下午和PP一起考了350-001 CCIE Routing and Switching Written Exam,两人都顺利通过。比较可惜的是PP由于没有复习无线部分,因此无线的3个题目错了2个。我考得分数比较平均,最不擅长的WAN部分拿了66%的分数,其他的从70%-100%分布,其中IP、IP Security、IP Multicast、Enterprise Wireless Mobility部分拿了100%。

对于Multicast能拿100%可能有幸运的成分在里面,因为在复习期间Multicast和QoS是我掌握的最不好的部分。在考Lab之前肯定还得继续准备准备,尽管配置不难,但是概念还是满多的。

随着考试的结束,终于踏上了成为CCIE主干道了…… 就像成绩单上写的那句话:You are now eligible to take the CCIE lab exam–the final step in CCIE certification.Penguin go

实验21 配置BGP联邦(CCIE实验51)

实验21 配置BGP联邦(CCIE实验51
时间:2006320
时间花费 总计约120分钟
实验设备:2501 5
实验拓扑:

bgp confederation

 

涉及到的概念:BGP联邦即BGP Confederation。一般用在一个AS的内部,在一个大的AS内部可以拆分成数个小的AS,这样只要保证小的AS之间可以通过EBGP方式进行互联即可,不必每台路由器都互相建立IBGP连接。

BGP联邦和RR的对比:BGP联邦建立之后在联邦内跨越内部的AS的时候AS_PATH仍然会发生变化,可以针对AS_PATH的变化做出更精确的控制。

配置如下:

routerE:
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 152.1.1.9 remote-as 200
 neighbor 152.1.2.5 remote-as 200
 no auto-summary 

routerB:
router ospf 1
 log-adjacency-changes
 redistribute connected subnets
 network 152.1.1.6 0.0.0.0 area 0
!
router bgp 65050
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 200
 bgp confederation peers 65051
 neighbor 152.1.1.5 remote-as 65050
 neighbor 152.1.1.5 next-hop-self
 neighbor 152.1.1.10 remote-as 100
 neighbor 152.1.1.65 remote-as 65051
 no auto-summary

routerA:
router ospf 1
 log-adjacency-changes
 network 152.1.1.0 0.0.0.255 area 0
!
router bgp 65050
 no synchronization
 bgp log-neighbor-changes
 network 152.1.1.1 mask 255.255.255.255
 neighbor 152.1.1.6 remote-as 65050
 no auto-summary
!

routerC:
router bgp 65051
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 200
 bgp confederation peers 65050
 network 152.1.2.1 mask 255.255.255.255
 neighbor 152.1.1.66 remote-as 65050
 neighbor 152.1.1.66 next-hop-self
 neighbor 152.1.2.6 remote-as 100
 neighbor 152.1.2.129 remote-as 65051
 no auto-summary
!

routerD:
router ospf 1
 log-adjacency-changes
 network 152.1.2.0 0.0.0.255 area 0
!
router bgp 65051
 no synchronization
 bgp log-neighbor-changes
 network 152.1.2.2 mask 255.255.255.255
 neighbor 152.1.2.130 remote-as 65051
 no auto-summary
!
 配置完毕后,在router E上show ip bgp可以看到:

E#sh ip bgp 
BGP table version is 7, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       0.0.0.0                  0         32768 i
*> 152.1.1.1/32     152.1.1.9                              0 200 i
*  152.1.2.1/32     152.1.1.9                              0 200 i
*>                  152.1.2.5                0             0 200 i
*  152.1.2.2/32     152.1.1.9                              0 200 i
*>                  152.1.2.5                              0 200 i 

由此可知,联邦对外的表现是一个整体,AS100看到的都是AS200,而不是内部的AS65050或65051。但是在联邦的内部执行show ip bgp仍然会看到联邦内的AS的信息:

b#sh ip bgp
BGP table version is 12, local router ID is 152.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  1.1.1.1/32       152.1.1.65               0    100      0 (65051) 100 i
*>                  152.1.1.10               0             0 100 i
r>i152.1.1.1/32     152.1.1.5                0    100      0 i
*> 152.1.2.1/32     152.1.1.65               0    100      0 (65051) i
*> 152.1.2.2/32     152.1.1.65               0    100      0 (65051) i