注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

乾颐堂_安德(Ender)的博客

学无前后达者为先,此博客是一个有态度网络技术共享平台,共享给大家更多知识和经验

 
 
 

日志

 
 
关于我

Ender“老湿”:双CCIE(R&S CCIE、ISP CCIE),思科认证讲师#34XXX,HCIE v2.0第一人。毕业于东北大学电子商务专业。在原公司及其他企业参与的重点项目和培训有: R&S CCIE专题课 SP CCIE专题课 思科支蜀援川项目 索尼中国(无锡)NP课程 能在这里找到我:QQ群106111081 我的微博:weibo.com/enderjoe

网易考拉推荐

乾颐堂安德IOS XR配置指导书-第一部分:基本配置和管理IOS XR设备  

2014-12-04 18:30:23|  分类: IOS XR-IOX系列 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

 

乾颐堂安德IOS XR配置指导书-第一部分:基本配置和管理IOS XR设备 - ender.joe - 乾颐堂_安德(Ender)的博客

 

乾颐堂安德IOS XR配置指导书-第一部分:基本配置

目录

IOS XR-Configuration Guide-第一部分:基本配置... 1

任务1、验证接口和子接口(桥接) 2

任务2、配置IPv6地址... 5

任务3、保存配置和加载配置... 7

任务4、查看特定的配置变更... 7

任务5、回滚配置... 8

 

 乾颐堂安德IOS XR配置指导书-第一部分:基本配置和管理IOS XR设备 - ender.joe - 乾颐堂_安德(Ender)的博客

 
乾颐堂安德IOS XR配置指导书-第一部分:基本配置和管理IOS XR设备 - ender.joe - 乾颐堂_安德(Ender)的博客  

任务1、验证接口和子接口(桥接)

下面通过单臂路由方式进行逻辑拓扑的桥接

R1

R1(config)#interface e0/0

R1(config-if)#no shutdown

R1(config)#interface ethernet 0/0.13

R1(config-subif)#encapsulation dot1Q 13

R1(config-subif)#ip address 13.1.1.1 255.255.255.0
R1(config)#interface loopback0

R1(config-if)#ip address 11.1.1.1 255.255.255.255

验证:

R1#show ip route connected

     11.0.0.0/32 is subnetted, 1 subnets

C       11.1.1.1 is directly connected, Loopback0

     13.0.0.0/24 is subnetted, 1 subnets

C       13.1.1.0 is directly connected, Ethernet0/0.13

R2

R2(config)#interface ethernet 0/0

R2(config-if)#no shutdown

R2(config)#interface ethernet 0/0.24

R2(config-subif)#encapsulation dot1Q 24

R2(config-subif)#ip address 24.1.1.2 255.255.255.0

R2(config)#interface loopback 0

R2(config-if)#ip address 22.1.1.1 255.255.255.255

R2#show ip route connected

     22.0.0.0/32 is subnetted, 1 subnets

C       22.1.1.1 is directly connected, Loopback0

     24.0.0.0/24 is subnetted, 1 subnets

C       24.1.1.0 is directly connected, Ethernet0/0.24

R3

RP/0/0/CPU0:R3(config)#interface gigabitEthernet 0/0/0/0

RP/0/0/CPU0:R3(config-if)#no shutdown

RP/0/0/CPU0:R3(config-if)#exit

RP/0/0/CPU0:R3(config)#interface g0/0/0/0.13

RP/0/0/CPU0:R3(config-subif)#dot1q vlan 13---封装到vlan13中,命令稍有区别,老式封装命令也支持

RP/0/0/CPU0:R3(config-subif)#ipv4 address 13.1.1.3 255.255.255.0

RP/0/0/CPU0:R3(config-subif)#commit---提交之后才生效,这一点需要适应
RP/0/0/CPU0:R3(config)#interface gigabitEthernet 0/0/0/0.34

RP/0/0/CPU0:R3(config-subif)#encapsulation dot1q 34

RP/0/0/CPU0:R3(config-subif)#ipv4 address 34.1.1.3 255.255.255.0

RP/0/0/CPU0:R3(config-subif)#exit

RP/0/0/CPU0:R3(config)#interface loopback 0

RP/0/0/CPU0:R3(config-if)#ipv4 address 33.1.1.1 255.255.255.255

验证:

RP/0/0/CPU0:R3#show running-config interface

Mon Feb 10 16:15:35.788 UTC

interface Loopback0

 ipv4 address 33.1.1.1 255.255.255.255

!

interface MgmtEth0/0/CPU0/0---此接口为管理接口可以不用理会

 shutdown

!

interface GigabitEthernet0/0/0/0

!

interface GigabitEthernet0/0/0/0.13

 ipv4 address 13.1.1.3 255.255.255.0

 encapsulation dot1q 13

!

interface GigabitEthernet0/0/0/0.34

 ipv4 address 34.1.1.3 255.255.255.0

 encapsulation dot1q 34

 

RP/0/0/CPU0:R1#ping 13.1.1.1

Mon Feb 10 16:12:21.721 UTC

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 13.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/21/79 ms

RP/0/0/CPU0:R4(config)#interface gigabitEthernet 0/0/0/0.34

RP/0/0/CPU0:R4(config-subif)#dot1q vlan 34

RP/0/0/CPU0:R4(config-subif)#ipv4 address 34.1.1.4 255.255.255.0

RP/0/0/CPU0:R4(config-subif)#exit

RP/0/0/CPU0:R4(config)#interface gigabitEthernet 0/0/0/0.24

RP/0/0/CPU0:R4(config-subif)#encapsulation dot1q 24

RP/0/0/CPU0:R4(config-subif)#ipv4 address 24.1.1.4 255.255.255.0

RP/0/0/CPU0:R4(config)#interface loopback 0

RP/0/0/CPU0:R4(config-if)#ipv4 address 44.1.1.1 255.255.255.255

验证:

RP/0/0/CPU0:R4#show running-config interface

Mon Feb 10 16:17:43.559 UTC

interface Loopback0

 ipv4 address 44.1.1.1 255.255.255.255

!

interface MgmtEth0/0/CPU0/0

 shutdown

!

interface GigabitEthernet0/0/0/0

!

interface GigabitEthernet0/0/0/0.24

 ipv4 address 24.1.1.4 255.255.255.0

 encapsulation dot1q 24

!

interface GigabitEthernet0/0/0/0.34

 ipv4 address 34.1.1.4 255.255.255.0

 encapsulation dot1q 34

RP/0/0/CPU0:R4#show route ipv4 connected

Mon Feb 10 16:18:03.598 UTC

 

C    24.1.1.0/24 is directly connected, 00:01:05, GigabitEthernet0/0/0/0.24

C    34.1.1.0/24 is directly connected, 00:01:05, GigabitEthernet0/0/0/0.34

RP/0/0/CPU0:R4#ping 34.1.1.3

Mon Feb 10 16:18:19.367 UTC

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 34.1.1.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms

RP/0/0/CPU0:R4#ping 24.1.1.2

Mon Feb 10 16:18:24.346 UTC

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 24.1.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 9/29/49 ms

RP/0/0/CPU0:R3#show interfaces brief

Mon Feb 10 16:31:15.093 UTC

 

               Intf       Intf        LineP              Encap  MTU        BW

               Name       State       State               Type (byte)    (Kbps)

--------------------------------------------------------------------------------

                Lo0          up          up           Loopback  1500          0

                Nu0          up          up               Null  1500          0

       Mg0/0/CPU0/0  admin-down  admin-down               ARPA  1514          0

          Gi0/0/0/0          up          up               ARPA  1514    1000000

       Gi0/0/0/0.24          up          up             802.1Q  1518    1000000

       Gi0/0/0/0.34          up          up             802.1Q  1518    1000000

 

任务2、配置IPv6地址

R1(config)#interface Loopback0

R1(config-if)# ipv6 address 2011::1/128

R1(config-if)#interface Ethernet0/0.13

R1(config-subif)# ipv6 address 2013::1/64

R2(config)#interface Loopback0

R2(config-if)# ipv6 address 2022::2/128

R2(config-if)#interface Ethernet0/0.24

R2(config-subif)# ipv6 address 2024::2/64

IOS XR的配置在此处并无特殊之处:

RP/0/0/CPU0:R3(config)#interface loopback 0

RP/0/0/CPU0:R3(config-if)#ipv6 address 2033::3/128

RP/0/0/CPU0:R3(config-if)#exit

RP/0/0/CPU0:R3(config)#interface gigabitEthernet 0/0/0/0.13

RP/0/0/CPU0:R3(config-subif)#ipv6 address 2013::3/64

RP/0/0/CPU0:R3(config-subif)#exit

RP/0/0/CPU0:R3(config)#interface gigabitEthernet 0/0/0/0.34

RP/0/0/CPU0:R3(config-subif)#ipv6 address 2034::3/64

RP/0/0/CPU0:R3(config-subif)#commit

RP/0/0/CPU0:R4(config)#interface loopback 0

RP/0/0/CPU0:R4(config-if)#ipv6 address 2044::4/128

RP/0/0/CPU0:R4(config-if)#exit

RP/0/0/CPU0:R4(config)#interface gigabitEthernet 0/0/0/0.34

RP/0/0/CPU0:R4(config-subif)#ipv6 address 2034::4/64

RP/0/0/CPU0:R4(config-subif)#exit

RP/0/0/CPU0:R4(config)#interface gigabitEthernet 0/0/0/0.24

RP/0/0/CPU0:R4(config-subif)#ipv6 address 2024::4/64

验证:

RP/0/0/CPU0:R3#show route ipv6

Mon Feb 10 16:49:47.078 UTC

 

Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, su - IS-IS summary null, * - candidate default

       U - per-user static route, o - ODR, L - local, G  - DAGR

       A - access/subscriber, a - Application route, (!) - FRR Backup path

 

Gateway of last resort is not set

 

C    2013::/64 is directly connected,

      00:09:13, GigabitEthernet0/0/0/0.13

L    2013::3/128 is directly connected,---注意128为的地址将作为L(本地)路由放入路由表,不会显示在直连中

      00:09:13, GigabitEthernet0/0/0/0.13

L    2033::3/128 is directly connected,

      00:09:13, Loopback0

C    2034::/64 is directly connected,

      00:09:13, GigabitEthernet0/0/0/0.34

L    2034::3/128 is directly connected,

      00:09:13, GigabitEthernet0/0/0/0.34

RP/0/0/CPU0:R3#show route ipv6 connected

Mon Feb 10 16:51:16.812 UTC

 

C    2013::/64 is directly connected,

      00:10:43, GigabitEthernet0/0/0/0.13

C    2034::/64 is directly connected,

      00:10:43, GigabitEthernet0/0/0/0.34

测试:

RP/0/0/CPU0:R3#ping 2034::4

Mon Feb 10 16:48:22.093 UTC

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2034::4, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms

RP/0/0/CPU0:R3#ping 2033::3

Mon Feb 10 16:48:28.723 UTC

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2033::3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

RP/0/0/CPU0:R3#ping 2013::1

Mon Feb 10 16:48:31.753 UTC

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2013::1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 9/19/39 ms

小提示:IOS XR支持在配置模式下show run来验证,但是ping等行为还需要加do

任务3、保存配置和加载配置

保存配置:

RP/0/0/CPU0:R3(config)#save configuration disk0:2014-2-10.text---保存配置到disk0,命名为2014-2-10.text

Mon Feb 10 17:55:48.396 UTC

Destination file name (control-c to abort): [/2014-2-10.text]?---询问目标地名,回车即保存,CTRL+C终止

Building configuration.

1 lines built in 1 second

[OK]

加载配置:

RP/0/0/CPU0:R3(config)#load disk0:2014-2-10.text---注意没有空格,加载disk0中的文件

Loading.

34 bytes parsed in 1 sec (33)bytes/sec

 

任务4、查看特定的配置变更

IOS XRrunning-configuration提交到一个名为SysDB的数据库中,当配置发生改变时,会有一个相应的commit-ID关联提交到SysDB

RP/0/0/CPU0:R3#show configuration commit list

Mon Feb 10 19:24:46.111 UTC

SNo. Label/ID    User      Line                Client      Time Stamp

~~~~ ~~~~~~~~    ~~~~      ~~~~                ~~~~~~      ~~~~~~~~~~

1    TEST1-2014  ender     con0_0_CPU0         CLI         Mon Feb 10 19:01:25 2014

2    1000000012  ender     con0_0_CPU0         CLI         Mon Feb 10 16:40:33 2014

3    1000000011  ender     con0_0_CPU0         CLI         Mon Feb 10 16:28:31 2014

4    1000000010  ender     con0_0_CPU0         CLI         Mon Feb 10 16:14:48 2014

5    1000000009  ender     con0_0_CPU0         CLI         Mon Feb 10 16:10:30 2014

6    1000000008  ender     con0_0_CPU0         CLI         Mon Feb 10 16:08:42 2014

7    1000000007  ender     con0_0_CPU0         CLI         Mon Feb 10 11:32:33 2014

8    1000000006  ender     con0_0_CPU0         CLI         Mon Feb 10 10:05:10 2014

9    1000000005  ender     con0_0_CPU0         CLI         Sun Feb  9 10:38:39 2014

10   1000000004  ender     con0_0_CPU0         CLI         Sun Feb  9 10:29:54 2014

11   1000000003  ender     con0_0_CPU0         CLI         Sat Feb  8 17:01:32 2014

12   1000000002  ender     con0_0_CPU0         CLI         Sat Feb  8 16:36:12 2014

13   1000000001  ender     con0_0_CPU0         CLI         Sat Feb  8 16:29:44 2014

查看某一次提交的改变情况:

RP/0/0/CPU0:R3#show configuration commit changes TeST1-2014-2-10

Mon Feb 10 19:25:37.947 UTC

Building configuration...

!! IOS XR Configuration 5.1.1

interface GigabitEthernet0/0/0/0.100

 encapsulation dot1q 100

!

end

查看最后N次配置改变情况:

RP/0/0/CPU0:R3#show configuration commit changes last 3

Mon Feb 10 19:26:52.412 UTC

Building configuration...

!! IOS XR Configuration 5.1.1

hostname R3

interface Loopback0

 ipv6 address 2033::3/128

!

interface GigabitEthernet0/0/0/0.13

 ipv6 address 2013::3/64

!

interface GigabitEthernet0/0/0/0.34

 ipv6 address 2034::3/64

!

interface GigabitEthernet0/0/0/0.100

 encapsulation dot1q 100

任务5、回滚配置

修改一个配置,本例修改了主机名:

RP/0/0/CPU0:R4(config)#hostname Rollback

提交一个标签

RP/0/0/CPU0:R4(config)#commit label Rollback---提交一个标签,方便回滚配置到该标签

回滚配置:

RP/0/0/CPU0:Rollback#show configuration commit list

Mon Feb 10 19:46:21.852 UTC

SNo. Label/ID    User      Line                Client      Time Stamp

~~~~ ~~~~~~~~    ~~~~      ~~~~                ~~~~~~      ~~~~~~~~~~

1    Rollback    ender     con0_0_CPU0         CLI         Mon Feb 10 19:32:44 2014

RP/0/0/CPU0:Rollback#rollback configuration to  Rollback

Mon Feb 10 19:46:58.939 UTC

Loading Rollback Changes.

Loaded Rollback Changes in 1 sec

Committing.RP/0/0/CPU0:Feb 10 19:47:00.049 : ike[226]: %SECURITY-IKE-4-WARNING : You may want to configure a domain-name

 

1 items committed in 1 sec (0)items/sec

Updating.

Updated Commit database in 1 sec

Configuration successfully rolled back to 'Rollback'.

RP/0/0/CPU0:R4#---正常情况下已经回滚到主机名为R4的配置

 

  评论这张
 
阅读(1123)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017