Blog | Tag | Local | Media | Guest | Login  RSS
Solaris#8-2

IP multi pathing
 1) 로드분산
 2) IP 장애극복
 
IPMP
 solaris 8 (10/00) 버젼

 solaris 9 (12/02) 버젼 ver.update 4 버젼 추천
 ====================================================
 Link Base : health check를 위해 sub interface 불필요
           interface kernel driver가 지원

 Probe Base : health check를 위해 sub interface 필요
 ====================================================
 fail over 장애 극복

 fail back 장애 이전으로 복구
 ====================================================
 /etc/default/mpathd
 설정 파일 구성

 ipv4, ipv6 환경하에서 모두 사용 가능
 ====================================================
 in.mpathd가 ipmp 그룹 명을 사용 (그룹명에는 공백사용 불가)

 test interface (테스트 인터페이스도 ip 라우팅이 가능해야합)
 ====================================================
 Fail Detection, Repair -----> ICMP

 Monitoring IFF_RUNNING flag 사용
 > cat /etc/defult/mpathd
 ====================================================

IPMP 구성을 위한 작업

 1) 버젼확인

 #cat /etc/release

 2) mac 확인

 #eeprom "local-mac-address?"
 #eeprom local-mac-address?=true

 or

 ok>printenv local-mac-address?
 ok>setenv local-mac-address? true

 ====================================================
 Standby 없이 dual active path의 IPMP설정 및 확인 설정
 ====================================================
 host1#eeprom local-mac-address?=true

 -> 각 interfacce의 ethernet address를 달기 설정하기 위한
     eeprom parameter를 true로 설정

 host1#ifconfig pcn0 unplumb
 host1#ifconfig pcn1 unplumb
 host1#ifconfig pcn0 plumb 192.168.0.86 group testgrp2 up

 host1#ps -ef|grep mpath
 root 477 1 0 17:18:09 ? 0:00 /sbin/in/mpathd

 host1#ifconfig pcn0 addif 192.168.0.87 deprecated -failover up

 host1#ifconfig -a
 host1#ifconfig pcn1 plumb 192.168.0.88 group testgrp2 up
 host2#ifconfig pcn1 addif 192.168.0.89 deprecated -failover up
 host1#ifconfig -a

 Failover 테스트

 ====================================================
 Standby를 가진 single active path의 IPMP 설정하기
 ====================================================
 host1#eeprom local-mac-address?=true
 host1#ifconfig pcn0 unplumb
 host1#ifconfig pcn1 unplumb
 host1#ifconfig pcn0 plumb 192.168.0.86 group testgrp2 up

 host1#ps -ef|grep mpath
 root 477 1 0 17:18:09 ? 0:00 /sbin/in.mpathd

 host1#ifconfig pcn0 addif 192.168.0.87 deprecated -failover up


 host1#ifconfig -a
 host1#ifconfig pcn1 plumb 192.168.0.88 group testgrp1 deprecated -failover standby up
 host1#ifconfig -a

 /etc/hostname.<interface> 설정 내용
 #cat /etc/hostname.pcn0
 192.168.0.86 netmask 255.255.255.0 broadcast + group host1 up \
 addif 192.168.0.87 deprecated -failover netmask 255.255.255.0 broadcast + up

 #cat /etc/hostname.pcn1
 192.168.0.88 netmask 255.255.255.0 broadcast + group host1 deprecated -failover standby up

 ====================================================

 solaris는 기본적으로 lan card가 2개 이상이면 router로 동작함.
 touch /etc/nonrouter ---> 생성하면 router 동작 안함.

 qfe, ce, ge, hme : link base 지원

 ====================================================
 #ps -ef |grep in[.]mpathd

 solaris 9 이하에서는
 /etc/rc2.d/S69inet script에 의해 동작

 solaris 10 부터
 /lib/svc/method/net-init에 의해 동작

 #grep in[.]mpathd /lib/svc/method/net-init
 ====================================================
 Link 기반 IPMP 구성

 모두 동일하나 sub interface를 생성하지 않음

 #ifconfig -a
 #ps -ef |grep in[.] mpathd

 Link 기반 IPMP 운영

 #if_mpadm -d hme0 ( -d : detatch (offline))

 #ifconfig -a

 #if_mpadm -r hme0 ( -r : reattach (online))
 ====================================================
 #IPMP singleton#

 한개의 IPMP 그룹에 하나의 NIC만 포함하는 형태
 Fail over 미지원되는 IPMP
 IPMP상태 추적 및 모니터링 용도
 (인터페이스의 상태에 관련 실시간 notification(알림) 지원)
 ====================================================
 dual step (ipv4 & ipv6)

 #touch /etc/hostname.6
 #init 6

 NAT-PT (<-ipv6 - ipv4)
 Tunnel (ipv4--ipv6--ipv4)
 ====================================================

Routing

direct rounting - 같은 네트워크
indirect routing - 다른 네트워크

static routing (정적)
  관리자가 직접 입력
  저사양에서도 동작
  보안성 좋음
  대규모 환경에 부적합 (네트워크 구성이 자주 변경)
  관리적 부하가 큼

dynamic routing (동적)
  별도의 프로토콜 동작 (solaris 경우 in.routed)
  관리자의 관리 및 입력 부하 적음
  라우터의 경우는 정적 구성보다 고사양의 cpu, memory 요구
  보안성이 상대적으로 떨어짐
  대규모 환경에 적합 (네트워크 구성이 자주 변경)


tip. 윈2000 라우터 (시스코 2500과 동등한 레벨의 라우팅 가능 > rip, rip v2, ospf)
     솔라리스 라우터 (윈도보다 떨어짐 > rip, rip v2)

 ====================================================
 static routing
   /etc/defaultrouter

 static indirect routing
   /etc/gateways
 ====================================================
 dynamic routing
   in.routed 데몬에 의해 라우팅 서비스가 동작함
   in.routed 데몬에 의해 라우팅테이블이 추가, 제거 됨

   RIPv1, RIPv2, ICMP router Discovery Protocol
 ====================================================
 svc:/network/initial
 SMF에서 라우팅서비스 활성화
 ====================================================
 IGP : RIP, OSPF...
 EGP : EGP -> BGP
 ====================================================
 netstat -r // hostname으로 라우팅 테이블 확인
 netstat -nr // ip로 라우팅 테이블 확인
 ====================================================
 /etc/defaultrouter 존재
 
 장점
 1. 적은 라우팅 테이블 구성 가능
 2. 신속한 ip데이터그랩 처리 가능
 3. 멀티플 기본 라우터 구성을 통한 SPOF 발생을 후회가능

 단점
 1. 지정된 default 장애시 네트워크 불가
 2. 대규모 네트워크에 부적합 (네트워크가 filexible한 경우)
 ====================================================
 /etc/gateways

 #cat /etc/gateways
 net 192.168.30.0 gateway sys11(or ip) metric 1

 :wq!
 ====================================================
 RIP 비활성화시
 /etc/gateways ==> no rip 추가

 noripin
   RIP 데이터그램이 지정된 인터페이스로 수신, 전송되지
   않도록 하려면 gateways 파일에 지시어 추가 수신된 rip정보 무시

 noripout
   멀티홈 시스템인 경우 라우트를 알리지 않도록

 norip
   noripin, noripout 지시어를 하나로 대체
 ====================================================
 /etc/gateways

 no_rip

 no_ripv1_in=pcn0
 ====================================================
 명령 구성 기반의 static routing

 #route add net 192.168.3.0 sys11exxt

 #route add host sys23 sys21ext

 #route add default instructor

 #route delete sys24 sys21ext

 #route change default 192.168.0.1

 ====================================================
 #route get default
 #route monitor
 #route flush

 #route -f add net 192.168.2.0 sys11 (-f : flush)
 
 #route add net 192.168.3.0 sys31ext -netmask 255.255.255.224
 
 #route add net 192.168.3.0/27 sys31ext

 route add net 192.168.30.0 sys2 metric1 (= ip route 192.168.30.0 s0/1)

 ====================================================
 routing algorithm

 1) maximum hop count
 2) triggerd update
 3) split horizon
 4) route poisioning (posion reverse)
 5) hold down timer
========================================================
↓ Solaris 10
========================================================
 #routeadm

 ipv4 routing
 ipv4 forwarding

 ===> /etc/defaultrouter 가 빈 내용 일때

 ripng (ipv6 rip)
 
 #routeadm -u -d ipv4-routing

   -u : update (현재 구동중 옵션 즉시 적용)
   -d : disable
   -e : enable
   -r : revert (시스템 부팅시 초기화로 돌아가지 않음)

 #routeadm -e ipv4-routing
 파일에만 반영. 즉시 반영 안됨

 ====================================================
 RDISC (in.rdisc)
 라우터 discovery

 ICMP (9, 10 번 타입을 이요해 route advertisement)

 multicast 224.0.0.1 (600초 단위 : 10분 단위)

 장점 : 라우팅 프로토콜과 독립적 구동
   멀티캐스트 사용
   라우팅 테이블 크기
   다중 기본 경로 제공을 통한 경로 중복 제공
 
 단점 : 10분단위로 광고 하므로 블랙홀에 빠질 수 있음
    호스트 --> 라우터 (o)
    라우터 --> 라우터 (x)
 ===================================================
 /etc/gateways 에서 rdisc 제어 가능

 rdisc_interval=100 (초)
 ===================================================
 icmp redirect (라우터 2중화 기능)

 해커의 icmp redirect 공격 방어

 #ndd -set /dev/ip ip_ignore_redirect 1

 http://www.sun.com/blueprints/1200/network-updt1.pdf
 ===================================================
 CIDR (supernetting) <-> VLSM (subnetting)

 연속된 네트워크여야 함!

 211.106.30.0/24
 211.106.31.0/24

 00011111
 00011110

 211.106.30.0/23
 211.106.31.0/23
 ===================================================
 #ifconfig pcn0 plumb 211.106.30.100/23 broadcast + up
 
 or
 
 #ifconfig pcn0 plumb 211.106.30.100 255.255.254.0 broadcast + up
 ===================================================
 #cat /etc/inet/routing.conf
 
 #rm /etc/defaultrouter
 #vi /etc/hostname.pcn0
 #vi /etc/hostname.pcn1
 #init 6

 solaris 9 이하

  #ndd -set /dev/ip ip_forwarding 1

 solaris 10

  #routeadm -u -e ipv4-forwarding

 라우팅 활성화

 #routeadm -u -d ipv4-routing
 #routeadm -u -e ipv4-routing
 ===================================================
 멀티홈드 (Multi Homed)

 NIC 2장 이상일 때

 solaris 10

  #routeadm -u -d ipv4_forwarding
 ===================================================

자바 테스크톱에서 CDE 콘솔 호출
#dtterm -C &