Skip to main content

tplogin.cn首页 > 新闻资讯 >

Juniper Olive动态路由RIP配置案例

2012-05-03 23:47 浏览:

上图为配置拓扑图:

R1,R2,R3,R4全部通过RIPv2获取路由,以下为配置文档。

system {
root-authentication {
encrypted-password "$1$PC0IgEDw$xh19u99VsA6AzoTDk9bFz."; ## SECRET-DATA
}
login {
user mengmeng {
uid 2001;
class super-user;
authentication {
encrypted-password "$1$kEim0KF/$ezlHwRupnb7HFdUZVdIvE."; ## SECRET-DATA
  }
 }
}
services {
telnet;
web-management {
http {
port 80;
   }
  }
 }
}
logical-routers {
R1 {
interfaces {
em1 {
unit 12 {
vlan-id 12;
family inet {
address 12.1.1.1/24;
 }
}
unit 13 {
vlan-id 13;
family inet {
address 13.1.1.1/24;
   }
  } 
 }
}
protocols {
rip {
group juniper {
export juniper;
neighbor em1.13;
neighbor em1.12;
  }
 }
}
policy-options {
policy-statement juniper {
term 1 {
from protocol static;
then accept;
}
term 2 {
from interface [ em1.12 em1.13 ];
then accept;
   }
  }
 }
}
R2 {
interfaces {
em2 {
unit 12 {
vlan-id 12;
family inet {
address 12.1.1.2/24;
 }
}
unit 24 {
vlan-id 24;
family inet {
address 24.1.1.2/24;
   }
  } 
 }
}
protocols {
rip {
group juniper {
export juniper//定义转发策略,juniper默认不会将直连网络宣告出去,需要定义转发策略 
neighbor em2.12;  //相当于在接口上启用rip 
neighbor em2.24;
  }
 }
}
policy-options {
policy-statement juniper {
term 1 {
from protocol static;
then accept;
}
term 2 {
from interface [ em2.12 em2.24 ]; //将在这些接口上收到的路由发布出去,包括这些接口的网络号 
then accept;
   }
  }
 }
}
R3 {
interfaces {
em3 {
unit 13 {
vlan-id 13;
family inet {
address 13.1.1.3/24;
 }
}
unit 34 {
vlan-id 34;
family inet {
address 34.1.1.3/24;
   }
  } 
 }
}
protocols {
rip {
group juniper {
export juniper;
neighbor em3.13;
neighbor em3.34;
  }
 }
}
policy-options {
policy-statement juniper {
term 1 {
from protocol static;
then accept;
}
term 2 {
from interface [ em3.13 em3.34 ];
then accept;
   }
  }
 }
}
R4 {
interfaces {
em4 {
unit 24 {
vlan-id 24;
family inet {
address 24.1.1.4/24;
 }
}
unit 34 {
vlan-id 34;
family inet {
address 34.1.1.4/24;
   }
  } 
 }
}
protocols {
rip {
group juniper {
export juniper;
neighbor em4.24;
neighbor em4.34;
  }                                                                      }
}
policy-options {
policy-statement juniper {
term 1 {
from protocol static;
then accept;
}
term 2 {
from interface [ em4.24 em4.34 ];
then accept;
    }
   }
  }
 }
}
interfaces {
em0 {
unit 0 {
family inet {
address 192.168.1.254/24;
  }
 }
}
em1 {
vlan-tagging;
}
em2 {
vlan-tagging;

em3 {
vlan-tagging;
}
em4 {
vlan-tagging;
 }
}

mengmeng# run show rip neighbor logical-router all 

logical-router: R1
Source Destination Send Receive In
Neighbor State Address Address Mode Mode Met 
-------- ----- ------- ----------- ---- ------- --- 
em1.12 Up 12.1.1.1 224.0.0.9 mcast both 1
em1.13 Up 13.1.1.1 224.0.0.9 mcast both 1
-----

logical-router: R2
em2.12 Up 12.1.1.2 224.0.0.9 mcast both 1
em2.24 Up 24.1.1.2 224.0.0.9 mcast both 1
-----
logical-router: R3
em3.13 Up 13.1.1.3 224.0.0.9 mcast both 1
em3.34 Up 34.1.1.3 224.0.0.9 mcast both 1
-----
logical-router: R4
em4.24 Up 24.1.1.4 224.0.0.9 mcast both 1
em4.34 Up 34.1.1.4 224.0.0.9 mcast both 1
-----
logical-router: default
RIPv2 instance is not running

[edit]
mengmeng# run show route logical-router all 

logical-router: R1

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

12.1.1.0/24 *[Direct/0] 07:22:59
> via em1.12
12.1.1.1/32 *[Local/0] 07:22:59
Local via em1.12
13.1.1.0/24 *[Direct/0] 07:22:59
> via em1.13
13.1.1.1/32 *[Local/0] 07:22:59
Local via em1.13
24.1.1.0/24 *[RIP/100] 00:47:09, metric 2, tag 0
> to 12.1.1.2 via em1.12
34.1.1.0/24 *[RIP/100] 00:28:07, metric 2, tag 0
> to 13.1.1.3 via em1.13
224.0.0.9/32 *[RIP/100] 00:24:48, metric 1
MultiRecv
-----

logical-router: R2

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

12.1.1.0/24 *[Direct/0] 07:22:59
> via em2.12
12.1.1.2/32 *[Local/0] 07:22:59
Local via em2.12
13.1.1.0/24 *[RIP/100] 00:47:10, metric 2, tag 0
> to 12.1.1.1 via em2.12
24.1.1.0/24 *[Direct/0] 07:22:59
> via em2.24
24.1.1.2/32 *[Local/0] 07:22:59
Local via em2.24
34.1.1.0/24 *[RIP/100] 00:24:43, metric 2, tag 0
> to 24.1.1.4 via em2.24
224.0.0.9/32 *[RIP/100] 00:24:48, metric 1
MultiRecv
-----

logical-router: R3

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

12.1.1.0/24 *[RIP/100] 00:28:11, metric 2, tag 0
> to 13.1.1.1 via em3.13
13.1.1.0/24 *[Direct/0] 07:20:09
> via em3.13
13.1.1.3/32 *[Local/0] 07:20:09
Local via em3.13
24.1.1.0/24 *[RIP/100] 00:24:43, metric 2, tag 0
> to 34.1.1.4 via em3.34
34.1.1.0/24 *[Direct/0] 07:20:09
> via em3.34
34.1.1.3/32 *[Local/0] 07:20:09
Local via em3.34
224.0.0.9/32 *[RIP/100] 00:24:48, metric 1
MultiRecv
-----

logical-router: R4

inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

12.1.1.0/24 *[RIP/100] 00:24:46, metric 2, tag 0
> to 24.1.1.2 via em4.24
13.1.1.0/24 *[RIP/100] 00:24:48, metric 2, tag 0
> to 34.1.1.3 via em4.34
24.1.1.0/24 *[Direct/0] 07:20:09
> via em4.24
24.1.1.4/32 *[Local/0] 07:20:09
Local via em4.24
34.1.1.0/24 *[Direct/0] 07:20:09
> via em4.34
34.1.1.4/32 *[Local/0] 07:20:09
Local via em4.34
224.0.0.9/32 *[RIP/100] 00:24:48, metric 1
MultiRecv
-----

logical-router: default

inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.1.0/24 *[Direct/0] 08:16:17
> via em0.0
192.168.1.254/32 *[Local/0] 08:31:57
Local via em0.0

__juniper_private2__.inet.0: 1 destinations, 1 routes (0 active, 0 holddown, 1 hidden)


相关文章

怎么把视频做成动态壁纸教程

2022-03-16 19:41:41    浏览: 152

提示无法定位程序输入点于动态链接库怎么解决

2022-01-24 02:10:34    浏览: 0

元气壁纸会员过期壁纸是否还在(元气壁纸会员过期动态壁纸就不在了)

2021-10-31 01:39:15    浏览: 0

元气壁纸设置不了动态壁纸解决方法

2021-10-31 01:41:46    浏览: 0

kernel32.dll动态链接库报错解决方法

2021-04-01 05:37:06    浏览: 0