Sunday, March 29, 2009
GRE Tunneling between 2 Cisco Routers
If this sounds like a virtual private network (VPN) to you, that's because it theoretically is: Technically, a GRE tunnel is a type of a VPN—but it isn't a secure tunneling method. However, you can encrypt GRE with an encryption protocol such as IPSec to form a secure VPN.
In fact, the point-to-point tunneling protocol (PPTP) actually uses GRE to create VPN tunnels. For example, if you configure Microsoft VPN tunnels, by default, you use PPTP, which uses GRE.
Why would I use GRE?
Why would you tunnel traffic using GRE? Here are some of the reasons:
* You need to encrypt multicast traffic. GRE tunnels can carry multicast packets—just like real network interfaces—as opposed to using IPSec by itself, which can't encrypt multicast traffic. Some examples of multicast traffic are OSPF, EIGRP, and RIPV2. Also, a number of video, VoIP, and streaming music applications use multicast.
* You have a protocol that isn't routable, such as NetBIOS or non-IP traffic over an IP network. For example, you could use GRE to tunnel IPX or AppleTalk through an IP network.
* You need to connect two similar networks connected by a different network with different IP addressing.
How do I configure GRE tunnels?
Configuring GRE tunnels on Cisco routers is relatively easy—all it takes is a few simple commands. Here's an example of a simple configuration:
Router A:
interface Ethernet0/1
ip address 10.2.2.1 255.255.255.0
interface Serial0/0
ip address 192.168.4.1 255.255.255.0
interface Tunnel0
ip address 1.1.1.2 255.255.255.0
tunnel source Serial0/0
tunnel destination 192.168.4.2
Router B:
interface FastEthernet0/1
ip address 10.1.1.1 255.255.255.0
interface Serial0/0
ip address 192.168.4.2 255.255.255.0
interface Tunnel0
ip address 1.1.1.1 255.255.255.0
tunnel source Serial0/0
tunnel destination 192.168.4.1
In this example, the two routers each have a virtual interface—the tunnel interface. This interface is its own network, just like a point-to-point T1 circuit would be. The traffic going over the tunnel network is tunneling through the serial network.
To each of the routers, it appears that it has two paths to the remote—the serial interface and the tunnel interface (running through the tunnel). This tunnel could then transmit unroutable traffic such as NetBIOS or AppleTalk. If it's going through the Internet, you could use IPSec to encrypt it.
As you can see in the output below, the tunnel interface on Router B is an interface like any other:
RouterB# sh ip int brie
Interface IP-Address OK? Method Status Protocol
Ethernet0 10.1.1.1 YES manual up down
Serial0 192.168.4.2 YES manual up up
Serial1 unassigned YES unset administratively down down
Tunnel0 1.1.1.1 YES manual up up
RouterB#
Troubleshooting GRE tunnels
Because GRE takes one packet and encapsulates it in another packet, you might run into a situation where the packet you're sending is larger than your interface allows. The solution to this issue is to configure ip tcp adjust-mss 1436on the tunnel interface.
While GRE doesn't provide encryption, you can enable a key on each side of the tunnel using the tunnel key command. This is like a simple clear-text password with no encryption.
Because GRE tunnels are stateless, it's possible for one side of the tunnel to go down while the other side remains up. The solution to this problem is to enable keepalive packets on each side of the tunnel. By doing this, each side of the tunnel periodically sends a keepalive to the other side. If one side doesn't receive a keepalive in the specified time, the tunnels go down on each side.
For more information, check out Cisco's list of Generic Routing Encapsulation (GRE) resources.
Thursday, March 26, 2009
CCNP Exams & Recommended Training
CCNP Exams & Recommended Training | |
|---|---|
| 642-901 BSCI | Building Scalable Cisco Internetworks (BSCI) |
| 642-812 BCMSN | Building Cisco Multilayer Switched Networks (BCMSN) |
| 642-825 ISCW | Implementing Secure Converged Wide Area Networks (ISCW) |
| 642-845 ONT | Optimizing Converged Cisco Networks (ONT) |
Wednesday, March 25, 2009
Several Links for study DNS ...
Whois --> http://whois.domaintools.com
.my Whois --> http://mynic.net
DNS Health Check --> http://www.squish.net/dnscheck/
Friday, March 20, 2009
FAQ for MPLS
Frequently Asked Questions
What is MPLS?
MPLS stands for Multi-Protocol Label Switching. MPLS is a framework that allows the introduction of label switching to any combination of Layer 3 and Layer 2 protocols. In an MPLS domain, a packet is examined at the ingress point, its headers are parsed, a routing decision is made, and a label is attached to it. The packet is then forwarded to the next router and the label tells the router what to do with the packet. Hence, the switching decision is made based on the label only - not on the Layer 3 headers. The router discards the label and attaches a new label to be used by the next router. The process continues until the packet emerges at the egress point.
How did MPLS evolve?
MPLS evolved from technologies that were primarily developed in the mid-1990s. However, it is worth noting that the concept of using label switching for a Layer 3 connectionless protocol could be traced back to the mid-1980s. At that time, the high speed networking community was faced with the challenge of increasing IP datagram forwarding rates several orders of magnitude, to the rates of OC-3 and OC-12. Routing based on IP headers used to be performed in software, consuming many CPU cycles, and hence, performance was limited by the processing power of the CPU. Several network researchers investigated the possibility of using label switching as a means of increasing the forwarding performance in an IP network. Label switching was a much simpler function, and could be implemented in hardware, which made it a very promising approach. In the mid-1990s the concept of label switching started drawing attention again, and several technologies were developed based on it, typically in the context of IP and ATM. The most notable developments were:
- Toshiba's Cell Switching Router, 1995
- Ipsilon's IP Switch, 1996
- Cisco's Tag Switching, 1996
- IBM's Aggregate Route-based IP Switching (ARIS), 1996
In 1997, the MPLS working group was formed with the goal of developing a standard approach for label switching.
What benefits does MPLS bring to my network?
Originally, the main benefit of label switching was facilitating high speed switching in Layer 3 devices. However, this is no longer perceived as the main benefit of MPLS, since ASIC-based routers, nowadays, can perform line speed routing on most interfaces. Today, the main benefits of MPLS are:
- Simplifying packet forwarding: Since the routing decision is made only once at the edge of the network, the core could keep only minimal routing information, thus reducing the overall complexity of the network (e.g. BGP could be run at the edge only, but there would be no need for it in the core).
- Traffic Engineering: MPLS offers the tools to control the paths taken by different flows. Using these tools, traffic could be rerouted to avoid congestion points in a network.
- Delivering Quality of Service (QoS) & Differentiated Services: Using MPLS' inherent mechanisms for traffic prioritization and traffic path control, a service provider could create a network that delivers QoS, facilitates offering differentiated services to customers, and fulfills the offered service level agreements.
- Network scalability: Using MPLS' label stacking capability, MPLS domains could be arranged in a hierarchy, offering multiple levels of abstraction, and therefore, scalability.
- Supporting VPNs: Since MPLS provides tunneling of packets from an ingress point to an egress point, VPN applications that leverage this capability can be created easily.
Who is responsible for creating the MPLS standards?
The IETF has a specialized working group, the MPLS working group, which is categorized as a sub-IP group. The group is responsible for the development of standards that define the core technology. Other IETF working groups, like the Provider Provisioned Virtual Private Networks working group, might develop standards that make use of the MPLS technology.
What is the MPLS Forum?
The MPLS Forum is an industry consortium concerned with advancing the deployment of multi-vendor MPLS networks. The Forum focuses on interoperability initiatives, implementation agreements, and education programs.
What does "Forwarding Equivalence Class (FEC)" mean?
A Forwarding Equivalence Class (FEC) is a class of packets that should be forwarded in the same manner (i.e. over the same path). A FEC is not a packet, nor is it a label. A FEC is a logical entity created by the router to represent a class (category) of packets. When a packet arrives at the ingress router of an MPLS domain, the router parses the packet's headers, and checks to see if the packet matches a known FEC (class). Once the matching FEC is determined, the path and outgoing label assigned to that FEC are used to forward the packet. FECs are typically created based on the IP destinations known to the router, so for each different destination a router might create a different FEC, or if a router is doing aggregation, it might represent multiple destinations with a single FEC (for example, if those destinations are reachable through the same immediate next hop anyway). The MPLS framework, however, allows for the creation of FECs using advanced criteria like source and destination address pairs, destination address and TOS, etc.
Is MPLS meant to replace the current routing protocols?
No. MPLS is not a routing protocol. As a matter of fact, MPLS needs the reachability information provided by the current routing protocols in order to calculate the paths that it uses. MPLS augments the functionality of the routing protocols, but does not replace them.
Is MPLS a protocol?
No. MPLS is a framework of functions, not a protocol. The framework incorporates concepts, mechanisms, and protocols to achieve functions that enhance the current Layer 3 and Layer 2 technologies.
Where does MPLS fit in the OSI reference model?
Some might argue that MPLS does not fit in the OSI reference model. The fact that MPLS is a framework that contains enhancements to the current Layer 3 and Layer 2 technologies makes it hard to fit MPLS within one layer of the OSI model. MPLS alone cannot be considered a layer in the OSI sense as it doesn't have a unified format for the transport of data from the layer above: it uses a shim header over SONET or Ethernet, it uses the existing VPI/VCI of ATM, etc. However, an individual MPLS function could be categorized as either an OSI Layer 3 or Layer 2 function.
Does MPLS support other protocols other than IP?
Yes. MPLS, by design, was meant to support many Layer 3 and Layer 2 protocols. At Layer 3, MPLS supports IPv4, IPv6, IPX, and AppleTalk. At Layer 2, MPLS supports Ethernet, PPP (for point to point links), Token Ring, FDDI, ATM, and Frame Relay. MPLS was designed to be flexible so that it could work with virtually any Layer 3 and Layer 2 technologies.
How does MPLS compare to ATM?
MPLS brings the label switching and traffic engineering functions of ATM to packet-based networks. MPLS, unlike ATM, runs over any Layer 2 infrastructure, i.e., it is not tied to a certain technology, which allows its use in a heterogeneous environment.
What is the relation between MPLS and VPNs?
Since MPLS provides tunneling of packets from an ingress point to an egress point, it is an attractive technology for VPN applications. Several flavours of VPNs - defined in IETF drafts and RFCs - can be implemented over MPLS. These VPNs can be broadly categorized as either MPLS Layer 3 VPNs, or MPLS Layer 2 VPNs.
What does VLL mean?
VLL stands for "Virtual Leased Line". VLL is a form of MPLS Layer 2 VPN offered as a service by a service provider. The service connects two customer edge (CE) devices at two different locations, as if they had a traditional leased line in between. That is, whatever Layer 2 frames the CE device on one end sends are transparently transported to the CE device at the other end of the VLL.
What does TLS mean?
TLS stands for Transparent LAN Services. A service provider offering Layer 2 connectivity to multiple customer sites in a manner that is transparent to the customer edge (CE) devices is said to be offering Transparent LAN Services (TLS). The provider takes care of transporting customer Layer 2 frames and switching them across the provider network from one customer site to the other(s). MPLS Layer 2 VPNs could be used to implement these services. In the context of MPLS and provider provisioned IP based VPNs, the preferred term for this service is "VPLS", which is mentioned in RFC 2764 - "A Framework for IP Based Virtual Private Networks".
What does VPLS mean?
VPLS stands for "Virtual Private LAN Segment". A service provider offering Layer 2 connectivity to multiple customer sites in a manner that is transparent to the customer edge (CE) devices is said to be offering a Virtual Private LAN Segment (VPLS). This is a new term that was chosen because the service resembles connecting the customer edge (CE) devices via a switch, i.e., all in the same broadcast domain / LAN segment. The provider takes care of transporting customer Layer 2 frames and switching them across the provider network from one customer site to the other(s). MPLS Layer 2 VPNs could be used to implement this service. In the context of classical Layer 2 service provider networks, or ATM networks, the term TLS is used. In the context of MPLS and provider provisioned IP based VPNs, the terms TLS and VPLS are often used interchangeably; however, the preferred term for this service is "VPLS", which is mentioned in RFC 2764 - "A Framework for IP Based Virtual Private Networks".
What is GMPLS?
GMPLS stands for "Generalized MPLS". GMPLS extends the scope of MPLS to include non-packet based devices that realize the actual Layer 1 paths used, e.g. TDM multiplexers, SONET ADMs, optical (lambda) switches, spatial switches (incoming port to outgoing port), etc.
Are there any networks currently utilizing MPLS?
Many service providers have announced that they are using MPLS in their networks. Names include: AT&T, British Telecom, Cable & Wireless, China Unicom, Deutsche Telekom, France Telecom, Global Crossing, Infonet, Japan Telecom, Level 3 Communications, NTT, Swisscom, Telia Iberia, Telecom Austria, Telecom Italia, Teleglobe, Time Warner Telecom, UUNet, Williams.
Are there any organizations that perform MPLS interoperability testing?
The Advanced Internet Lab at George Mason University provides interoperability testing services. The lab is sponsored by several equipment manufacturers - including Brocade, Cisco, and Juniper - as well as service providers. For more information, check the AIL web site.
Also, the InterOperability Lab MPLS Consortium at the University of New Hampshire provides these services. Members include Brocade, Cisco, Avici, and others. For more information, check the IOL web site.
Benefits of MPLS:
* Over the last few years, MPLS has become the dominant internetworking technology. More and more providers are migrating to MPLS.
* Carriers have deployed IP/MPLS core routers in order to support existing legacy networks more cost effectively.
* Fundamentally, MPLS employs an encapsulation technique providing internetworking between different technologies, coupled with signaling protocols necessary to discover, configure and manage connectivity.
* In addition to signaling protocols, MPLS uses resiliency protocols, such as Fast Re-route and Bi-directional Fault Detection, to determine failures and in turn switching to standby links.
* The strength of these protocols combined with the popularity of MPLS core networks have made MPLS a logical choice for extending into metro networks.
* Vendors have responded by creating MPLS-enabled multi-service platforms with a mixture of legacy port options.
MPLS combines the multi-service and traffic management capabilities of ATM with the scalability of packet networks to create a best-of-breed service provider network.
Main reasons to deploy MPLS include:
* Cost reduction through data network convergence: MPLS facilitates the convergence of disparate Frame Relay, ATM, Ethernet and IP networks onto a single infrastructure to reduce capital and operational expenses. The cost savings can be up to 40% from frame relay.
* Integration of voice, video and data services: MPLS's traffic management capabilities enable this services "triple play" on a common backbone.
* New high-margin revenue opportunities through MPLS-based service offerings: MPLS's flexibility, high availability and multi-service support enables service providers to offer strict SLAs, increasing revenue and margins.
MPLS can lower operational costs by integrating multiple services onto a common backbone; has integrated capabilities which enable service providers to offer strict SLAs and thereby increase revenue and margins; and facilitates the convergence of disparate Frame Relay, ATM, Ethernet and IP networks onto a single infrastructure to reduce capital and operating expenses.
Find out from Shopforbandwidth.com which providers offer this service and if it is available in all of your locations. They specialize in finding the right bandwidth solutions to fit any business application requirement as they work with over 20 providers. They'll do all the research Free for your company including negotiating the best rates from available vendors in your area. Once you decide on the best solution, they'll help you throughout the provisioning process and with customer service should you have any issue with the provider making your job easier.
Wednesday, March 18, 2009
Configuring FreeRADIUS to support Cisco AAA Clients
“FreeRADIUS is the most widely deployed RADIUS server in the world. It is the basis for multiple commercial offerings. It supplies the AAA needs of many Fortune-500 companies and Tier 1 ISPs. It is also widely used in the academic community, including eduroam. The server is fast, feature-rich, modular, and scalable.” –FreeRADIUS home page
I’ve been using FreeRADIUS in production for a few years now, mostly to support wireless users. One of the benefits of FreeRADIUS — besides being open source, of course — is the numbers of backends one can use for authentication:
“If a password is not available locally for some reason, the server can pass the authentication to another system such as LDAP, PAM, Unix (/etc/passwd), Kerberos, Active Directory, or RADIUS server via RADIUS proxying. Local programs (e.g. CGI scripts) can also be used to authenticate users via shell scripts or any other method. Perl or Python scripts can be pre-loaded into the server, which significantly lowers the cost of running such programs.”
Powerful, huh? Indeed.
For this demonstration, I’m installing a new CentOS 5.2 virtual machine on my MacBook under VMware Fusion. Installing the operating system, however, is beyond the scope of this document. Also, we’ll just be using the local system database for now — we’ll save SQL and LDAP (perhaps even Active Directory) authentication for later. After we get FreeRADIUS up and running, we’ll set up a user account and then configure a Cisco router to use RADIUS for authentication.
Let’s begin with installing FreeRADIUS by running (as root) the following command:
[root@bertram ~]# yum -y install freeradius “yum” should have went out, grabbed the appropriates packages and dependencies, and installed them. If the end of your output looks like this, you’re all set:
Complete!
[root@bertram ~]# Because FreeRADIUS will need to use the local system database for authentication, we need to set ‘user = root’ and ‘group = root’ in radiusd.conf. This is easy enough, just open up /etc/raddb/radiusd.conf, and change the lines that reads “user = radiusd” and “group = radiusd” to “user = root” and “group = root”, respectively. Note that this (running our daemons as root) is almost always something we want to avoid. Using other authentication backends, such as SQL or LDAP, would not require this change and would allow the FreeRADIUS service to run under the default “radiusd” unprivileged account.
Next, we need to let FreeRADIUS know about our NAS — in this case, our Cisco router. For the sake of this demonstration, our router (R1) will have IP address 192.168.1.201. We’ll also need a shared secret that the router and RADIUS server use. Let’s use the ever popular “SECRET_KEY”. Add the following to the end of /etc/raddb/clients.conf:
client 192.168.1.201 {
secret = SECRET_KEY
shortname = R1
nastype = cisco
} Then, on the FreeRADIUS side, we need to create a user account in the local user database that we’ll use for actually authenticating to R1. Nothing special here, just creating a new user account and setting the password. I’ve passed the plain-text password into “passwd” via stdin so that you can see it. Normally, we wouldn’t do that — just run “passwd cisco” and enter the password when prompted:
[root@bertram ~]# /usr/sbin/useradd cisco
[root@bertram ~]# echo secret | passwd --stdin cisco
Changing password for user cisco.
passwd: all authentication tokens updated successfully.
[root@bertram ~]# We now have a local user named “cisco” with a password of “secret” that we’ll use when it comes time to authenticate to R1. Before we can do that, however, we must let FreeRADIUS know about the user. Append the following to /etc/raddb/users:
cisco Auth-Type := System
Service-Type = NAS-Prompt-User,
cisco-avpair = "shell:priv-lvl=15" This notifies FreeRADIUS of a local user account named “cisco”. Using the “cisco-avpair” attribute in this manner allows us to automatically assign privilege level 15 to the user, removing the requirement for the user to issue “enable” (and the enable secret) in order to gain elevated access.
Let’s get started configuring R1. I’m going to assume that you’re starting from a default configuration. The first thing we want to do is create a “fallback” user account (on the router itself) that we can use to authenticate if, for some reason, connectivity to the RADIUS server is lost. Let’s create a user named “admin” with a password of “letmein”:
R1(config)#username admin privilege 15 secret letmein Under normal circumstances, we’ll never use this local account — only when the RADIUS server is unavailable.
The first thing I need to do is configure my interface on R1 and verify we can ping the RADIUS server. Assuming you already have your router up and running, you can likely skip this step:
R1(config)#interface fastethernet 3/0
R1(config-if)#ip address 192.168.1.201 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
*Mar 1 00:10:14.635: %LINK-3-UPDOWN: Interface FastEthernet3/0, changed state to up
*Mar 1 00:10:15.635: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet3/0, changed state to up
R1(config-if)#do ping 192.168.1.51
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.51, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 4/11/24 ms
R1(config-if)# Excellent, all set! Let’s start configuring R1 for AAA:
R1(config)#aaa new-model
R1(config)#radius-server host 192.168.1.51 auth-port 1812 acct-port 1813 key SECRET_KEY AAA should now be enabled on R1. Note that we provided the IP address of the RADIUS server as well as the shared secret we configured in FreeRADIUS earlier. In addition, we must specify the “auth-port” and “acct-port” used by FreeRADIUS, as these are different from Cisco’s defaults (1645 and 1646). Let’s configure authentication:
R1(config)#aaa authentication login default group radius local
R1(config)#line vty 0 4
R1(config-line)#login authentication default
R1(config-line)#line con 0
R1(config-line)#login authentication default Here, we’ve told R1 to use RADIUS for authentication and to fall back to the local user database if the RADIUS server is not available. We don’t want to DoS ourselves!
The following command will allow the user to run an “exec” shell when logging into the router:
R1(config)#aaa authorization exec default group radius if-authenticated Last, but not least, we want accounting (the final “A” in “AAA”):
R1(config)#aaa accounting exec default start-stop group radius
R1(config)#aaa accounting system default start-stop group radius That should be enough to allow us to login with our local (Linux) system account “cisco” that we created earlier. Let’s give it a shot:
macbook:~ jlgaddis$ telnet 192.168.1.201
Trying 192.168.1.201...
Connected to 192.168.1.201.
Escape character is '^]'.
User Access Verification
Username: cisco
Password:
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES unset administratively down down
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
FastEthernet3/0 192.168.1.201 YES manual up up
R1#exit
Connection closed by foreign host.
macbook:~ jlgaddis$ Success! We’ve installed FreeRADIUS, added a local user account, set up the NAS client (R1) and configured it to authenticate against the RADIUS server. Let’s take a look at what was logged by FreeRADIUS:
[root@bertram ~]# cat /var/log/radius/radacct/192.168.1.201/detail-20081119
Wed Nov 19 00:24:47 2008
Acct-Session-Id = "00000005"
User-Name = "cisco"
Acct-Authentic = RADIUS
Acct-Status-Type = Start
NAS-Port = 130
NAS-Port-Id = "tty130"
NAS-Port-Type = Virtual
Calling-Station-Id = "192.168.1.49"
Service-Type = NAS-Prompt-User
NAS-IP-Address = 192.168.1.201
Acct-Delay-Time = 0
Client-IP-Address = 192.168.1.201
Acct-Unique-Session-Id = "31b757fca2145e79"
Timestamp = 1227072287
Wed Nov 19 00:25:14 2008
Acct-Session-Id = "00000005"
User-Name = "cisco"
Acct-Authentic = RADIUS
Acct-Terminate-Cause = User-Request
Acct-Session-Time = 27
Acct-Status-Type = Stop
NAS-Port = 130
NAS-Port-Id = "tty130"
NAS-Port-Type = Virtual
Calling-Station-Id = "192.168.1.49"
Service-Type = NAS-Prompt-User
NAS-IP-Address = 192.168.1.201
Acct-Delay-Time = 0
Client-IP-Address = 192.168.1.201
Acct-Unique-Session-Id = "31b757fca2145e79"
Timestamp = 1227072314
[root@bertram ~]# If there’s interest, I may expand on this later to include huntgroups, multiple RADIUS servers, using MySQL for accounting, or even through some LDAP and/or Active Directory authentication into the mix.
Refer to http://evilrouters.net/2008/11/19/configuring-freeradius-to-support-cisco-aaa-clients/
Monday, March 16, 2009
Learning OSPF ...
Open Shortest Path First (OSPF) is a robust link-state interior gateway protocol (IGP). People use OSPF when they discover that Routing Information Protocol (RIP) just isn’t going to work for their larger network, or when they need very fast convergence.
OSPF is the most widely used IGP. When we discuss IGPs, we’re talking about one routing domain, or Autonomous System (AS). Imagine a medium-sized company with multiple buildings and departments, all connected and sharing two redundant Internet links. All of the buildings on-site are part of the same AS. With OSPF, however, we also have the concept of an Area, which allows further segmentation, perhaps by department in each building.
To understand the design needs for areas in OSPF, let’s start with discussing how OSPF works. There is some terminology you may not have encountered before, including the following:
- Router ID: In OSPF this is a unique 32-bit number assigned to each router. This is chosen as the highest IP address on a router, and can be set large by configuring an address on a loopback interface of the chosen router.
- Neighbor Routers: two routers with a common link that can talk to each other.
- Adjacency: a two-way relationship between two neighbor routers. Neighbors don’t always form adjacencies.
- LSA: Link State Advertisements are flooded; they describe routes within a given link.
- Hello Protocol: This is how routers on a network determine their neighbors and form LSAs.
- Area: a hierarchy. A set of routers that exchange LSAs, with others in the same area. Areas limit LSAs and encourage aggregate routes.
OSPF is a link-state routing protocol, as we’ve said. Think of this as a distributed map of the network. To get this information distributed, OSPF does three things.
First, when a router running OSPF comes up it will send hello packets to discover its neighbors and elect a designated router. The hello packet includes link-state information, as well as a list of neighbors. Providing information about your neighbor to that neighbor serves as an ACK, and proves that communication is bi-directional. OSPF is smart about the layer 2 topology: if you’re on a point-to-point link, it knows that this is enough, and the link is considered “up.” If you’re on a broadcast link, the router must wait for an election before deciding if the link is operational.
The election ballot can be stuffed, with a Priority ID, so that you can ensure that your beefiest router is the Designated Router (DR). Otherwise, the largest IP address wins. The key idea with a DR and backup DR (BDR) is that they are the ones to generate LSAs, and they must do database exchanges with other routers in the subnet. So, non-designated routers form adjacencies with the DR. The whole DR/BDR design is used to keep the protocol scalable. The only way to ensure that all routers have the same information is to make them synchronize their databases. If you have 21 routers, and want to bring another one up, then you’d have to form 21 new adjacencies. If you centralize the database, with a backup (just in case), then adding more becomes an easy to manage linear problem.
The database exchange is part of bringing up adjacencies after the hello packets are exchanged, and it’s very important. If the databases are out of sync, we could risk routing loops, blackholes and other perils. The third part of bringing up an adjacency is Reliable Flooding, or LSA exchange. The LSA area zero is special, and if you have multiple areas, they must all touch area zero. This is also called the Backbone Area. There are different types of areas in OSPF, and it can get really crazy when you throw in Virtual Links to allow two areas to speak without hitting area zero.

Image Source (1): AVICI Systems. Avici Systems Inc., is a leading provider of
purpose-built carrier-class routing solutions for the Internet.
There also are different types of routers in OSPF:
- ABR: An Area Border Router is a router that is in area zero, and one or more other areas.
- DR, BDR: A Designated Router, as we said, is the router that keeps the database for the subnet. It sends and receives updates (via multicast) from the other routers in the same network.
- ASBR: The Autonomous System Boundary Router is very special, but confusing. The ASBR connects one or more AS, and exchanges routes between them. The ASBR’s purpose is to redistribute routes from another AS into its own AS.
The concept of redistribution finally rears its head: let’s say we have a router, an internal-only router, not a BR, and we want to connect it to a new network that we don’t control. After this connection is made, we have a few options. We can fire up a non-IGP routing protocol, like BGP, to exchange routes. Alternatively, we could decide that a summary route is good enough, and hard-code a static route to the new network in this router. Anything directly using this router for this destination would be able to get to the new network, but OSPF doesn’t know about it. To make that happen, we redistribute the miscellaneous information into OSPF. We wouldn’t want to feed 200K+ routes from BGP into OSPF, but if we went the static route, we’d definitely want to propagate that information so everyone in our AS could get to the new place. As soon as we tell our internal router that it should redistribute static routes into OSPF, it becomes an ASBR, and the entire network can now reach the new network.
Did You Know...
OSPF is a fast-converging, link-state IGP used by millions. OSPF forms adjacencies with neighbors and shares information via the DR and BDR using Link State Advertisements. Areas in OSPF are used to limit LSAs and summarize routes. Everyone connects to area zero, the backbone.
Saturday, March 14, 2009
VPN Problemss.... again ....
From the 1st method of troubleshooting, surely is blaming TM"NUT" for it's so called "network services", but after tooooo much of complaints letters received, is time to work out a bit liao ...
2ndly, reset and reconfigured... 3th, reset and reconfigured ...
Nov 2008, the problem remains, but our little brain is being toutured to the fullest, so next step, change it to Juniper NetScreen SSG...
Integrating FireBox and NetScreen, really a big issues ... after a few day of dedicated troubleshooting, all solved, and the solutions is, 2 NetScreen in 2 places ...
haiz ... life not easy for a network engineer, have to troubleshoot network problems, as the same time have to help people clean up their ass .... sometimes even their dropping too ... WTF
The Network Engineer, The Life
Network Troubleshooting, RM1000
Network Isolation, RM1500
Network Design, RM5000
Network Offline Sdn Bhd, Priceless .....
