728x90

OSPF Support for Traffic Engineering


기본적으로  JUNOS에서는  ospf traffic engineering  dlsable 상태이다.


enable 하게 되면 shortest-path-first (SPF) 알고리즘이  MPLS 계위에 설정되어 있는 LSP를 고려하여  계산을 하고  link-state 


advertisements (LSAs)에 추가적인 engineering parameters 들이 붙게 된다.


 또한 metric 을 설정할 경우 TE용도에 사용되고  일반적인 OSPF  포워딩 에는 영항을 주지 않는다.


user@host# show protocols ospftraffic-engineering;


[edit protocols ospf area 0.0.0.0]

user@host set interface fe-0/1/1 te-metric 10


728x90

GRES 는 라우팅엔진 switchover 시에 커널 정보와 인터페이스 정보 손실을 방지하여 트래픽 손실을 방지하는 JUNOS 의 HA  기능중 하나입니다. 커널정보와 인터페이스 정보 손실을 방지하지만 control plane( 라우팅엔진 내 정보들 ) 의 손실을 보호하지는 못합니다. 그러기 때문에 switchover가 발생하면 neighboring 라우터는 이를 감지 할 수 있습니다. 

NSR(nonstop routing) 이나 GR(graceful restart) 과 같이 사용하게 되면  마스터 라우팅 엔진이 라우팅 업데이트를 받으면 그 즉시 백업 라우팅 엔진에게도 전달 해 주므로 swithover 가 발생하면 라우팅 정보는 그대로 유지 할 수 있습니다. 

백업 라우팅엔진이 마스터로 부터 keepalive를 2초 동안 받지 못하면 백업라우팅엔진은 마스터가 고장난걸로 간주하고 자신이 마스터가 됩니다. PFE(packet forwarding engine)은 기존 마스터와 연결을 끊고 새로운 마스터와 새로 연결합니다. PFE는 리부팅 하지 않기 때문에 ( GRES 미 설정시에는 PFE가 리부팅 함) 트래픽이 중단되지 않습니다. 새로운 마스터 라우팅엔진은 PFE와 동기화를 하게 되고 라우팅엔진이 PFE가 가진 forwarding table 이 최신정보가 아닌 걸 알게되면 업데이트 메시지를 보내 업데이트 하게 된다. 



1. 마스터 라우팅엔진 동작

2. chassisd 와 같은 routing platform processes들이 동작

3. Packet Forwarding Engine이 동작하고 마스터 라우팅엔진과 연결됨.

4. 모든 라우팅 정보들이 업데이트 된다.

5. 백업 라우팅엔진 동작

6. 라우터가 GRES가 enable 되어있는지 인지한다. 

7. kernel synchronization process (ksyncd) 이 백업과 마스터 라우팅엔진을 동기화 시킨다.

8. 동기화가 완료되면 모든 상태정보와 포워딩테이블이 업데이트 된다. 





1. 마스터 라우팅엔진으로부터 keepalive 를 받지 못하면 라우터는 switchover 를 수행한다.

2. Packet Forwarding Engine은 새롭게 마스터가 된 라우팅엔진과 연결을 수립한다. 

3. Routing platform processes(rpd) 는 GRES가 보호하지 못하므로 rpd가 restart 된다. 

4. switchover 발생 시점의 상태정보를 업데이트 한다. 

5. GR (graceful restart) 가 설정되어 있다면 helper라우터로 부터 라우팅 정보를 받아서 복원한다. 


 출처 : http://www.juniper.net/techpubs/en_US/junos13.1/topics/concept/gres-overview.html

728x90

Nonstop Active Routing

NSR은 인터페이스와 커널정보를 보존하기 위해 GRES와 동일한 구조를 사용한다. 그러나 GRES와는 다르게  NSR은 백업 라우팅 엔진에서 rpd( routing protocol daemon)을 실행하면서 라우팅 정보를 동기화 하고 있다. 이로인해 helper 라우터로 부터 라우팅 정보를 복원할 필요가 없습다. peer 라우터가 GR (gresful restart) 를 미지원 할 경우 사용하면 유용하고,  GR (graceful restart)의 대안으로 사용하기도 한다.


- NSR를 사용하기 위해서는  반드시 GRES가 enable상태이여야 한다. 



1. 마스터 라우팅엔진 부팅

2. 마스터 라우팅엔진에 chassisd, rpd 가 실행된다.

3. 패킷포워딩엔진이 시작하고 마스터 라우팅엔진과 연결된다.

4. 모든 시스템 정보가 업데이트 된다.

5. 백업 라우팅엔진이 시작되고 chassisd, rpd 가 실행된다.

6. 시스템이 GRES, NSR 이 enable 되어 있는지 확인한다.

7. ksyncd ( kernel synchronization daemon) 이 

8. ksyncd가 마스터와 백업라우팅엔진을 서로 동기화 시킨다.

9. 지원되는 프로토콜의 상태정보는 마스터와 백업 rpd 사이에서 다이렉트로 업데이트 된다.


1. 마스터와 백업간의 keeplives 가 실패하면 시스템은 백업라우팅 엔진으로 switch over 한다.

2. 패킷 포워딩엔진이 백업라우팅엔진과 연결되며, 백업라우팅엔진은 마스터가 된다. rpd  가 이미 실행중이기

    때문에 restart 가 필요없다. ( GRES 만 enable 상태일 경우에는 rpd 가 실행중이지 않으며 restart 가 된다.)

3. switch over 중에 배운 상태정보는 시스템에 업데이트 된다. 포워딩과 라우팅은 switch over 동안에 계속되며 이로인해 

   최소한의 패킷로스가 발생한다.

4. 마치 아무일 없었던 것처럼 peer 라우터와 계속적으로 정보를 교환한다. adjacencies 와 session 정보는 손실되지 않고 

   (백업 , 마스터 rpd 가 동기화 하고 있었기 때문에 ) rpd 가 restat 되지 않는다. 


GRES만 enable 된 경우 백업 라우팅엔진에 rpd 가 running 중이 아니므로 restart 가 필요하고, 인접  peer 라우터에게 라우팅 정보를 업데이트 받아야만 한다. 


출처 : http://www.juniper.net/techpubs/en_US/junos9.5/information-products/topic-collections/swconfig-high-availability/nsr-overview.html


<script src="https://ads-partners.coupang.com/g.js"></script> <script> new PartnersCoupang.G({ id:370207 }); </script>

728x90

ICMP type 5 는 우회경로로 패킷을 전송하기 위해 redirect message를 포함하고 있습니다. ICMP Redirect 는 라우터가 호스트에게 라우팅 정보를 전달하기 위한 메카니즘이고, Redirect Message 는 호스트가 자신의 라우팅 정보를 업데이트 하기 위한 ICMP message 입니다.

만약 호스트가 R1 이라는 라우터를 통해 데이터를 전송하고 R1은 데이터의 목적지로 보내기위해  R2 에게 그 데이터를 전송하고  호스트와 R2 간에 direct path가 사용가능한 상태라면( R1 과 R2가 동일 이더넷 세그먼트상에 있는경우) R1은 호스트에게 "목적지로 가는 최적의 경로는 R2를 통해서 가는 것 이다" 라는 메시지를 보냅니다. 그러면 호스트는 바로 R2 로 데이터를 보내게 될 것입니다.

라우터는 original datagram을 의도된 경로로 보낼것 입니다. 하지만 datagram에 라우팅 정보가 포함되어 있다면 더 좋은 경로가 사용 가능하더라도 라우팅 정보는 전송하지 않습니다. RFC1122에 redirects 는 internet host로 보내지면 안되고  오로지 게이트웨이로만 보내져야 한다고 선언되어 있습니다.

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Type = 5 Code Header Checksum

IP Address

IP Header + First 8 Bytes of Original Datagram's Data

Type must be set to 5. The code, which specifies the reason for the redirection, include the following:

Code Description
0 Redirect for Network.
1 Redirect for Host.
2 Redirect for Type of Service and Network.
3 Redirect for Type of Service and Host.


IP address는 redirection message 가 보내져야 하는 게이트웨이의 주소 입니다.
 
From Wikipedia, the free encyclopedia

728x90
OSPF, RIP 디폴드 정책




R1

interfaces {
    em0 {
        unit 0 {
            family inet;
        }
    }
    em1 {          
        unit 0 {
            family inet {
                address 192.168.12.2/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.1/32;
            }
        }
    }
}
protocols {
    ospf {
        area 0.0.0.10 {
            interface em1.0;
            interface lo0.0;
        }
    }
}


    OSPF database, Area 0.0.0.10
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router  *1.1.1.1          1.1.1.1          0x8000000b  2118  0x22 0x44d8  48  
Router   1.1.1.2          1.1.1.2          0x8000000b  2449  0x22 0x64cb  36
Network *192.168.12.2     1.1.1.1          0x8000000a  1618  0x22 0x8725  32
Summary  1.1.1.2          1.1.1.2          0x8000000a  1950  0x22 0x1b0f  28
Summary  1.1.1.3          1.1.1.2          0x80000009   203  0x22 0x1d0c  28
Summary  1.1.1.4          1.1.1.2          0x80000004  1202  0x22 0x2705  28
Summary  192.168.13.0     1.1.1.2          0x8000000a   952  0x22 0x1c9b  28
Summary  192.168.14.0     1.1.1.2          0x80000008  2700  0x22 0x1f98  28
ASBRSum  1.1.1.3          1.1.1.2          0x80000002  1451  0x22 0x1d12  28  
 // Type4  ASBR summary 정보 ( ASBR address 포함 )
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Extern   1.1.1.6          1.1.1.3          0x80000001  2187  0x22 0x8a17  36   // RIP 재분배로 받아온 경로

R2

interfaces {
    em1 {
        unit 0 {
            family inet {
                address 192.168.13.1/24;
            }
        }
    }
    em3 {
        unit 0 {
            family inet {
                address 192.168.12.1/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.2/32;
            }
        }          
    }
}
protocols {
    ospf {
        area 0.0.0.10 {
            interface em3.0;
        }
        area 0.0.0.0 {
            interface lo0.0;
            interface em1.0;
        }
    }
}


R3

interfaces {
    em1 {
        unit 0 {
            family inet {
                address 192.168.13.2/24;
            }
        }
    }
    em2 {
        unit 0 {
            family inet {
                address 192.168.15.2/24;
            }
        }
    }
    em3 {
        unit 0 {
            family inet {
                address 192.168.14.2/24;
            }
        }
    }              
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.3/32;
            }
        }
    }
}
protocols {
    ospf {
        export rip-ospf;
        area 0.0.0.0 {
            interface em1.0;
            interface lo0.0;
        }
        area 0.0.0.20 {
            interface em3.0;
        }
    }
    rip {
        group riprouter {
            export ospf-rip;
            neighbor em2.0;
        }
    }
}
policy-options {
    policy-statement ospf-rip {     // ospf - > rip  재분배   ( 상단 표를 보면 디폴트가  reject 이다)
        from protocol ospf;
        then accept;
    }
    policy-statement rip-ospf {   // rip - > ospf 재분배     ( 상단 표를 보면 디폴트가  reject 이다)
        from protocol rip;
        then accept;
    }
}


R4

interfaces {
    em2 {
        unit 0 {
            family inet {
                address 192.168.14.1/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.4/32;
            }
        }
    }
}
protocols {
    ospf {
        area 0.0.0.20 {
            interface em2.0;
            interface lo0.0;
        }          
    }
}


    OSPF database, Area 0.0.0.20
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router   1.1.1.3          1.1.1.3          0x8000002c   648  0x22 0x48be  36
Router  *1.1.1.4          1.1.1.4          0x80000008   687  0x22 0x6da8  48
Router  *192.168.14.1     192.168.14.1     0x8000000a  2213  0x22 0x1b16  48
Network *192.168.14.1     1.1.1.4          0x80000006  1437  0x22 0x9d0b  32
Summary  1.1.1.1          1.1.1.3          0x8000000a  1522  0x22 0x33f4  28
Summary  1.1.1.2          1.1.1.3          0x8000000a  1254  0x22 0x1f09  28
Summary  1.1.1.3          1.1.1.3          0x8000000c   719  0x22 0x71f   28
Summary  192.168.12.0     1.1.1.3          0x8000000a   987  0x22 0x2b8b  28
Summary  192.168.13.0     1.1.1.3          0x8000000d    20  0x22 0x10a3  28

    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Extern   1.1.1.6          1.1.1.3          0x80000002   317  0x22 0x8818  36  // RIP 재분배로 받아온 경로

R6

interfaces {
    em1 {
        unit 0 {
            family inet {
                address 192.168.15.1/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 1.1.1.6/32;
            }
        }
    }
}
protocols {
    rip {
        group riprouter {
            export rip_export;
            neighbor em1.0;
            neighbor lo0.0;
        }
    }
}
policy-options {
    policy-statement rip_export {       // RIP 라우터끼리는 default 로 라우팅 정보를 export 하지 않아서
        then accept;                             설정함.
    }
}
728x90

5.1.1 Changing the Settings for the Console Port

Of the three connections previously described, the console port is unique in that it is always used for the initial steps needed in configuration because it is by default the only interface that can be used to access the CLI on a Juniper Networks router. All other interfaces lack a functional configuration at initial startup. The console port is an RS232 male 9-pin connection on the craft interface of every Juniper Networks M-Series router. Refer to Figures 5-1 through 5-6 to identify the location of the console port connection on the craft interfaces of the routers.

By default the console port is considered to be secure in that it is permissible to log into the router as the root user through this connection. Those familiar with UNIX will recall that the root user has special permissions. In the Juniper Networks world, the root user is capable of accessing the UNIX kernel, as well as the core of JUNOS. Under normal conditions, root access should be permitted through the console. However, should a network engineer find it necessary, the console port can be blocked from allowing root access. The following example shows how to disable the root login on the console port:

[edit system ports console] 
lab@Chicago# set insecure

The default speed for the console connection is 9,600 baud. The following example shows the command completions for setting the connection speeds. By using the question mark, the valid completions for any command string can be accessed from any point within the JUNOS CLI.

[edit system ports console] 
lab@Chicago# set speed ?
Possible completions:
  115200               Standard terminal at 115200 baud
  19200                Standard terminal at 19200 baud
  38400                Standard terminal at 38400 baud
  4800                 Standard terminal at 4800 baud
  57600                Standard terminal at 57600 baud
  9600                 Standard terminal at 9600 baud

If the baud rate on the console port is changed, any user logged in through that port will immediately be disconnected once the change is committed. The configuration sample below shows how to set the link speed for the console port to 19.2Kbps. It also shows user lab being logged off once the change is committed:

[edit system ports console] 
lab@Chicago# set speed 19200

[edit system ports console]
lab@Chicago# show
speed 19200;

[edit system ports console]
lab@Chicago# commit



+ Recent posts