In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
RIP protocol, routing information protocol, the simplest distance vector protocol, maximum hop 15 hops, 16 unreachable, spread and update the routing table by broadcast, the packet does not contain the subnet mask (in the second generation), and
The marking of the outer layer agreement, etc.
Only configure the RIP protocol on Juniper devices here. If you are familiar with it, the principle remains the same.
Shown under the network topology diagram:
R1-R2-R3
Interface connection:
Em1.12-em2.12 192.168.1.1/24
Em2.23-em3.23 192.168.2.1/24
Create the appropriate loopback interface on each router:
R1: 1.1.1.1/32
R2: 2.2.2.2/32
R3: 3.3.3.3/32
Create three logical routers
Logical-routers {
R1
R2
R3
Configure the interface IP address:
Juniper@Olive# set interfaces em1.12 family inet address 192.168.1.1/24
[edit logical-routers r1]
Juniper@Olive# set interfaces lo0.12 family inet address 1.1.1.1/24
Make similar configurations on R2 and R3
View the configuration of the interface:
Juniper@Olive > show interfaces terse
Interface Admin Link Proto Local Remote
Dsc up up
Em0 up up
Em0.0 up up inet 192.168.72.10/24
Em1 up up
Em1.12 up up inet 192.168.1.1/24
Em1.32767 up up
Em2 up up
Em2.12 up up inet 192.168.1.2/24
Em2.23 up up inet 192.168.2.1/24
Em2.32767 up up
Em3 up up
Em3.23 up up inet 192.168.2.2/24
Lo0 up up
Lo0.12 up up inet 1.1.1.1/24
Lo0.21 up up inet 2.2.2.2-- > 0 Universe 0
Lo0.23 up up inet 3.3.3.3-- > 0 Universe 0
Lo0.16384 up up inet 127.0.0.1-- > 0pa 0
Test communication:
PING R2 interface IP address on R1:
Juniper@Olive# run ping 192.168.1.2 logical-router r1
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=0.387 ms
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.351 ms
^ C
-192.168.1.2 ping statistics-
2 packets transmitted, 2 packets received, 0 packet loss
Round-trip min/avg/max/stddev = 0.351 ms 0.369 ms
[edit logical-routers r1]
Before this, it is necessary to configure static routes, although static routes are very simple, but the configuration of Juniper is still a little different from that of Cisco Huawei.
Be sure to specify a mask when there is a configuration. You have configured 192.168.1.0 next-hop 192.168.1.2, it will not report an error, but it will not work, in the future configuration
Form good habits.
The configuration is as follows:
Routing-options {
Static {
Route 192.168.2.0/24 {
Next-hop 192.168.1.2
Metric 2
}
}
}
Set routing-options static route 192.168.1.0/24 next-hop 192.168.1.0/24 next-hop 192.168.2.1 metric 2
Configure the RIP protocol:
When we are on the devices of Cisco and Huawei, we just Network directly and announce it, but when we configure Juniper, even if you send it on the interface
Multicast packets, but the neighbors are still unable to get up, so you must configure the policy and make relevant announcements.
First, configure the following policy to declare the directly connected:
Applying Export Policy
Policy-options {
Policy-statement connected-routes {
Term advertise-routes {
From protocol direct
Then accept
}
}
Specific configuration commands are not listed.
Declare the route from the RIP protocol:
Policy-statement transit-rip-routes {
Term advretise-routes {
From protocol rip
Then accept
}
}
}
Reconfigure in the protocol:
Protocols {
Rip {
Group neighbor-routers {
Export [connected-routes transit-rip-routes]
Neighbor em3.23
}
}
}
Apply the policy on the interface em3.23 to announce the routing information.
View the neighbor's information:
[edit logical-routers r2]
Juniper@Olive# run show rip neighbor logical-router r2
Source Destination Send Receive In
Neighbor State Address Address Mode Mode Met
Em2.12 Up 192.168.1.2 224.0.0.9 mcast both 1
Em2.23 Up 192.168.2.1 224.0.0.9 mcast both 1
View routing table information:
Juniper@Olive# run show route protocol rip logical-router r2
Inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route,-= Last Active, * = Both
1.1.1.0 to 24 * [RIP/100] 00:30:08, metric 2, tag 0
> to 192.168.1.1 via em2.12
3.3.3.3 RIP/100 32 * [RIP/100] 00:25:36, metric 2, tag 0
> to 192.168.2.2 via em2.23
224.0.0.9 RIP/100 32 * [RIP/100] 00:25:39, metric 1
MultiRecv
Applying Import Policy
The JUNOS software allows you to filter routes being imported by the local router from its neighbors. You can use import policies to reject unwanted routes or to alter the metric on routes received from certain neighbors. To accomplish these goals, you create a routing policy, which you then apply to the RIP configuration. If you specify more than one policy, they are evaluated in order (first to last) and the first matching policy is applied to the route. If no match is found, the local router imports all usable RIP routes from all neighbors.
The configuration on R2 is as follows:
Policy-statement filter-riesling {
Term filter-routes {
From {
Protocol rip
Route-filter 192.168.100.0/24 orlonger
}
Then reject
}
Add an incoming filtering policy to filter 192.168.100.0, and there is no longer such a routing information on R2 and R1.
It will be configured on the appropriate interface, which is specifically implemented in the protocol.
Protocols {
Rip {
Group neighbor-routers {
Export [transit-rip-routes connected-routes]
Neighbor em2.12
Neighbor em2.23 {
Import filter-riesling
}
}
Modifying the Incoming Metric
I don't explain too much about some configurations. That's what it means. It's just applied to JUNOS software. No matter what kind of device you configure RIP, some of its features will not change.
RIP has been running for so many years, and that vendor will not change the feature application, but it is just different in configuration.
Make the following configuration on R1:
Protocols {
Rip {
Group neihbor-routes {
Export [connected-routes transit-rip-routes]
Neighbor em1.12 {
Metric-in 5
}
}
}
}
View the appropriate results:
Juniper@Olive# run show route protocol rip logical-router r1
Inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route,-= Last Active, * = Both
2.2.2.2 RIP/100 32 * [RIP/100] 01:07:45, metric 6, tag 0
> to 192.168.1.2 via em1.12
3.3.3.3 RIP/100 32 * [RIP/100] 01:03:13, metric 7, tag 0
> to 192.168.1.2 via em1.12
192.168.2.0 RIP/100 24 * [RIP/100] 01:07:45, metric 6, tag 0
> to 192.168.1.2 via em1.12
224.0.0.9 RIP/100 32 * [RIP/100] 00:02:43, metric 1
MultiRecv
As you can see, the measure has increased.
Modifying the Outgoing Metric
The configuration command only adds a small bar.
Protocols {
Rip {
Group neihbor-routes {
Metric-out 10
Export [connected-routes transit-rip-routes]
Neighbor em1.12
}
}
}
View the appropriate results on other routing devices:
Juniper@Olive# run show route protocol rip logical-router r2
Inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route,-= Last Active, * = Both
1.1.1.0 to 24 * [RIP/100] 01:19:41, metric 11, tag 0
> to 192.168.1.1 via em2.12
3.3.3.3 RIP/100 32 * [RIP/100] 01:15:09, metric 2, tag 0
> to 192.168.2.2 via em2.23
224.0.0.9 RIP/100 32 * [RIP/100] 00:01:40, metric 1
MultiRecv
Configuring Authentication
By default, authentication between RIP neighbors is disabled within the JUNOS software;You can configure it globally for all peers or on a peer-by-peer basis within the neighbor configuration hierarchy
Simple authentication Uses a plain-text password that is included in the transmitted packet.
MD5 authentication Sends the result of an one-way hashing algorithm in the transmitted packet.
When configuring authentication, there is a buffer time. During this time, although you can see the routing information, the Ping is blocked and the network has not yet converged.
The simple configuration is as follows:
Protocols {
Rip {
Authentication-type md5
Authentication-key "$9 $VMsgJikP36AGD6Ap0hcbs2"; # # SECRET-DATA
Group neighbor-routers {
Export [connected-routes transit-rip-routes]
Neighbor em3.23
Controlling Route Preference
The JUNOS software default for the preference of RIP routes within the routing table is 100. The routing table uses the preference values to select the best route when multiple protocols are advertising the same destination prefix
Some configuration operations are actually configured in the global mode of the protocol, and the interfaces to which the protocol is enabled are applied.
Protocols {
Rip {
Authentication-type md5
Authentication-key "$9 $d8w2ajHmFnCZUnCtuEhVwY"; # # SECRET-DATA
Group neihbor-routes {
Preference 90
Metric-out 10
Export [connected-routes transit-rip-routes]
Neighbor em1.12
}
}
}
This priority can be seen on the routing device, and when the network topology diagram is complex, you can modify the priority to choose the corresponding route.
Juniper@Olive# run show route protocol rip logical-router r1
Inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route,-= Last Active, * = Both
2.2.2.2 RIP/90 32 * [RIP/90] 01:48:16, metric 2, tag 0
> to 192.168.1.2 via em1.12
3.3.3.3 RIP/90 32 * [RIP/90] 01:48:29, metric 3, tag 0
> to 192.168.1.2 via em1.12
192.168.2.0 RIP/90 24 * [RIP/90] 01:48:16, metric 2, tag 0
> to 192.168.1.2 via em1.12
224.0.0.9 RIP/100 32 * [RIP/100] 00:04:10, metric 1
Configuring Update Messages
By default, all RIP routers will advertise RIPv2 messages via multicast to all configured neighbors. In addition, all routers are able to receive both RIPv1 and RIPv2 messages.
The receive-options values are:
Both Accept RIPv1 and v2 packets.
None Do not receive RIP packets.
Version-1 Accept only RIPv1 packets.
Version-2 Accept only RIPv2 packets.
The configuration is also relatively simple.
Protocols {
Rip {
Authentication-type md5
Authentication-key "$9 $d8w2ajHmFnCZUnCtuEhVwY"; # # SECRET-DATA
Group neihbor-routes {
Preference 90
Metric-out 10
Export [connected-routes transit-rip-routes]
Neighbor em1.12 {
Send version-1
Receive version-1
Configuring the Number of Route Entries in an Update Message
You can increase the default size of the RIP Response messages to include more than 25 route entries in each Update message. The maximum number of route entries you can advertise is 255 in a single message
Juniper@Olive# set protocols rip message-size 100
That's it.
Accepting Packets Whose Reserved Fields Are Nonzero
Recall that the Request and Response messages for both RIPv1 and RIPv2 were identical. The difference between them was in the use of the message fields. RIPv1 viewed many fields as reserved, while the RIPv2 specification used those same fields for subnet mask, next hop, and so forth.
The purpose of this command is because the packet formats of RIPV1 and RIPV2 are different. In order not to make the inspection error, the check is ignored.
Juniper@Olive# set protocols rip no-check-zero
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.