diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 88593de..0b1dac1 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -442,7 +442,7 @@
 }
 
 static u_int8_t
-lsp_bits_generate (int level, int overload_bit)
+lsp_bits_generate (int level, int overload_bit, int attached_bit)
 {
   u_int8_t lsp_bits = 0;
   if (level == IS_LEVEL_1)
@@ -451,6 +451,8 @@
     lsp_bits = IS_LEVEL_1_AND_2;
   if (overload_bit)
     lsp_bits |= overload_bit;
+  if (attached_bit)
+    lsp_bits |= attached_bit;
   return lsp_bits;
 }
 
@@ -1135,7 +1137,8 @@
       return lsp;
     }
   lsp = lsp_new (frag_id, ntohs(lsp0->lsp_header->rem_lifetime), 0,
-                 lsp_bits_generate (level, area->overload_bit), 0, level);
+                 lsp_bits_generate (level, area->overload_bit,
+                 area->attached_bit), 0, level);
   lsp->area = area;
   lsp->own_lsp = 1;
   lsp_insert (lsp, area->lspdb[level - 1]);
@@ -1589,7 +1592,8 @@
     }
   rem_lifetime = lsp_rem_lifetime (area, level);
   newlsp = lsp_new (lspid, rem_lifetime, seq_num,
-                    area->is_type | area->overload_bit, 0, level);
+                    area->is_type | area->overload_bit | area->attached_bit,
+                    0, level);
   newlsp->area = area;
   newlsp->own_lsp = 1;
 
@@ -1656,7 +1660,8 @@
 
   lsp_clear_data (lsp);
   lsp_build (lsp, area);
-  lsp->lsp_header->lsp_bits = lsp_bits_generate (level, area->overload_bit);
+  lsp->lsp_header->lsp_bits = lsp_bits_generate (level, area->overload_bit,
+                                                 area->attached_bit);
   rem_lifetime = lsp_rem_lifetime (area, level);
   lsp->lsp_header->rem_lifetime = htons (rem_lifetime);
   lsp_seqnum_update (lsp);
@@ -1666,7 +1671,8 @@
   for (ALL_LIST_ELEMENTS_RO (lsp->lspu.frags, node, frag))
     {
       frag->lsp_header->lsp_bits = lsp_bits_generate (level,
-                                                      area->overload_bit);
+                                                      area->overload_bit,
+                                                      area->attached_bit);
       /* Set the lifetime values of all the fragments to the same value,
        * so that no fragment expires before the lsp is refreshed.
        */
@@ -1816,7 +1822,8 @@
 
   lsp->level = level;
   /* RFC3787  section 4 SHOULD not set overload bit in pseudo LSPs */
-  lsp->lsp_header->lsp_bits = lsp_bits_generate (level, 0);
+  lsp->lsp_header->lsp_bits = lsp_bits_generate (level, 0,
+                                                 circuit->area->attached_bit);
 
   /*
    * add self to IS neighbours 
@@ -1946,7 +1953,9 @@
 
   rem_lifetime = lsp_rem_lifetime (circuit->area, level);
   /* RFC3787  section 4 SHOULD not set overload bit in pseudo LSPs */
-  lsp = lsp_new (lsp_id, rem_lifetime, 1, circuit->area->is_type, 0, level);
+  lsp = lsp_new (lsp_id, rem_lifetime, 1,
+                 circuit->area->is_type | circuit->area->attached_bit,
+                 0, level);
   lsp->area = circuit->area;
 
   lsp_build_pseudo (lsp, circuit, level);
@@ -2012,7 +2021,8 @@
   lsp_build_pseudo (lsp, circuit, level);
 
   /* RFC3787  section 4 SHOULD not set overload bit in pseudo LSPs */
-  lsp->lsp_header->lsp_bits = lsp_bits_generate (level, 0);
+  lsp->lsp_header->lsp_bits = lsp_bits_generate (level, 0,
+                                                 circuit->area->attached_bit);
   rem_lifetime = lsp_rem_lifetime (circuit->area, level);
   lsp->lsp_header->rem_lifetime = htons (rem_lifetime);
   lsp_inc_seqnum (lsp, 0);
@@ -2416,7 +2426,8 @@
 		     IS_LEVEL_1);
 
   lsp->lsp_header->lsp_bits = lsp_bits_generate (lsp->level,
-                                                 lsp->area->overload_bit);
+                                                 lsp->area->overload_bit,
+                                                 lsp->area->attached_bit);
   rem_lifetime = lsp_rem_lifetime (lsp->area, IS_LEVEL_1);
   lsp->lsp_header->rem_lifetime = htons (rem_lifetime);
 
@@ -2455,8 +2466,8 @@
       lspid[ISIS_SYS_ID_LEN - 2] = ((i >> 8) & 0xFF);
 
       rem_lifetime = lsp_rem_lifetime (area, IS_LEVEL_1);
-      lsp = lsp_new (lspid, rem_lifetime, 1, IS_LEVEL_1 | area->overload_bit,
-                     0, 1);
+      lsp = lsp_new (lspid, rem_lifetime, 1, IS_LEVEL_1 | area->overload_bit
+                     | area->attached_bit, 0, 1);
       if (!lsp)
 	return;
       lsp->area = area;
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 898dfd2..20b8e50 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -2170,6 +2170,39 @@
   return CMD_SUCCESS;
 }
 
+DEFUN (set_attached_bit,
+       set_attached_bit_cmd,
+       "set-attached-bit",
+       "Set attached bit to identify as L1/L2 router for inter-area traffic\n"
+       "Set attached bit\n")
+{
+  struct isis_area *area;
+
+  area = vty->index;
+  assert (area);
+
+  area->attached_bit = LSPBIT_ATT;
+  lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1);
+
+  return CMD_SUCCESS;
+}
+
+DEFUN (no_set_attached_bit,
+       no_set_attached_bit_cmd,
+       "no set-attached-bit",
+       "Reset attached bit\n")
+{
+  struct isis_area *area;
+
+  area = vty->index;
+  assert (area);
+
+  area->attached_bit = 0;
+  lsp_regenerate_schedule (area, IS_LEVEL_1 | IS_LEVEL_2, 1);
+
+  return CMD_SUCCESS;
+}
+
 DEFUN (dynamic_hostname,
        dynamic_hostname_cmd,
        "hostname dynamic",
@@ -3245,6 +3278,9 @@
   install_element (ISIS_NODE, &set_overload_bit_cmd);
   install_element (ISIS_NODE, &no_set_overload_bit_cmd);
 
+  install_element (ISIS_NODE, &set_attached_bit_cmd);
+  install_element (ISIS_NODE, &no_set_attached_bit_cmd);
+
   install_element (ISIS_NODE, &dynamic_hostname_cmd);
   install_element (ISIS_NODE, &no_dynamic_hostname_cmd);
 
diff --git a/isisd/isisd.h b/isisd/isisd.h
index 5db485f..838a08b 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -116,6 +116,8 @@
   char is_type;			/* level-1 level-1-2 or level-2-only */
   /* are we overloaded? */
   char overload_bit;
+  /* L1/L2 router identifier for inter-area traffic */
+  char attached_bit;
   u_int16_t lsp_refresh[ISIS_LEVELS];
   /* minimum time allowed before lsp retransmission */
   u_int16_t lsp_gen_interval[ISIS_LEVELS];
