ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [EdgeRouter] IPTV를 위한 IGMP-Proxy 및 방화벽 설정
    Device 2021. 3. 18. 22:57

    EdgeRouter를 사용시 IPTV를 보기 위해서는 별도의 설정이 필요합니다.

     

    필요한 설정으로는

    • IGMP-Proxy를 설정
    • 방화벽에 멀티캐스트 및 IGMP 패킷 허용 설정

     

    참조

     

    Multicast를 수신하기 위해 먼저 IGMP Proxy를 설정합니다.

    IGMP-Proxy 설정: CLI Only


    Configuration 모드로 진입

    configure

     

    igmp-proxy 인터페이스로 upstream(WAN)과 downstream(LAN)을 다음과같이 각각 설정한다.

    set protocols igmp-proxy interface eth0 role upstream
    set protocols igmp-proxy interface eth0 threshold 1
    set protocols igmp-proxy interface eth0 alt-subnet 0.0.0.0/0
    
    
    set protocols igmp-proxy interface eth1 role downstream
    set protocols igmp-proxy interface eth1 threshold 1
    set protocols igmp-proxy interface eth1 alt-subnet 0.0.0.0/0

     

    commit 하고 저장한다.

    commit ; save

     

    설정완료 후 상태

    # show protocols igmp-proxy
     interface eth0 {
         alt-subnet 0.0.0.0/0
         role upstream
         threshold 1
     }
     interface eth1 {
         alt-subnet 0.0.0.0/0
         role downstream
         threshold 1
     }

     

     

     

    방화벽 설정: CLI


    IGMP 패킷이 WAN_LOCAL을 지나도록 추가합니다.

    set firewall name WAN_LOCAL rule 30 action accept
    set firewall name WAN_LOCAL rule 30 protocol igmp
    set firewall name WAN_LOCAL rule 30 log disable
    set firewall name WAN_LOCAL rule 30 description "Allow IGMP"

     

     Multicast Packet을 WAN_IN 에 통과되도록 추가 합니다.

    set firewall name WAN_IN rule 30 action accept
    set firewall name WAN_IN rule 30 protocol udp
    set firewall name WAN_IN rule 30 destination address 233.0.0.0/8
    set firewall name WAN_IN rule 30 description "Allow Multicast"
    set firewall name WAN_IN rule 30 log disable

     

     

    commit 하고 저장

    commit ; save

     

    모니터링


    멀티캐스트를 수신하게되면 다음의 명령어로 multicast 상태를 모니터링 할 수 있습니다

    $ show ip multicast mfc
    Group           Origin           In          Out                Pkts         Bytes  Wrong
    233.18.158.102  125.159.1.5      eth0        eth1                 18       23.84KB

     

    인터페이스별 멀티캐스트 송수신량

    $ show ip multicast interfaces
    Intf             BytesIn        PktsIn      BytesOut       PktsOut            Local
    eth0             22.61MB         17485         0.00b             0   203.236.122.32
    eth1               0.00b             0       22.61MB         17485      192.168.1.1
    eth2               0.00b             0         0.00b             0      192.168.2.1

     

     

    전체 설정 내용


     name WAN_IN {
         default-action drop
         description "WAN to internal"
         rule 10 {
             action accept
             description "Allow established/related"
             state {
                 established enable
                 related enable
             }
         }
         rule 20 {
             action drop
             description "Drop invalid state"
             state {
                 invalid enable
             }
         }
         rule 30 {
             action accept
             description "Allow Multicast"
             destination {
                 address 233.0.0.0/8
             }
             log disable
             protocol udp
         }
     }
     name WAN_LOCAL {
         default-action drop
         description "WAN to router"
         rule 10 {
             action accept
             description "Allow established/related"
             state {
                 established enable
                 related enable
             }
         }
         rule 20 {
             action drop
             description "Drop invalid state"
             state {
                 invalid enable
             }
         }
         rule 30 {
             action accept
             description "Allow IGMP"
             log disable
             protocol igmp
         }
     }
     igmp-proxy {
         interface eth0 {
             alt-subnet 0.0.0.0/0
             role upstream
             threshold 1
         }
         interface eth1 {
             alt-subnet 0.0.0.0/0
             role downstream
             threshold 1
         }
     }

     

    참고


    라우터 밑에 Switch를 두고 쓸 때 Multicast를 수신하는 장비가 있다면, IGMP-Snooping을 지원하는 Switch를 사용해야 합니다. 그렇지 않으면 Multicast 데이터가 Broadcast 되어 Switch의 모든 장비에 전달되므로 불필요한 트래픽 유발로 네트워크가 느려지게 되고, Multicast Packet이 손실되는등의 증상이 발생할 수 있습니다.

     

    알아두면 좋은 내용

     

    728x90
    반응형

    댓글

Designed by Tistory.