(四)配置动态路由

内部网关协议IGP

RIP协议之适用于小型互联网

 

给路由器添加wc-2t

   184911_Vu7T_3746673.png

PC0

184923_Fy1E_3746673.png

PC1

185223_R53B_3746673.png

router0

Router>
Router>en
Router#conf
Router#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#clock set 18:43:00 jun 5 2017
Router#show clock
*18:43:12.806 UTC ?? 6? 5 2017
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname zhu0129
zhu0129(config)#int
zhu0129(config)#interface fa
zhu0129(config)#interface fastEthernet0/0
zhu0129(config-if)#ip ad
zhu0129(config-if)#ip address 192.168.3.1 255.255.255.0
zhu0129(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

zhu0129(config-if)#exit
zhu0129(config)#int
zhu0129(config)#interface s
zhu0129(config)#interface serial0/1/0
zhu0129(config-if)#ip ad
zhu0129(config-if)#ip address 10.10.10.1 255.255.255.0
zhu0129(config-if)#clock rate 64000
zhu0129(config-if)#no shutdown
zhu0129#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

zhu0129(config)#router rip
zhu0129(config-router)#network 192.168.3.0
zhu0129(config-router)#network 10.10.10.0


router1

Router>en
Router#int
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#clock set 18:58:00 jun 5 2017
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname zhu0129
zhu0129(config)#int
zhu0129(config)#interface s
zhu0129(config)#interface serial0/1/0
zhu0129(config-if)#ip ad
zhu0129(config-if)#ip address 10.10.10.254 255.255.255.0
zhu0129(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

zhu0129(config-if)#exit
zhu0129(config)#int
zhu0129(config)#interface
zhu0129(config)#interface s
zhu0129(config)#interface serial
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up

% Incomplete command.
zhu0129(config)#intt
zhu0129(config)#int
zhu0129(config)#interface s
zhu0129(config)#interface serial0/1/1
zhu0129(config-if)#ip ad
zhu0129(config-if)#ip address 12.12.12.1 255.255.255.0
zhu0129(config-if)#clock rate 64000
zhu0129(config-if)#no shutdown

zhu0129(config)#router rip
zhu0129(config-router)#network 10.10.10.0
zhu0129(config-router)#network 12.12.12.0
zhu0129(config-router)#





router2

Router>en
Router#clock set 19:01:00 jun 5 2017
Router#conf
Router#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int
Router(config)#interface s
Router(config)#interface serial0/1/0
Router(config-if)#ip ad
Router(config-if)#ip address 12.12.12.254 255.255.255.0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

Router(config-if)#exit
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up

Router(config)#int
Router(config)#interface fa
Router(config)#interface fastEthernet0/0
Router(config-if)#ip ad
Router(config-if)#ip address 172.18.5.1 255.255.255.0
Router(config-if)#no shutdown

zhu0129(config)#router rip
zhu0129(config-router)#network 12.12.12.0
zhu0129(config-router)#network 172.18.5.0
zhu0129(config-router)#exit

 

 

转载于:https://my.oschina.net/u/3746673/blog/1588670

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Nuxt.js中,配置动态路由可以通过使用动态路由参数来实现。动态路由参数是指在路由路径中使用冒号(:)定义的参数,这些参数的值可以根据实际情况进行动态匹配。 下面是配置动态路由的步骤: 1. 在Nuxt.js项目的`pages`目录下创建一个文件夹,用于存放与动态路由相关的页面组件。 2. 在该文件夹下创建一个`.vue`文件,作为动态路由的页面组件。例如,创建一个名为`_id.vue`的文件,其中`id`是动态路由参数的名称。 3. 在`nuxt.config.js`文件中配置动态路由。找到`router`配置项,并添加一个`extendRoutes`属性,用于扩展路由配置。 ```javascript export default { // ... router: { extendRoutes(routes, resolve) { routes.push({ name: 'dynamic', path: '/dynamic/:id', // 定义动态路由路径 component: resolve(__dirname, 'pages/dynamic/_id.vue') // 指定对应的页面组件 }) } } } ``` 在上述代码中,我们定义了一个名为`dynamic`的路由,路径为`/dynamic/:id`,并指定了对应的页面组件。 4. 在动态路由的页面组件中,可以通过`this.$route.params`来获取动态路由参数的值。例如,在`_id.vue`文件中可以这样使用: ```vue <template> <div> <h1>动态路由页面</h1> <p>参数值:{{ $route.params.id }}</p> </div> </template> ``` 在上述代码中,我们通过`$route.params.id`获取了动态路由参数`id`的值,并在页面中进行展示。 这样,当访问`/dynamic/123`时,就会匹配到动态路由页面组件`_id.vue`,并且可以获取到参数值为`123`。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值