For CCNA exam success, you had better know what split horizon is, how to turn it off, and when to turn it off. Knowing when to turn split horizon off is also important in production networks, because it can cause a hub-and-spoke network to have incomplete routing tables on the spokes.
Split horizon exists for a very good reason - routing loop prevention. The rule of split horizon states that a router cannot send an advertisement for a route out the same interface that it came in on. Split horizon is on by default on all interfaces running RIP, IGRP, and EIGRP.
In this CCNA tutorial, R1 will serve, as the hub and R2 and R3 will be the spokes. We'll first configure EIGRP over the 172.16.123.0 /24 network, the network connecting the three routers.
R1#conf t
R1(config)#router eigrp 100
R1(config-router)#no auto-summary
R1(config-router)#network 172.12.123.0 0.0.0.255
R2#conf t
R2(config)#router eigrp 100
R2(config-router)#no auto-summary
R2(config-router)#network 172.12.123.0 0.0.0.255
R3#conf t
R3(config)#router eigrp 100
R3(config-router)#no auto-summary
R3(config-router)#network 172.12.123.0 0.0.0.255
Running show ip eigrp neighbor on R1 shows that adjacencies to R2 and R3 are up.
R1#show ip eigrp neighbor
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
1 172.12.123.3 Se0/0 11 00:02:45 1 5000 0 1
0 172.12.123.2 Se0/0 161 00:03:01 1 5000 0 1
Each router will now advertise its loopback address via EIGRP.
R1#conf t
R1(config)#router eigrp 100
R1(config-router)#network 1.1.1.0 0.0.0.255
R2#conf t
R2(config)#router eigrp 100
R2(config-router)#network 2.2.2.0 0.0.0.255
R3#conf t
R3(config)#router eigrp 100
R3(config-router)#network 3.3.3.0 0.0.0.255
Running show ip eigrp route on each router shows that R1 has a route for both R2’s and R3’s loopback. R2 and R3 will only see R1’s loopback address, and not each other’s. Why?
R1#show ip route eigrp
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 172.12.123.2, 00:03:19, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/2297856] via 172.12.123.3, 00:03:04, Serial0/0
R2#show ip route eigrp
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2297856] via 172.12.123.1, 00:03:40, Serial0/0.123
R3#show ip route eigrp
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2297856] via 172.12.123.1, 00:05:17, Serial0/0.31
EIGRP uses Split Horizon by default to prevent routing loops. In this lab, though, it prevents full network reachability. R2 and R3 both form neighbor relationships with R1’s Serial physical interface. R2 advertises its loopback address to R1’s Serial interface, as does R3. Split Horizon does not allow a route to be advertised back out the same interface it was received on. This prevents R1 from advertising R2’s loopback to R3, or R3’s loopback to R2.
Split Horizon must be disabled to allow full network reachability in this lab. To do so, run no ip split-horizon eigrp 100 on R1’s Serial interface. When Split Horizon is disabled, that will cause the neighbor
relationships to fail, and then reestablish. Run show ip route eigrp 100 on both R2 and R3. The appropriate route to the remote loopback address will now appear.
R1#conf t
R1(config)#int serial0
R1(config-if)#no ip split-horizon eigrp 100
10:02:23: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 172.12.123.2 (Serial0/0) down: split horizon changed
10:02:23: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 172.12.123.3 (Serial0/0) down: split horizon changed
10:02:27: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 172.12.123.3 (Serial0/0) ip: new adjacency
10:02:54: %DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 172.12.123.2 (Serial0/0) ip: new adjacency
R2#show ip route eigrp
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2297856] via 172.12.123.1, 00:00:06, Serial0/0.123
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/2809856] via 172.12.123.1, 00:00:06, Serial0/0.123
R3#show ip route eigrp
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2297856] via 172.12.123.1, 00:00:12, Serial0/0.31
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2809856] via 172.12.123.1, 00:00:12, Serial0/0.31
Disabling split horizon should be done with care, but knowing when and where to do so shows that you truly understand how this technology works - and that's a big step on the way to earning your CCNA!
Showing posts with label horizon. Show all posts
Showing posts with label horizon. Show all posts
Thursday, December 25, 2008
Tuesday, December 23, 2008
Cisco CCNA / CCNP Certification Exam Lab: Frame Relay Subinterfaces And Split Horizon
Earning your Cisco CCNA and CCNP is a tough proposition, and part of that is the fact that you quickly learn that there’s usually more than one way to do things with Cisco routers – and while that’s generally a good thing, you better know the ins and outs of all options when it comes to test day and working on production networks. Working with Frame Relay subinterfaces and split horizon is just one such situation.
One reason for the use of subinterfaces is to circumvent the rule of split horizon. You recall from your CCNA studies that split horizon dictates that a route cannot be advertised out the same interface upon which it was learned in the first place. In the following example, R1 is the hub and R2 and R3 are the spokes. All three routers are using their physical interfaces for frame relay connectivity, and they are also running RIPv2 172.12.123.0 /24. Each router is also advertising a loopback interface, using the router number for each octet.
R1(config)#int s0
R1(config-if)#ip address 172.12.123.1 255.255.255.0
R1(config-if)#no frame inverse
R1(config-if)#frame map ip 172.12.123.2 122 broadcast
R1(config-if)#frame map ip 172.12.123.3 123 broadcast
R1(config-if)#no shut
R2(config)#int s0
R2(config-if)#encap frame
R2(config-if)#no frame inver
R2(config-if)#frame map ip 172.12.123.1 221 broadcast
R2(config-if)#frame map ip 172.12.123.3 221 broadcast
R2(config-if)#ip address 172.12.123.2 255.255.255.0
R3(config)#int s0
R3(config-if)#encap frame
R3(config-if)#no frame inver
R3(config-if)#frame map ip 172.12.123.1 321 broadcast
R3(config-if)#frame map ip 172.12.123.2 321 broadcast
R3(config-if)#ip address 172.12.123.3 255.255.255.0
R1#show ip route rip
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 172.12.123.2, 00:00:20, Serial0
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/1] via 172.12.123.3, 00:00:22, Serial0
R2#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.123.1, 00:00:06, Serial0
R3#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.123.1, 00:00:04, Serial0
The hub router R1 has a route to both loopbacks, but neither spoke has a route to the other spoke's loopback. That's because split horizon prevents R1 from advertising a network via Serial0 if the route was learned on Serial0 to begin with.
We've got two options here, one of which is to disable spilt horizon on the interface. While doing so will have the desired effect in our little network, disabling split horizon is not a good idea and should be avoided whenever possible. We’re not going to do it in this lab, but here is the syntax to do so:
R1(config)#interface serial0
R1(config-if)#no ip split-horizon
A better solution is to configure subinterfaces on R1. The IP addressing will have to be revisited, but that's no problem here. R1 and R2 will use 172.12.123.0 /24 to communicate, while R1 and R3 will use 172.12.13.0 /24. R3's serial0 interface will need to be renumbered, so let's look at all three router configurations:
R1(config)#interface serial0
R1(config-if)#encap frame
R1(config-if)#no frame inverse-arp
R1(config-if)#no ip address
R1(config-if)#interface serial0.12 multipoint
R1(config-subif)#ip address 172.12.123.1 255.255.255.0
R1(config-subif)#frame map ip 172.12.123.2 122 broadcast
R1(config-subif)#interface serial0.31 point-to-point
R1(config-subif)#ip address 172.12.13.1 255.255.255.0
R1(config-subif)#frame interface-dlci 123
R2(config)#int s0
R2(config-if)#ip address 172.12.123.2 255.255.255.0
R2(config-if)#encap frame
R2(config-if)#frame map ip 172.12.13.3 221 broadcast
R2(config-if)#frame map ip 172.12.123.1 221 broadcast
R3(config)#int s0
R3(config-if)#ip address 172.12.13.3 255.255.255.0
R3(config-if)#encap frame
R3(config-if)#frame map ip 172.12.13.1 321 broadcast
R3(config-if)#frame map ip 172.12.123.2 321 broadcast
A frame map statement always names the REMOTE IP address and the LOCAL DLCI. Don't forget the broadcast option!
Show frame map shows us that all the static mappings on R1 are up and running. Note the "static" output, which indicates these mappings are a result of using the frame map command. Pings are not shown, but all three routers can ping each other at this point.
R1#show frame map
Serial0 (up): ip 172.12.123.2 dlci 122(0x7A,0x1CA0), static,
broadcast, CISCO, status defined, active
Serial0 (up): ip 172.12.13.3 dlci 123(0x7B,0x1CB0), static,
broadcast, CISCO, status defined, active
After the 172.12.13.0 /24 network is added to R1 and R3’s RIP configuration, R2 and R3 now have each other's loopback network in their RIP routing tables.
R2#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.123.1, 00:00:20, Serial0
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/1] via 172.12.123.1, 00:00:22, Serial0
R3#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.13.1, 00:00:20, Serial0
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 172.12.13.1, 00:00:22, Serial0
While turning split horizon off is one way to achieve total IP connectivity, doing so can have other unintended results. The use of subinterfaces is a more effective way of allowing the spokes to see the hub's loopback network.
One reason for the use of subinterfaces is to circumvent the rule of split horizon. You recall from your CCNA studies that split horizon dictates that a route cannot be advertised out the same interface upon which it was learned in the first place. In the following example, R1 is the hub and R2 and R3 are the spokes. All three routers are using their physical interfaces for frame relay connectivity, and they are also running RIPv2 172.12.123.0 /24. Each router is also advertising a loopback interface, using the router number for each octet.
R1(config)#int s0
R1(config-if)#ip address 172.12.123.1 255.255.255.0
R1(config-if)#no frame inverse
R1(config-if)#frame map ip 172.12.123.2 122 broadcast
R1(config-if)#frame map ip 172.12.123.3 123 broadcast
R1(config-if)#no shut
R2(config)#int s0
R2(config-if)#encap frame
R2(config-if)#no frame inver
R2(config-if)#frame map ip 172.12.123.1 221 broadcast
R2(config-if)#frame map ip 172.12.123.3 221 broadcast
R2(config-if)#ip address 172.12.123.2 255.255.255.0
R3(config)#int s0
R3(config-if)#encap frame
R3(config-if)#no frame inver
R3(config-if)#frame map ip 172.12.123.1 321 broadcast
R3(config-if)#frame map ip 172.12.123.2 321 broadcast
R3(config-if)#ip address 172.12.123.3 255.255.255.0
R1#show ip route rip
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 172.12.123.2, 00:00:20, Serial0
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/1] via 172.12.123.3, 00:00:22, Serial0
R2#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.123.1, 00:00:06, Serial0
R3#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.123.1, 00:00:04, Serial0
The hub router R1 has a route to both loopbacks, but neither spoke has a route to the other spoke's loopback. That's because split horizon prevents R1 from advertising a network via Serial0 if the route was learned on Serial0 to begin with.
We've got two options here, one of which is to disable spilt horizon on the interface. While doing so will have the desired effect in our little network, disabling split horizon is not a good idea and should be avoided whenever possible. We’re not going to do it in this lab, but here is the syntax to do so:
R1(config)#interface serial0
R1(config-if)#no ip split-horizon
A better solution is to configure subinterfaces on R1. The IP addressing will have to be revisited, but that's no problem here. R1 and R2 will use 172.12.123.0 /24 to communicate, while R1 and R3 will use 172.12.13.0 /24. R3's serial0 interface will need to be renumbered, so let's look at all three router configurations:
R1(config)#interface serial0
R1(config-if)#encap frame
R1(config-if)#no frame inverse-arp
R1(config-if)#no ip address
R1(config-if)#interface serial0.12 multipoint
R1(config-subif)#ip address 172.12.123.1 255.255.255.0
R1(config-subif)#frame map ip 172.12.123.2 122 broadcast
R1(config-subif)#interface serial0.31 point-to-point
R1(config-subif)#ip address 172.12.13.1 255.255.255.0
R1(config-subif)#frame interface-dlci 123
R2(config)#int s0
R2(config-if)#ip address 172.12.123.2 255.255.255.0
R2(config-if)#encap frame
R2(config-if)#frame map ip 172.12.13.3 221 broadcast
R2(config-if)#frame map ip 172.12.123.1 221 broadcast
R3(config)#int s0
R3(config-if)#ip address 172.12.13.3 255.255.255.0
R3(config-if)#encap frame
R3(config-if)#frame map ip 172.12.13.1 321 broadcast
R3(config-if)#frame map ip 172.12.123.2 321 broadcast
A frame map statement always names the REMOTE IP address and the LOCAL DLCI. Don't forget the broadcast option!
Show frame map shows us that all the static mappings on R1 are up and running. Note the "static" output, which indicates these mappings are a result of using the frame map command. Pings are not shown, but all three routers can ping each other at this point.
R1#show frame map
Serial0 (up): ip 172.12.123.2 dlci 122(0x7A,0x1CA0), static,
broadcast, CISCO, status defined, active
Serial0 (up): ip 172.12.13.3 dlci 123(0x7B,0x1CB0), static,
broadcast, CISCO, status defined, active
After the 172.12.13.0 /24 network is added to R1 and R3’s RIP configuration, R2 and R3 now have each other's loopback network in their RIP routing tables.
R2#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.123.1, 00:00:20, Serial0
3.0.0.0/32 is subnetted, 1 subnets
R 3.3.3.3 [120/1] via 172.12.123.1, 00:00:22, Serial0
R3#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.12.13.1, 00:00:20, Serial0
2.0.0.0/32 is subnetted, 1 subnets
R 2.2.2.2 [120/1] via 172.12.13.1, 00:00:22, Serial0
While turning split horizon off is one way to achieve total IP connectivity, doing so can have other unintended results. The use of subinterfaces is a more effective way of allowing the spokes to see the hub's loopback network.
Subscribe to:
Posts (Atom)