<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6176524294759831899</id><updated>2012-02-17T10:06:44.388+05:30</updated><category term='ACL-Extended IP Access Lists'/><category term='ACL-IPX Access Lists'/><category term='BGP - local-as option'/><category term='BGP - Local AS notes'/><category term='Advanced Router Features'/><category term='BGP - Allowas-in with number of occurrences'/><category term='3560 QoS DSCP mutation'/><category term='BGP - Loopback Interfaces'/><category term='ACL-IPX SAP Filters'/><category term='BGP - Route Flap Dampening'/><category term='ARP-BGP Hide Local Autonomous System'/><category term='Multicast TTL-Threshold'/><category term='BGP - As_path Attribute'/><category term='NTP authentication'/><category term='BGP - Troubleshooting'/><category term='ISDN-Troubleshooting'/><category term='Cisco-Routers and Access Products'/><category term='Cisco-Cisco 2600 Series'/><category term='TCP/IP-TCP/IP OVERVIEW'/><category term='ARP-BGP MPLS'/><category term='BGP - regexp practice part 1'/><category term='Cisco-Cisco 2500 Series'/><category term='VLAN-Finding out port numbers'/><category term='BGP - RR and Conventional Speakers'/><category term='Priority-queuing in Action'/><category term='BGP no-export community'/><category term='TCP Intercept - Watch vs Intercept'/><category term='MPLS-Multi VRF CE Requirements'/><category term='LEASEDLINE-Componants'/><category term='CBAC Example'/><category term='Cisco-Cisco 7100 Series'/><category term='Cisco-Cisco 7200 Series'/><category term='MPLS-Multi VRF CE Overview'/><category term='Cisco-Cisco AS5800 Series'/><category term='Back to Back Multilink Frame-Relay'/><category term='MPLS-MPLS VPN Network Topology'/><category term='BGP - TTL security'/><category term='Cisco-Cisco 700 Series'/><category term='BGP aggregation with suppress-map'/><category term='VLAN-Routing between VLANs'/><category term='BGP - Filtering'/><category term='ACL-Making a VLAN IPv6'/><category term='Cisco-Cisco AS5300 Series'/><category term='BGP - peer session templates'/><category term='MPLS-MPLS IP VPN vs. Other IP VPN'/><category term='BGP distance command&apos;s 3 arguments'/><category term='BGP - Route Reflectors'/><category term='R.E.F.L.E.C.T'/><category term='BGP - External confedration peers'/><category term='WAN-WAN Connection Types'/><category term='ACL Allowing telnet to a non-standard port'/><category term='WAN-Point-to-Point Protocol'/><category term='Frame-relay Compression'/><category term='Prefix-lists vs ACLs'/><category term='BGP - Troubleshooting AS Paths with confederations'/><category term='BGP - maximum-prefix command'/><category term='VLAN-VTP Modes of Operation'/><category term='Cisco-Cisco AS5300/Voice Gateway'/><category term='VLAN-Virtual LANs'/><category term='TCP/IP-IP ADDRESSING'/><category term='VLAN-Identifying VLANs'/><category term='Cisco-Cisco 6700 Series'/><category term='BGP - eBGP Multihop'/><category term='BGP - Community Attribute'/><category term='BGP - Multiple RRs within a Cluster'/><category term='MPLS-MPLS VPN Overview'/><category term='Cisco-Cisco 3600 Series'/><category term='BGP - Network Command'/><category term='BGP - AS_SET not used in AS Path length comparison'/><category term='Cisco-Cisco 1000 Series'/><category term='BGP - Neighbor discovery protocol'/><category term='Cisco-Cisco 1400 Series'/><category term='Allowing telnet to a non-standard port'/><category term='ACL-Lock and Key'/><category term='BGP - Configuring BGP Conditional Route Injection'/><category term='ACL-Even and Odd matching in ACLs'/><category term='VPN-VPN Overview'/><category term='ISDN-ISDN COMPLETE DOC'/><category term='PPP Authentication with MD5'/><category term='FXS and FXO'/><category term='VLAN-VLAN Memberships'/><category term='BGP - deterministic-med and always-compare-med'/><category term='WAN-Defining WAN Terms'/><category term='3550 QoS - Trusting'/><category term='Remote VPN Access from Anywhere'/><category term='WAN-Data Link Connection Identifiers'/><category term='ARP-BGP'/><category term='BGP - Conditional Advertisement with non-exist-map'/><category term='BGP - prefix-based outbound route filtering'/><category term='ACL-Standard IP access lists'/><category term='BGP - Metric Attribute'/><category term='BGP - Enabling BGP Routing'/><category term='Cisco-Router Configuration Tutorial'/><category term='BGP - set clauses are ignored on reflected routes'/><category term='ACL-Access Lists Basics'/><category term='Multicast - Basics'/><category term='BGP - Aggregation with advertise-map'/><category term='Cisco-Cisco 12000 Series'/><category term='BGP - Backdoor Attribute'/><category term='Wide Area File Sharing'/><category term='BGP - Forming BGP Neighbors'/><category term='ACL-Extended ping with TOS byte'/><category term='BGP - expanded community-lists'/><category term='OSI Model Networking Materials'/><category term='BGP - Route Maps'/><category term='VOIP-ISDN Trace'/><category term='BGP - Neighbors'/><category term='Cisco-Cisco 3300 Series'/><category term='BGP - Conditional route injection'/><category term='Debugging an E-BGP multihop'/><category term='ARP-IP Routing in a Larger Network'/><category term='Cisco-Cisco 7500 Series'/><category term='BGP - Command Reference'/><category term='BGP aggregation with unsuppress-map option'/><category term='BGP - iBGP'/><category term='BGP - Synchronization'/><category term='WAN-WAN Frame Relay'/><category term='TCP/IP-Private IP Addresses'/><category term='Cisco Commands'/><category term='LEASEDLINE-Trouble Shooting'/><category term='What is Promiscuous Mode'/><category term='Layers of OSI Model'/><category term='Registered Port Numbers'/><category term='ISDN'/><category term='Cisco-Cisco 6400 Series'/><category term='LEASEDLINE-Modem Configuration'/><category term='OSPF - OSPF TUTORIAL'/><category term='Mapping and Override'/><category term='BGP - Peer Groups'/><category term='CISCO-IOS UPGRADE PROCESS'/><category term='VLAN-VLAN Identification Methods'/><category term='VOIP-Call Termination on FXO'/><category term='BGP - Confederation'/><category term='BGP - Weight Attribute'/><category term='BGP - fast-external-fallover'/><category term='BGP - changing cluster-id'/><category term='BGP - BGP Static Routes'/><category term='Cisco-Cisco 1700 Series'/><category term='BGP - Origin Attribute'/><category term='Cisco-password recovery process'/><category term='Frame-relay Fragmentation'/><category term='BGP - eBGP and iBGP'/><category term='BGP - AS−Regular Expression'/><category term='3560 QoS VLAN-Based Classification'/><category term='Troubleshooting OSPF over Frame-Relay'/><category term='BGP - Configuration Examples'/><category term='TCP/IP-IP SUBNETTING 2'/><category term='MPLS-MPLS VPN Configuration'/><category term='IP Accounting for traffic violations'/><category term='Cisco-MC3810 Multiservice Concentrator'/><category term='Cisco-Cisco 800 Series'/><category term='BGP - RIP failures and suppress-inactive'/><category term='CBAC with APPFW'/><category term='WAN-Dial-on-demand routing'/><category term='BGP - Verifying BGP Conditional Route Injection'/><category term='BGP - How Does BGP Work'/><category term='ARP-Large Scale Stub Networks'/><category term='Configuring multipoint subinterface so the interface status reflects status of the PVC'/><category term='Cisco-Cisco 1600 Series'/><category term='BGP - Local Preference Attribute'/><category term='Cisco-Cisco 4000 Series'/><category term='BGP - bgp inject-map exist-map'/><category term='3560 QoS Per-port per-vlan policing'/><category term='VOIP-RS-232 connection to an AudioCodes'/><category term='LEASED LINE'/><category term='WAN-Integrated Services Digital Network'/><category term='WAN-High-Level Data-Link Control Protocol'/><category term='TCP/IP-IP SUBNETTING'/><category term='INTRODUCTION'/><category term='ARP-BGP Conditional Route Injection'/><category term='BGP - Nexthop Attribute'/><category term='BGP -BGP Commands'/><category term='NTP Access group'/><category term='BGP - CIDR'/><category term='VOIP'/><category term='WCCP notes'/><title type='text'>Networking Concepts</title><subtitle type='html'>Easy to Learn and Apply Network concepts.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.networksamples.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default?start-index=101&amp;max-results=100'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>200</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5417903610155385396</id><published>2009-11-24T12:44:00.001+05:30</published><updated>2009-11-24T12:46:33.068+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Multicast - Basics'/><title type='text'>Multicast - Basics</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5417903610155385396?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5417903610155385396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5417903610155385396&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5417903610155385396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5417903610155385396'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/11/multicast-basics.html' title='Multicast - Basics'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-969789501905750497</id><published>2009-07-21T12:47:00.001+05:30</published><updated>2009-07-21T12:49:22.640+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is Promiscuous Mode'/><title type='text'>What is Promiscuous Mode</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(0, 0, 153); font-family: arial;"&gt;1) In a network, promiscuous mode allows a network device to intercept and read each network packet that arrives in its entirety. This mode of operation is sometimes given to a network snoop server that captures and saves all packets for analysis (for example, for monitoring network usage). &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-family: arial;"&gt;2) In an Ethernet local area network (LAN), promiscuous mode is a mode of operation in which every data packet transmitted can be received and read by a network adapter. Promiscuous mode must be supported by each network adapter as well as by the input/output driver in the host operating system. Promiscuous mode is often used to monitor network activity. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-family: arial;"&gt;Promiscuous mode is the opposite of non-promiscuous mode. When a data packet is transmitted in non-promiscuous mode, all the LAN devices "listen to" the data to determine if the network address included in the data packet is theirs. If it isn't, the data packet is passed onto the next LAN device until the device with the correct network address is reached. That device then receives and reads the data. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-969789501905750497?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/969789501905750497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=969789501905750497&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/969789501905750497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/969789501905750497'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/07/what-is-promiscuous-mode.html' title='What is Promiscuous Mode'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5431586614563053812</id><published>2009-02-12T18:14:00.001+05:30</published><updated>2009-02-12T18:14:43.095+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Multicast TTL-Threshold'/><title type='text'>Multicast TTL-Threshold</title><content type='html'>&lt;span style="color: rgb(51, 0, 51);"&gt;ip multicast ttl-threshold&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;Usage Guidelines&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;"Only multicast packets with a TTL value greater than the threshold are forwarded out the interface."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Oh yeah?! I guess it depends on when you look at the TTL. Consider the network:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1----R2----R3----R4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;PIM-DM is enabled everywhere.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R4 has joined 239.0.0.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1 is sending pings which have 255 TTL when sent from R1.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R2 receives the PING, decrements the TTL to 254 before sending to R3.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;So if we set TTL threshold to 254 on R2's interface to R3, it should block it right? No:&lt;/span&gt;&lt;br /&gt;&lt;pre style="color: rgb(51, 0, 51);"&gt;&lt;br /&gt;R2(config)#int s1/0&lt;br /&gt;R2(config-if)#ip multicast ttl-threshold 254&lt;br /&gt;&lt;br /&gt;R1#ping 239.0.0.1  &lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 1, 100-byte ICMP Echos to 239.0.0.1, timeout is 2 seconds:&lt;br /&gt;&lt;br /&gt;Reply to request 0 from 192.168.34.4, 164 ms&lt;br /&gt;R1#&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;The router will still pass packets that have a TTL equal to the threshold if it was the router that decremented the TTL to reach that value. Here we see 255 will fail:&lt;/span&gt;&lt;br /&gt;&lt;pre style="color: rgb(51, 0, 51);"&gt;&lt;br /&gt;R2(config)#int s1/0&lt;br /&gt;R2(config-if)#ip multicast ttl-threshold 255&lt;br /&gt;&lt;br /&gt;R1#ping 239.0.0.1&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 1, 100-byte ICMP Echos to 239.0.0.1, timeout is 2 seconds:&lt;br /&gt;.&lt;br /&gt;R1#&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5431586614563053812?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5431586614563053812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5431586614563053812&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5431586614563053812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5431586614563053812'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/multicast-ttl-threshold.html' title='Multicast TTL-Threshold'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-1222090820456175495</id><published>2009-02-12T18:11:00.001+05:30</published><updated>2009-02-12T18:11:58.340+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCCP notes'/><title type='text'>WCCP notes</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 0, 51);"&gt;WCCPv1&lt;br /&gt;---------&lt;br /&gt;-Single router serves a cluster&lt;br /&gt;-Cache engine is configured with ip address of control router (max 32)&lt;br /&gt;-Cache engines send ip's to router via control port udp 2048&lt;br /&gt;-Control creates a cluster view, sends to cache engines&lt;br /&gt;-Lead cache engine selected, decides how traffic is redirected.&lt;br /&gt;-HTTP only&lt;br /&gt;&lt;br /&gt;WCCPv2&lt;br /&gt;---------&lt;br /&gt;-Multiple routers can server a cluster&lt;br /&gt;-Service group: routers + cache engines&lt;br /&gt;-Unicast or multicast control (ip wccp group-listen)&lt;br /&gt;-Non-HTTP support, TCP and UDP&lt;br /&gt;-MD5 security&lt;br /&gt;-Error handling keeps track of cache misses&lt;br /&gt;-Load distribution (hot spot handling, load balancing, load shedding)&lt;br /&gt;-IP only&lt;br /&gt;-Multicast TTL must be 15 or lower&lt;br /&gt;-32 cache engines and 32 routers max per service group&lt;br /&gt;-Dynamic services are defined by the cache engines&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;--------------&lt;br /&gt;Router(config)# ip wccp version 2&lt;br /&gt;Router(config)# ip wccp {web-cache | service-number} [group-address groupaddress] [redirect-list access-list] [group-list access-list] [password password]&lt;br /&gt;Router(config)# interface type number&lt;br /&gt;Router(config-if)# ip wccp {web-cache | service-number} redirect {out | in}&lt;br /&gt;&lt;br /&gt;Exclude an interface from redirecting inbound traffic:&lt;br /&gt;Router(config-if)# ip wccp redirect exclude in &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-1222090820456175495?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/1222090820456175495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=1222090820456175495&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1222090820456175495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1222090820456175495'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/wccp-notes.html' title='WCCP notes'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-9147770902556873460</id><published>2009-02-12T18:09:00.000+05:30</published><updated>2009-02-12T18:10:27.649+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting OSPF over Frame-Relay'/><title type='text'>Troubleshooting OSPF over Frame-Relay</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 0, 51);"&gt; Scenario:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Full mesh of PVCs between  3 routers: R4 R5 and R6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Frame-relay map statements DO NOT have broadcast statement&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Adjacencies do not form.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;This is from debug ip packet on R6:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6#debug ip packet&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;IP packet debugging is on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;*Mar  1 01:00:26.367: IP: s=172.12.45.6 (local), d=224.0.0.5 (Serial1/1), len 76, sending broad/multicast&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;*Mar  1 01:00:26.371: IP: s=172.12.45.6 (local), d=224.0.0.5 (Serial1/1), len 76, encapsulation failed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;After enabling broadcast on the frame maps, adjacencies came up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Solution:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Point-to-multipoint ospf networks need broadcast keyword on frame-relay map.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Without it you will see "encapsulation failed" when the router tries to send multicast hellos.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-9147770902556873460?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/9147770902556873460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=9147770902556873460&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/9147770902556873460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/9147770902556873460'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/troubleshooting-ospf-over-frame-relay.html' title='Troubleshooting OSPF over Frame-Relay'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2705046478342989773</id><published>2009-02-12T18:08:00.001+05:30</published><updated>2009-02-12T18:08:48.841+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Frame-relay Compression'/><title type='text'>Frame-relay Compression</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);" class="post-labels"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="color: rgb(51, 0, 51); text-align: justify;" class="post hentry"&gt; &lt;a name="9013079095994239220"&gt;&lt;/a&gt; &lt;h3 class="post-title entry-title"&gt; &lt;a href="http://ccietobe.blogspot.com/2008/06/frame-relay-compression.html"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h3&gt;  &lt;div class="post-body entry-content"&gt; Compression must be configured on both ends for it to be enabled:&lt;br /&gt;&lt;br /&gt;R5 --- FR CLOUD --- R6&lt;br /&gt;&lt;br /&gt;R6(config)#interface s1/1&lt;br /&gt;R6(config-if)#frame-relay map ip 172.14.45.5 605 payload-compression FRF9 stac&lt;br /&gt;&lt;br /&gt;R6#ping 172.14.45.5&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 5, 100-byte ICMP Echos to 172.14.45.5, timeout is 2 seconds:&lt;br /&gt;!!!!!&lt;br /&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 32/52/76 ms&lt;br /&gt;&lt;br /&gt;R6#show compress&lt;br /&gt;Serial1/1 - DLCI: 605&lt;br /&gt;        Compression not active&lt;br /&gt;        uncompressed bytes xmt/rcv 0/0&lt;br /&gt;        compressed bytes   xmt/rcv 0/0&lt;br /&gt;        Compressed bytes sent:         0 bytes   0 Kbits/sec&lt;br /&gt;        Compressed bytes recv:         0 bytes   0 Kbits/sec&lt;br /&gt;        1  min avg ratio xmt/rcv 0.000/0.000&lt;br /&gt;        5  min avg ratio xmt/rcv 0.000/0.000&lt;br /&gt;        10 min avg ratio xmt/rcv 0.000/0.000&lt;br /&gt;        no bufs xmt 0 no bufs rcv 0&lt;br /&gt;        resyncs 0&lt;br /&gt;        Additional Stac Stats:&lt;br /&gt;        Transmit bytes:  Uncompressed =        0 Compressed =          0&lt;br /&gt;        Received bytes:  Compressed =          0 Uncompressed =        0&lt;br /&gt;&lt;br /&gt;Now on R5:&lt;br /&gt;&lt;br /&gt;R6(config)#interface s1/0&lt;br /&gt;R6(config-if)#frame-relay map ip 172.14.45.6 506 payload-compression FRF9 stac&lt;br /&gt;&lt;br /&gt;Check R6 and see compression is enabled:&lt;br /&gt;&lt;br /&gt;R6#ping 172.14.45.5&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 5, 100-byte ICMP Echos to 172.14.45.5, timeout is 2 seconds:&lt;br /&gt;!!!!!&lt;br /&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 28/76/168 ms&lt;br /&gt;&lt;br /&gt;R6#show compress&lt;br /&gt;Serial1/1 - DLCI: 605&lt;br /&gt;        Software compression enabled&lt;br /&gt;        uncompressed bytes xmt/rcv 1232/1232&lt;br /&gt;        compressed bytes   xmt/rcv 381/382&lt;br /&gt;        Compressed bytes sent:       381 bytes   0 Kbits/sec  ratio: 3.233&lt;br /&gt;        Compressed bytes recv:       382 bytes   0 Kbits/sec  ratio: 3.225&lt;br /&gt;        1  min avg ratio xmt/rcv 0.055/0.057&lt;br /&gt;        5  min avg ratio xmt/rcv 0.113/0.118&lt;br /&gt;        10 min avg ratio xmt/rcv 0.113/0.118&lt;br /&gt;        no bufs xmt 0 no bufs rcv 0&lt;br /&gt;        resyncs 0&lt;br /&gt;        Additional Stac Stats:&lt;br /&gt;        Transmit bytes:  Uncompressed =        0 Compressed =        290&lt;br /&gt;        Received bytes:  Compressed =        291 Uncompressed =        0&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2705046478342989773?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2705046478342989773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2705046478342989773&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2705046478342989773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2705046478342989773'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/frame-relay-compression.html' title='Frame-relay Compression'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6029207865557144873</id><published>2009-02-12T18:04:00.001+05:30</published><updated>2009-02-12T18:04:58.053+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Frame-relay Fragmentation'/><title type='text'>Frame-relay Fragmentation</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 0, 51);"&gt;R4 --- FR CLOUD --- R6&lt;br /&gt;&lt;br /&gt;Both ends configured:&lt;br /&gt;&lt;br /&gt;R6(config)#int s1/1&lt;br /&gt;R6(config-if)#frame-relay fragment 200 end-to-end&lt;br /&gt;R6(config-if)#^Z&lt;br /&gt;&lt;br /&gt;R6#ping 172.14.45.4 size 8000&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 5, 8000-byte ICMP Echos to 172.14.45.4, timeout is 2 seconds:&lt;br /&gt;!!!!!&lt;br /&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 676/756/796 ms&lt;br /&gt;&lt;br /&gt;R6#show frame-relay fragment&lt;br /&gt;interface                dlci frag-type  size in-frag    out-frag   dropped-frag&lt;br /&gt;Se1/1                    604  end-to-end 200  220        220        0&lt;br /&gt;Se1/1                    605  end-to-end 200  0          0          0&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6029207865557144873?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6029207865557144873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6029207865557144873&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6029207865557144873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6029207865557144873'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/frame-relay-fragmentation.html' title='Frame-relay Fragmentation'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2286791781778684900</id><published>2009-02-12T18:03:00.000+05:30</published><updated>2009-02-12T18:04:03.254+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Configuring multipoint subinterface so the interface status reflects status of the PVC'/><title type='text'>Configuring multipoint subinterface so the interface status reflects status of the PVC</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;On a physical frame-relay interface, if the opposite end goes down, the local interface will remain up/up. When using multipoint subinterfaces this is not the case. When the remote interface goes down (taking the dlci with it), the local ends puts its interface in a down/down state.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1, R3 and R5 connect via full mesh frame-relay, subnet 190.1.135.0/24&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1 dlci 103 maps to R3 dlci 301&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1 dlci 105 maps to R5 dlci 501&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R3 dlci 305 maps to R5 dlci 503&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Configure all routers on the physical interfaces.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is the outlook so far from R3:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip int brief serial 1/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Interface                  IP-Address      OK? Method Status                Protocol&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Serial1/0                  190.1.135.1     YES manual up                    up    &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3# &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Now Let's shut the physical interfaces On R5 and R1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R5(config)#int s0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R5(config-if)#shut&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R1(config)#int s0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R1(config-if)#shut&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R3 still has its interface up/up:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip int brief serial 1/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Interface                  IP-Address      OK? Method Status                Protocol&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Serial1/0                  190.1.135.1     YES manual up                    up    &lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;If we want R3's interface to go down when R5 and R1 are no longer available we need to use multipoint subinterface. Let's create one on R3 and move the config over:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#interface Serial1/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-if)# no ip address 190.1.135.1 255.255.255.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-if)# no frame-relay map ip 190.1.135.1 301&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-if)# no frame-relay map ip 190.1.135.5 305&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-if)#int s1/0.3 multipoint&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-subif)# ip address 190.1.135.1 255.255.255.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-subif)# frame-relay map ip 190.1.135.1 301 broadcast&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-subif)# frame-relay map ip 190.1.135.5 305 broadcast&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-subif)# no frame-relay inverse-arp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Bring up R5 and R1 again and now we have:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R3#show ip int brief s1/0.3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;Interface                  IP-Address      OK? Method Status                Protocol&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;Serial1/0.3                190.1.135.1     YES manual up                    up    &lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Shut down R5 and R3 is stil up but look at the debug frame-relay lmi. The status of PVC 305 is 0x0 which is inactive&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip int brief s1/0.3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Interface                  IP-Address      OK? Method Status                Protocol&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Serial1/0.3                190.1.135.1     YES manual up                    up   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2286791781778684900?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2286791781778684900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2286791781778684900&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2286791781778684900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2286791781778684900'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/configuring-multipoint-subinterface-so.html' title='Configuring multipoint subinterface so the interface status reflects status of the PVC'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8829911876306490293</id><published>2009-02-12T18:01:00.000+05:30</published><updated>2009-02-12T18:02:50.080+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Back to Back Multilink Frame-Relay'/><title type='text'>Back to Back Multilink Frame-Relay</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;I had this task on a recent lab. I was surprised I actually got it to work (with some help from the DocCD). Sometimes I skip these boring WAN technology tasks, but sometimes they can be fun if you get them to work :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6 ==== R9&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6 and R6 are connected via two serial links, serial 0/2/0 and serial 0/2/1. The task says to configure these with a /31 on the subnet 172.30.96.0 network. R6 should use DLCI 609 and R9 should use DLCI 906. Now let me say the PG was mistaken in its answer, it didn't have any frame-relay whatsoever - still waiting to hear via email what the deal was. So this is my "tentative" solution, which works great.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is my R6 config:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface MFR1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; ip address 172.30.96.0 255.255.255.254&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt; no keepalive&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; frame-relay map ip 172.30.96.0 609&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; frame-relay map ip 172.30.96.1 906 broadcast&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; frame-relay interface-dlci 609&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Serial0/2/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no ip address&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; encapsulation frame-relay MFR1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; clock rate 2000000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no arp frame-relay&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Serial0/2/1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no ip address&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; encapsulation frame-relay MFR1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; clock rate 2000000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no arp frame-relay&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is the R9 config:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface MFR1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; ip address 172.30.96.1 255.255.255.254&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt; no keepalive&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; frame-relay map ip 172.30.96.0 609 broadcast&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; frame-relay map ip 172.30.96.1 906&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; frame-relay interface-dlci 609&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Serial0/2/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no ip address&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; encapsulation frame-relay MFR1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no arp frame-relay&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Serial0/2/1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no ip address&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; encapsulation frame-relay MFR1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no arp frame-relay&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8829911876306490293?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8829911876306490293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8829911876306490293&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8829911876306490293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8829911876306490293'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/back-to-back-multilink-frame-relay.html' title='Back to Back Multilink Frame-Relay'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-806821443457625941</id><published>2009-02-10T19:46:00.000+05:30</published><updated>2009-02-10T19:49:30.888+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCP/IP-IP SUBNETTING 2'/><title type='text'>ip subnetting</title><content type='html'>&lt;div&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;IP subnetting is a fundamental subject that's critical for any IP network  engineer to understand, yet students have traditionally had a difficult time  grasping it. Over the years, I've watched students needlessly struggle through  school and in practice when dealing with subnetting because it was never  explained to them in an easy-to-understand way. I've helped countless  individuals learn what subnetting is all about using my own graphical approach  and calculator shortcuts, and I've put all that experience into this  article.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;IP addresses and subnets&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Although IP stands for Internet Protocol, it's a communications protocol used  from the smallest private network to the massive global Internet. An IP address  is a unique identifier given to a single device on an IP network. The IP address  consists of a 32-bit number that ranges from 0 to 4294967295. This means that  theoretically, the Internet can contain approximately 4.3 billion unique  objects. But to make such a large address block easier to handle, it was chopped  up into four 8-bit numbers, or "octets," separated by a period. Instead of 32  binary base-2 digits, which would be too long to read, it's converted to four  base-256 digits. Octets are made up of numbers ranging from 0 to 255. The  numbers below show how IP addresses increment.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.0.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.0.1&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;...increment 252  hosts...&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.0.254&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.0.255&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.1.0&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.1.1&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;...increment 252  hosts...&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.1.254&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.1.255&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.2.0&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0.0.2.1&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;...increment 4+  billion hosts...&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;255.255.255.255&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The word &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;subnet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; is short for &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;sub network&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;--a smaller network  within a larger one. The smallest subnet that has no more subdivisions within it  is considered a single "broadcast domain," which directly correlates to a single  LAN (local area network) segment on an Ethernet switch. The broadcast domain  serves an important function because this is where devices on a network  communicate directly with each other's MAC addresses, which don't route across  multiple subnets, let alone the entire Internet. MAC address communications are  limited to a smaller network because they rely on ARP broadcasting to find their  way around, and broadcasting can be scaled only so much before the amount of  broadcast traffic brings down the entire network with sheer broadcast noise. For  this reason, the most common smallest subnet is 8 bits, or precisely a single  octet, although it can be smaller or slightly larger.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Subnets have a beginning and an ending, and the beginning number is always  even and the ending number is always odd. The beginning number is the "Network  ID" and the ending number is the "Broadcast ID." You're not allowed to use these  numbers because they both have special meaning with special purposes. The  Network ID is the official designation for a particular subnet, and the ending  number is the broadcast address that every device on a subnet listens to.  Anytime you want to refer to a subnet, you point to its Network ID and its  subnet mask, which defines its size. Anytime you want to send data to everyone  on the subnet (such as a multicast), you send it to the Broadcast ID. Later in  this article, I'll show you an easy mathematical and graphical way to determine  the Network and Broadcast IDs.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The graphical subnet ruler&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Over the years, as I watched people struggle with the subject of IP  subnetting, I wanted a better way to teach the subject. I soon realized that  many students in IT lacked the necessary background in mathematics and had a  hard time with the concept of binary numbers. To help close this gap, I came up  with the graphical method of illustrating subnets shown in &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;. In  this example, we're looking at a range of IP addresses from 10.0.0.0 up to  10.0.32.0. Note that the ending IP of 10.0.32.0 itself is actually the beginning  of the next subnet. This network range ends at the number right before it, which  is 10.0.31.255.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_a.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Note that for every bit increase, the size of the subnet doubles in length,  along with the number of hosts. The smallest tick mark represents 8 bits, which  contains a subnet with 256 hosts--but since you can't use the first and last IP  addresses, there are actually only 254 usable hosts on the network. The easiest  way to compute how many usable hosts are in a subnet is to raise 2 to the power  of the bit size minus 2. Go up to 9 bits ,and we're up to 510 usable hosts,  because 2 to the 9th is 512, and we don't count the beginning and ending. Keep  on going all the way up to 13 bits, and we're up to 8,190 usable hosts for the  entire ruler shown above.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Learning to properly chop subnets&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Subnets can be subdivided into smaller subnets and even smaller ones still.  The most important thing to know about chopping up a network is that you can't  arbitrarily pick the beginning and ending. The chopping must be along clean  binary divisions. The best way to learn this is to look at my subnet ruler and  see what's a valid subnet. In &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, green subnets are valid and red  subnets are not.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_b.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The ruler was constructed like any other ruler, where we mark it down the  middle and bisect it. Then, we bisect the remaining sections and with shrinking  markers every time we start a new round of bisecting. In the sample above, there  were five rounds of bisections. If you look carefully at the edge of any valid  (green) subnet blocks, you'll notice that none of the markers contained within  the subnet is higher than the edge's markers. There is a mathematical reason for  this, which we'll illustrate later, but seeing it graphically will make the math  easier to understand.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The role of the subnet mask&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The subnet mask plays a crucial role in defining the size of a subnet. Take a  look at &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;. Notice the pattern and pay special attention to the  numbers in red. Whenever you're dealing with subnets, it will come in handy to  remember eight special numbers that reoccur when dealing with subnet masks. They  are &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;255&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;254&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;252&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;248&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;240&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;224&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;,  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;192&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, and &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;128&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;. You'll see these numbers over and over again in IP  networking, and memorizing them will make your life much easier.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_c.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;I've included three class sizes. You'll see the first two classes, with host  bit length from 0 to 16, most often. It's common for DSL and T1 IP blocks to be  in the 0- to 8-bit range. Private networks typically work in the 8- to 24-bit  range.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Note how the binary mask has all those zeros growing from right to left. The  subnet mask in binary form always has all ones to the left and all zeros to the  right. The number of zeros is identical to the &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;subnet length&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;. I showed  only the portion of the binary subnet in the octet that's interesting, since all  octets to the right consist of zeros and all octets to the left consist of ones.  So if we look at the subnet mask where the subnet length is 11 bits long, the  full binary subnet mask is 11111111.11111111.11111000.00000000. As you can see  under &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;mask octet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, the subnet mask transitions from 1 to 0 in the third  octet. The particular binary subnet mask translates directly to base-256 form as  255.255.248.0.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The "mask" in subnet mask&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The subnet mask not only determines the size of a subnet, but it can also  help you pinpoint where the end points on the subnet are if you're given any IP  address within that subnet. The reason it's called a subnet "mask" is that it  literally masks out the host bits and leaves only the Network ID that begins the  subnet. Once you know the beginning of the subnet and how big it is, you can  determine the end of the subnet, which is the Broadcast ID.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;To calculate the Network ID, you simply take any IP address within that  subnet and run the AND operator on the subnet mask. Let's take an IP address of  10.20.237.15 and a subnet mask of 255.255.248.0. Note that this can be and often  is written in shorthand as &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;10.20.237.15/21&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; because the subnet mask length  is 21. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure D&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; and &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure E&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; show the Decimal and Binary versions  of the AND operation.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure D&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_d.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;small&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Decimal math&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/small&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure E&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_e.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;small&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Binary math&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/small&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The binary version shows how the &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;s act as a mask on the IP address on  top. Inside the masking box, the &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;s convert all numbers on top into  zeros, no matter what the number is. When you take the resultant binary Network  ID and convert it to decimal, you get 10.20.232.0 as the Network ID.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;One thing that's always bothered me about the way subnetting is taught is  that students are not shown a simple trick to bypass the need for binary  conversions when doing AND operations. I even see IT people in the field using  this slow and cumbersome technique to convert everything to binary, run the AND  operation, and then convert back to decimal using the Windows Calculator. But  there's a really simple shortcut using the Windows Calculator, since the AND  operator works directly on decimal numbers. Simply punch in 237, hit the AND  operator, and then 248 and [Enter] to instantly get 232, as shown in &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure  F&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;. I'll never understand why this isn't explained to students, because it  makes mask calculations a lot easier.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure F&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_f.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Since there are 11 zeros in the subnet mask, the subnet is 11 bits long. This  means there are 2^11, or 2,048, maximum hosts in the subnet and the last IP in  this subnet is 10.20.239.255. You could compute this quickly by seeing there are  three zeros in the third octet, which means the third octet of the IP address  can have a variance of 2^3, or 8. So the next subnet starts at 10.20.232+8.0,  which is 10.20.240.0. If we decrease that by 1, we have 10.20.239.255, which is  where this subnet ends. To help you visualize this, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure G&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; shows it on  my subnet ruler.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure G&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_g.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;IP classes made simple&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;For an arbitrary classification of IP subnets, the creators of the Internet  chose to break the Internet into multiple classes. Note that these aren't  important as far as your subnet calculations are concerned; this is just how the  Internet is "laid out." The Internet is laid out as Class A, B, C, D, and E.  Class A uses up the first half of the entire Internet, Class B uses half of the  remaining half, Class C uses the remaining half again, Class D (Multicasting)  uses up the remaining half again, and whatever is left over is reserved for  Class E. I've had students tell me that they struggled with the memorization of  IP classes for weeks until they saw this simple table shown in &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure H&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;.  This is because you don't actually need to memorize anything, you just learn the  technique for constructing the ruler using half of what's available.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;center&gt; &lt;table style="text-align: justify;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="middle"&gt; &lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Figure H&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;img src="http://techrepublic.com.com/i/tr/downloads/images/subnetting/subnetting_h.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Remember that all subnets start with EVEN numbers and all subnet endings are  ODD. Note that 0.0.0.0/8 (0.0.0.0 to 0.255.255.255) isn't used and 127.0.0.0/8  (127.0.0.0 to 127.255.255.255) is reserved for loopback addresses.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;All Class A addresses have their first octet between 1 to 126 because 0 and  127 are reserved. Class A subnets are all 24 bits long, which means the subnet  mask is only 8 bits long. For example, we have the entire 3.0.0.0/8 subnet owned  by GE, since GE was lucky enough to get in early to be assigned 16.8 million  addresses. The U.S. Army owns 6.0.0.0/8. Level 3 Communications owns 8.0.0.0/8.  IBM owns 9.0.0.0/8. AT&amp;amp;T owns 12.0.0.0/8. Xerox owns 13.0.0.0/8. HP owns  15.0.0.0/8 and 16.0.0.0/8. Apple owns 17.0.0.0/8.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;All Class B addresses have their first octet between 128 and 191. Class B  subnets are all 16 bits long, which means the subnet masks are 16 bits long. For  example, BBN Communications owns 128.1.0.0/16, which is 128.1.0.0 to  128.1.255.255. Carnegie Mellon University owns 128.2.0.0/16.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;All Class C addresses have their first octet between 192 and 223. Class C  subnets are all 8 bits long, so the subnet mask is only 24 bits long. Note that  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.arin.net/" target="-blank"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;ARIN&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; (the organization that  assigns Internet addresses) will sell blocks of four Class C addresses only to  individual companies and you have to really justify why you need 1,024 Public IP  addresses. If you need to run BGP so you can use multiple ISPs for redundancy,  you have to have your own block of IP addresses. Also note that this isn't the  old days, where blocks of 16.8 million Class A addresses were handed out for  basically nothing. You have to pay an annual fee for your block of 1,024  addresses with a subnet mask of /22, or 255.255.252.0.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The concept of subnet classes can cause harm in actual practice. I've  actually seen people forget to turn classes off in their old Cisco router and  watch large subnet routes get hijacked on a large WAN configured for dynamic  routing whenever some routes were added. This is because a Cisco router will  assume the subnet mask is the full /8 or /16 or /24 even if you define something  in between. All newer Cisco IOS software versions turn off the concept of subnet  classes and uses classless routing by default. This is done with the default  command "IP Classless."&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Public versus private IP addresses&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Besides the reserved IP addresses (0.0.0.0/8 and 127.0.0.0/8) mentioned  above, there are other addresses not used on the public Internet. These  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;private subnets&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; consist of private IP addresses and are usually behind a  firewall or router that performs NAT (network address translation). NAT is  needed because private IP addresses are nonroutable on the public Internet, so  they must be translated into public IP addresses before they touch the Internet.  Private IPs are never routed because no one really owns them. And since anyone  can use them, there's no right place to point a private IP address to on the  public Internet. Private IP addresses are used in most LAN and WAN environments,  unless you're lucky enough to own a Class A or at least a Class B block of  addresses, in which case you might have enough IPs to assign internal and  external IP addresses.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The following blocks of IP addresses are allocated for private networks:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt; &lt;li style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;10.0.0.0/8  (10.0.0.0 to 10.255.255.255)  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;172.16.0.0/12  (172.16.0.0 to 172.31.255.255)  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;192.168.0.0/16  (192.168.0.0 to 192.168.255.255)  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;169.254.0.0/16  (169.254.0.0 to 169.254.255.255)*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;*Note that 169.254.0.0/16 is a block of private IP addresses used for random  self IP assignment where &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://techrepublic.com.com/5100-6345-5034551.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;DHCP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;  servers are not available.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;10.0.0.0/8 is normally used for larger networks, since there are  approximately 16.8 million IP addresses available within that block. They chop  it up into lots of smaller groups of subnets for each geographic location, which  are then subdivided into even smaller subnets. Smaller companies typically use  the 172.16.0.0/12 range, chopped up into smaller subnets, although there's no  reason they can't use 10.0.0.0/8 if they want to. Home networks typically use a  /24 subnet within the 192.168.0.0/16 subnet.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;The use of private IP addresses and NAT has prolonged the life of IPv4 for  the foreseeable future because it effectively allows a single public IP address  to represent thousands of private IP addresses. At the current rate that IPv4  addresses are handed out, we have enough IPv4 addresses for &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://news.zdnet.com/2100-1009_22-1020653.html" target="_blank"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;approximately 17 years&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;. ARIN is much more stingy now about  handing them out, and small blocks of IP addresses are relatively expensive  compared to the old days, when companies like Apple were simply handed a block  of 16.8 million addresses. The next version of IP addresses, called &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/IPv6" target="_blank"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;IPv6&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;, is 128 bits  long--and there are more than 79 thousand trillion trillion times more IP  addresses than IPv4. Even if you assigned 4.3 billion people on the planet with  4.3 billion IP addresses each, you would still have more than 18 million  trillion IPv6 addresses left!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-806821443457625941?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/806821443457625941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=806821443457625941&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/806821443457625941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/806821443457625941'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/ip-subnetting.html' title='ip subnetting'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8915157182188846165</id><published>2009-02-08T15:58:00.000+05:30</published><updated>2009-02-08T16:01:19.288+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CBAC with APPFW'/><title type='text'>CBAC with APPFW</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; I have begun my goal of reading the entire 12.4 Security Configuration Guide. I likely won't read it all because many things are probably unrelated to CCIE R&amp;amp;S, but you never really can tell. Especially since the blueprint has "Other Security Features" on it. This configuration is part of CBAC and so I thought I would test a small scenario.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R4----s1/0 R5----R6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R4 is the http server and R6 is the client. Here is how I set them up to verify it's working:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R4#copy run test.html&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Destination filename [test.html]?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erase flash: before copying? [confirm]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erasing the flash filesystem will remove all files! Continue? [confirm]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erase of flash: complete&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Verifying checksum...  OK (0x7071)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;1942 bytes copied in 4.628 secs (420 bytes/sec)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R4#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R4#dir&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Directory of flash:/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;   1  -rw-        1942                    &lt;no&gt;  test.html&lt;/no&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;no&gt;&lt;/no&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;no&gt;7864316 bytes total (7862308 bytes free)&lt;/no&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;no&gt;R4#conf t&lt;/no&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;no&gt;R4(config)#ip http path flash:&lt;/no&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R4 is setup, let's test R6 the client:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R6#copy http://192.168.45.4/test.html flash:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Destination filename [test.html]?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erase flash: before copying? [confirm]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erasing the flash filesystem will remove all files! Continue? [confirm]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erase of flash: complete&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Loading http://192.168.45.4/test.html !&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Verifying checksum...  OK (0x7071)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;1942 bytes copied in 0.688 secs (2823 bytes/sec)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R6#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Good, so we know that works. Now we can configure R5 as the HTTP Application FW. This does require CBAC as well as some new appfw commands which I have never used. There are &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;MANY&lt;/span&gt; more options besides this, so I suggest you read the DocCD for a more in depth explanation. I just wanted to get the gist of it here:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ip inspect name APPFW appfw HTTPFW&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ip inspect name APPFW http&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;appfw policy-name HTTPFW&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  application http&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    strict-http action allow alarm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    content-length minimum 1945 action reset alarm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    port-misuse tunneling action reset&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Serial1/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; description TO R4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; ip inspect APPFW out&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Notice the minimum content length is 1945 byes. This will prevent R6 from copying the file via HTTP (test.html is 1942 bytes as we can see above):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;6#copy http://192.168.45.4/test.html flash:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Destination filename [test.html]?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Erase flash: before copying? [confirm]n&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;%Error opening http://192.168.45.4/test.html (I/O error)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R6#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Jump to R5 and see the message:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Mar  2 05:34:02.708: %APPFW-4-HTTP_CONT_TYPE_SIZE: Sig:11 Content size 1942 out of range - Reset -  Content size out-of-bounds from 192.168.56.6:25101 to 192.168.45.4:80&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;If we change the minimum content legth to 1942, everything works as expected:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#appfw policy-name HTTPFW                             &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(cfg-appfw-policy)#application http                                     &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(cfg-appfw-policy-http)#content-length minimum 1942 action reset alarm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#copy http://192.168.45.4/test.html flash:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Destination filename [test.html]? &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;%Warning:There is a file already existing with this name &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Do you want to over write? [confirm]y&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Erase flash: before copying? [confirm]n&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Loading http://192.168.45.4/test.html !&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Verifying checksum...  OK (0x7071)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;1942 bytes copied in 0.396 secs (4904 bytes/sec)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8915157182188846165?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8915157182188846165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8915157182188846165&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8915157182188846165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8915157182188846165'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/cbac-with-appfw.html' title='CBAC with APPFW'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2336606151185157694</id><published>2009-02-08T15:55:00.000+05:30</published><updated>2009-02-08T15:56:08.419+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP aggregation with suppress-map'/><title type='text'>BGP aggregation with suppress-map</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 51, 255);"&gt;   This scenario involves use of the suppress-map with BGP aggregate-address command. It is fairly simple to understand but I could use the practice.&lt;br /&gt;&lt;br /&gt;R1 is getting the following routes from R2 in AS 200:&lt;br /&gt;&lt;br /&gt;R1#show ip bgp | Begin Network&lt;br /&gt;  Network          Next Hop            Metric LocPrf Weight Path&lt;br /&gt;*&gt; 2.2.2.2/32       172.12.12.22             0             0 200 i&lt;br /&gt;r&gt; 2.2.2.3/32       172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.1.1.2/32     172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.2.2.2/32     172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.3.3.2/32     172.12.12.22             0             0 200 i&lt;br /&gt;&lt;br /&gt;On R2 we can configure aggregation with the following command:&lt;br /&gt;&lt;br /&gt;R2(config-router)#aggregate-address 200.0.0.0 255.0.0.0&lt;br /&gt;&lt;br /&gt;Without clearing BGP, here is R1's BGP table with the aggregate 200.0.0.0/8:&lt;br /&gt;&lt;br /&gt;R1#show ip bgp | Begin Network&lt;br /&gt;  Network          Next Hop            Metric LocPrf Weight Path&lt;br /&gt;*&gt; 2.2.2.2/32       172.12.12.22             0             0 200 i&lt;br /&gt;r&gt; 2.2.2.3/32       172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.0.0.0/8      172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.1.1.2/32     172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.2.2.2/32     172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.3.3.2/32     172.12.12.22             0             0 200 i&lt;br /&gt;&lt;br /&gt;Suppose we wanted to suppress only some of the "component routes", but not all. With the summary-only keyword we would suppress all, but with a suppress-map we can supress a few.&lt;br /&gt;&lt;br /&gt;on R2 we add the following:&lt;br /&gt;&lt;br /&gt;access-list 50 permit 200.1.1.2&lt;br /&gt;access-list 50 permit 200.3.3.2&lt;br /&gt;!&lt;br /&gt;route-map BLOCK permit 10&lt;br /&gt;match ip address 50&lt;br /&gt;!&lt;br /&gt;router bgp 200&lt;br /&gt;aggregate-address 200.0.0.0 255.0.0.0 suppress-map BLOCK&lt;br /&gt;!&lt;br /&gt;&lt;br /&gt;Note that the access-list "permits" the networks and the supress-map matches whatever networks are permitted by the ACL and suppresses them.&lt;br /&gt;&lt;br /&gt;Now on R1 we have:&lt;br /&gt;&lt;br /&gt;R1#show ip bgp | Begin Network&lt;br /&gt;  Network          Next Hop            Metric LocPrf Weight Path&lt;br /&gt;*&gt; 2.2.2.2/32       172.12.12.22             0             0 200 i&lt;br /&gt;r&gt; 2.2.2.3/32       172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.0.0.0/8      172.12.12.22             0             0 200 i&lt;br /&gt;*&gt; 200.2.2.2/32     172.12.12.22             0             0 200 i &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2336606151185157694?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2336606151185157694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2336606151185157694&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2336606151185157694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2336606151185157694'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-aggregation-with-suppress-map.html' title='BGP aggregation with suppress-map'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8465909791682858559</id><published>2009-02-08T15:54:00.002+05:30</published><updated>2009-02-08T15:55:36.236+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP aggregation with unsuppress-map option'/><title type='text'>BGP aggregation with unsuppress-map option</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 51, 255);"&gt;  R1 [AS 100] connects to R2 [AS 200]&lt;br /&gt;&lt;br /&gt;R1 is currently summarizing a bunch of subnets in the 1.0.0.0/8 range.&lt;br /&gt;&lt;br /&gt;R1#   show ip route | in C&lt;br /&gt;Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP&lt;br /&gt;C       1.1.1.1/32 is directly connected, Loopback0&lt;br /&gt;C       1.3.3.3/32 is directly connected, Loopback3&lt;br /&gt;C       1.2.2.2/32 is directly connected, Loopback2&lt;br /&gt;C       1.5.5.5/32 is directly connected, Loopback5&lt;br /&gt;C       1.4.4.4/32 is directly connected, Loopback4&lt;br /&gt;C       1.7.7.7/32 is directly connected, Loopback7&lt;br /&gt;C       1.6.6.6/32 is directly connected, Loopback6&lt;br /&gt;&lt;br /&gt;R1 is configured as such:&lt;br /&gt;&lt;br /&gt;router bgp 100&lt;br /&gt;no synchronization&lt;br /&gt;bgp log-neighbor-changes&lt;br /&gt;network 1.1.1.1 mask 255.255.255.255&lt;br /&gt;network 1.2.2.2 mask 255.255.255.255&lt;br /&gt;network 1.3.3.3 mask 255.255.255.255&lt;br /&gt;network 1.4.4.4 mask 255.255.255.255&lt;br /&gt;network 1.5.5.5 mask 255.255.255.255&lt;br /&gt;aggregate-address 1.0.0.0 255.0.0.0 summary-only&lt;br /&gt;neighbor 172.12.12.2 remote-as 200&lt;br /&gt;neighbor 172.12.14.4 remote-as 100&lt;br /&gt;&lt;br /&gt;The following route shows up on R2:&lt;br /&gt;&lt;br /&gt;R2#show ip bgp | begin Network&lt;br /&gt; Network          Next Hop            Metric LocPrf Weight Path&lt;br /&gt;*  1.0.0.0          172.12.23.3                            0 300 100 i&lt;br /&gt;*&gt;                  172.12.12.1                            0 100 i&lt;br /&gt;&lt;br /&gt;As you can see we are supressing all of the 1.0.0.0 subnets. Suppose we wanted to advertise one of the subnets as well, to do so we can use the unsuppress-map option on the neighbor command.&lt;br /&gt;&lt;br /&gt;On R1:&lt;br /&gt;&lt;br /&gt;R1(config)#access-list 12 permit 1.1.1.1&lt;br /&gt;R1(config)#access-list 12 permit 1.2.2.2&lt;br /&gt;R1(config)#access-list 12 permit 1.3.3.3&lt;br /&gt;R1(config)#route-map ALLOW&lt;br /&gt;R1(config-route-map)#match ip address 12&lt;br /&gt;R1(config-route-map)#exit&lt;br /&gt;R1(config)#router bgp 100&lt;br /&gt;R1(config-router)#neighbor 172.12.12.2 unsuppress-map ALLOW&lt;br /&gt;&lt;br /&gt;Clear BGP:&lt;br /&gt;&lt;br /&gt;R1#clear ip bgp *&lt;br /&gt;R1#&lt;br /&gt;00:41:47: %BGP-5-ADJCHANGE: neighbor 172.12.12.2 Down User reset&lt;br /&gt;00:42:28: %BGP-5-ADJCHANGE: neighbor 172.12.12.2 Up&lt;br /&gt;&lt;br /&gt;Now on R2 we have "unsuppressed" 3 routes:&lt;br /&gt;&lt;br /&gt;R2#show ip bgp | inc 1\.&lt;br /&gt;*  1.0.0.0          172.12.23.3                            0 300 100 i&lt;br /&gt;*&gt; 1.1.1.1/32       172.12.12.1              0             0 100 i&lt;br /&gt;*&gt; 1.2.2.2/32       172.12.12.1              0             0 100 i&lt;br /&gt;*&gt; 1.3.3.3/32       172.12.12.1              0             0 100 i &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8465909791682858559?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8465909791682858559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8465909791682858559&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8465909791682858559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8465909791682858559'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-aggregation-with-unsuppress-map.html' title='BGP aggregation with unsuppress-map option'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2172674531507369971</id><published>2009-02-08T15:54:00.001+05:30</published><updated>2009-02-08T15:54:41.974+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP no-export community'/><title type='text'>BGP no-export community</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 51, 255);"&gt;   This is gonna be short and hopefully sweet. I'll leave some blanks in here so you can fill in the rest...&lt;br /&gt;&lt;br /&gt;R4  (AS3) connects to R1 via EBGP&lt;br /&gt;R1 connects to R2 via IBGP (AS 2)&lt;br /&gt;R2 connects to R5 (AS1) via EBGP&lt;br /&gt;&lt;br /&gt;We don't want AS2 to become a transit AS between R4 and R5 so we can use the no-export community to accomplish this. There are several ways to do is but here is a way with using the as-path access-lists. AS-path access-lists are awesome because they use regexp.&lt;br /&gt;&lt;br /&gt;So on R1 we create an AS-path access list to match any routes originating in R4 AS:&lt;br /&gt;&lt;br /&gt;ip as-path access-list 1 permit _3$&lt;br /&gt;&lt;br /&gt;Then we create a route-map and apply it to the R2 neighbor going outbound:&lt;br /&gt;&lt;br /&gt;route-map noexport permit 10&lt;br /&gt;match as-path 1&lt;br /&gt;set community no-export&lt;br /&gt;&lt;br /&gt;route-map noexport permit 20&lt;br /&gt;&lt;br /&gt;router bgp 2&lt;br /&gt;neighbor 155.1.23.2 send-community&lt;br /&gt;neighbor 155.1.23.2 route-map noexport out&lt;br /&gt;&lt;br /&gt;Now on R2 we have this:&lt;br /&gt;&lt;br /&gt;R2#show ip bgp 204.12.1.0 | inc Community&lt;br /&gt;     Community: no-export&lt;br /&gt;&lt;br /&gt;R5 does not have the route!&lt;br /&gt;&lt;br /&gt;R5#show ip bgp 204.12.1.0&lt;br /&gt;% Network not in table&lt;br /&gt;R5#&lt;br /&gt;&lt;br /&gt;You can do the reverse on R2 to accomplish the two way restriction. Also note that R4 can bypass this by prepending an AS# to its routes! A better way would be to add the no-export community to all routes learned from R4 not just the ones originating in R4's AS. But I just wanted to see the flexibility of route-maps and as-path access lists with communities. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2172674531507369971?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2172674531507369971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2172674531507369971&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2172674531507369971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2172674531507369971'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-no-export-community.html' title='BGP no-export community'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2395133530727910169</id><published>2009-02-08T15:53:00.000+05:30</published><updated>2009-02-08T15:54:04.849+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - External confedration peers'/><title type='text'>BGP - External confedration peers</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; It is important to remember when doing confederations that although external confederation peers behave like EBGP peers in several ways, they do NOT modify the next hop without manual configuration.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R4 --- [[R1---R3]---[R2]]---R5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R1, R2 and R3 are in AS#2 as far as R4 and R5 are concerned. But R1 and R3 share sub-AS 65013, and R2 is in sub-AS 65002. Confederations allow R3 to advertise routes learned from R1 to R2 and vice-versa. Without confederations, this would not happen because routes learned from IBGP neighbors do not get advertise to other IBGP neighbors.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Confederations allow this to happen but be careful with the next hop attribute. When R2 passes routes learned from R5 to R3, it will not modify the next hop, but instead leave it pointing to R5. You must use the next-hop-self argument on the neighbor command to allow R3 to install these routes (unless R3 has a route to the R2-R5 network).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Suppose the network in questions is 155.1.5.0/24. Here is the output of show ip bgp before the change:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp 155.1.5.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP routing table entry for 155.1.5.0/24, version 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Paths: (1 available, no best path)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Flag: 0x208&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Not advertised to any peer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  (65002) 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    155.1.0.5 (inaccessible) from 155.1.23.2 (155.1.23.2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 0, localpref 100, valid, external&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;And after the change:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R3#show ip bgp 155.1.5.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;BGP routing table entry for 155.1.5.0/24, version 7&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Flag: 0x208&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Advertised to non peer-group peers:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;155.1.13.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;(65002) 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt; 155.1.23.2 from 155.1.23.2 (155.1.23.2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;   Origin IGP, metric 0, localpref 100, valid, external, best&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2395133530727910169?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2395133530727910169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2395133530727910169&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2395133530727910169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2395133530727910169'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-external-confedration-peers.html' title='BGP - External confedration peers'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8664730498752085668</id><published>2009-02-08T15:52:00.002+05:30</published><updated>2009-02-08T15:53:23.920+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Troubleshooting AS Paths with confederations'/><title type='text'>BGP - Troubleshooting AS Paths with confederations</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 51, 255);"&gt;   I ran into an issue while doing BGP confederations today. In the topology below, I was seeing sub-AS 65013 in the AS PATH on R5 for routes to VLAN4. I found out the problem but I decided to post this so if you ever see this issue, you can tell what it looks like.&lt;br /&gt;&lt;br /&gt;VLAN4--R4---[[R1---R3]---[R2]]---R5--VLAN5 and 58&lt;br /&gt;&lt;br /&gt;R4 = AS 3&lt;br /&gt;R1,R3 = sub-AS 65013, AS 2&lt;br /&gt;R2 = sub-AS 65002, AS 2&lt;br /&gt;R5 = AS 1&lt;br /&gt;&lt;br /&gt;VLAN4 = 204.1.12.0&lt;br /&gt;VLAN5 = 155.1.5.0&lt;br /&gt;VLAN58 = 155.1.58.0&lt;br /&gt;&lt;br /&gt;Study the outputs below. Notice that R5 still sees sub-AS 65013 in it's routes to R4. The AS PATH should be: 2 3. What is the error I made?&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;In the below output, R4 sees R5's VLAN coming from AS 1 and AS 2. There is no way of telling these come from condeferations.&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 20, local router ID is 4.4.4.4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.5.0/24     155.1.146.1                            0 2 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.58.0/24    155.1.146.1                            0 2 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 204.12.1.0       0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;R1 sees both of R5's VLANS as coming from AS 1 and sub-AS 65002. R1 is confederation peer with sub-AS 65002.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 8, local router ID is 155.1.146.1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;i155.1.5.0/24     155.1.23.2               0    100      0 (65002) 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;i155.1.58.0/24    155.1.23.2               0    100      0 (65002) 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 204.12.1.0       155.1.146.4              0             0 3 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;R3 sees the same thing as R1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 8, local router ID is 155.1.37.3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.5.0/24     155.1.23.2               0    100      0 (65002) 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.58.0/24    155.1.23.2               0    100      0 (65002) 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;i204.12.1.0       155.1.13.1               0    100      0 3 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;R2 sees R5's vlan as originating from AS 1. It also sees R4's VLAN as coming from AS 3 and AS 65013 - not sure why there isn't parenthesis around 65013 in this case...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#sho ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 4, local router ID is 155.1.23.2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.5.0/24     155.1.0.5                0             0 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.58.0/24    155.1.0.5                0             0 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 204.12.1.0       155.1.13.1               0    100      0 65013 3 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Here are R5 sees R4's VLAN as coming throigh AS 3 65013 and then from AS 2. Why is 65013 appearing?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 22, local router ID is 5.5.5.5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.5.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.58.0/24    0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 204.12.1.0       155.1.0.2                              0 2 65013 3 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;It turns out the error was on R3:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 65013&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no synchronization&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp log-neighbor-changes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp confederation peers 65002&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 155.1.13.1 remote-as 65013&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 155.1.23.2 remote-as 65002&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I dont have a bgp confederation identifier!&lt;br /&gt;&lt;br /&gt;Let's fix it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#router bgp 65013&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-router)#bgp confederation identifier 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's much better:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show  ip bg&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 24, local router ID is 5.5.5.5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.5.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 155.1.58.0/24    0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 204.12.1.0       155.1.0.2                              0 2 3 i&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8664730498752085668?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8664730498752085668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8664730498752085668&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8664730498752085668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8664730498752085668'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-troubleshooting-as-paths-with.html' title='BGP - Troubleshooting AS Paths with confederations'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8603258938089439819</id><published>2009-02-08T15:52:00.001+05:30</published><updated>2009-02-08T15:52:36.077+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Aggregation with advertise-map'/><title type='text'>BGP - Aggregation with advertise-map</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; R1,R2 and R3 connect to R5 via Frame-relay&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R1-\&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R2---R5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R3-/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;These 3 spokes are EBGP peers with R5.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;These routes are advertised into bgp:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R1, loopback 150.1.1.1 AS1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R2, loopback 150.1.2.2 AS2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R3, loopback 150.1.3.3 AS3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R5, loopback 150.1.5.5 AS5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Here are R3's and R5's BGP table before any aggregation:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.1.0/24     155.1.0.1                0             0 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.2.0/24     155.1.0.2                0             0 2 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.3.0/24     155.1.0.3                0             0 3 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.5.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.1.0/24     155.1.0.1                              0 5 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.2.0/24     155.1.0.2                              0 5 2 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.3.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.5.0/24     155.1.0.5                0             0 5 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Suppose R5 wants to advertise a summary-only aggregate to R3:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R5(config)#router bgp 5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R5(config-router)#aggregate-address 150.1.0.0 255.255.248.0 as-set summary-only&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R3 will deny the route because of the as-set option which forces R5 to include the AS numbers as an unordered set in the AS PATH:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.3.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#debug ip bgp updates&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;00:37:37: BGP(0): 155.1.0.5 rcv UPDATE w/ attr: nexthop 155.1.0.5, origin i, aggregated by 5 150.1.5.5, originator 0.0.0.0, path 5 {1,2,3}, community , extended community&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;00:37:37: BGP(0): 155.1.0.5 rcv UPDATE about 150.1.0.0/21 -- DENIED due to: AS-PATH contains our own AS;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;We can have R5 remove R3's attributes (AS PATH) in the aggregate by using an advertise-map. This will allow R3 to recieve the aggregate.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;First we create a prefix-list to match the route:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#ip prefix-list R3 permit 150.1.3.0/24&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;The we create a route-map, note that we are denying the prefix. This means any matches will NOT have their attributes populated to the aggregate's attributes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#route-map DENY3 deny 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-route-map)#match ip address prefix-list R3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-route-map)#exit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#route-map DENY3 permit 20&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-route-map)#exit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Finally, we apply the advertise-map to the aggregate-address command under the bgp process:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#aggregate-address 150.1.0.0 255.255.248.0 as-set summary-only advertise-map DENY3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Here are the final results:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.0.0/21     0.0.0.0                            32768 {1,2} i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;s&gt; 150.1.1.0/24     155.1.0.1                0             0 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;s&gt; 150.1.2.0/24     155.1.0.2                0             0 2 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;s&gt; 150.1.3.0/24     155.1.0.3                0             0 3 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;s&gt; 150.1.5.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;00:46:26: BGP(0): 155.1.0.5 update run completed, afi 0, ran for 4ms, neighbor v&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ersion 35, start version 38, throttled to 38&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;00:46:26: BGP(0): 155.1.0.5 rcvd UPDATE w/ attr: nexthop 155.1.0.5, origin i, at&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;omic-aggregate, aggregated by 5 150.1.5.5, path 5 {1,2}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;00:46:26: BGP(0): 155.1.0.5 rcvd 150.1.0.0/21&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;00:46:26: BGP(0): Revise route installing 150.1.0.0/21 -&gt; 155.1.0.5 to main IP t&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;able&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.0.0/21     155.1.0.5                              0 5 {1,2} i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.1.3.0/24     0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Notice that the aggregate only has AS1 and AS2 in the AS PATH. This allows R3 to install the aggregate in it's BGP table. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8603258938089439819?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8603258938089439819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8603258938089439819&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8603258938089439819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8603258938089439819'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-aggregation-with-advertise-map.html' title='BGP - Aggregation with advertise-map'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5042356876875821545</id><published>2009-02-08T15:51:00.001+05:30</published><updated>2009-02-08T15:51:57.450+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Conditional Advertisement with non-exist-map'/><title type='text'>BGP - Conditional Advertisement with non-exist-map</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; It took me awhile to get this going for some reason but here is the doc that helped me out:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Configuring and Verifying the BGP Conditional Advertisement Feature&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Here's my example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;[R1]---[R4]---[R5]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Each router is in its own AS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R1 is advertising 10.1.0.0/16 to R4.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;if this route should fail, then R4 should advertise 4.4.4.0/24 to R5.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;If 10.1.0.0/16 appears in R4's BGP table, then it should stop advertising 4.4.4.0/24.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R4 is where the action is so let's have a look:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Loopback0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; ip address 4.4.4.4 255.255.255.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no synchronization&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp log-neighbor-changes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; network 4.4.4.0 mask 255.255.255.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 155.1.45.5 remote-as 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 155.1.45.5 advertise-map ADV non-exist-map NON&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 155.1.146.1 remote-as 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no auto-summary&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;access-list 10 permit 10.1.0.0 0.0.255.255&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;access-list 40 permit 4.4.4.0 0.0.0.255&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;route-map NON permit 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; match ip address 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;route-map ADV permit 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; match ip address 40&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;10.1.0.0 is actually the loopback network on R1 so we can test easy by shutting/no shutting the interface. Right now it is up. Let's check the BGP tables on R4 and R5:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R4#show ip bgp | begin Network&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;*&gt; 4.4.4.0/24       0.0.0.0                  0         32768 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;*&gt; 10.1.0.0/16      155.1.146.1              0             0 1 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R5#show ip bgp | begin Network&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;*&gt; 10.1.0.0/16      155.1.45.4                             0 4 1 i&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Now let's shut the interface on R1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#int lo 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-if)#shut&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Now check R4 and R5 again:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;R4#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.4.4.0/24       0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;R5#debug ip bgp updates&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;BGP updates debugging is on for address family: IPv4 Unicast&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;*Mar  1 01:59:35.787: BGP(0): 155.1.45.4 rcvd UPDATE w/ attr: nexthop 155.1.45.4, origin i, metric 0, path 4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;*Mar  1 01:59:35.791: BGP(0): 155.1.45.4 rcvd 4.4.4.0/24&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;*Mar  1 01:59:35.799: BGP(0): Revise route installing 1 of 1 routes for 4.4.4.0/24 -&gt; 155.1.45.4(main) to main IP table&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.4.4.0/24       155.1.45.4               0             0 4 i&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5042356876875821545?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5042356876875821545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5042356876875821545&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5042356876875821545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5042356876875821545'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-conditional-advertisement-with-non.html' title='BGP - Conditional Advertisement with non-exist-map'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-4406462551039911446</id><published>2009-02-08T15:50:00.000+05:30</published><updated>2009-02-08T15:51:12.849+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - expanded community-lists'/><title type='text'>BGP - expanded community-lists</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 51, 255);"&gt;   &lt;span style="font-size: 100%;"&gt;BGP expanded community-lists are more flexible than their standard counterparts because they can match on regexp instead of just a community string. Here you can see the differences:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config)#ip community-list standard STANDARD permit ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  &lt;1-4294967295&gt;    community number&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  aa:nn                      community number&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  internet                Internet (well-known community)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  local-AS                Do not send outside local AS (well-known community)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  no-advertise        Do not advertise to any peer (well-known community)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  no-export              Do not export to next AS (well-known community)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  &lt;cr&gt;&lt;/cr&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config)#ip community-list expanded EXPANDED permit ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  LINE              An ordered list as a regular-expression&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Now for a little lab. R1 and R2 are both going to EBGP peer with R4. R4 will then EBGP peer with R3. R1 and R2 will each send routes with different community strings to R4, along with routes without a community. We will use an expanded list to match certain community values. Hopefully, we can get it done with one permit statement.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;R1 has 4 loopback networks:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;1.0.0.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;1.0.1.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;1.0.2.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;1.0.3.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;R2 has 4 loopback networks:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;2.0.0.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;2.0.1.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;2.0.2.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;2.0.3.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;R1 is sending community 100 with its first two loopbacks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;R2 is sending community 200 with its first two loopbacks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;The other loopbacks do not have a community attached.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Here is how we do it on R1, R2 is similar:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#ip prefix-list LOOP1 permit 1.0.0.0/24&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#ip prefix-list LOOP1 permit 1.0.1.0/24&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#route-map setcom&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-route-map)#match ip address prefix LOOP1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-route-map)#set commu 100&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-route-map)#exit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#route-map setcom perm 20&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-route-map)#exit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#router bgp 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-router)#neighbor 172.12.14.4 send-community&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-router)#neighbor 172.12.14.4 route-map setcom out&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Verify on R4 (this shows R4 is receiving all loopbacks)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4#sho ip bgp | begin Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.0.0/24       172.12.14.1              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.1.0/24       172.12.14.1              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.2.0/24       172.12.14.1              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.3.0/24       172.12.14.1              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.0.0/24       172.12.24.2              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.1.0/24       172.12.24.2              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.2.0/24       172.12.24.2              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.3.0/24       172.12.24.2              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Here are the loopbacks with community attributes:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R4#show ip bgp community 100 | begin Net&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;*  1.0.0.0/24       172.12.14.1              0             0 65000 i&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;*  1.0.1.0/24       172.12.14.1              0             0 65000 i&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R4#show ip bgp community 200 | begin Net&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;*  2.0.0.0/24       172.12.24.2              0             0 65000 i&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;*  2.0.1.0/24       172.12.24.2              0             0 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Here is R3:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.1.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.2.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.3.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.1.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.2.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.3.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Now we will configure R4 to send only routes with community 100 or 200 to R3:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config)#ip community-list expanded EXPANDED permit [1-2]00&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config)#route-map filtercom&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config-route-map)#match community ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;1-99&gt;     Community-list number (standard)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;&lt;100-500&gt;  Community-list number (expanded)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;WORD       Community-list name&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config-route-map)#match community EXPANDED&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config-route-map)#exit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config)#router bgp 400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;span style="font-size: 85%;"&gt;R4(config-router)#neighbor 172.12.34.3 route-map filtercom out&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;Let's check on R3:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;3#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 66, local router ID is 3.3.3.3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;              r RIB-failure, S Stale&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.1.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.1.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 100%;"&gt;In this example the regexp string [1-2]00 matched either 100 or 200 an only allowed these routes through to R3.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-4406462551039911446?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/4406462551039911446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=4406462551039911446&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/4406462551039911446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/4406462551039911446'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-expanded-community-lists.html' title='BGP - expanded community-lists'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2211130654620275281</id><published>2009-02-08T15:49:00.001+05:30</published><updated>2009-02-08T15:49:56.785+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - prefix-based outbound route filtering'/><title type='text'>BGP - prefix-based outbound route filtering</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 0, 51);"&gt;   Prefix-based outbound route filtering is used so a local router can tell it's peer what routes it should send/filter. This prevents unnecessary resources from being used. There is no sense in a router sending a bunch of route updates, if they are only going to get filtered anyway.&lt;br /&gt;&lt;br /&gt;In this example we have EBGP peers R4 and R3:&lt;br /&gt;&lt;br /&gt;[R4]---[R3]&lt;br /&gt;&lt;br /&gt;R3 is receiving a bunch of routes from R4:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp&lt;/span&gt;  &lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.1.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.2.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.3.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.1.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.2.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.3.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 3.3.3.0/24       0.0.0.0                  0         32768 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.0.0.0/24       172.12.34.4              0             0 400 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.0.1.0/24       172.12.34.4              0             0 400 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.0.2.0/24       172.12.34.4              0             0 400 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.0.3.0/24       172.12.34.4              0             0 400 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R3 only wants to receive 3 routes:&lt;br /&gt;&lt;br /&gt;1.0.0.0/24&lt;br /&gt;2.0.0.0/24&lt;br /&gt;4.0.0.0/24&lt;br /&gt;&lt;br /&gt;R3 can create a prefix-list allowing these 3 routes only and advertise this to R4. R4 will use this list as a outbound filter. Let's configure it. First you need enable the advertisement of the orf capability. R3 is the one sending the prefix-list so use the send keyword. R4 is receiving the prefix-list.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#router bgp 65003&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-router)#neighbor 172.12.34.4 capability orf prefix-list send&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;R4(config)#router bgp 400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config-router)#neighbor 172.12.34.3 capability orf prefix-list receive&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now &lt;span style="font-size: 100%;"&gt;configure&lt;/span&gt; the prefix-list and apply it to the neighbor:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#ip prefix-list ZERO seq 5 permit 1.0.0.0/24&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#ip prefix-list ZERO seq 10 permit 2.0.0.0/24&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#ip prefix-list ZERO seq 15 permit 4.0.0.0/24&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config)#router bgp 65003&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3(config-router)#neighbor 172.12.34.4 prefix-list ZERO in&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#clear ip bgp * soft in prefix-filter&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;Here is the final result:&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 1.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.0.0.0/24       172.12.34.4                            0 400 65000 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 3.3.3.0/24       0.0.0.0                  0         32768 i&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 4.0.0.0/24       172.12.34.4              0             0 400 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here are some captures I took in dynamips. The first shows the advertisement of the orf capability. The second shows the actually prefix-list R3 is sending. Wireshark shows this as "route-refresh" message. Pretty cool, eh?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JlGUPVCvNQY/SHeKrXh7WYI/AAAAAAAAAB8/JLaN6vpKEbI/s1600-h/bgp+-+orf+capture1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JlGUPVCvNQY/SHeKrXh7WYI/AAAAAAAAAB8/JLaN6vpKEbI/s400/bgp+-+orf+capture1.JPG" alt="" id="BLOGGER_PHOTO_ID_5221794770614704514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JlGUPVCvNQY/SHeKwyXnj7I/AAAAAAAAACE/tXnVmfJRMg4/s1600-h/bgp+-+orf+capture2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JlGUPVCvNQY/SHeKwyXnj7I/AAAAAAAAACE/tXnVmfJRMg4/s400/bgp+-+orf+capture2.JPG" alt="" id="BLOGGER_PHOTO_ID_5221794863718567858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Restrictions:&lt;br /&gt;&lt;br /&gt;I used the bgp upgrade-cli command to configure these neighbors in AF mode.&lt;br /&gt;Also, prefix-lists must be used, not ACL or distribute lists&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2211130654620275281?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2211130654620275281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2211130654620275281&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2211130654620275281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2211130654620275281'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-prefix-based-outbound-route.html' title='BGP - prefix-based outbound route filtering'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JlGUPVCvNQY/SHeKrXh7WYI/AAAAAAAAAB8/JLaN6vpKEbI/s72-c/bgp+-+orf+capture1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6294241880530162749</id><published>2009-02-08T15:48:00.001+05:30</published><updated>2009-02-08T15:48:51.293+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - changing cluster-id'/><title type='text'>BGP - changing cluster-id</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; The network:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;[R3]---[R5]---[R4]---[EXTERNAL AS]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R3 is IBGP peer with R5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R5 is IBGP peer with R4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;R5 is the route reflector&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Here is the bgp entry for a route learned initially from R4:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R3#show ip bgp 6.0.0.0&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;BGP routing table entry for 6.0.0.0/24, version 5&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  Not advertised to any peer&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  65000&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;    4.4.4.4 (metric 2) from 5.5.5.5 (5.5.5.5)&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;      Origin IGP, metric 0, localpref 100, valid, internal, best&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;      Originator: 4.4.4.4, Cluster list: 5.5.5.5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Changing the cluster-id:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R5(config)#router bgp 345&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R5(config-router)#bgp cluster-id ?&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  &lt;1-4294967295&gt;  Route-Reflector Cluster-id as 32 bit quantity&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  A.B.C.D         Route-Reflector Cluster-id in IP address format&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R5(config-router)#bgp cluster-id 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Here's how the change looks on R3:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;R3#show ip bgp 6.0.0.0&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;BGP routing table entry for 6.0.0.0/24, version 9&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;Flag: 0x800&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  Not advertised to any peer&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;  65000&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;    4.4.4.4 (metric 2) from 5.5.5.5 (5.5.5.5)&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;      Origin IGP, metric 0, localpref 100, valid, internal, best&lt;/span&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: courier new; font-size: 85%;"&gt;      Originator: 4.4.4.4, Cluster list: 0.0.0.5&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6294241880530162749?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6294241880530162749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6294241880530162749&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6294241880530162749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6294241880530162749'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-changing-cluster-id.html' title='BGP - changing cluster-id'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-963288591909607978</id><published>2009-02-08T15:47:00.000+05:30</published><updated>2009-02-08T15:48:12.392+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - set clauses are ignored on reflected routes'/><title type='text'>BGP - set clauses are ignored on reflected routes</title><content type='html'>&lt;div style="text-align: justify; color: rgb(0, 0, 153);"&gt;   Network:&lt;br /&gt;&lt;br /&gt;R4,R5,R6 have serial interfaces connected to Frame cloud 172.14.45.0/24&lt;br /&gt;R3,R4,R5 have LAN interfaces connected to 172.12.34.0/24&lt;br /&gt;&lt;br /&gt;R6 has EBGP peering with R5 and R4, however R5 has R6 neighbor shutdown for now.&lt;br /&gt;R4 is connected to R5 via IBGP.&lt;br /&gt;R5 then connects to R3 via IBGP.&lt;br /&gt;R5 has R3 configured as a route-reflector client.&lt;br /&gt;R5 reflects routes learned from R4 to R3.&lt;br /&gt;R5 has the following config:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 345&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp cluster-id 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 3.3.3.3 remote-as 345&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 3.3.3.3 update-source Loopback0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; !&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; address-family ipv4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 3.3.3.3 activate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 3.3.3.3 send-community&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 3.3.3.3 route-reflector-client&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 3.3.3.3 route-map SET out&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ip prefix-list SIX seq 5 permit 6.0.0.0/24&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;route-map LOOPBACK permit 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; match ip address 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;route-map SET permit 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; match ip address prefix-list SIX&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; set community 500&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;route-map SET permit 20&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The community does not show up on R3:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp 6.0.0.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP routing table entry for 6.0.0.0/24, version 9&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Paths: (1 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Not advertised to any peer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    4.4.4.4 (metric 2) from 5.5.5.5 (5.5.5.5)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 0, localpref 100, valid, internal, best&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Originator: 4.4.4.4, Cluster list: 0.0.0.5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's peer R5 directly with R6 and see what happens:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 345&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 4.4.4.4 shutdown&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#no neighbor 172.14.45.6 shutdown&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Immediately the community shows up on R3:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R3#show ip bgp 6.0.0.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP routing table entry for 6.0.0.0/24, version 13&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Paths: (1 available, no best path)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Flag: 0x820&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Not advertised to any peer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.14.45.6 (inaccessible) from 5.5.5.5 (5.5.5.5)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 200, localpref 100, valid, internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Community: 500&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;I got this info while browsing the DocCD:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cisco.com/en/US/docs/ios/iproute/configuration/guide/irp_bgp_int_features_ps6350_TSD_Products_Configuration_Guide_Chapter.html#wp1054036"&gt;Configuring a Route Reflector&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;"&lt;span class="content"&gt;The use of &lt;b class="cBold"&gt;set&lt;/b&gt; clauses in outbound route maps can modify attributes and possibly create routing loops. To avoid this behavior, &lt;b class="cBold"&gt;set&lt;/b&gt; clauses of outbound route maps are ignored for routes reflected to iBGP peers."&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-963288591909607978?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/963288591909607978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=963288591909607978&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/963288591909607978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/963288591909607978'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-set-clauses-are-ignored-on.html' title='BGP - set clauses are ignored on reflected routes'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2157011266789633062</id><published>2009-02-08T15:46:00.001+05:30</published><updated>2009-02-08T15:46:51.818+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - deterministic-med and always-compare-med'/><title type='text'>BGP - deterministic-med and always-compare-med</title><content type='html'>&lt;div style="text-align: justify; color: rgb(0, 0, 153);"&gt;How the bgp deterministic-med Command Differs from the bgp always-compare-med Command&lt;br /&gt;&lt;br /&gt;In order to get the various routes to look right in the bgp table, it took some work. Here is a picture that helps explain it. I'm not gonna put addressing on it. If you want configs, let me know.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JlGUPVCvNQY/SHutT7h301I/AAAAAAAAACs/EITouwVZZAw/s1600-h/bgp+med+comparison.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JlGUPVCvNQY/SHutT7h301I/AAAAAAAAACs/EITouwVZZAw/s400/bgp+med+comparison.jpg" alt="" id="BLOGGER_PHOTO_ID_5222958750775104338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Our focus is on R1, it has 3 bgp entries to 3.3.3.0:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R1#show ip bgp 3.3.3.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;BGP routing table entry for 3.3.3.0/24, version 24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;Paths: (3 available, best #3, table Default-IP-Routing-Table)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;Advertised to non peer-group peers:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;172.12.12.2 172.12.14.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;400&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;172.12.12.2 from 172.12.12.2 (2.2.2.2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt; Origin IGP, metric 100, localpref 100, valid, internal&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;400&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;172.12.14.4 from 172.12.14.4 (4.0.3.4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt; Origin IGP, metric 150, localpref 100, valid, external&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;65003&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;172.12.13.3 from 172.12.13.3 (3.3.3.3)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt; Origin IGP, metric 200, localpref 100, valid, external, best&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R1#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Tiebreaker:&lt;br /&gt;1. entry1 and entry2 are compared, entry2 is picked because external &gt; internal&lt;br /&gt;2. entry2 and entry3 are compared, entry 3 picked because RID 3.3.3.3&lt;br /&gt;&lt;br /&gt;Now let's configre always-compare-med:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#router bgp 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-router)#bgp always-compare-med&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This command should allow entry1 to be picked over entry2 (lower MED), then entry1 will be preferred over entry3 (also lower MED):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;R1#show ip bgp 3.3.3.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;BGP routing table entry for 3.3.3.0/24, version 41&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;Paths: (3 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;Flag: 0x820&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;  Advertised to non peer-group peers:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;  172.12.13.3 172.12.14.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;  400&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;    172.12.12.2 from 172.12.12.2 (2.2.2.2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;      Origin IGP, metric 100, localpref 100, valid, internal, best&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;  400&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;    172.12.14.4 from 172.12.14.4 (4.0.3.4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;      Origin IGP, metric 150, localpref 100, valid, external&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;  65003&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;    172.12.13.3 from 172.12.13.3 (3.3.3.3)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;      Origin IGP, metric 200, localpref 100, valid, external&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It works!&lt;br /&gt;&lt;br /&gt;Notice that entries are compared in pairs. To get the pairs reordered you may have shut peers down and enable them accordingly. Example: I wanted the peers to appear in this order 4.0.3.4, 3.3.3.3, and 2.2.2.2. So I brought them up in reverse order: 2.2.2.2, 3.3.3.3, and finally 4.0.3.4. I just did a shut/no shut on the interface. Now I have:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp 3.3.3.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP routing table entry for 3.3.3.0/24, version 47&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Paths: (3 available, best #3, table Default-IP-Routing-Table)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Advertised to non peer-group peers:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  172.12.13.3 172.12.14.4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.14.4 from 172.12.14.4 (4.0.3.4)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 150, localpref 100, valid, external&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  65003&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.13.3 from 172.12.13.3 (3.3.3.3)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 200, localpref 100, valid, external&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.12.2 from 172.12.12.2 (2.2.2.2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 100, localpref 100, valid, internal, best&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice the best route is still from 2.2.2.2 because always-compare-med is enabled. Let's try bgp deterministic-med, without always compare-med. First reset bgp, then continue.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#router bgp 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R1(config-router)#no bgp always-compare-med&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-router)#bgp deterministic-med&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this case entry2 should be compared to entry3 with entry 2 winning based on lower MED (they are in the same AS so MED is compared). Then entry2 is compared to entry1, with entry1 winning because external bgp is preferred over internal. MED is not compared between these entries.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp 3.3.3.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP routing table entry for 3.3.3.0/24, version 11&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Paths: (3 available, best #1, table Default-IP-Routing-Table)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Advertised to non peer-group peers:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  172.12.12.2 172.12.14.4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  65003&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.13.3 from 172.12.13.3 (3.3.3.3)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 200, localpref 100, valid, external, best&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.12.2 from 172.12.12.2 (2.2.2.2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 100, localpref 100, valid, internal&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.14.4 from 172.12.14.4 (4.0.3.4)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 150, localpref 100, valid, external&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice in the above example that the entries are ordered in groups based on AS. I brough up 4.4.4.4 last, but it is showing up last with the other entry from AS400.&lt;br /&gt;&lt;br /&gt;The last example uses both bgp deterministic-med and bgp always-compare-med. In this case, entry2 should win with the lowest MED. This is the same as the last example except MED is used for comparison between entry1 and entry2.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp 3.3.3.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP routing table entry for 3.3.3.0/24, version 12&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Paths: (3 available, best #2, table Default-IP-Routing-Table)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Advertised to non peer-group peers:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  172.12.13.3 172.12.14.4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  65003&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.13.3 from 172.12.13.3 (3.3.3.3)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 200, localpref 100, valid, external&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.12.2 from 172.12.12.2 (2.2.2.2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 100, localpref 100, valid, internal, best&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  400&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;    172.12.14.4 from 172.12.14.4 (4.0.3.4)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;      Origin IGP, metric 150, localpref 100, valid, external&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2157011266789633062?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2157011266789633062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2157011266789633062&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2157011266789633062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2157011266789633062'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-deterministic-med-and-always.html' title='BGP - deterministic-med and always-compare-med'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JlGUPVCvNQY/SHutT7h301I/AAAAAAAAACs/EITouwVZZAw/s72-c/bgp+med+comparison.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6333624234530410890</id><published>2009-02-08T15:44:00.000+05:30</published><updated>2009-02-08T15:45:38.101+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - maximum-prefix command'/><title type='text'>BGP - maximum-prefix command</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 0, 51);"&gt;The network: [R5]---[R6]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R5 connects to R6 via EBGP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R5 is 172.14.45.5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6 is 172.45.45.6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6 is advertising 10 networks to R5:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R5#show ip bgp | inc 45\.6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.0.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.1.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.2.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.3.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.4.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.5.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.6.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.7.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.8.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 6.0.9.0/24       172.14.45.6              0             0 65000 i&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;I am going to play with a few options of the maximum-prefix command and see the effect. First let's configure a maximum of 8 routes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 maximum-prefix 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:45:41.467: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Down Maximum-Prefix restart timeout&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:46:10.519: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:46:11.919: %BGP-4-MAXPFX: No. of prefix received from 172.14.45.6 (afi 0) reaches 7, max 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:46:11.927: %BGP-3-MAXPFXEXCEED: No. of prefix received from 172.14.45.6 (afi 0): 9 exceed limit 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:46:11.931: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Down BGP Notification sent&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:46:11.931: %BGP-3-NOTIFICATION: sent to neighbor 172.14.45.6 3/1 (update malformed) 0 bytes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)# FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0058 0200 0000 1940 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;101 0040 0204 0201 FDE8 4003 04AC 0E2D 0680 0404 0000 0000 1806 0009 1806 0008 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;806 0007 1806 0006 1806 0005 1806 0004 1806 0003 1806 0002 1806 0001 1806 0000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Notice that the nighbor tried to come up after I configured the max. It never tried to come up again after going down the second time. Now the neighbor has the following output (much of the output is omitted):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;R5#show clock&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;.20:50:26.655 UTC Mon Jul 14 2008&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;R5#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp neighbor 172.14.45.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Peer had exceeded the max. no. of prefixes configured.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Maximum prefixes allowed 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Threshold for warning message 75%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Reduce the no. of prefix and clear ip bgp 172.14.45.6 to restore peering&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;We can also configure the router to try and establush the connection again after the max limit is reached and the connection is brought down:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 maximum-prefix 8 restart 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is a sample of the output, the connection tries to re-establish but then drops because the max-prefix limit is reached:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:53:16.779: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:53:16.811: %BGP-4-MAXPFX: No. of prefix received from 172.14.45.6 (afi 0) reaches 7, max 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:53:16.819: %BGP-3-MAXPFXEXCEED: No. of prefix received from 172.14.45.6 (afi 0): 9 exceed limit 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:53:16.823: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Down BGP Notification sent&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:53:16.827: %BGP-3-NOTIFICATION: sent to neighbor 172.14.45.6 3/1 (update malformed) 0 bytes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:54:15.999: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:54:16.011: %BGP-4-MAXPFX: No. of prefix received from 172.14.45.6 (afi 0) reaches 7, max 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:54:16.015: %BGP-3-MAXPFXEXCEED: No. of prefix received from 172.14.45.6 (afi 0): 9 exceed limit 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:54:16.023: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Down BGP Notification sent&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:54:16.023: %BGP-3-NOTIFICATION: sent to neighbor 172.14.45.6 3/1 (update malformed) 0 bytes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:55:41.311: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:55:41.355: %BGP-4-MAXPFX: No. of prefix received from 172.14.45.6 (afi 0) reaches 7, max 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:55:41.359: %BGP-3-MAXPFXEXCEED: No. of prefix received from 172.14.45.6 (afi 0): 9 exceed limit 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:55:41.363: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Down BGP Notification sent&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 20:55:41.367: %BGP-3-NOTIFICATION: sent to neighbor 172.14.45.6 3/1 (update malformed) 0 bytes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;We can also configure a percentage to give us a warning. Here we configure the percantge to 75 of 8 (6) while disabling 3 of the loopbacks on R6:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 maximum-prefix 8 7&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 21:00:08.226: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 21:00:08.234: %BGP-4-MAXPFX: No. of prefix received from 172.14.45.6 (afi 0) reaches 7, max 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;The connection stays up:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp summary&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;172.14.45.6     4 65000     186     177      224    0    0 00:00:33        7&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Lastly, we can configure a warning-only which doesn't bring down the connection:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 maximum-prefix 8 75 warning-only&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 21:01:53.614: %BGP-4-MAXPFX: No. of prefix received from 172.14.45.6 (afi 0) reaches 8, max 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 21:02:24.046: %BGP-3-MAXPFXEXCEED: No. of prefix received from 172.14.45.6 (afi 0): 9 exceed limit 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;The connection stays up:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp summary | be Ne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;172.14.45.6     4 65000     190     181      226    0    0 00:02:41        9&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6333624234530410890?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6333624234530410890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6333624234530410890&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6333624234530410890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6333624234530410890'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-maximum-prefix-command.html' title='BGP - maximum-prefix command'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-7241300895877395913</id><published>2009-02-08T15:43:00.002+05:30</published><updated>2009-02-08T15:44:12.181+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - local-as option'/><title type='text'>BGP - local-as option</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 51, 255);"&gt;   BGP local-as option allows a router to appear as if it is in another AS. Suppose we have a frame-relay cloud with 3 routers all EBGP peers with each other:&lt;br /&gt;&lt;br /&gt;R6: 172.14.45.6 (AS 65000)&lt;br /&gt;R5: 172.14.45.5 (AS 65005)&lt;br /&gt;R4: 172.14.45.4 (AS 345)&lt;br /&gt;&lt;br /&gt;We can configure R6 to use the local-as option to appear to be from AS 65006 to R5, but remain in AS65000 for R4. Here's how:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-router)#router bgp  65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-router)#neighbor 172.14.45.5 local-as 65006&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On R5:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R5(config-router)#neighbor 172.14.45.6 remote-as 65006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;Let's take a look at the neighbor summary:&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R5# show ip bgp summary | be Ne&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;172.14.45.6     4 65006     220     221      244    0    0 00:03:39        9&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R4#show ip bgp summary  | be Ne&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;172.14.45.6     4 65000     176     146       69    0    0 00:00:08       11&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice the different AS numbers. Also notice the AS path from R5's view:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5# show ip bgp | inc 172.14.45.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 6.0.3.0/24       172.14.45.6              0             0 65006 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 6.0.4.0/24       172.14.45.6              0             0 65006 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 6.0.5.0/24       172.14.45.6              0             0 65006 65000 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And the AS path from R6's view also includes the local-AS number:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show ip bgp | be Ne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop     Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.2.2.2/32       172.14.45.5                     0 65006 65005 65002 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 5.5.5.5/32       172.14.45.5       0             0 65006 65005 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The routes appear to magically pass through 65006. We can prevent R6 from prepending the local-as number on routes received from R6 with the no-prepend option&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config)#router bgp 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-router)#neighbor 172.14.45.5 local-as 65006 no-prepend&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;65006 is no longer in the AS Path:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show ip bgp | be Ne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop     Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 2.2.2.2/32       172.14.45.5                     0 65005 65002 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 5.5.5.5/32       172.14.45.5       0             0 65005 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With the replace-AS we can prevent R5's real BGP AS number from appearing in the AS path on routes from R6 to R5:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config)#router bgp 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-router)#neighbor 172.14.45.5 local-as 65006 no-prepend replace-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5# show ip bgp | be Ne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop     Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 6.0.3.0/24       172.14.45.6       0             0 65006 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 6.0.4.0/24       172.14.45.6       0             0 65006 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 6.0.5.0/24       172.14.45.6       0             0 65006 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Lastly, we can configure R6 to accept connections to either AS 65000 or AS 65006 with the dual-as option:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config)#router bgp 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-router)#neighbor 172.14.45.5 local-as 65006 no-prepend replace-as dual-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp summary&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;172.14.45.6     4 65006     268     284      343    0    0 00:00:08        9&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#conf t&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Enter configuration commands, one per line.  End with CNTL/Z.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 remote-as 65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 21:34:34.273: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Down Remote AS changed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 21:34:36.505: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#^Z&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp summary&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;172.14.45.6     4 65000     270     286        0    0    0 00:00:09        0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-7241300895877395913?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/7241300895877395913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=7241300895877395913&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7241300895877395913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7241300895877395913'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-local-as-option.html' title='BGP - local-as option'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-483529351792835675</id><published>2009-02-08T15:43:00.001+05:30</published><updated>2009-02-08T15:43:26.660+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - TTL security'/><title type='text'>BGP - TTL security</title><content type='html'>&lt;div style="text-align: justify; color: rgb(0, 0, 153);"&gt;   Suppose R5 and R6 are EBGP peers. Each send BGP packets with TTL of 1 to each other. They process any BGP packet with a TTL value of 1 or higher. So if an attacker wants to cause mayhem he can send tons of BGP packets to an edge router in a type of DoS attack and these packets will be processed no matter how far away the attacker is. With BGP TTL Security we can configure the router to expect to receive packets with higher TTL values. That way, an attacker more than the configured number of hops away, will never be able to DoS the router.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;On R6 we configure:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config)#router bgp  65000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-router)#neighbor 172.14.45.5 ttl-security hops 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After 3 minutes (BGP default time) without a keepalive, R6 drops the neighbor:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Mar  1 03:16:55.467: %BGP-5-ADJCHANGE: neighbor 172.14.45.5 Down BGP Notification sent&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Mar  1 03:16:55.467: %BGP-3-NOTIFICATION: sent to neighbor 172.14.45.5 4/0 (hold time expired) 0 bytes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The reason this happens is because after the TTL security command is configured, R6 will silently drop any packet with a TTL lower of 250 or lower. If it receives a packet with TTL 250, I think it will drop it according to my testing. How can we make R5 send packets with a TTL of 251? We can use TTL-security on that router to or use ebgp-multihop.&lt;br /&gt;&lt;br /&gt;In this case I use ebgp-multihop:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 ebgp-multihop 251&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 23:01:46.740: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this case we use TTL security on R5:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#router bgp 65005&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#no neighbor 172.14.45.6 ebgp-multihop 251&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-router)#neighbor 172.14.45.6 ttl-security hops 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After clearing the session:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jul 14 23:05:15.131: %BGP-5-ADJCHANGE: neighbor 172.14.45.6 Up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can verify like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show ip bgp neighbors 172.14.45.5 | inc TTL&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;(output omitted)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;External BGP neighbor may be up to 5 hops away.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Connection is ECN Disabled, Mininum incoming TTL 250, Outgoing TTL 255&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't know why ebgp-multihop didn't work with 250. Perhaps the router decrements it before processing and then sees 249 as the TTL. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-483529351792835675?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/483529351792835675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=483529351792835675&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/483529351792835675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/483529351792835675'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-ttl-security.html' title='BGP - TTL security'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-3193692113857443545</id><published>2009-02-08T15:42:00.001+05:30</published><updated>2009-02-08T15:42:52.313+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Neighbor discovery protocol'/><title type='text'>BGP - Neighbor discovery protocol</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R9 is connected to the same LAN as BB3. We need to peer with BB3 but we don't know the IP or the AS number of BB3.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;First, we can ping the broadcast address on the ethernet segment between R9 and BB3. This works best with only 1 other host. Otherwise we would have to resort to trial and error or some other means, maybe debug ip packet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9#ping 100.100.250.255&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 100.100.250.255, timeout is 2 seconds:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Reply to request 0 from 100.100.250.250, 4 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Reply to request 1 from 100.100.250.250, 1 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Reply to request 2 from 100.100.250.250, 1 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Now we know our peer ip, but we need to know the AS number. If you peer to the wrong AS, you can see the BB AS in message debug:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9(config)#router bgp 19999&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9(config-router)#neighbor 100.100.250.250 remote-as 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Aug 12 02:57:05.411: %BGP-3-NOTIFICATION: sent to neighbor 100.100.250.250 2/2 (peer in wrong AS) 2 bytes 0DE9&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 002D 0104 0DE9 00B4 6E0F 90C8 1002 0601 0400 0100 0102 0280 0002 0202 00&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here the neighbor is in AS 0DE9 (3561)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R9(config)#router bgp 19999                  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R9(config-router)#neighbor 100.100.250.250 remote-as&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*Aug 12 02:59:12.359: %BGP-5-ADJCHANGE: neighbor 100.100.250.250 Up &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-3193692113857443545?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/3193692113857443545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=3193692113857443545&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/3193692113857443545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/3193692113857443545'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-neighbor-discovery-protocol.html' title='BGP - Neighbor discovery protocol'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-7123999072731100514</id><published>2009-02-08T15:41:00.001+05:30</published><updated>2009-02-08T15:41:47.424+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - regexp practice part 1'/><title type='text'>BGP - regexp practice part 1</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 0, 51);"&gt; Using regexp with as-path access-list are one of the coolest features of BGP. The show ip bgp regexp command is good way to test your regular expression.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is what I have currently on R1's bgp table:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;R1#show ip bgp | be Ne&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.3.0.0/24     172.12.123.3             0             0 300 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.3.1.0/24     172.12.123.3             0             0 300 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.3.2.0/24     172.12.123.3             0             0 300 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.6.0.0/24     172.12.123.3                           0 300 600 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.6.1.0/24     172.12.123.3                           0 300 600 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.6.2.0/24     172.12.123.3                           0 300 600 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.6.3.0/24     172.12.123.3                           0 300 600 1000 1200 i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51);"&gt;*&gt; 100.6.4.0/24     172.12.123.3                           0 300 600 1000 1200 i&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Suppose I want to match routes that contain one AS or two AS but no more. I could do this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;R1#show ip bgp regexp ^[0-9]*$|^[0-9]*_[0-9]*$&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.3.0.0/24     172.12.123.3             0             0 300 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.3.1.0/24     172.12.123.3             0             0 300 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.3.2.0/24     172.12.123.3             0             0 300 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.6.0.0/24     172.12.123.3                           0 300 600 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.6.1.0/24     172.12.123.3                           0 300 600 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.6.2.0/24     172.12.123.3                           0 300 600 i&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;How about paths that only contain at least one 4-digit AS# (why? i have no clue but here's how)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;R1#show ip bgp regexp _[0-9][0-9][0-9][0-9]_&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.6.3.0/24     172.12.123.3                           0 300 600 1000 1200 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;*&gt; 100.6.4.0/24     172.12.123.3                           0 300 600 1000 1200 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-7123999072731100514?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/7123999072731100514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=7123999072731100514&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7123999072731100514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7123999072731100514'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-regexp-practice-part-1.html' title='BGP - regexp practice part 1'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6611405417167555201</id><published>2009-02-08T15:40:00.001+05:30</published><updated>2009-02-08T15:40:50.515+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Allowas-in with number of occurrences'/><title type='text'>BGP - Allowas-in with number of occurrences</title><content type='html'>&lt;div style="text-align: justify; color: rgb(51, 0, 51);"&gt;   I ran into this BGP issue on IPexpert volume 2 Lab 4 today. Cat 1 is in AS 500. There are 3 other ASes, but CAT1 needs to see all of these as AS8888. Confederations right? For 2 of the ASes that is right, but the task says NOT to use a sub-as for AS78. Here is the AS map:&lt;br /&gt;&lt;br /&gt;As500----As100----AS2456====AS78&lt;br /&gt;&lt;br /&gt;AS2456 has 2 connections (R5 and R6) to AS78 (R7).&lt;br /&gt;&lt;br /&gt;On R5 and R6 I have this ( I am allowed to use confederations on AS 2456):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 2456&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp confederation identifier 8888&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.7 remote-as 8888&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;on R7 I have this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 78&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.5 remote-as 8888&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.5 local-as 8888 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.5 allowas-in&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.6 remote-as 8888&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.6 local-as 8888 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.6 allowas-in&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Works great so far:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;R7#show ip bgp sum | be Neigh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;150.10.8.8      4    78      55      64       64    0    0 00:35:46        1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;150.20.56.5     4  8888     112     121       64    0    0 00:01:07        5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;150.20.56.6     4  8888     109     116       64    0    0 00:01:10        5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But notice the prefix I am learning from R8 (ibgp peer with R7). That prefix does not get installed by R5 and R6 because it has AS 8888 in the path. Here is the debug from R6:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#debug ip bgp update&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Oct 18 17:46:11.270: BGP(0): 150.20.56.7 rcv UPDATE about 200.200.200.0/24 -- DENIED&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6(config-rout due to: AS-PATH contains our own AS;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;How do we allow R6 and R5 to accept this route? By using "allowas-in" option of the neighbor command. However, because we don't want R6 to learn routes that passed from R5 to R7 we set a maximum on the number of occurrences of the AS, which is 1.&lt;br /&gt;&lt;br /&gt;R5 and R6:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 2456&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.20.56.7 allowas-in 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now here is the same debug on R6:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;*Oct 18 17:56:48.366: BGP(0): Revise route installing 1 of 1 routes for 200.200.200.0/24 -&gt; 150.20.56.7(main) to main IP table&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;Let's take a look at CAT1 in AS 500&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Cat1#show ip bgp | begin Net&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 200.200.200.0    150.20.110.1                           0 8888 8888 78 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is not good! We can get rid of AS 78 by doing this on R7:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R7(config)#router bgp 78&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R7(config-router)#neighbor 150.20.56.5 local-as 8888 no-prepend replace-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R7(config-router)#neighbor 150.20.56.6 local-as 8888 no-prepend replace-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's take a look:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;Cat1#show ip bgp | beg Net&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;*&gt; 200.200.200.0    150.20.110.1                           0 8888 8888 ?&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6611405417167555201?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6611405417167555201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6611405417167555201&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6611405417167555201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6611405417167555201'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-allowas-in-with-number-of.html' title='BGP - Allowas-in with number of occurrences'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-3594847918704853785</id><published>2009-02-08T15:39:00.000+05:30</published><updated>2009-02-08T15:40:07.952+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - peer session templates'/><title type='text'>BGP - peer session templates</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 0, 51);"&gt; I had a task to configure bgp timers on R2 for the peering session to R1. I was not to use "timers bgp" or any neighbor commands withe the word "timers". I immediately thought of peer-session templates which was something I came across while reading the DocCD one day. Here is how it works. We are on R2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config)#router bgp 2456&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config-router)#template ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  peer-policy   Template configuration for policy parameters&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  peer-session  Template configuration for session parameters&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config-router)#template peer-session TEMPLATE-R1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config-router-stmp)#timers 30 90&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config-router-stmp)#exit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config-router)#neighbor 150.21.21.1 inherit ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  peer-policy   Inherit a peer-policy template&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  peer-session  Inherit a peer-session template&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2(config-router)#neighbor 150.21.21.1 inherit peer-session TEMPLATE-R1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new; color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-3594847918704853785?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/3594847918704853785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=3594847918704853785&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/3594847918704853785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/3594847918704853785'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-peer-session-templates.html' title='BGP - peer session templates'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-33864693952135350</id><published>2009-02-08T15:37:00.000+05:30</published><updated>2009-02-08T15:38:37.990+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Debugging an E-BGP multihop'/><title type='text'>Debugging an E-BGP multihop</title><content type='html'>&lt;div style="text-align: center;"&gt; Debugging an E-BGP multihop scenario&lt;br /&gt;&lt;/div&gt;&lt;h3 class="post-title entry-title"&gt;&lt;/h3&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R5----R2----R6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R2 is the hub, all routers are in the 150.100.100.0/24 subnet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R2 = 150.100.100.2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R5 = 150.100.100.5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6 = 150.100.100.6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Please note that R2 has one multipoint subinterface connected to R5 and R6. Blogspot doesn't like text drawings so I must draw it like above.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;All routers are in sub-AS bgp confederations. R2 can only peer with one, and R5 and R6 must peer with each other.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;The peers will not come up without ebgp-multihop configured, but suppose we forgot that. What kind of debugging could we do to lead us to that conclusion?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;1) debug ip bgp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:46:18.587: BGP: 150.100.100.5 open active, local address 150.100.100.6&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:46:48.587: BGP: 150.100.100.5 open failed: Connection timed out; remote host not responding, open active delayed 29387ms (35000ms max, 28% jitter)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;This debug command shows us that BGP never completes the Active state. RFC 1771 tells us this about the Active state:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;"In this state BGP is trying to acquire a peer by initiating a transport protocol connection."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;So our TCP connection is not completing. Do you we have IP connectivity to R5? Sure:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R6#ping 150.100.100.5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;Sending 5, 100-byte ICMP Echos to 150.100.100.5, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 100/102/108 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R6#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;So now we can look higher up the protocol stack (e.g. filtering), or maybe the problem is still in the IP layer. In this case we have no ACL's applied.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;2) debug ip packet detail&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;What I am looking for here is some packets from R5, sourced from 150.100.100.5. Debugging shows that I am getting none! However it also shows that I am getting ICMP type 11 messages from R2 immediately after I send a packet to R5:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:51:44.539: IP: tableid=0, s=150.100.100.6 (local), d=150.100.100.5 (Serial0/1/0), routed via FIB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:51:44.539: IP: s=150.100.100.6 (local), d=150.100.100.5 (Serial0/1/0), len 44, sending&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:51:44.539:     TCP src=24713, dst=179, seq=1584149779, ack=0, win=16384 SYN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:51:44.563: IP: tableid=0, s=150.100.100.2 (Serial0/1/0), d=150.100.100.6 (Serial0/1/0), routed via RIB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:51:44.563: IP: s=150.100.100.2 (Serial0/1/0), d=150.100.100.6 (Serial0/1/0), len 56, rcvd 3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:51:44.563:     ICMP type=11, code=0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Seems that R2 is telling us something about our packet sent to R5.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;3) debug ip icmp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*May 25 04:53:23.839: ICMP: time exceeded rcvd from 150.100.100.2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here we get our answer. At this point we realize that our tcp syn packets sent to R5 have an IP TTL of 1, and thus are getting dropped by R2.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Do you know any other commands that would help you come to this conclusion? &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-33864693952135350?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/33864693952135350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=33864693952135350&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/33864693952135350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/33864693952135350'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/debugging-e-bgp-multihop.html' title='Debugging an E-BGP multihop'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8167159072608610501</id><published>2009-02-08T15:35:00.001+05:30</published><updated>2009-02-08T15:35:56.091+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - RIP failures and suppress-inactive'/><title type='text'>BGP - RIP failures and suppress-inactive</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1 [AS10] ----- R2 [AS256]------R6[AS256]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;The network between R2 and R6 is 150.100.100.0/24. This network is advertised into BGP on R6 but not R2. Because this is a connected route, R2 does not install it as a BGP route. It does receive the advertisement however and propagate it to R1.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is the R2 config:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#show run | sec router bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;router bgp 256&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no synchronization&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp log-neighbor-changes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; network 150.100.25.0 mask 255.255.255.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.100.12.1 remote-as 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.100.100.6 remote-as 256&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 150.100.100.6 route-reflector-client&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; no auto-summary&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is the R6 config:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R6#show run | sec router bgp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;router bgp 256&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; no synchronization&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; bgp log-neighbor-changes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; network 150.100.69.0 mask 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; network 150.100.96.0 mask 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; network 150.100.100.0 mask 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; neighbor 150.100.100.2 remote-as 256&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt; no auto-summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Here is R2's BGP table:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#show ip bgp | beg Network&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.25.0/24  0.0.0.0                  0         32768 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;i150.100.69.0/24  150.100.100.6            0    100      0 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;i150.100.96.0/24  150.100.100.6            0    100      0 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;r&gt;i150.100.100.0/24 150.100.100.6            0    100      0 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Notice the last entry has an 'r' next to it. This is not installed in the route table as a BGP route. It is already installed as connected. This is known as a RIB failure.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;But the route is advertised to R1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip route bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;     150.100.0.0/16 is variably subnetted, 7 subnets, 2 masks&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;B       150.100.96.0/24 [20/0] via 150.100.12.2, 00:05:25&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;B       150.100.100.0/24 [20/0] via 150.100.12.2, 00:05:25&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;B       150.100.69.0/24 [20/0] via 150.100.12.2, 00:05:25&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;B       150.100.25.0/24 [20/0] via 150.100.12.2, 00:05:25&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Now here's the tricky part. You can use the BGP suppress-inactive command to prevent RIB failures from getting advertised. But when I use it on R2 and R6 it doesn't work quite like I expected.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#show run | inc inac&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp suppress-inactive&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show run | inc inac&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; bgp suppress-inactive&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Notice here that R1 still has the 150.100.100.0 route from R2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#clear ip bgp *     &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Nov 23 13:59:37.379: %BGP-5-ADJCHANGE: neighbor 150.100.12.2 Down User reset&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Nov 23 13:59:38.039: %BGP-5-ADJCHANGE: neighbor 150.100.12.2 Up &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp        &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;BGP table version is 5, local router ID is 200.0.3.1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;              r RIB-failure, S Stale&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Origin codes: i - IGP, e - EGP, ? - incomplete&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.25.0/24  150.100.12.2             0             0 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.69.0/24  150.100.12.2                           0 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.96.0/24  150.100.12.2                           0 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.100.0/24 150.100.12.2                           0 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Anybody know how this command is supposed to work in preventing RIB failures from getting advertised in BGP? &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8167159072608610501?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8167159072608610501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8167159072608610501&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8167159072608610501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8167159072608610501'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-rip-failures-and-suppress-inactive.html' title='BGP - RIP failures and suppress-inactive'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-403394430477842361</id><published>2009-02-08T15:34:00.001+05:30</published><updated>2009-02-08T15:34:57.970+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Local AS notes'/><title type='text'>BGP - Local AS notes</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R6[AS256]-----R9[AS9999]=====BB3[AS3561]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;We will be looking at the BGP tables of R6 and BB3 as we test each option of the local-as neighbor configuration.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;1) LOCAL-AS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R9 has local-as configured with as 19999. R6 sees routes as follows, with 19999 in between BB2 and R9 real AS number.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9#show run | inc local-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 100.100.250.250 local-as 19999&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show ip bgp &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.0.0/22     150.100.96.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.16.0/20    150.100.96.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.32.0/22    150.100.96.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.48.0/22    150.100.96.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 19999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;BB3 sees routes from R9 in the same way, as if AS19999 was connected between itself and R9:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;CoreTech-BB3#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.25.0/24  100.100.250.9                          0 19999 9999 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.69.0/24  100.100.250.9                          0 19999 9999 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.91.0/24  100.100.250.9            0             0 19999 9999 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.96.0/24  100.100.250.9                          0 19999 9999 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;2) LOCAL-AS NO-PREPEND&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;With the no-prepend option, R6 does not see 19999 in the path:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;R9#show run | inc local-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 100.100.250.250 local-as 19999 no-prepend&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;R9#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show ip bgp      &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.0.0/22     150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.16.0/20    150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.32.0/22    150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*  102.0.48.0/22    150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;This command has no impact on the routes BB3 receives. They look the same.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;CoreTech-BB3#show ip bgp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.25.0/24  100.100.250.9                          0 19999 9999 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.69.0/24  100.100.250.9                          0 19999 9999 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.91.0/24  100.100.250.9            0             0 19999 9999 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 150.100.96.0/24  100.100.250.9                          0 19999 9999 256 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;3) LOCAL-AS NO-PREPEND REPLACE-AS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;With the Replace-as, everything looks the same as the last command on R6.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9#show run | inc local-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt; neighbor 100.100.250.250 local-as 19999 no-prepend replace-as&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R9#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;R6#show ip bgp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*  102.0.0.0/22     150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*  102.0.16.0/20    150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*  102.0.32.0/22    150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*  102.0.48.0/22    150.100.96.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 0, 51); font-size: 85%;"&gt;*&gt;                  150.100.69.9                           0 9999 3561 ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;However on BB3 we now see a difference as 9999 is no longer in the path.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;CoreTech-BB3#show ip bgp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 150.100.25.0/24  100.100.250.9                          0 19999 256 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 150.100.69.0/24  100.100.250.9                          0 19999 256 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 150.100.91.0/24  100.100.250.9            0             0 19999 i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*&gt; 150.100.96.0/24  100.100.250.9                          0 19999 256 i&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-403394430477842361?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/403394430477842361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=403394430477842361&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/403394430477842361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/403394430477842361'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-local-as-notes.html' title='BGP - Local AS notes'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5043689267246157518</id><published>2009-02-08T15:32:00.000+05:30</published><updated>2009-02-08T15:34:17.718+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - Conditional route injection'/><title type='text'>BGP - Conditional route injection</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R5----R7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R5 is advertising 10.34.19.0/26 to R7&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Configure R7 to inject 10.34.19.48/28&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-weight: bold;"&gt;1) MAKE PREFIX-LISTS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ip prefix-list EXIST seq 5 permit 10.34.19.0/26&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ip prefix-list INJECT 5 permit 10.34.19.48/28&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;ip prefix-list SOURCE seq 5 permit 192.168.5.5/32&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;2) MAKE ROUTE-MAPS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%; color: rgb(51, 0, 51);"&gt;route-map INJECT permit 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%; color: rgb(51, 0, 51);"&gt;set ip address prefix-list INJECT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%; color: rgb(51, 0, 51);"&gt;route-map EXIST permit 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%; color: rgb(51, 0, 51);"&gt;match ip address prefix-list EXIST&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%; color: rgb(51, 0, 51);"&gt;match ip route-source prefix-list SOURCE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;3) CONFIGURE BGP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;route bgp 567&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%; color: rgb(51, 0, 51);"&gt;&lt;span style="font-family: courier new;"&gt;bgp inject-map INJECT exist-map EXIST&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;4) VERIFY&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ip bgp nei 192.168.7.7  advertised-routes | begin Net&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;   Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt; 10.34.19.0/26    192.168.2.2              0    200      0 24 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R7#show ip bgp injected-paths | begin Net&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;  Network          Next Hop            Metric LocPrf Weight Path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*&gt;i10.34.19.48/28   192.168.5.5              0    200      0 24 1 i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Things to remember:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;- Must use Prefix-lists, NOT ACLs&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;- Injected route must a subset of am aggregate already in the table&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;- Use "set" command for inject-map, not "match"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;- I commonly forget the "prefix-list" argument when configuring the maps&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;- inject-map Command is a bgp command, not per-neighbor &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5043689267246157518?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5043689267246157518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5043689267246157518&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5043689267246157518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5043689267246157518'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-conditional-route-injection.html' title='BGP - Conditional route injection'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2376268435250724698</id><published>2009-02-08T15:31:00.000+05:30</published><updated>2009-02-08T15:32:33.620+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - fast-external-fallover'/><title type='text'>BGP - fast-external-fallover</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="color: rgb(51, 0, 51);"&gt; This feature allows the router to bring a BGP session down when the interface to that peer goes down. If you don't want this or are asked to not allow this to happen, you can disable it:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R1 has a neighbor:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R1#show ip bgp sum | be Ne&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;136.10.12.2     4   200     188     188       38    0    0 01:56:59        4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R1(config)#int f0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R1(config-if)#shut&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;*Dec  7 03:16:21.270: %BGP-5-ADJCHANGE: neighbor 136.10.12.2 Down Interface flap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;We can prevent R1 from tearing the session down by disabling fast-external-fallover:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp sum | be Ne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;136.10.12.2     4   200     196     194       50    0    0 00:00:03        4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config)#router bgp 100             &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-router)#no bgp fast-external-fallover &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-router)#int f0/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-if)#shut &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-if)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Dec  7 03:19:41.386: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;*Dec  7 03:19:42.386: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1(config-if)#^Z&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#show ip bgp sum | be Ne&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;136.10.12.2     4   200     196     194       54    0    0 00:00:50        4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Still up:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;R1#show ip bgp sum | be Ne&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51); font-family: courier new; font-size: 85%;"&gt;136.10.12.2     4   200     196     195       54    0    0 00:01:29        4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;Now the session will come down when the hold time expires.  Some things to remember:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;-Only works for directly-connected EBGP peers (hence the word "external" in the command)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;-I tested with ebgp-multihop peers and it does not have any effect&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;-Keepalives are use to bring session down&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;-Also configurable per-interface with &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 51);"&gt;ip bgp fast-external-fallover&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2376268435250724698?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2376268435250724698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2376268435250724698&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2376268435250724698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2376268435250724698'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-fast-external-fallover.html' title='BGP - fast-external-fallover'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2603140398727117342</id><published>2009-02-08T15:27:00.000+05:30</published><updated>2009-02-08T15:30:02.606+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP - AS_SET not used in AS Path length comparison'/><title type='text'>AS_SET not used in AS Path length comparison</title><content type='html'>&lt;div style="text-align: justify;"&gt;Routing TCP/IP says that AS_SET is not considered when determining shortest AS_PATH. So I decided to lab it and see for myself. R4 is learning the 192.168.0.0/16 aggregate from R5 and R7 each with differing AS_SET lengths.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#sho ip bgp | be Net&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   Network          Next Hop     Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*  192.168.0.0/16   192.168.47.7      0             0 7 {8,900} i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*&gt;                  192.168.45.5      0             0 5 {6,600,6000,3033} i&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The longest one is winning! AS_SET does count as 1 AS by the way.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#sho ip bgp 192.168.0.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;BGP routing table entry for 192.168.0.0/16, version 4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Paths: (2 available, best #2, table Default-IP-Routing-Table)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Flag: 0x820&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  Advertised to update-groups:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;     1         &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  7 {8,900}, (aggregated by 7 192.168.78.7)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    192.168.47.7 from 192.168.47.7 (192.168.78.7)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      Origin IGP, metric 0, localpref 100, valid, external&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  5 {6,600,6000,3033}, (aggregated by 5 192.168.56.5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    192.168.45.5 from 192.168.45.5 (192.168.56.5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      Origin IGP, metric 0, localpref 100, valid, external, best&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;All other things being equal it looks like the most recent path is winning. If we clear BGP on R5, R7 would be the most recent:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#clear ip bgp *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*Mar  1 01:34:11.475: %BGP-5-ADJCHANGE: neighbor 192.168.45.4 Down User reset&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*Mar  1 01:34:11.479: %BGP-5-ADJCHANGE: neighbor 192.168.56.6 Down User reset&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*Mar  1 01:34:11.667: %BGP-5-ADJCHANGE: neighbor 192.168.56.6 Up &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*Mar  1 01:34:12.287: %BGP-5-ADJCHANGE: neighbor 192.168.45.4 Up &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#sho ip bgp | be Net   &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   Network          Next Hop     Metric LocPrf Weight Path&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*  192.168.0.0/16   192.168.45.5      0             0 5 {6,600,6000,3033} i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;*&gt;                  192.168.47.7      0             0 7 {8,900} i&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2603140398727117342?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2603140398727117342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2603140398727117342&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2603140398727117342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2603140398727117342'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/asset-not-used-in-as-path-length.html' title='AS_SET not used in AS Path length comparison'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-345636928483314989</id><published>2009-02-08T15:26:00.000+05:30</published><updated>2009-02-08T15:27:09.556+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='NTP authentication'/><title type='text'>NTP authentication</title><content type='html'>&lt;div style="text-align: justify;"&gt;   This is scenario 3 dealing with NTP and in this post I will set up NTP authentication. Remember that the purpose is for the client to authenticate the server. First will make sure NTP is synchronized on the client. Next, we will turn on authentication on the client only until the clocks become unsynchronized. Finally, we will configure the server with the appropriate key and make sure the client is synchronized again.&lt;br /&gt;&lt;br /&gt;We use the same topology as the other NTP scenarios:&lt;br /&gt;R4, R5 and R6 connected via full mesh frame-relay on subnet 172.12.45.0/24&lt;br /&gt;&lt;br /&gt;Let's make sure R6, the master, is synchronized first:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R6#show clock&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;20:14:37.215 MDT Mon Jun 2 2008&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R6#show ntp status | inc Clock is&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Clock is synchronized, stratum 2, reference is 127.127.7.1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R4:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#show ntp status | in Clock&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Clock is synchronized, stratum 3, reference is 172.12.45.6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and R5:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5#show ntp status | inc Clock&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Clock is synchronized, stratum 3, reference is 172.12.45.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's configure authentication on R4:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config)#ntp authenticate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config)#ntp authentication-key 1 md5 cisco&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config)#ntp trusted-key 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4(config)#ntp server 172.12.45.6 key 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4#debug ntp validity&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;NTP peer validity debugging is on&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4#debug ntp authentication&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;NTP authentication debugging is on&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In a few moments we get these debug messages:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4(config)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Jun  3 03:24:49.759: NTP: packet from 172.12.45.6 failed validity tests 10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Jun  3 03:24:49.763: Authentication failed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4(config)#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What's strange is that R4 is still synchronized with R6:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#show ntp status&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Clock is synchronized, stratum 3, reference is 172.12.45.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So I waited about 10 minutes (it seemed that long) and now R4 is unsynchronized:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#show ntp status | inc Clock&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Clock is unsynchronized, stratum 16, no reference clock&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's configure NTP authentication on R6:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R6(config)#ntp authenticate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R6(config)#ntp authentication-key 1 md5 cisco&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On R4 I will set up some debugging, a lot of the output doesn't make much sense, but here it is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R4#debug ntp packets&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;NTP packets debugging is on&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;!! HERE R4 TRANSMITS A PACKET WITH AUTHENTICATION-KEY 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.711: NTP: xmit packet to 172.12.45.6:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.715:  leap 3, mode 3, version 3, stratum 0, ppoll 64&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.715:  rtdel 0D4E (51.971), rtdsp 05CD (22.659), refid AC0C2D06 (172.12.45.6)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.719:  ref CBEF37C1.C8A9606E (20:23:45.783 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.719:  org CBEF3A6A.BF8D3204 (20:35:06.748 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.723:  rec CBEF3A6A.C784D317 (20:35:06.779 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.723:  xmt CBEF3AAA.B614DB93 (20:36:10.711 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;.Jun  3 03:36:10.727:  Authentication key 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;!! HERE R4 RECEIVES A PACKET WITH AUTHENTICATION-KEY 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.771: NTP: rcv packet from 172.12.45.6 to 172.12.34.4 on FastEthernet0/1:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.775:  leap 0, mode 4, version 3, stratum 2, ppoll 64&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.779:  rtdel 0000 (0.000), rtdsp 0002 (0.031), refid 7F7F0701 (127.127.7.1)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.779:  ref CBEF3A89.50E1C8AB (20:35:37.315 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.783:  org CBEF3AAA.B614DB93 (20:36:10.711 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.783:  rec CBEF3AAA.C3941C78 (20:36:10.763 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.787:  xmt CBEF3AAA.C39DD400 (20:36:10.764 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;.Jun  3 03:36:10.791:  inp CBEF3AAA.C565D38F (20:36:10.771 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;.Jun  3 03:36:10.791:  Authentication key 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R4 is now synchronized:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R4#show ntp status&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Clock is synchronized, stratum 3, reference is 172.12.45.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;nominal freq is 250.0000 Hz, actual freq is 250.0004 Hz, precision is 2**18&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;reference time is CBEF3AAA.C565D38F (20:36:10.771 MDT Mon Jun 2 2008)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;clock offset is 22.8825 msec, root delay is 59.68 msec&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;root dispersion is 15897.92 msec, peer dispersion is 15875.02 msec&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's check R5 to see if it is still synchronized:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#show ntp status | inc Clock&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Clock is synchronized, stratum 3, reference is 172.12.45.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see, R5 is still synchronized because it is not requesting authentication from R6. R4 on the other sends the request with an authentication key and requires that the time-source, R6, does so as well.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-345636928483314989?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/345636928483314989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=345636928483314989&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/345636928483314989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/345636928483314989'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/ntp-authentication.html' title='NTP authentication'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-1015073464701698101</id><published>2009-02-08T15:25:00.000+05:30</published><updated>2009-02-08T15:26:14.320+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Allowing telnet to a non-standard port'/><title type='text'>Allowing telnet to a non-standard port</title><content type='html'>&lt;div style="text-align: justify;"&gt;   I didn't have time for any of the security tasks in Mock Lab 1. There were 3 for a total of 9 points. Again, the lab sessions run 7:45 and I had to load initial configs and eat dinner! Had I been able to use the full 8 hours, I am sure I would have gotten 1 or 2 of these tasks.&lt;br /&gt;&lt;br /&gt;Here is the gist of the first security task, 9.1:&lt;br /&gt;&lt;br /&gt;R9 should accept telnet on port 3005.&lt;br /&gt;It should not allow telnet on port 23.&lt;br /&gt;Configure a local user cisco with password of cisco and privilege level 15.&lt;br /&gt;Telnet should require a login, but console access should not&lt;br /&gt;&lt;br /&gt;I am going to use R5 as an example since I already have it up in Dynamips. First, to allow telnet on port 3005 use the rotary command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#username cisco privilege 15 password cisco&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#line vty 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#rotary 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#login local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next we create an ACL to block telnet to port 23:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R5(config)#access-list 101 deny tcp any any eq telnet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R5(config)#access-list 101 permit ip any any&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R5(config)#line vty 0 ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;  &lt;1-935&gt;  Last Line number&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;  &lt;cr&gt;&lt;/cr&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;cr&gt;&lt;/cr&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;cr&gt;R5(config)#line vty 0 935&lt;/cr&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;cr&gt;R5(config-line)#access-class 101 in&lt;/cr&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's try from R4:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R4#telnet 141.141.45.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;Trying 141.141.45.5 ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;% Connection refused by remote host&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R4#telnet 141.141.45.5 3005&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;Trying 141.141.45.5, 3005 ... Open&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;User Access Verification&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;Username: cisco&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R5#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we have already satisfied the last requirement right? "Telnet should require a login, but console access should not." But for some reason the proctor guide goes a step further and creates an aaa method for VTY while console uses the default. Here's what they have:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#aaa new-model&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#aaa authentication login VTY local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#aaa authentication login default none&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#line vty 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#login authentication VTY&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first command tells the router to enable the aaa commands. The second command defines a login list called VTY. Note that this is not used anywhere until it is applied in the last command. The third command configures that default login method to be "none" or no authentication. This method is applied to the console by default. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-1015073464701698101?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/1015073464701698101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=1015073464701698101&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1015073464701698101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1015073464701698101'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/allowing-telnet-to-non-standard-port.html' title='Allowing telnet to a non-standard port'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-7248292555255317263</id><published>2009-02-08T15:24:00.000+05:30</published><updated>2009-02-08T15:25:25.812+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PPP Authentication with MD5'/><title type='text'>PPP Authentication with MD5</title><content type='html'>&lt;h3 class="post-title entry-title"&gt; &lt;a href="http://ccietobe.blogspot.com/2009/01/ppp-authentication-with-md5.html"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h3&gt;   I had a task this weekend that asked to authenticate PPP via Md5. I did a context sensitive help and saw this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2(config-if)#ppp authentication ?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;chap        Challenge Handshake Authentication Protocol (CHAP)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;eap         Extensible Authentication Protocol (EAP)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ms-chap     Microsoft Challenge Handshake Authentication Protocol (MS-CHAP)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ms-chap-v2  Microsoft CHAP Version 2 (MS-CHAP-V2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;pap         Password Authentication Protocol (PAP)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family: georgia; font-size: 100%;"&gt;&lt;/span&gt;Doesn't look like there is an Md5 option...or is there? I looked up the ppp authentication commands in the DocCD:&lt;br /&gt;&lt;br /&gt;-12.4 Mainline&lt;br /&gt;-Master Index&lt;br /&gt;-Cisco IOS Master Command List, All Releases&lt;br /&gt;-ppp authentication MWP-147, SEC-1481&lt;br /&gt;&lt;br /&gt;Click the SEC-1481 link&lt;br /&gt;&lt;br /&gt;Now is where I used the browser search to look for "Md5." Not sure if this is possible in the lab so you may have to quickly scan with your eyes. The only hit comes up under "ppp eap local" command. You will see this phrase:&lt;br /&gt;&lt;br /&gt;"In local mode, the EAP session is authenticated using the MD5 algorithm and obeys the same authentication rules as does Challenge Handshake Authentication Protocol (CHAP)."&lt;br /&gt;&lt;br /&gt;Voila!&lt;br /&gt;&lt;br /&gt;So now that we know what mode we need everything else is easy, and it works just like CHAP. On both sides:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;username R5 password cisco&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ip address 150.100.25.2 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;encapsulation ppp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ppp authentication eap&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ppp eap password 0 cisco&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ppp eap local&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Always verify just to make sure it's working:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;R2#debug ppp authentication&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-7248292555255317263?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/7248292555255317263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=7248292555255317263&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7248292555255317263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7248292555255317263'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/ppp-authentication-with-md5.html' title='PPP Authentication with MD5'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6575074614618530797</id><published>2009-02-08T15:23:00.000+05:30</published><updated>2009-02-08T15:24:16.364+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BGP distance command&apos;s 3 arguments'/><title type='text'>BGP distance command's 3 arguments</title><content type='html'>&lt;div style="text-align: justify;"&gt;   In BGP configuration mode, the distance command has 3 arguments:&lt;br /&gt;&lt;br /&gt;R6(config-router)#distance bgp ?&lt;br /&gt; &lt;1-255&gt;  Distance for routes external to the AS&lt;br /&gt;&lt;br /&gt;R6(config-router)#distance bgp 13 ?&lt;br /&gt; &lt;1-255&gt;  Distance for routes internal to the AS&lt;br /&gt;&lt;br /&gt;R6(config-router)#distance bgp 13 26 ?&lt;br /&gt; &lt;1-255&gt;  Distance for local routes&lt;br /&gt;&lt;br /&gt;R6(config-router)#distance bgp 13 26&lt;br /&gt;&lt;br /&gt;External BGP and Internal BGP routes are easy enough to understand, but what exactly is the third option "local routes" for and when do you see it?&lt;br /&gt;&lt;br /&gt;Here is an example:&lt;br /&gt;&lt;br /&gt;R1#show run&lt;br /&gt;!&lt;br /&gt;interface Loopback10&lt;br /&gt;ip address 10.10.10.1 255.255.255.0&lt;br /&gt;!&lt;br /&gt;interface Loopback11&lt;br /&gt;ip address 11.11.11.11 255.255.255.0&lt;br /&gt;!&lt;br /&gt;router bgp 65000&lt;br /&gt;no synchronization&lt;br /&gt;distance bgp 13 26 8&lt;br /&gt;network 10.10.10.0 mask 255.255.255.0&lt;br /&gt;aggregate-address 10.0.0.0 254.0.0.0&lt;br /&gt;!&lt;br /&gt;R1#show ip route&lt;br /&gt;&lt;br /&gt;C       172.12.15.0 is directly connected, Serial1/1&lt;br /&gt;C       172.12.123.0 is directly connected, Serial1/0&lt;br /&gt;    10.0.0.0/24 is subnetted, 1 subnets&lt;br /&gt;C       10.10.10.0 is directly connected, Loopback10&lt;br /&gt;    11.0.0.0/24 is subnetted, 1 subnets&lt;br /&gt;C       11.11.11.0 is directly connected, Loopback11&lt;br /&gt;B    10.0.0.0/7 [8/0] via 0.0.0.0, 00:02:02, Null0&lt;br /&gt;&lt;br /&gt;The null route gets the "local route" distance when you configure aggregate routes.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6575074614618530797?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6575074614618530797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6575074614618530797&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6575074614618530797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6575074614618530797'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/bgp-distance-commands-3-arguments.html' title='BGP distance command&apos;s 3 arguments'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-4947869706911435314</id><published>2009-02-08T15:22:00.001+05:30</published><updated>2009-02-08T15:22:21.331+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IP Accounting for traffic violations'/><title type='text'>IP Accounting for traffic violations</title><content type='html'>&lt;div style="text-align: justify;"&gt;   R6 &lt;---FRAME---&gt; R5 &lt;----ETHERNET---&gt; R3&lt;br /&gt;&lt;br /&gt;First step is to create the ACL that blocks traffic. Here will block traffic (and configure accounting) for packets from R6 to R3. IP address 6.6.6.10 is a loopback on R6 being advertised into OSPF to R5 and on to R3. 3.3.3.3 is the loopback on R3.&lt;br /&gt;&lt;br /&gt;R5#show run | section access-list 101&lt;br /&gt;access-list 101 deny   ip host 6.6.6.10 host 3.3.3.3&lt;br /&gt;access-list 101 permit ip any any&lt;br /&gt;&lt;br /&gt;Apply the ACL to the interface where traffic is to be restricted. FastEthernet0/0 is the interface connected to R3's LAN interface. Enable accounting for access-violations on that interface with the command "ip accounting access-violations"&lt;br /&gt;&lt;br /&gt;R5#show run int f0/0&lt;br /&gt;Building configuration...&lt;br /&gt;&lt;br /&gt;Current configuration : 153 bytes&lt;br /&gt;!&lt;br /&gt;interface FastEthernet0/0&lt;br /&gt;ip address 172.12.34.5 255.255.255.0&lt;br /&gt;ip access-group 101 out&lt;br /&gt;ip accounting access-violations&lt;br /&gt;speed 100&lt;br /&gt;full-duplex&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Ping from R6 to verify that traffic is blocked:&lt;br /&gt;&lt;br /&gt;R6#ping 3.3.3.3 source 6.6.6.10&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:&lt;br /&gt;Packet sent with a source address of 6.6.6.10&lt;br /&gt;U.U.U&lt;br /&gt;Success rate is 0 percent (0/5)&lt;br /&gt;&lt;br /&gt;Verify accounting on R5:&lt;br /&gt;&lt;br /&gt;R5#show ip accounting access-violations&lt;br /&gt;Source           Destination              Packets               Bytes   ACL&lt;br /&gt;6.6.6.10         3.3.3.3                          6                 600   101&lt;br /&gt;&lt;br /&gt;Accounting data age is 4&lt;br /&gt;&lt;br /&gt;The output of the command shows how many packets (6) and bytes (600) were blocked as well as the ACL (101) that blocked them. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-4947869706911435314?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/4947869706911435314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=4947869706911435314&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/4947869706911435314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/4947869706911435314'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/ip-accounting-for-traffic-violations_08.html' title='IP Accounting for traffic violations'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5921633239332222511</id><published>2009-02-08T15:20:00.000+05:30</published><updated>2009-02-08T15:21:22.630+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IP Accounting for traffic violations'/><title type='text'>IP Accounting for traffic violations</title><content type='html'>&lt;div style="text-align: justify;"&gt;   R6 &lt;---FRAME---&gt; R5 &lt;----ETHERNET---&gt; R3&lt;br /&gt;&lt;br /&gt;First step is to create the ACL that blocks traffic. Here will block traffic (and configure accounting) for packets from R6 to R3. IP address 6.6.6.10 is a loopback on R6 being advertised into OSPF to R5 and on to R3. 3.3.3.3 is the loopback on R3.&lt;br /&gt;&lt;br /&gt;R5#show run | section access-list 101&lt;br /&gt;access-list 101 deny   ip host 6.6.6.10 host 3.3.3.3&lt;br /&gt;access-list 101 permit ip any any&lt;br /&gt;&lt;br /&gt;Apply the ACL to the interface where traffic is to be restricted. FastEthernet0/0 is the interface connected to R3's LAN interface. Enable accounting for access-violations on that interface with the command "ip accounting access-violations"&lt;br /&gt;&lt;br /&gt;R5#show run int f0/0&lt;br /&gt;Building configuration...&lt;br /&gt;&lt;br /&gt;Current configuration : 153 bytes&lt;br /&gt;!&lt;br /&gt;interface FastEthernet0/0&lt;br /&gt;ip address 172.12.34.5 255.255.255.0&lt;br /&gt;ip access-group 101 out&lt;br /&gt;ip accounting access-violations&lt;br /&gt;speed 100&lt;br /&gt;full-duplex&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Ping from R6 to verify that traffic is blocked:&lt;br /&gt;&lt;br /&gt;R6#ping 3.3.3.3 source 6.6.6.10&lt;br /&gt;&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:&lt;br /&gt;Packet sent with a source address of 6.6.6.10&lt;br /&gt;U.U.U&lt;br /&gt;Success rate is 0 percent (0/5)&lt;br /&gt;&lt;br /&gt;Verify accounting on R5:&lt;br /&gt;&lt;br /&gt;R5#show ip accounting access-violations&lt;br /&gt;Source           Destination              Packets               Bytes   ACL&lt;br /&gt;6.6.6.10         3.3.3.3                          6                 600   101&lt;br /&gt;&lt;br /&gt;Accounting data age is 4&lt;br /&gt;&lt;br /&gt;The output of the command shows how many packets (6) and bytes (600) were blocked as well as the ACL (101) that blocked them.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5921633239332222511?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5921633239332222511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5921633239332222511&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5921633239332222511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5921633239332222511'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/ip-accounting-for-traffic-violations.html' title='IP Accounting for traffic violations'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6988251168280619558</id><published>2009-02-08T15:19:00.001+05:30</published><updated>2009-02-08T15:19:58.886+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='NTP Access group'/><title type='text'>NTP Access group</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;a name="6528176292145964968"&gt;&lt;/a&gt;    I will call this NTP blog NTP Scenario 2: NTP with access-group filtering.&lt;br /&gt;&lt;br /&gt;R4, R5, and R6 are connected via full mesh frame-relay&lt;br /&gt;R6 will be the NTP server.&lt;br /&gt;&lt;br /&gt;In scenario 1 we set up R4 to sync to R6. In this scenario we&lt;br /&gt;will prevent R5 from syncing with R6 by using ntp access-group command.&lt;br /&gt;&lt;br /&gt;I have never used this command before, so I hope I am understanding it correctly. If not, please let me know how else to test this command.&lt;br /&gt;&lt;br /&gt;On R6 we have the following ACL:&lt;br /&gt;&lt;br /&gt;access-list 1 permit 172.12.45.4&lt;br /&gt;access-list 1 permit 127.127.7.1&lt;br /&gt;&lt;br /&gt;172.12.45.4 is the address of R4. 127.127.7.1 is the IP address that a cisco router uses as it's reference when you make the router an NTP master. This must be added to the ACL or it will become unsynchronized with itself.&lt;br /&gt;&lt;br /&gt;In global config mode we enter:&lt;br /&gt;&lt;br /&gt;ntp access-group serve-only 1&lt;br /&gt;&lt;br /&gt;Let's check the current times:&lt;br /&gt;&lt;br /&gt;R5#show clock&lt;br /&gt;16:15:04.031 UTC Sat May 31 2008&lt;br /&gt;&lt;br /&gt;R6#show clock&lt;br /&gt;16:31:45.687 UTC Sat May 31 2008&lt;br /&gt;&lt;br /&gt;R5 is about 15 minutes behind. I don't know a way to debug on R6 to make sure it's working, so what I will do is wait about 10 minutes then add R5's IP address to ACL. I think 10 minutes is sufficient to prove that R6 is not allowing R5 to sync to it.&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Well it's almost 20 minutes now. Let's check if R4 is synchronized:&lt;br /&gt;&lt;br /&gt;R4#show ntp status | inc Cloc&lt;br /&gt;Clock is synchronized, stratum 3, reference is 172.12.45.6&lt;br /&gt;&lt;br /&gt;How about R5:&lt;br /&gt;&lt;br /&gt;R5#sho ntp status | inc Clock&lt;br /&gt;Clock is unsynchronized, stratum 16, no reference clock&lt;br /&gt;&lt;br /&gt;Some quick show clocks:&lt;br /&gt;&lt;br /&gt;R4#show clock&lt;br /&gt;16:49:06.505 UTC Sat May 31 2008&lt;br /&gt;&lt;br /&gt;R5#show clock&lt;br /&gt;16:32:29.755 UTC Sat May 31 2008&lt;br /&gt;&lt;br /&gt;R6#show clock&lt;br /&gt;16:49:12.335 UTC Sat May 31 2008&lt;br /&gt;&lt;br /&gt;R5 is still unsynchronized and more than 15 minutes behind R6. Let's add R5's address to ACL 1 on R6 and see how long it takes to sync...&lt;br /&gt;&lt;br /&gt;R6(config)#access-list 1 permit 172.12.45.5&lt;br /&gt;&lt;br /&gt;We'll debug on R5:&lt;br /&gt;&lt;br /&gt;R5#debug ntp sync&lt;br /&gt;NTP clock synchronization debugging is on&lt;br /&gt;R5#sho ntp status | inc Clock&lt;br /&gt;Clock is unsynchronized, stratum 16, no reference clock&lt;br /&gt;R5#&lt;br /&gt;May 31 16:33:54.039: NTP: synced to new peer 172.12.45.6&lt;br /&gt;&lt;br /&gt;Took less than a minute!&lt;br /&gt;&lt;br /&gt;This is the second of many NTP scenarios to come. It really seems so simple, but I have always had problems understanding NTP server/peer relationships and authentication configurations. So these will be the topics of future NTP blogs. Hopefully I (and you!) will become NTP masters in time for CCIE :)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6988251168280619558?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6988251168280619558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6988251168280619558&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6988251168280619558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6988251168280619558'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/ntp-access-group.html' title='NTP Access group'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-911595777659935073</id><published>2009-02-08T15:18:00.001+05:30</published><updated>2009-02-08T15:18:47.928+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Priority-queuing in Action'/><title type='text'>Priority-queuing in Action</title><content type='html'>&lt;h3 style="text-align: justify;" class="post-title entry-title"&gt; &lt;/h3&gt;&lt;div style="text-align: justify;"&gt;   Too see how priotiy-queuing impacts traffic flows, I set up a small lab. R2, R3 and R4 connect to the same LAN as R5. R5 connects to R6. Each router has a loopback x.x.x.x where x is the router number.&lt;br /&gt;&lt;br /&gt;R2&lt;br /&gt;  \&lt;br /&gt;R3-------f0/0 R5 s1/1 ----R6&lt;br /&gt;  /&lt;br /&gt;R4&lt;br /&gt;&lt;br /&gt;On R5 we make 3 ACLs:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#access-list 102 permit icmp host 2.2.2.2 host 6.6.6.6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#access-list 103 permit icmp host 3.3.3.3 host 6.6.6.6&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#access-list 104 permit icmp host 4.4.4.4 host 6.6.6.6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we assign each ACL to a priority-list&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#priority-list 1 protocol ip high list 102&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#priority-list 1 protocol ip medium list 103&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#priority-list 1 protocol ip normal list 104&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assign the priority-list to the interface with the priority-group command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config)#int s1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R5(config-if)#priority-group 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's verify the priority queuing is working.&lt;br /&gt;&lt;br /&gt;Below we get a baseline and see that R3 normally gets an average round trip time of 34-38 ms for 200 pings. When R2 starts sending traffic, we can see the R3 round trip average (and max time) increase about 50%.&lt;br /&gt;&lt;br /&gt;R3 pings, R2 is silent:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R3#ping 6.6.6.6 source 3.3.3.3 repeat 200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Sending 200, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Packet sent with a source address of 3.3.3.3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Success rate is 100 percent (200/200), round-trip min/avg/max = &lt;span style="color: rgb(255, 0, 0);"&gt;4/34/188 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R3#ping 6.6.6.6 source 3.3.3.3 repeat 200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Sending 200, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Packet sent with a source address of 3.3.3.3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Success rate is 100 percent (200/200), round-trip min/avg/max = &lt;span style="color: rgb(255, 0, 0);"&gt;4/38/104 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R3 and R2 both send pings (I started sending 250 1200-byte packets from R2 first, then quickly hopped over to R3 and started the ping)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R3#ping 6.6.6.6 source 3.3.3.3 repeat 200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Sending 200, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Packet sent with a source address of 3.3.3.3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Success rate is 100 percent (200/200), round-trip min/avg/max = &lt;span style="color: rgb(255, 0, 0);"&gt;4/57/220 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R3#ping 6.6.6.6 source 3.3.3.3 repeat 200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Sending 200, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Packet sent with a source address of 3.3.3.3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Success rate is 100 percent (200/200), round-trip min/avg/max = &lt;span style="color: rgb(255, 0, 0);"&gt;8/66/368 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice how much higher the avg and max times are for R3 when R2 is pinging R6. We can see directly how priority-queuing impacts traffic flows. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-911595777659935073?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/911595777659935073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=911595777659935073&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/911595777659935073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/911595777659935073'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/priority-queuing-in-action.html' title='Priority-queuing in Action'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8508655098591684277</id><published>2009-02-08T15:17:00.002+05:30</published><updated>2009-02-08T15:18:08.841+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='R.E.F.L.E.C.T'/><title type='text'>R.E.F.L.E.C.T</title><content type='html'>&lt;div style="text-align: justify;"&gt;R1 --INSIDE--&gt; R4 --OUTSIDE--&gt; R5&lt;br /&gt;&lt;br /&gt;We are going to apply a reflexive ACL on R4 to permit outgoing telnet, web and ping traffic.&lt;br /&gt;&lt;br /&gt;Let's go to R4 and create our outbound ACL with the keyword "reflect" used to create our reflexive ACL.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config)#ip access-list extended OUTBOUND&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#permit tcp any any eq 23 reflect ?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;  WORD  Access-list name&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#permit tcp any any eq 23 reflect MIRROR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#permit tcp any any eq 80 reflect MIRROR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#permit icmp any any echo reflect MIRROR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#exit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next we "evaluate" the reflexive ACL on our inbound ACL (note that I am doing OSPF between R4 and R5 and I don't want the adjacency to break).&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config)#ip access-list extended INBOUND&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;R4(config-ext-nacl)#evaluate MIRROR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#permit ospf any any&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#deny ip any any log&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-ext-nacl)#exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config)#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Apply these ACLs inbound and outbound on your outside interface, in my case S1/0:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config)#int s1/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-if)#ip access-group INBOUND in&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4(config-if)#ip access-group OUTBOUND out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's do some telnetting from R1 to R5&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R1#telnet 155.1.5.5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Trying 155.1.5.5 ... Open&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;User Access Verification&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Username: cisco&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Flip over to R4 for Verification:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4#show ip access-lists MIRROR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Reflexive IP access list MIRROR&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;     permit tcp host 155.1.5.5 eq telnet host 155.1.4.4 eq 58347 (51 matches) (t&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;ime left 298)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's examine the ACL MIRROR, The source is our telnet destination (the device we are telnetting to). This ACL is being used inbound on our outside interface to allow return traffic. Also I should note that R4 is doing NAT, with 155.1.4.4 being the translated address of R1's actual interface address (10.0.0.1). So you can see reflexive ACL's are very neat because they automatically allow for return traffic while we filter inbound and outbound.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8508655098591684277?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8508655098591684277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8508655098591684277&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8508655098591684277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8508655098591684277'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/reflect.html' title='R.E.F.L.E.C.T'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2803619960897520060</id><published>2009-02-08T15:17:00.001+05:30</published><updated>2009-02-08T15:17:23.785+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='CBAC Example'/><title type='text'>CBAC Example</title><content type='html'>&lt;div style="text-align: justify;"&gt;   Context-Based access control is another way to dynamically modify access-lists on the fly to allow return traffic. Here we configure a simple example that allows FTP traffic as well as PING from inside to outside. First let's apply an ACL inbound on R4 serial 1/0 and see what happens we ping from R1 to R5:&lt;br /&gt;&lt;br /&gt;R1 --INSIDE--&gt; R4 s1/0 --OUTSIDE--&gt; R5&lt;br /&gt;&lt;br /&gt;On R4:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;ip access-list extended INBOUND&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; permit ospf any any&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; deny   ip any any log&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;interface Serial1/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; ip access-group INBOUND in&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now from R1:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R1#ping 155.1.5.5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Sending 5, 100-byte ICMP Echos to 155.1.5.5, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Success rate is 0 percent (0/5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R1#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now on R4 we add the following CBAC configuration:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;ip inspect name CBAC ftp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;ip inspect name CBAC tcp router-traffic&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;ip inspect name CBAC icmp router-traffic&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;interface Serial1/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; ip inspect CBAC out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now back to R1:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R1#ping 155.1.5.5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Sending 5, 100-byte ICMP Echos to 155.1.5.5, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 40/115/268 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R1#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Verify on R4 (Do this quick or the session will be gone)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4#show ip inspect sessions&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Established Sessions&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt; Session 659A79DC (10.0.0.1:8)=&gt;(155.1.5.5:0) icmp SIS_OPEN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R4#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I tried testing ftp but for some reason the "ftp-server enable" doesn't seem to exist in my IOS with is 12.4 ADVENT. Anyways, that should give you a quick idead of how CBAC is used to punch holes in ACLs for return traffic.&lt;br /&gt;&lt;br /&gt;Also remember that we DENY traffic INBOUND on the OUTSIDE interface if we want to inspect it in the OUTBOUND direction. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2803619960897520060?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2803619960897520060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2803619960897520060&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2803619960897520060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2803619960897520060'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/cbac-example.html' title='CBAC Example'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8740162955356910755</id><published>2009-02-08T15:16:00.001+05:30</published><updated>2009-02-08T15:16:48.557+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='TCP Intercept - Watch vs Intercept'/><title type='text'>TCP Intercept - Watch vs Intercept</title><content type='html'>&lt;div style="text-align: justify;"&gt;   TCP Intercept is used to prevent DoS attacks where the attacker tries to use up all the TCP resources by sending SYN packets and then never replying to the SYN-ACK (the source is spoofed which is why the attacker doesn't respond). Here we configure R4 to detect this attack and prevent it by dropping these "half-open" connections. I am not sure how to spoof an address from a Cisco router, so we'll just configure TCP intercept and do some monitoring.&lt;br /&gt;&lt;br /&gt;[R5]---[R4]---[R1]&lt;br /&gt;&lt;br /&gt;10.0.0.0 is the LAN address range between R1 and R4. We'll create an ACL that matches telnet traffic from R5 to R1. R1 in this case is the server we want to protect from the SYN Attack.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#access-list 100 permit tcp any 10.0.0.0 0.0.0.255 eq 23&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept ?&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  connection-timeout&lt;/span&gt;  Specify timeout for connection info&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  drop-mode&lt;/span&gt;           Specify incomplete connection drop mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  finrst-timeout&lt;/span&gt;      Specify timeout for FIN/RST&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  list&lt;/span&gt;                Specify access-list to use&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  max-incomplete&lt;/span&gt;      Specify maximum number of incomplete connections before clamping&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  mode&lt;/span&gt;                Specify intercepting mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  one-minute          &lt;/span&gt;Specify one-minute-sample watermarks for clamping&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  watch-timeout&lt;/span&gt;       Specify timeout for incomplete connections in watch mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept list 100&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept max-incomplete high 200&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept max-incomplete low 150&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept connection-timeout 60&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept drop-mode random&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Debugging and Verification:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#debug ip tcp intercept&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;TCP intercept debugging is on&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:33.866: INTERCEPT: new connection (155.1.45.5:31039 SYN -&gt; 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:33.874: INTERCEPT(*): (155.1.45.5:31039 &lt;- ACK+SYN 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:33.954: INTERCEPT: 1st half of connection is established (155.1.45.5:31039 ACK -&gt; 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:33.958: INTERCEPT(*): (155.1.45.5:31039 SYN -&gt; 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:34.034: INTERCEPT: 2nd half of connection established  (155.1.45.5:31039 &lt;- ACK+SYN 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:34.038: INTERCEPT(*): (155.1.45.5:31039 ACK -&gt; 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:28:34.042: INTERCEPT(*): (155.1.45.5:31039 &lt;- WINDOW 10.0.0.1:23)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't like the output above. I expected to see R4's address somewhere in the output since it is "intercepting" the connections. Perhaps I am misunderstanding this...both "halves" look the same to me.&lt;br /&gt;&lt;br /&gt;Anyways, here's a show command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#show tcp intercept connections&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Incomplete:&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Client                Server                State    Create   Timeout  Mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Established:&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Client                Server                State    Create   Timeout  Mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;155.1.45.5:31039      10.0.0.1:23           ESTAB    00:00:49 00:59:14 I&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's see what it looks like in watch mode:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4(config)#ip tcp intercept mode watch&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:30:58.082: INTERCEPT: new connection (155.1.45.5:12568 SYN -&gt; 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:30:58.182: INTERCEPT: (155.1.45.5:12568 &lt;- ACK+SYN 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;*Mar  1 06:30:58.310: INTERCEPT: (155.1.45.5:12568 ACK -&gt; 10.0.0.1:23)&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#show tcp intercept connections&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Incomplete:&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Client                Server                State    Create   Timeout  Mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Established:&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;Client                Server                State    Create   Timeout  Mode&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R4#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice that "show tcp intercept connections" only gives output when the router is in intercept mode. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8740162955356910755?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8740162955356910755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8740162955356910755&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8740162955356910755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8740162955356910755'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/tcp-intercept-watch-vs-intercept.html' title='TCP Intercept - Watch vs Intercept'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-27200511770413670</id><published>2009-02-08T15:14:00.000+05:30</published><updated>2009-02-08T15:15:56.117+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prefix-lists vs ACLs'/><title type='text'>Prefix-lists vs ACLs</title><content type='html'>&lt;a name="513595859113848956"&gt;&lt;/a&gt;    Many people prefer prefixes-lists over ACLs because they give you more preciseness over which routes to allow. This blogs goes over some examples between the two methods using RIP and distribute-lists.&lt;br /&gt;&lt;br /&gt;The Network:&lt;br /&gt;&lt;br /&gt;R1----R2----R3&lt;br /&gt;&lt;br /&gt;Each router is connected to its own LAN, call them LAN1,LAN2 and LAN3&lt;br /&gt;&lt;br /&gt;Addressing:&lt;br /&gt;&lt;br /&gt;R1-R2 = 12.0.0.0/8&lt;br /&gt;R2-R3 = 13.0.0.0/8&lt;br /&gt;LAN1 = 1.0.0.1/8&lt;br /&gt;LAN2 = 2.0.0.2/8&lt;br /&gt;LAN3 = 3.0.0.0/16&lt;br /&gt;&lt;br /&gt;R3 also has 4 loopbacks:&lt;br /&gt;&lt;br /&gt;3.1.0.3/16&lt;br /&gt;3.2.0.3/16&lt;br /&gt;3.3.0.3/16&lt;br /&gt;3.4.0.3/16&lt;br /&gt;&lt;br /&gt;RIP is enabled everywhere so that R1 has the following route table:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#show ip route | begin Ga&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Gateway of last resort is not set&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     1.0.0.0/16 is subnetted, 1 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C       1.0.0.0 is directly connected, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R    2.0.0.0/8 [120/2] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     3.0.0.0/16 is subnetted, 5 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.3.0.0 [120/1] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.2.0.0 [120/1] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.1.0.0 [120/1] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.0.0.0 [120/1] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.4.0.0 [120/1] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R    23.0.0.0/8 [120/1] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R    12.0.0.0/8 [120/2] via 13.0.0.3, 00:00:06, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C    13.0.0.0/8 is directly connected, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's say I create a prefix-list like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#ip prefix-list NET3 permit 3.0.0.0/8&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then apply the distribute list:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#distribute-list prefix NET3 out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R1 will have no routes to any of the 3 networks:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#  show ip route | begin Ga&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Gateway of last resort is not set&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     1.0.0.0/16 is subnetted, 1 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C       1.0.0.0 is directly connected, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C    13.0.0.0/8 is directly connected, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But if we use the same matching principle (3.0.0.0/8) in an ACL, then R3 has all the 3.0.0.0 routes:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#no distribute-list prefix NET3 out&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#access-list 3 permit 3.0.0.0 0.255.255.255&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#distribute-list 3 out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#clear ip route *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#  show ip route | begin Ga&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Gateway of last resort is not set&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     1.0.0.0/16 is subnetted, 1 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C       1.0.0.0 is directly connected, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     3.0.0.0/16 is subnetted, 5 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.3.0.0 [120/1] via 13.0.0.3, 00:00:01, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.2.0.0 [120/1] via 13.0.0.3, 00:00:01, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.1.0.0 [120/1] via 13.0.0.3, 00:00:01, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.0.0.0 [120/1] via 13.0.0.3, 00:00:01, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.4.0.0 [120/1] via 13.0.0.3, 00:00:01, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C    13.0.0.0/8 is directly connected, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The reason this happens is because prefix-lists match on the exact route subnet length unless the ge or le arguments are added. To make the prefix-list perform like the ACL we can do this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#no distribute-list 3 out&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#exit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#no ip prefix-list NET3 permit 3.0.0.0/8&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#ip prefix-list NET3 permit 3.0.0.0/8 ge 9&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#distribute-list prefix NET3 out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#clear ip route *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#  show ip route | begin Ga&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Gateway of last resort is not set&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     1.0.0.0/16 is subnetted, 1 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C       1.0.0.0 is directly connected, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     3.0.0.0/16 is subnetted, 5 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.3.0.0 [120/1] via 13.0.0.3, 00:00:00, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.2.0.0 [120/1] via 13.0.0.3, 00:00:00, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.1.0.0 [120/1] via 13.0.0.3, 00:00:00, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.0.0.0 [120/1] via 13.0.0.3, 00:00:00, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R       3.4.0.0 [120/1] via 13.0.0.3, 00:00:00, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C    13.0.0.0/8 is directly connected, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The prefix-lists matches the first 8 bits of a prefix and then matches any of those prefixes that have masks of 9 bits or longer. If we wanted the ACL to perform like the prefix-list we could do this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#access-list 13 permit 3.0.0.0 0.0.0.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config)#router rip&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#no distribute-list prefix NET3 out&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R3(config-router)#distribute-list 13 out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;R1#  show ip route | begin Ga&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Gateway of last resort is not set&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;     1.0.0.0/16 is subnetted, 1 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C       1.0.0.0 is directly connected, FastEthernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     3.0.0.0/16 is subnetted, 1 subnets&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;R       3.0.0.0 [120/1] via 13.0.0.3, 00:00:02, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;C    13.0.0.0/8 is directly connected, Serial1/1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now R1 has the route to 3.0.0.0, but notice it has no regard for the subnet length as the prefix-lists does. In other words, the above ACL 13 would match 3.0.0.0/8, 3.0.0.0/9, etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-27200511770413670?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/27200511770413670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=27200511770413670&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/27200511770413670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/27200511770413670'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/prefix-lists-vs-acls.html' title='Prefix-lists vs ACLs'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-4210914292664096505</id><published>2009-02-08T15:13:00.000+05:30</published><updated>2009-02-08T15:14:26.660+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ACL Allowing telnet to a non-standard port'/><title type='text'>ACL Allowing telnet to a non-standard port</title><content type='html'>Here is the gist of the first security task, 9.1:&lt;br /&gt;&lt;br /&gt;R9 should accept telnet on port 3005.&lt;br /&gt;It should not allow telnet on port 23.&lt;br /&gt;Configure a local user cisco with password of cisco and privilege level 15.&lt;br /&gt;Telnet should require a login, but console access should not&lt;br /&gt;&lt;br /&gt;I am going to use R5 as an example since I already have it up in Dynamips. First, to allow telnet on port 3005 use the rotary command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#username cisco privilege 15 password cisco&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#line vty 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#rotary 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#login local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next we create an ACL to block telnet to port 23:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R5(config)#access-list 101 deny tcp any any eq telnet&lt;br /&gt;R5(config)#access-list 101 permit ip any any&lt;br /&gt;R5(config)#line vty 0 ?&lt;br /&gt; &lt;1-935&gt;  Last Line number&lt;br /&gt; &lt;cr&gt;&lt;br /&gt;&lt;br /&gt;R5(config)#line vty 0 935&lt;br /&gt;R5(config-line)#access-class 101 in&lt;/cr&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's try from R4:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 204, 255); font-size: 85%;"&gt;R4#telnet 141.141.45.5&lt;br /&gt;Trying 141.141.45.5 ...&lt;br /&gt;% Connection refused by remote host&lt;br /&gt;&lt;br /&gt;R4#telnet 141.141.45.5 3005&lt;br /&gt;Trying 141.141.45.5, 3005 ... Open&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User Access Verification&lt;br /&gt;&lt;br /&gt;Username: cisco&lt;br /&gt;Password:&lt;br /&gt;R5#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we have already satisfied the last requirement right? "Telnet should require a login, but console access should not." But for some reason the proctor guide goes a step further and creates an aaa method for VTY while console uses the default. Here's what they have:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#aaa new-model&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#aaa authentication login VTY local&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#aaa authentication login default none&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config)#line vty 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R5(config-line)#login authentication VTY&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first command tells the router to enable the aaa commands. The second command defines a login list called VTY. Note that this is not used anywhere until it is applied in the last command. The third command configures that default login method to be "none" or no authentication. This method is applied to the console by default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-4210914292664096505?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/4210914292664096505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=4210914292664096505&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/4210914292664096505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/4210914292664096505'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/acl-allowing-telnet-to-non-standard.html' title='ACL Allowing telnet to a non-standard port'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5129372679416847714</id><published>2009-02-08T15:08:00.000+05:30</published><updated>2009-02-08T15:09:31.857+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ACL-Lock and Key'/><title type='text'>ACL - Lock and Key</title><content type='html'>Here is the example I am following, pretty much to a T, except I am doing BGP for routing protocol and the topology is different.&lt;br /&gt;&lt;br /&gt;Lock-and-Key: Dynamic Access Lists&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Here is my topology:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;[R1]----[R2]----[R3]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The goal is to prevent R1 from telnetting to R3 (172.12.23.3) unless it has authenticated to R2 first, via telnet. All configuration is on R2, but remember to configure your vty on R3.&lt;br /&gt;&lt;br /&gt;First create a username and password on R2&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config)#username test password test&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next setup the router to allow access once telnet session is established:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config)#line vty 0 4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config-line)#autocommand access-enable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config-line)#login local&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next create and apply the the ACL. Note that I am using BGP for a routing protocol and I need to allow that before anything else is configured.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config)#access-list 120 permit tcp any any eq bgp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config)#access-list 120 permit tcp any eq bgp any eq bgp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;R2(config)#access-list 120 dynamic testlist timeout 15 permit ip any any&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config)#access-list 120 permit tcp any host 172.12.12.2 eq telnet&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config)#int s1/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R2(config-if)#ip access-group 120 in&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's try to telnet to R1 from R3:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#telnet 172.12.23.3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Trying 172.12.23.3 ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;% Destination unreachable; gateway or host down&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's telnet to R2 first, notice that our session gets dropped immediately:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#telnet 172.12.12.2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Trying 172.12.12.2 ... Open&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;User Access Verification&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Username: test&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[Connection to 172.12.12.2 closed by foreign host]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's try and telnet to R3:&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;br /&gt;R1#telnet 172.12.23.3&lt;br /&gt;Trying 172.12.23.3 ... Open&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User Access Verification&lt;br /&gt;&lt;br /&gt;Password:&lt;br /&gt;R3&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Perfect! Some things to remember about lock and key are:&lt;br /&gt;&lt;br /&gt;1) always allow your routing protocol at the top (lines 1 and 2 of the ACL)&lt;br /&gt;2) allow telnet to the local router interface (line 4 of the above ACL)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5129372679416847714?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5129372679416847714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5129372679416847714&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5129372679416847714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5129372679416847714'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/acl-lock-and-key.html' title='ACL - Lock and Key'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-8000862849533493986</id><published>2009-02-08T15:07:00.000+05:30</published><updated>2009-02-08T15:08:24.614+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ACL-Even and Odd matching in ACLs'/><title type='text'>Even and Odd matching in ACLs</title><content type='html'>&lt;a href="http://ccietobe.blogspot.com/2008/09/even-and-odd-filtering-in-acls.html"&gt;&lt;/a&gt;&lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt;  The rest of this blog will just be examples with short explanations. I will use the word "match" as opposed to "permit" or "deny." Once you now the correct bit pattern you can just insert it into your ACL as necessary.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;1) Match the networks with an odd numbered 3rd octet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Starting off, we don't care about the first, second or third octets so we have:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;0.0.x.0 255.255.x.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The x will be for matching odd numbered networks. All odd numbered networks have one thing in common, they have a 1 in the right-most bit. So now we have:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;0.0.1.0 255.255.x.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we need to make sure our wildcard mask matches all networks with a 1 in the right-most bit. In other words, we "care" to match this bit. We don't care about any other bits in this octet so we set them to 1. Now we have:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;0.0.1.0 255.255.254.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;2) Match all even networks in the 3rd octect.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What do all even-numbered networks have in common? A 0 in the right-most bit. So we have:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;0.0.0.0 255.255.254.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;3) Match odd numbered-networks in the second octet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Same as example 1 except we are in the 2nd octet.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;0.1.0.0 255.254.255.255&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-8000862849533493986?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/8000862849533493986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=8000862849533493986&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8000862849533493986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/8000862849533493986'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/even-and-odd-matching-in-acls.html' title='Even and Odd matching in ACLs'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-3767146113837116482</id><published>2009-02-08T15:06:00.000+05:30</published><updated>2009-02-08T15:07:03.112+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ACL-Extended ping with TOS byte'/><title type='text'>Extended ping with TOS byte</title><content type='html'>Here is the scenario:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R2---R6---R7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R6 is only supposed to allow traffic with an IP precedence level of critical to R7. Easy right? Well with extended ping you can verify that it is working.&lt;br /&gt;&lt;br /&gt;On R6 we the following ACL applied to the interface towards R7:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;access-list 101 permit ospf any any&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;access-list 101 permit ip any any precedence critical log&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;access-list 101 deny   ip any any log&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The only traffic being allowed is ospf to maintain the adjacency with R7 and "critical" IP traffic.&lt;br /&gt;&lt;br /&gt;For our extended ping we need to find the hex value of the critical precedence. Critical is precedence 5 which in the ToS byte would break out to &lt;span style="font-weight: bold;"&gt;101 000 00.&lt;/span&gt; We can align it like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1010 0000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is equal to hex value 0xA0 (the first four bits are 10 which is A, the last 4 are 0). So here is our first ping which fails:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R2#ping 150.100.220.7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 150.100.220.7, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;U.U.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 0 percent (0/4)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we send the extended ping with ToS value 0xA0&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;R2#ping&lt;br /&gt;Protocol [ip]:&lt;br /&gt;Target IP address: 150.100.220.7&lt;br /&gt;Repeat count [5]:         &lt;br /&gt;Datagram size [100]:&lt;br /&gt;Timeout in seconds [2]:&lt;br /&gt;Extended commands [n]: y&lt;br /&gt;Source address or interface:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Type of service [0]: 0xA0&lt;/span&gt;&lt;br /&gt;Set DF bit in IP header? [no]:&lt;br /&gt;Validate reply data? [no]:&lt;br /&gt;Data pattern [0xABCD]:&lt;br /&gt;Loose, Strict, Record, Timestamp, Verbose[none]:&lt;br /&gt;Sweep range of sizes [n]:&lt;br /&gt;Type escape sequence to abort.&lt;br /&gt;Sending 5, 100-byte ICMP Echos to 150.100.220.7, timeout is 2 seconds:&lt;br /&gt;!!!!!&lt;br /&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 16/18/20 ms&lt;br /&gt;R2#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;On R6 we can verify the matches:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R6#show access-lists 101&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Extended IP access list 101&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    10 permit ospf any any (1 match)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;    20 permit ip any any precedence critical log (5 matches)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    30 deny ip any any log (44 matches)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-3767146113837116482?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/3767146113837116482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=3767146113837116482&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/3767146113837116482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/3767146113837116482'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/extended-ping-with-tos-byte.html' title='Extended ping with TOS byte'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2527792519150964259</id><published>2009-02-08T15:05:00.001+05:30</published><updated>2009-02-08T15:05:57.262+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ACL-Making a VLAN IPv6'/><title type='text'>Making a VLAN IPv6</title><content type='html'>Here is the simple topology for this lab. R1 and R2 are on VLAN 12. VLAN12 needs to be IPv6 only. We test this my assigning IPv4 and IPv6 addresses to both routers and then pinging.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;R1---SW1---SW2---R2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;R1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;IPv4: 192.168.12.1/24&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;IPv6: 2001::1/64&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;R2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;IPv4: 192.168.12.2/24&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;IPv6: 2001::2/64&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Making a vlan IPv6 only requires more configuration than I previously thought. This was my first attempt. On all switches:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;mac access-list extended IPv6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; permit any any 0x86DD 0x0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;vlan access-map IPv6only 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; action forward&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; match mac address IPv6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;vlan filter IPv6only vlan-list 12&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So R1 pings R2:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 192.168.12.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 0 percent (0/5)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 192.168.12.2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But wait, let's remove the filter, ping, add the filter back, and ping again.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW1(config)#no vlan filter IPv6only vlan-list 12&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 192.168.12.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW1(config)#vlan filter IPv6only vlan-list 12&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 192.168.12.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R1 can still ping. What happened? Well the original filter wasn't blocking IP, it was only blocking ARP packets. Remember MAC access-lists do not have an implicit deny for the IP ethertype but they do have an implicit deny for all the other ethertypes. So once we removed the filter and allowed ARP through, R1 was able to ping R2 when the filtered was applied.&lt;br /&gt;&lt;br /&gt;To make the vlan IPv6 only I had to specify a drop action in an empty access-map statement:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW1(config)#vlan access-map IPv6only 20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW1(config-access-map)# action drop&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 192.168.12.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 0 percent (0/5)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But wait, let's check out spanning-tree:&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;&lt;br /&gt;SW1#sho spanning-tree vlan 12 | inc root&lt;br /&gt;          This bridge is the root&lt;br /&gt;SW2#show spanning-tree vlan 12 | inc root&lt;br /&gt;          This bridge is the root&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is bad because both switches forward out all ports when they think they are root. If we had multiple links between these switches, we would have a loop. You may start seeing these messages:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW2# &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;01:28:49: %SW_MATM-4-MACFLAP_NOTIF: Host 00b0.6410.3901 in vlan 12 is flapping between port Fa0/13 and port Fa0/14&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;01:28:49: %SW_MATM-4-MACFLAP_NOTIF: Host 0007.eb14.4f81 in vlan 12 is flapping between port Fa0/13 and port Fa0/14&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We need to allow STP bpdu's in our original MAC access-list. Do this now:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;SW1(config)#mac access-list extended IPv6&lt;br /&gt;SW1(config-ext-macl)#permit any any lsap 0xAAAA 0x0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we see SW2 blocking on the port f0/14 (for VLANs 1 and 12):&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;SW2#sho span | inc BLK&lt;br /&gt;Fa0/14              Altn BLK 19        128.16   P2p&lt;br /&gt;Fa0/14              Altn BLK 19        128.16   P2p &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Verify R1 can ping R2 via IPv6 and not IPv4:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 192.168.12.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 0 percent (0/5)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#ping 2001::2     &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;R1#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I used 0xAAAA because this what lsap type PVST uses. I don't know where I got this but I think I saw it on GS somehwere. I have also seen 0x4242 used but I think this is for normal STP (802.1d). In any case, only the 0xAAAA worked for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-2527792519150964259?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/2527792519150964259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=2527792519150964259&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2527792519150964259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/2527792519150964259'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/making-vlan-ipv6.html' title='Making a VLAN IPv6'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-6477926428225490418</id><published>2009-02-08T15:02:00.000+05:30</published><updated>2009-02-08T15:04:35.992+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='VLAN-Finding out port numbers'/><title type='text'>Finding out port numbers with NBAR show commands</title><content type='html'>I had a filtering task that said to allow H323 Traffic to a specific vlan. Well...what ports does H323 use? I could not find it on the DocCD but I remembered a show command that will let us know:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 100%;"&gt;&lt;span style="font-family: courier new;"&gt;R1#sho ip nbar port-map h323 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;port-map h323       udp 1300 1718 1719 1720 11720 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;port-map h323       tcp 1300 1718 1719 1720 11000 - 11999 &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-6477926428225490418?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/6477926428225490418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=6477926428225490418&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6477926428225490418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/6477926428225490418'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/finding-out-port-numbers-with-nbar-show.html' title='Finding out port numbers with NBAR show commands'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-5119629059108040333</id><published>2009-02-08T14:58:00.000+05:30</published><updated>2009-02-08T14:59:49.430+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='3560 QoS DSCP mutation'/><title type='text'>3560 QoS DSCP mutation</title><content type='html'>&lt;span style="color: rgb(51, 0, 51); font-weight: bold;"&gt;Here is the topology (it's a mutated iewb topology)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 51);"&gt;R4====SW2====SW1====SW3---[int vlan 201,202]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;R4 is trunk link carrying vlan 201,202:&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;interface Ethernet0/0.201&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; encapsulation dot1Q 201&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; ip address 155.1.201.4 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;interface Ethernet0/0.202&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; encapsulation dot1Q 202&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; ip address 155.1.202.4 255.255.2550&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SW3 has two SVIs:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;interface Vlan201&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; ip address 155.1.201.9 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;interface Vlan202&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; ip address 155.1.202.9 255.255.255.0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Other links are all dot1q trunks passing vlan 201 and 202.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. SET UP SW2 TO CLASSIFY AND MARK&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;mls qos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;access-list 1 permit 155.1.201.0 0.0.0.255&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;access-list 2 permit 155.1.202.0 0.0.0.255&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;class-map match-all VLAN202&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;  match access-group 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;class-map match-all VLAN201&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;  match access-group 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;policy-map MARK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;  class VLAN201&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;   set precedence 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;  class VLAN202&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;   set precedence 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;interface FastEthernet0/4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt; service-policy input MARK&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. ON SW3 TRUST AND MONITOR QOS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;mls qos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;int f0/13         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; mls qos trust dscp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; mls qos monitor dscp 0 8 16 24 32 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW3# show mls qos int f0/13 st&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;FastEthernet0/13&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Ingress&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  dscp: incoming   no_change  classified policed    dropped (in pkts)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    0 : 19         19         200        0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;    8 : 200        100        0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    16: 200        100        0          0          0 &lt;/span&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    24: 0          0          0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    32: 0          0          0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Others: 0          0          0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Egress&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  dscp: incoming   no_change  classified policed    dropped (in pkts)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    0 : 200           n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;    8 : 100           n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    16: 100           n/a       n/a      0          0 &lt;/span&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    24: 0             n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    32: 0             n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Others: 283           n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You can see that we already have traffic coming in as DSCP 8 and 16. We will be mutating these on SW1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. CONFIGURE DSCP-to-DSCP MUTATION ON SW1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;mls qos&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;mls qos map dscp-mutation MAP1 8 to 24&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;mls qos map dscp-mutation MAP1 16 to 32&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;int f0/13&lt;br /&gt;mls qos trust dscp&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt; mls qos dscp-mutation MAP1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. PING FROM R4 to SVI on SW3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R4#ping 155.1.202.9 re 100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Sending 100, 100-byte ICMP Echos to 155.1.202.9, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Success rate is 100 percent (100/100), round-trip min/avg/max = 1/2/4 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R4#ping 155.1.201.9 re 100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Sending 100, 100-byte ICMP Echos to 155.1.201.9, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;Success rate is 100 percent (100/100), round-trip min/avg/max = 1/2/8 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new;"&gt;R4#&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. VERIFY MUTATION ON SW3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3# show mls qos int f0/13 st&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;FastEthernet0/13&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Ingress&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  dscp: incoming   no_change  classified policed    dropped (in pkts)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    0 : 194        194        200        0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    8 : 600        500        0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    16: 700        600        0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: courier new;"&gt;    24: 100        100        0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    32: 100        100        0          0          0 &lt;/span&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Others: 0          0          0          0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Egress&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  dscp: incoming   no_change  classified policed    dropped (in pkts)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    0 : 200           n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    8 : 500           n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    16: 600           n/a       n/a      0          0         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;span style="color: rgb(255, 0, 0);"&gt;24: 100           n/a       n/a      0          0         &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    32: 100           n/a       n/a      0          0  &lt;/span&gt;       &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Others: 2674          n/a       n/a      0          0   &lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-5119629059108040333?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/5119629059108040333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=5119629059108040333&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5119629059108040333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/5119629059108040333'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/3560-qos-dscp-mutation.html' title='3560 QoS DSCP mutation'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-1055867956326135818</id><published>2009-02-08T14:57:00.000+05:30</published><updated>2009-02-08T14:58:15.330+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='3560 QoS VLAN-Based Classification'/><title type='text'>3560 QoS VLAN-Based Classification</title><content type='html'>Comparing Traffic Policing Features in the 3550 and 3560 switches&lt;br /&gt;&lt;br /&gt;I have the following topology:&lt;br /&gt;&lt;br /&gt;R1----|&lt;br /&gt;R3---SW1---SW2---R2&lt;br /&gt;R5----|&lt;br /&gt;&lt;br /&gt;R1,R3 are in vlan 100, 192.168.100.0/24&lt;br /&gt;R5 is in vlan 200, 192.168.200.0/24&lt;br /&gt;&lt;br /&gt;R2 is on a trunked port with the following configuration:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Ethernet0/0.100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; encapsulation dot1Q 100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; ip address 192.168.100.2 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; ip accounting precedence input&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; no snmp trap link-status&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Ethernet0/0.200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; encapsulation dot1Q 200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; ip address 192.168.200.2 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; ip accounting precedence input&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; no snmp trap link-status&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;On SW2 we will enable vlan-based qos and then mark traffic based on ACLs. First we make the ACLs:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ip access-list extended ICMP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; permit icmp any any&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;ip access-list extended TCP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; permit tcp any any&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Next we make our class-maps and policy-maps:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;class-map match-all ICMP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  match access-group name ICMP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;class-map match-all TCP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  match access-group name TCP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;policy-map VLAN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  class TCP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   set ip precedence 5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  class ICMP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   set ip precedence 3&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Next enable mls qos, vlan-based qos and apply the policy to an SVI. Note that the SVI does not need an IP address:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;mls qos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;int f0/13&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; interface FastEthernet0/13&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; switchport trunk encapsulation dot1q&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; switchport trunk native vlan 50&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; switchport mode trunk&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; mls qos vlan-based&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;int vlan 100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; service-policy input VLAN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;int vlan 200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; service-policy input VLAN&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now run some tests. Here I Ping and Telnet from R5, telnet from R1 and then ping from R3:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#ping 192.168.200.2 rep 100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Sending 100, 100-byte ICMP Echos to 192.168.200.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Success rate is 100 percent (100/100), round-trip min/avg/max = 1/3/4 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#telnet 192.168.200.2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Trying 192.168.200.2 ... Open&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;[Connection to 192.168.200.2 closed by foreign host]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R1#telnet 192.168.100.2 &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Trying 192.168.100.2 ... Open&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;[Connection to 192.168.100.2 closed by foreign host]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R1#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R3#ping 192.168.100.2 re 50&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Type escape sequence to abort.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Sending 50, 100-byte ICMP Echos to 192.168.100.2, timeout is 2 seconds:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Success rate is 100 percent (50/50), round-trip min/avg/max = 1/3/4 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R3#&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Verify on R2:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2#sho int precedence &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Ethernet0/0.100 &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  Input&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    Precedence 3:  50 packets, 5900 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    Precedence 5:  46 packets, 2953 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;Ethernet0/0.200 &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  Input&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    Precedence 3:  100 packets, 11800 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    Precedence 5:  15 packets, 969 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2#&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-1055867956326135818?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/1055867956326135818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=1055867956326135818&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1055867956326135818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1055867956326135818'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/3560-qos-vlan-based-classification.html' title='3560 QoS VLAN-Based Classification'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-1423772520971092148</id><published>2009-02-08T14:55:00.000+05:30</published><updated>2009-02-08T14:56:32.733+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='3560 QoS Per-port per-vlan policing'/><title type='text'>3560 QoS Per-port per-vlan policing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JlGUPVCvNQY/SYdRTIdqbTI/AAAAAAAAAG0/k4Sg5FRN3uE/s1600-h/3560+lab.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 191px;" src="http://4.bp.blogspot.com/_JlGUPVCvNQY/SYdRTIdqbTI/AAAAAAAAAG0/k4Sg5FRN3uE/s400/3560+lab.jpg" alt="" id="BLOGGER_PHOTO_ID_5298292875755941170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Per-van policing in the 3560s is different from the 3550s because there is no "match VLAN" clause available. Instead you create hierarchical policies and attach them to the SVI.&lt;br /&gt;&lt;br /&gt;Here is the scenario:&lt;br /&gt;&lt;br /&gt;VLAN100 will be policed to 64k (192.168.100.0/24)&lt;br /&gt;VLAN200 Will be policed to 128k (192.168.200.0/24)&lt;br /&gt;&lt;br /&gt;Because of bursts, I was not able to get these exact rates, but you will see how these policies are applied and the effect they have on traffic flow. Plus you can always play with the burst sizes on your own :)&lt;br /&gt;&lt;br /&gt;Here is the tracker I created on R2:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;access-list 1 permit 192.168.100.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;access-list 1 permit 192.168.100.3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;access-list 2 permit 192.168.200.5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;class-map match-any VLAN100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; match access-group 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;class-map match-any VLAN200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; match access-group 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;policy-map TRACKER&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; class VLAN100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; class VLAN200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Ethernet0/0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; no ip address&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; load-interval 30&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; full-duplex&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Ethernet0/0.100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; encapsulation dot1Q 100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; ip address 192.168.100.2 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; service-policy input TRACKER&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Ethernet0/0.200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; encapsulation dot1Q 200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; ip address 192.168.200.2 255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; service-policy input TRACKER&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;All configuration is being done on SW2. There really is not an order of operations to follow, but basically you just need to make sure class-maps and policy-maps are created before you apply them. The logical flow is what you want to get used to. Otherwise you will be jumping into and out of classes and policies, reconfiguring them like I did :)&lt;br /&gt;&lt;br /&gt;At our child (aka "second") level we have a class-map that matches the interface and we have our policer. The interface matching here is whats is referred into in the first clause of "per-port per-vlan" policing.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;class-map match-all TRUNK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  match input-interface  FastEthernet0/13&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;policy-map VLAN100-POLICER&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  class TRUNK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    police 64000 12000 exceed-action drop&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;policy-map VLAN200-POLICER&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  class TRUNK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    police 128000 24000 exceed-action drop&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As far as I know, this "bottom" or "second" level class-map can only match input-interface. And this second level policy must be a policer.&lt;br /&gt;&lt;br /&gt;Now, at the parent level we create a new class to match IP traffic and then apply our child polices below that. This top-level class must match an ACL (match protocol ip gave me errors when applying the policy).&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;access-list 100 permit ip any any&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;class-map match-all IP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  match access-group 100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;policy-map VLAN100-PARENT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  class IP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   set ip precedence 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   service-policy VLAN100-POLICER&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;policy-map VLAN200-PARENT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;  class IP&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   set ip precedence 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;   service-policy VLAN200-POLICER&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice that I have the "set ip precedence" clause in our parent policies. These first level policies are required to have an action. You will get an error message stating this if you try to apply it to the SVI without an action:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW2(config)#int vlan 100                       &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW2(config-if)#service-policy input VLAN100-PARENT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;%QoS: No action is configured in the policymap VLAN100-PARENT classmap IP, or it is being modified.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So make sure you have set or trust clause in there. Now we can apply them to the SVIs:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;mls qos&lt;br /&gt;!&lt;br /&gt;interface FastEthernet0/13&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; mls qos vlan-based&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Vlan100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; no ip address&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; service-policy input VLAN100-PARENT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;interface Vlan200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; no ip address&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt; service-policy input VLAN200-PARENT&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;From R1, R3 and R5 I will send a bunch of pings to R2:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R1#ping 192.168.100.2 re 1000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R3#ping 192.168.100.2 re 1000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R5#ping 192.168.200.2 re 1000000&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Let's look at R2 after a few minutes.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2#sho policy-map interface e0/0.100 | section VLAN100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    Class-map: VLAN100 (match-any)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      107819 packets, 12722642 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      30 second offered rate 50000 bps&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      Match: access-group 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;        107819 packets, 12722642 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;        30 second rate 50000 bps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;R2#sho policy-map interface e0/0.200 | section VLAN200&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;    Class-map: VLAN200 (match-any)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      156873 packets, 18511014 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      30 second offered rate 107000 bps&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;      Match: access-group 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;        156873 packets, 18511014 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;        30 second rate 107000 bps&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We don't see the limits of 64k and 128k being reached, but the drops on the senders indicate that policing is working. And we can also tell VLAN 200 is getting roughly twice the bandwidth that VLAN 100 is getting. We could get closer to the limit by adjusting the burst sizes appropriately.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;Key things to remember:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Child classes use match input-interface&lt;/li&gt;&lt;li&gt;Child policies use police&lt;/li&gt;&lt;li&gt;Parent classes match ACL (I think you can also match dscp, maybe others)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Parent policies must have an action (e.g. set or trust)&lt;/li&gt;&lt;li&gt;Apply parent policies to SVI&lt;/li&gt;&lt;/ul&gt;I strongly recommend getting your hands dirty with these configurations if you want to master them. I read a lot about switch qos, but it wasn't until I started playing around with scenarios like this that I got a better understanding of how to do it and what is required. If we truly understand what each QoS method does, then we should have no trouble deciphering what we are asked to do on the lab :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-1423772520971092148?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/1423772520971092148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=1423772520971092148&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1423772520971092148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/1423772520971092148'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/3560-qos-per-port-per-vlan-policing.html' title='3560 QoS Per-port per-vlan policing'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JlGUPVCvNQY/SYdRTIdqbTI/AAAAAAAAAG0/k4Sg5FRN3uE/s72-c/3560+lab.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-7098512632584606644</id><published>2009-02-08T14:52:00.000+05:30</published><updated>2009-02-08T14:54:42.489+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mapping and Override'/><category scheme='http://www.blogger.com/atom/ns#' term='3550 QoS - Trusting'/><title type='text'>3550 QoS - Trusting, Mapping and Override</title><content type='html'>Here's the network:&lt;br /&gt;&lt;br /&gt;[R2]---[SW3]---[trunk, native vlan 1]---[SW4]---[R4 ]&lt;br /&gt;&lt;br /&gt;R2 sets ip-prec to 2:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-family: courier new; font-size: 85%;"&gt;interface FastEthernet0/0&lt;br /&gt;ip address 192.168.0.2 255.255.255.0&lt;br /&gt;rate-limit output 16000 8000 8000 conform-action set-prec-transmit 2 exceed-action set-prec-transmit 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Packet capture show packets still marked when they reach R4 (using Dyngen for routers, binding them to NICs on the PC and then connecting them to the 3550's).&lt;br /&gt;&lt;br /&gt;As soon as I enable mls qos on SW3, packets are no longer marked:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3(config)#mls qos&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get the 3550 to keep the marking I configure qos trust on the incoming ports:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3(config)#int f0/2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW3(config-if)#mls qos trust&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get the switch to remark the packets, configure cos override:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3(config)#int f0/2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW3(config-if)#mls qos cos override&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW3(config-if)#mls qos cos 4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These packets show up as CS4 on R4. Note that the override command removes the trust command and vice versa:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3(config)#int f0/2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW3(config-if)#mls qos trust&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3#show run int f0/2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;interface FastEthernet0/2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; switchport mode dynamic desirable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; mls qos cos 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; mls qos trust dscp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the trust and "mls qos cos 4" commands exist, the trust takes effect and will not override the DSCP. So the COS4 override mapped to CS4...where does this mapping take place? Here:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3#show mls qos maps cos-dscp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;   Cos-dscp map:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        cos:   0  1  2  3  4  5  6  7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     --------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       dscp:   0  8 16 24 32 40 48 56&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Suppose we want COS4 to be mapped to AF41...which is DSCP 34. We can do this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW3(config)#mls qos map cos-dscp ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  &lt;0-63&gt;  8 dscp values separated by spaces&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW3(config)#mls qos map cos-dscp 0 8 16 24 &lt;span style="color: rgb(255, 0, 0);"&gt;34 &lt;/span&gt;40 48 56&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here's part of my wireshark capture in plain text:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;Internet Protocol, Src: 192.168.0.4 (192.168.0.4), Dst: 192.168.0.2 (192.168.0.2)&lt;br /&gt;  Version: 4&lt;br /&gt;  Header length: 20 bytes&lt;br /&gt;  Differentiated Services Field: 0x88 (&lt;span style="color: rgb(51, 204, 255);"&gt;DSCP 0x22: Assured Forwarding 41; ECN: 0x00)&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(255, 0, 0);"&gt;1000 10.. = Differentiated Services Codepoint: Assured Forwarding 41 (0x22)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ok here's an interesting one: what happens if I configure QoS on SW4 and set it to trust the  COS instead of the DSCP value?&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255); font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;SW4(config)#int f0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW4(config-if)#mls qos trust ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  cos            Classify by packet COS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  device         trusted device class&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  dscp           Classify by packet DSCP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  ip-precedence  Classify by packet IP precedence&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  &lt;cr&gt;&lt;/cr&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SW4(config-if)#mls qos trust cos&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It remarks the packet to CS4 based on the cos-dscp map, of course!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6176524294759831899-7098512632584606644?l=www.networksamples.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.networksamples.com/feeds/7098512632584606644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6176524294759831899&amp;postID=7098512632584606644&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7098512632584606644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6176524294759831899/posts/default/7098512632584606644'/><link rel='alternate' type='text/html' href='http://www.networksamples.com/2009/02/3550-qos-trusting-mapping-and-override.html' title='3550 QoS - Trusting, Mapping and Override'/><author><name>Sarma Remella</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6176524294759831899.post-2238811581082523768</id><published>2009-01-22T04:15:00.000+05:30</published><updated>2009-01-22T04:33:47.103+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSPF - OSPF TUTORIAL'/><title type='text'>OSPF Tutorial</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mM2wZY2xenc/SXeo086SqCI/AAAAAAAAAQ8/AT_lBJIStFM/s1600-h/OSPF+1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 290px; height: 273px;" src="http://3.bp.blogspot.com/_mM2wZY2xenc/SXeo086SqCI/AAAAAAAAAQ8/AT_lBJIStFM/s400/OSPF+1.JPG" alt="" id="BLOGGER_PHOTO_ID_5293885514654591010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mM2wZY2xenc/SXeo021UXWI/AAAAAAAAAQ0/uJoqmp-iCCk/s1600-h/OSPF+2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 151px;" src="http://1.bp.blogspot.com/_mM2wZY2xenc/SXeo021UXWI/AAAAAAAAAQ0/uJoqmp-iCCk/s400/OSPF+2.JPG" alt="" id="BLOGGER_PHOTO_ID_5293885513023118690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mM2wZY2xenc/SXeo0tTEyzI/AAAAAAAAAQs/5n3nEoPHSyI/s1600-h/OSPF+3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 321px; height: 340px;" src="http://4.bp.blogspot.com/_mM2wZY2xenc/SXeo0tTEyzI/AAAAAAAAAQs/5n3nEoPHSyI/s400/OSPF+3.JPG" alt="" id="BLOGGER_PHOTO_ID_5293885510463572786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mM2wZY2xenc/SXeo0giwpGI/AAAAAAAAAQk/G8AMPG-7JFk/s1600-h/OSPF+4.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 226px;" src="http://4.bp.blogspot.com/_mM2wZY2xenc/SXeo0giwpGI/AAAAAAAAAQk/G8AMPG-7JFk/s400/OSPF+4.JPG" alt="" id="BLOGGER_PHOTO_ID_5293885507039700066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;link rel="themeData" href="file:///E:%5CDOCUME%7E1%5CSarma%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///E:%5CDOCUME%7E1%5CSarma%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&
