Internet Windows Android

What is the rip router settings. Configuring RIPv2 on Cisco Equipment

But if there are a lot of routers, then manually entering routes is very time consuming and it is very possible to get confused. For this, we came up with dynamic routing, so that everything would be set up by itself =)

This cheat sheet uses the dynamic routing protocol RIPv2.

// This is how I will denote comments.

    We establish a console connection via a hyperterminal with the following settings:
  • Speed: 9600; Data bits: 8; Parity: None; Stop bits: 1; Flow control: No;
  • // when entering the router, enter the password - cisco
  • R1> enable // Enter privileged mode.
  • // enter the password - class
  • R1 # configure terminal // go into global configuration mode
  • R1 (config) # router rip// with this command we enable the RIP protocol on the router, and we find ourselves in the protocol configuration mode
  • R1 (config-router) #
  • R1 (config-router) #version 2 // enable RIP Version 2
  • R2 (config-router) #no auto-summary // disable automatic summation of routes
  • // in order to find out which networks are connected to the router, you must enter the command in the privileged mode R1 # show ip route
  • R2 (config-router) #network 192.168.0.0 // enter networks that will be transmitted to other routers, in our case I entered all connected
  • R2 (config-router) #network 192.168.0.128
  • R2 (config-router) #network 192.168.0.192
  • // here we set the interface to which there is no need to send updates to the routing table
  • R2 (config-router) # passive-interface FastEthernet0 / 0
  • R1 (config-line) #end // go into privileged EXEC Mode
  • R1 # show running-config // Check the entered data.
  • R1 # copy running-config startup-config // Save the settings made to energy-independent memory.

Download completed router setup task

I propose to download the file with the completed task for the PacketTracer emulator program, open it and look at the implementation. Router R2 is also configured with dynamic routing, so everything pings successfully.

Configuring the router by copying the configuration

    For automatic basic configuration (everything above) of the router, follow these steps:
  • 1. Copy the text below to the clipboard: move everything, right-click on the selection and select "Copy".
  • 2. If necessary, clear the router from all settings and reboot it.
  • 3. Enter the global configuration mode and call the Hyper Terminal menu "Edit", and in it "Transfer to the host computer".
  • 4. Be sure to check the settings using the show running-config command
  • 5. If necessary, enable the interfaces with the no shutdown command from the mode of each interface

Since the RIP protocol has little theory and it works relatively simply, I propose to start this section with a story about what is routing protocols (routing protocol), as well as some interesting points of filling and using the routing table.

Routing protocols

Routing protocols allow routers to exchange information about existing routes. The most popular routing protocols today are RIP, EIGRP, OSPF and BGP.

  • RIP- probably the oldest (relative to the listed) routing protocol. Used in small networks. Has several disadvantages compared to other routing protocols, but is much easier to configure than its competitors.
  • EIGRP- proprietary routing protocol, works exclusively on Cisco devices. Easy to maintain and customize.
  • OSPF- standardized routing protocol. Can be used in large networks, responds relatively quickly to changes in network topology, but is a little difficult to understand compared to EIGRP.
  • BGP- standardized routing protocol. It is usually used to exchange information on routers on the global Internet. Very hard to understand.

We have already passed what is Administrative Distance(), and we know its meaning for static ( static) and connected ( connected) routes. Table 7.1 shows the sources from where they learned about the route and the meaning Administrative Distance(AD).

Table 7.1 Main Values ​​of Administrative Distance

A source Administrative Distance
Directly connected ( connected) 0
Statics ( static) 1
BGP 20
EIGRP 90
OSPF 110
RIP 120
External EIGRP 170
iBGP 200
Undefined 255

Looking at this table, we can say that if the same route is statically defined and found via RIP, then the static route will be added to the routing table. Or another example, if the same route is found using the routing protocols EIGRP and OSPF, then the route learned through EIGRP will appear in the routing table. What External EIGRP and iBGP we will discuss it in one of the following sections.


Important note o filling in the routing table. If there are several identical routes, the route with the lowest metric (AD) gets into the routing table. Identical routes- routes with the same network number and prefix (mask), so the network numbers 10.77.0.0/16 and 10.77.0.0/24 will be assigned to different routes.


Important note about choosing a route when transmitting packets. When transmitting packets, the router looks at the recipient's ip address and looks for the route with the longest match. For example, there are three routes to networks 10.77.7.0/24, 10.77.0.0/16 and a default route 0.0.0.0. The router needs to send a packet with the recipient's ip address 10.77.7.7. The router determines the longest match. The default route has the lowest match (0 bits), the 10.77.0.0/16 route has the first two octets match 10.77 (16 bits), and the 10.77.7.0/24 route has the maximum match (of the routes presented) 10.77.7 (24 bits) , therefore, the router will decide to send the packet along the 10.77.7.0/24 route. We will definitely analyze this case in practice.

Now you can move on to parsing the first routing protocol - Routing Information Protocol.

Routing Information Protocol (RIP)

RIP belongs to the category of protocols with a code name distance-vector... As a metric, it uses the number of "hops" (hop count, in American terminology, packets are not transmitted between routers, but "jump") to each route.

Figure 7.1 shows how routers determine the number of hops to the 10.99.1.0/24 subnet.


Important note... When using the RIP routing protocol, the maximum number of hops must be taken into account - 15.

RIP protocol versions

  • RIP version 1- protocol published 1988. Can only work with class addressing. Updates are sent using the broadcast address.
  • RIP version 2- updated protocol, added support for classless addressing (support for VLSM, Variable Length Subnet Masks), also added support for authorization of updates. Updates are sent using the multicast address 224.0.0.9.
  • RIPng(RIP next generation) - added IPv6 support.

RIP timers

By default, the router sends updates every 30 seconds. The updates contain not only routes that are directly connected to it, but also routes learned from other routers using the RIP protocol.

If the router does not receive updates within 180 seconds, the routes received using the previous updates are marked as “not updated”. And if updates have not arrived within 240 seconds, then the marked routes are deleted (240 seconds, this is 4 minutes, users will simply eat you during this time, this is one of the drawbacks of the RIP protocol).

Initial data

All “manipulations” can be performed using PC0 (or from other PCs in the network).

In this practical work, the network is already planned, addressing is distributed and DHCP is configured. The network equipment is configured with a telnet server, the password is cisco123... There is no access to ISP (Internet Server Provider) routers.

Abbreviations in names: Br - Branch; HO -Head Office; CE - Customer Edge.

  • 1c-srv-2.local – 172.16.12.2
  • 1c-srv-1.local – 172.16.14.5
  • core-r1.local – 10.1.1.1
  • core-r2.local – 10.1.1.2
  • r2.local – 10.77.2.1
  • r3.local – 10.77.2.254
  • br-r1.local – 10.1.2.2
  • small-r1.local – 10.1.3.2
  • dns.local – 10.77.2.5

Goals

  1. Understand the presented topology
  2. Configure RIP on routers: r2, br-r2, small-br-r1. Parse command show ip route
  3. Parse command show ip rip database
  4. Parse command passive-interface .
  5. Influence the movement of the package

Performance

  1. Understand the presented topology

    First of all, let's define the colored rectangles. The blue rectangle denotes the boundaries of the “Head office” network, green - the boundaries of the “Branch” network, and the yellow one - the boundaries of the “Branch” network. The “Branch” and “Branch” are connected to the “Head Office” due to the provision of L2-channels by the provider (L2VPN), that is, roughly speaking, the provider provides us with a wire between the “Head Office” and the “Branch”.

    It should also be noted that the r2 and r3 routers have DHCP configured for the 10.77.2.0/23 network. In this case, the r2 router gives out the range 10.77.2.255 - 10.77.3.99, with the gateway 10.77.2.1, and r3 gives out the range 10.77.3.100 - 10.77.3.199 with the gateway 10.77.2.254. This is done for redundancy (bad example of redundancy).

    In this practical work, a relatively small network is presented, but it already causes difficulty in writing static routes (especially if they need to be backed up). Therefore, we will use the routing protocol. At the moment, the RIP routing protocol is configured on all routers, except for those that will be discussed in the next paragraph.

  2. Configure RIP on routers: r2, br-r1, small-br-r1

    I propose to configure r2 at the beginning, and then disassemble all the commands used in order. To connect to r2, you can use PC0 by running the command telnet r2.local... (It is advisable to study the command before configuring show ip route)

    PC> telnet r2.local Trying 10.77.2.1 ... Open User Access Verification Password: r2 # conf t Enter configuration commands, one per line. End with CNTL / Z. r2 (config) # router rip r2 (config-router) # version 2 r2 (config-router) # network 10.0.0.0 r2 (config-router) # no auto-summary r2 (config-router) # exit r2 (config) # exit r2 # r2 # sh runn Building configuration ... Current configuration: 1158 bytes! version 12.4 ...! router rip version 2 network 10.0.0.0 no auto-summary! ...

    To enable the routing protocol on the router, you must use the command router rip, with the help of it we also get into the configuration mode of this protocol. The first thing we did was define the protocol version. The default is version 1, which only supports class-based addressing. This does not suit us, therefore, using the command version 2, we have installed the second version of the RIP protocol. Next, we indicated the network in which this protocol should work - network 10.0.0.0... The command consists of the word network and network class number... No matter how hard you try to enter a classless network number here, the router will convert it to a class one and add it to the configuration. By specifying a network, RIP runs on those interfaces that fall within the specified class range. In our case, the range is 10.0.0.1 - 10.255.255.254, under which all interfaces of the r2 router fall (it's easier for us). And the last command that was used when setting up - no auto-summary . Auto-summary Is an automatic summation of routes (a very dangerous thing 😊). For example, a router has information about two routes connected to it - 10.1.1.0/24 and 10.2.1.0/24, and if it is indicated that routes can be “summed up”, then the router will announce only one route - 10.0.0.0/8, which is not very correct. Always think before using auto-summary and don't forget to turn it off!

    Now let's examine the routing table.

    R2 # sh ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP ... Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks R 10.1.1.0/30 via 10.1.1.5, 00:00:15, FastEthernet0 / 0 C 10.1.1.4/30 is directly connected, FastEthernet0 / 0 R 10.1.1.8/30 via 10.77.2.254, 00: 00:05, Vlan1 C 10.1.2.0/30 is directly connected, FastEthernet0 / 1 R 10.1.3.0/30 via 10.77.2.254, 00:00:05, Vlan1 C 10.77.2.0/23 is directly connected, Vlan1

    Super! As mentioned earlier, RIP is already configured on half of the routers, which is why we see that the routing table is full. Opposite each route learned via RIP is a letter R... Now let's see what is ... The first number is the Administrative Distance, the second number of hops to the specified subnet is the metric that RIP uses. There is a time next to each route - the countdown from the last update of the route.

    Now let's configure the router br-r1... Unfortunately, you cannot connect from PC0. But you will be able to connect from a router r2.

    R2 # br-r1.local Translating "br-r1.local" ... domain server (10.77.2.5) Trying 10.1.2.2 ... Open User Access Verification Password: br-r1 # conf t Enter configuration commands, one per line. End with CNTL / Z. br-r1 (config) # router rip br-r1 (config-router) # ver 2 br-r1 (config-router) # no auto-summary br-r1 (config-router) # net 10.0.0.0 br-r1 ( config-router) # net 172.16.14.1 br-r1 (config-router) # exit br-r1 (config) # exit br-r1 # sh runn Building configuration ... Current configuration: 1204 bytes! version 12.4 ...! router rip version 2 network 10.0.0.0 network 172.16.0.0 no auto-summary! ...

    Overall setting br-r1 no different from setting r2... The only thing we tried to specify the ip address as the network number, but as you can see from show runn, the ip address was converted to a network number, while the class number.

    Before completing this part, it remains to configure RIP on the router. small-br-r1... You can get to it from a router r3... Below is the “copy-paste” to configure it.

    Router rip version 2 network 10.0.0.0 network 192.168.10.0 no auto-summary

  3. Parse command show ip rip database

    To study the command show ip rip database, a router was selected core-r2, we also need a routing table.

    Core-r2 # show ip rip database 10.1.1.0/30 auto-summary 10.1.1.0/30 directly connected, Vlan1 10.1.1.4/30 auto-summary 10.1.1.4/30 via 10.1.1.1, 00:00:15, Vlan1 10.1.1.8/30 auto-summary 10.1.1.8/30 directly connected, FastEthernet0 / 0 10.1.2.0/30 auto-summary 10.1.2.0/30 via 10.1.1.1, 00:00:15, Vlan1 via 10.1.1.10, 00 : 00: 12, FastEthernet0 / 0 10.1.2.4/30 auto-summary 10.1.2.4/30 via 10.1.1.1, 00:00:15, Vlan1 via 10.1.1.10, 00:00:12, FastEthernet0 / 0 10.1.3.0 / 30 auto-summary 10.1.3.0/30 via 10.1.1.10, 00:00:12, FastEthernet0 / 0 10.77.2.0/23 auto-summary 10.77.2.0/23 via 10.1.1.10, 00:00:12, FastEthernet0 / 0 172.16.12.0/30 auto-summary 172.16.12.0/30 via 10.1.1.1, 00:00:15, Vlan1 via 10.1.1.10, 00:00:12, FastEthernet0 / 0 172.16.14.0/24 auto-summary 172.16. 14.0 / 24 via 10.1.1.1, 00:00:15, Vlan1 via 10.1.1.10, 00:00:12, FastEthernet0 / 0 192.168.10.0/24 auto-summary 192.168.10.0/24 via 10.1.1.10, 00:00 : 12, FastEthernet0 / 0 core-r2 # sh ip route Codes: C - connected, S - st atic, I - IGRP, R - RIP, M - mobile, B - BGP ... Gateway of last resort is not set 4.0.0.0/28 is subnetted, 1 subnets C 4.4.4.0 is directly connected, FastEthernet0 / 1 10.0. 0.0 / 8 is variably subnetted, 7 subnets, 2 masks C 10.1.1.0/30 is directly connected, Vlan1 R 10.1.1.4/30 via 10.1.1.1, 00:00:04, Vlan1 C 10.1.1.8/30 is directly connected , FastEthernet0 / 0 R 10.1.2.0/30 via 10.1.1.1, 00:00:04, Vlan1 via 10.1.1.10, 00:00:29, FastEthernet0 / 0 R 10.1.2.4/30 via 10.1.1.1, 00:00 : 04, Vlan1 via 10.1.1.10, 00:00:29, FastEthernet0 / 0 R 10.1.3.0/30 via 10.1.1.10, 00:00:29, FastEthernet0 / 0 R 10.77.2.0/23 via 10.1.1.10, 00 : 00: 29, FastEthernet0 / 0 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks R 172.16.12.0/30 via 10.1.1.1, 00:00:04, Vlan1 via 10.1.1.10, 00:00:29 , FastEthernet0 / 0 R 172.16.14.0/24 via 10.1.1.1, 00:00:04, Vlan1 via 10.1.1.10, 00:00:29, FastEthernet0 / 0 R 192.168.10.0/24 via 10.1.1.10, 00:00 : 29, FastEthernet0 / 0

    Command show ip rip database shows all routes that RIP knows about. Immediately, we will stipulate that the lines with the word auto-summary we are not interested because we have disabled “route summarization”. As you can see, this route database contains not only routes learned from other routers, but also routes connected directly to this router. It is this table that the router sends every 30 seconds. Now let's analyze the routes learned from other routers, for example, for the network number 10.1.2.4/30. In square brackets () the metric is indicated (the number of "jumps"), then it is indicated who sent information about this route ( via 10.1.1.10). Note that there are two routes to this subnet, through 10.1.1.10 and through 10.1.1.1, both with metric 3 (the path to the 10.1.2.4/30 subnet goes through 3 routers). Now we will find the subnet 10.1.2.4/30, in the routing table ( show ip route), as you can see, both routes have been added. It is very important that if two routes appear in the routing table to the same subnet, then the router performs load balancing. Unfortunately, consideration of the types of balancing and more fine-tuning of the RIP protocol will not be considered (since Packet Tracer simply does not have a sufficient number of commands).

  4. Parse command passive-interface... Add static route

    Using the command passive-interface you can specify an interface that will not send out the route base, but will receive updates. In our example, it is convenient to do this at the border of the “Head Office” and “Branch” networks, so that the router r2 will receive route information from the router br-r1, but will not transmit information about its route base. For such a scheme to work, you will have to add to br-r1 one static route. First, let's add a static route to br-r1, then install passive-interface and see how the RIP route base has changed to br-r1.

    Br-r1 (config) # ip route 0.0.0.0 0.0.0.0 10.1.2.1 r2 (config) # router rip r2 (config-router) # passive-interface fa 0/1

    Interface Fa0 / 1 router r2"Looks" at the router br-r1, now it is in mode passive-interface- receives information about routes, but does not send. Now let's look at the routing table at br-r1, you must first clear it with the command clear ip route *(thus the router will need to re-collect all the information about the routes).

    Br-r1 # clear ip route * br-r1 # sh ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP ... Gateway of last resort is 10.1. 2.1 to network 0.0.0.0 10.0.0.0/30 is subnetted, 2 subnets C 10.1.2.0 is directly connected, FastEthernet0 / 0 C 10.1.2.4 is directly connected, Vlan2 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.12.0/30 is directly connected, Vlan1 C 172.16.14.0/24 is directly connected, FastEthernet0 / 1 S * 0.0.0.0/0 via 10.1.2.1

    Super, now on br-r1 compact routing table, while the router has a default route pointing to r2... You can check for yourself that the routing table is on r2 has routes to the "Branch" network.

  5. Influence the movement of the package

    As noted in the theory part - “if there are several identical routes, the route with the lowest metric (AD) gets into the routing table”. But what if we add an intersecting route? I suggest experimenting.

    Now the transfer of data between the “Branch” (172.16.14.0/24) and “Branch” (192.168.10.0/24) occurs according to the following scheme:

    “Branch” → R2 → R3 → “Branch”

    Now, having added one single route, we change the path for some of the addresses(not for the entire subnet).

    R2 (config) # ip route 192.168.10.0 255.255.255.240 10.1.1.5 core-r1 (config) # ip route 192.168.10.0 255.255.255.240 10.1.1.2

    Before explaining, let's trace to two addresses 192.168.10.10 (small-br-sw-1) and 192.168.10.50 (PC4) from PC3, Figure 7.3.

    Let's take a look at the first trace, which shows the expected path. As mentioned above, the path is as follows:

    “Branch” (172.16.14.0/24) → br-r1 → 10.1.2.0/30 → r2 → 10.77.2.0/23 → r3 → 10.1.3.0/30 → small-br-r1 → “Branch” (192.168.10.0 / 24)

    By adding a route for the 192.168.10.0/28 subnet to the r2 and core_r1 routers, some of the packets will go the other way, namely packets with a recipient address in the range 192.168.10.0 - 192.168.10.15. Thus, when we trace to 192.168.10.10, the trace has increased by two more routers:

    “Branch” (172.16.14.0/24) → br-r1 → 10.1.2.0/30 → r2 → 10.1.1.4/30 → core-r1 → 10.1.1.0/30 → core-r2 → 10.1.1.8/30 → r3 → 10.1.3.0/30 → small-br-r1 → “Branch” (192.168.10.0/24)

    If you look at the r2 routing table, you can see two intersecting routes to the 192.168.10.0/24 and 192.168.10.0/28 subnets. Now you should understand what we discussed in the theoretical part - “when transmitting packets, the router looks at the recipient's ip address and looks for a route with the longest match” (or minimum prefix).

    And one more interesting fact. After adding routes, 6 routers will pass data to the address 192.168.10.10, but the response will be transmitted only through 4 routers (for example, from 192.168.10.10 to PC3). Try to guess why.

Initial data

All “manipulations” can be performed using PC0 (or from other devices). Password from cisco123 equipment, connect using telnet. To access network equipment, use the addressing shown in the diagram, dns records are also configured (presented below). The network uses the RIP routing protocol. All devices on the network can access the Internet through the core-r1 router.

Configured DNS records (DNS server):

  • 1c-srv-2.local – 172.16.12.2
  • 1c-srv-1.local – 172.16.14.5
  • core-r1.local – 10.1.1.1
  • core-r2.local – 10.1.1.2
  • r2.local – 10.77.2.1
  • r3.local – 10.77.2.254
  • br-r1.local – 10.1.2.2
  • small-r1.local – 10.1.3.2
  • dns.local – 10.77.2.5

Exercise

  1. Your company's policy allows remote control of network equipment via the Internet. Received a task to make the following static NAT translations (on the core-r1 router):
    • 3.3.3.3:3001 – 10.77.2.1:23
    • 3.3.3.3:3002 – 10.77.2.254:23
    • 3.3.3.3:3003 – 10.77.2.10:23
    • 3.3.3.3:3004 – 10.77.2.11:23
  2. At the moment, all devices in the “Branch” are connected to the Internet through the “Head Office”, which has led to a high load of the channel between these offices. It was decided that the "Branch" should go out through its own Internet, for this a br-core-r1 router was allocated. A provider is already connected to this router, addressing is in the diagram. Your task is to configure br-core-r1 and br-r1 according to the plan below.

    Configure br-core-r1 (you can get to the router from the br-r1 router):

    • Configure the RIPv2 routing protocol, without automatic route summarization.
    • Configure NAT / PAT Overload using Standard ACL named Branch-NAT (already created).
    • Configure port translation: 172.16.12.2:80 - 8.8.8.3:8080 and 172.16.14.5:80 - 8.8.8.4:8080.

    Configure br-r1:

    • Add static route for network 10.0.0.0/8 via r2.
    • Add static route for 192.168.0.0/16 network via r2.
    • Add default route via br-core-r1.

    (use PC_HOME to check the result)

If you find an error in the text, select the text and press Ctrl + Enter

ID: 154 Created: Oct 19, 2016 Modified Jan 15, 2019

Customization RIPv2(Routing Information Protocol v2) is an extremely simple process and consists of three steps:

  1. enable the protocol with the global router rip command
  2. changing the protocol version to the second version 2
  3. selection of networks that the protocol will "broadcast", for which the network command (s) is used;

The first two commands are obvious, but the last command requires explanation: with network, you specify the interfaces that will participate in the routing process. This command takes a classful network as a parameter and enables RIP on the appropriate interfaces.

Example for Configuring RIPv2

In our topology, routers R1 and R2 have directly connected subnets.

We need to include these subnets in the dynamic RIP routing process. To do this, we first need to enable RIP on both routers and then "broadcast" the network data using the network command. On router R1, go to global configuration mode and enter the following commands:

Router rip verison 2 network 10.0.0.0 network 172.16.0.0

A little clarification - first we enable the dynamic routing protocol, then we change the version to the second, then we use the network 10.0.0.0 command to enable the Fa0 / 1 interface on the R1 router. As we said, the network command takes a class network, so every interface with a subnet starting with 10 will be added to RIP process. For example, if the address 10.1.0.1 is on another interface, then it will also be added to the routing process. We also need to connect two routers in RIP, for this we add another network command - with the address 172.16.0.0

IP addresses starting with 10 are class A by default and have a default subnet mask of 255.0.0.0.

On R2, the setup looks similar, only with a different subnet - because the subnet 192.168.0.0 is directly connected to router R2.

Router rip verison 2 network 192.168.0.0 network 172.16.0.0

How do I check the routing table?

To check, you must enter the show ip route command - you should see the 192.168.0.0/24 subnet on R1 and the 10.0.0.0/24 subnet on R2 marked with the letter R - that is, this is a RIP route. The administrative distance and metric for this route will also be visible there.