Contents

조회 수 30010 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
네트워크는 수많은 변수가 존재 하여 절차마다 신경를 쓰지 않으면 시간이 곱배기로 들므로 잘 숙지하고 해야 한다.

네트워크를 설정하는데 쓰이는 파일들

    # 기초적 네트워크 파일:        hosts, resolv.conf, network, ifcfg-eth0
     /etc/HOSTNAME
     /etc/host.conf
     /etc/hosts
     /etc/resolv.conf
     /etc/nsswitch.conf
     /etc/conf.modules
     /etc/sysconfig/network
     /etc/sysconfig/static-routes
     /etc/sysconfig/network-scripts/ifcfg-eth0  


1. 첫번째 랜카드(eth0) 잡기

    사전에 랜카드 종류를 반드시 적어두고(3Com, ne2000 권장)
    리눅스 설치시에 Static, DHCP 기능까지 정하여 잡는다.
    (rtl8139는 나중에 잡으려면 모듈이 없다고 나온다.)
    두 개의 랜카드를 꽂고 잡을 경우에는 어느 것이 eth0으로 잡혔는지 주지한다.

    # IP 설정
    $ vi /etc/sysconfig/network-scripts/ifcfg-eth0
        DEVICE=eth0
        IPADDR=192.168.1.156
        NETMASK=255.255.255.0
        NETWORK=192.168.1.0
        BROADCAST=192.168.1.255
        ONBOOT=yes 
        
        # Gateway 설정
        $ vi /etc/sysconfig/network
        NETWORKING=yes
        FORWARD_IPV4=yes
        HOSTNAME="top.co.kr"
        GATEWAYDEV=eth0
        GATEWAY= 

        # DNS 설정하기
        $ vi /etc/resolv.conf
        search thrunet.com top.co.kr
        nameserver 210.117.65.1
        nameserver 210.117.65.2 

        $ vi /etc/hosts
        127.0.0.1       localhost       localhost.localdomain
        192.168.1.1    top.co.kr       top
        
        $ vi /etc/HOSTNAME
        top.co.kr

2. 두번째 랜카드 잡기

    $ vi /etc/sysconfig/network-scripts/ifcfg-eth1
          DEVICE="eth1"
          IPADDR="192.168.1.1"
          NETMASK="255.255.255.0"
          NETWORK="192.168.100.0"
          BROADCAST="192.168.100.255"
          ONBOOT="yes"
          BOOTPROTO="none"
          GATEWAY="192.168.1.101"
          GATEWAYDEV="eth0"
    $ vi /etc/sysconfig/network
          NETWORKING=yes
          FORWARD_IPV4=yes
          HOSTNAME=top.co.kr
          DOMAINNAME=co.kr
          GATEWAY=192.168.1.101
          GATEWAYDEV=eth0 
    $ vi /etc/hosts
       127.0.0.1       localhost       localhost.localdomain
       192.168.1.1    top.co.kr       top
    $ vi /etc/HOSTNAME
       top.co.kr


3. 각기 다른 게이트웨이를 쓸 경우

    $ vi /etc/sysconfig/static-routes
       eth0        net 192.168.10.0 netmask 255.255.255.0 gw 192.168.10.1
       eth1        net 192.168.11.0 netmask 255.255.255.0 gw 192.168.11.1
       eth1:0        net 192.168.12.0 netmask 255.255.255.0 gw 192.168.12.1
       # eth1:0  IP-Alias를 적용한 예


4. 일종의 드라이버인 모듈을 올리기

    # 모듈이 안올라 왔을 경우
    $ vi  /etc/conf.modules
       alias   eth0   rtl8139                        # PCI LANCard인 경우
       alias   eth1   ne                        # ISA LANCard인 경우
       options   ne   io=0x300   irq=5        
    $ ls  /lib/modules/kernel-version/net
    $ modprobe  ne.o  io=0x300  irq=5
    $ lsmod
    $ rmmod
    $ control-panel
       Kernel Daemon Configuration -> Add -> Module Types eth -> OK -> 
       Which module type? eth1 -> Which module? ne -> OK -> 
       io=0x300 -> irq=5 -> Done


5. 부팅시 커널차원에서 인식 시키기

    # Lan종류 + auto IRQ + auto IO + Lancard Device 번호의 순서로
    $ vi  /etc/lilo.conf
       append="ether=0,0,eth0 ether=0,0,eth1"                        # PnP 인식
       # append="ether=11,0x6100,eth0  ether=5,0x300,eth1"                # 특정 인식


6. CMOS 차원에서의 IRQ 설정

    # CMOS에서 네트워크의 PNP 기능을 없애서 내정 IRQ에 따른 출동을 피한다
       [PNP/PCI Configuration]
        PNP OS Installed : NO

7. 랜카드 차원에서의 IRQ 설정
  
    # 물리적인 변경
       LANCard Jumper move 10 -> 5
    # 프로그램을 이용한 변경
        Intel Ether Express Pro/10 PNP ISA                e10disk.exe  sofset2.exe
        RealTek 8019 ISA PNP Ethernet(ne2000)        rset8019.exe
    # Setup
       Plug and Play :  Disable(or Juper less)
       IO and IRQ setting


8. 네트워크 등록정보 입력

    7.1. ip 설정
          $ ifconfig                                                        # 정보 보기
          $ ifconfig  eth0  192.168.10.5  netmask  255.255.255.0  up        # ip 설정
          $ ifconfig  eth0  down                                                # ip 해제
    7.2. 라우터 추가(파일을 고친후에도 이것은 해주어야 작동)
          $ route                                                                # 정보 보기
          $ netstat  -nr                                                         # 정보 보기
          $ route  add  -net  192.168.10.0  netmask  255.255.255.0  dev  eth0        # 라우터 서브넷 추가
          $ route  add  default  gw  192.168.1.1  eth0                        # 디폴트 라우터 추가
          $ route  del  default  gw  192.168.1.1  eth0                        # 디폴트 라우터 삭제

    7.3. 비주얼 제어판을 통한 설정
          $ netcfg                                                        # 혹은 "$ linuxconf"
              Default  Gateway-203.239.44.50
              Default  Gateway  Device-eth0
          $ ifdown eth0;  ifup eth0


9. 테스트 

    $ netcfg
    $ ifdown eth1; ifup eth1
    $ ifconfig
   
    # IRQ, IO 번호 확인하기
    $ cat  /proc/pci
    $ cat  /proc/interrupts
    $ cat  /proc/ioports
    $ dmesg
   
   # 모듈의 확인하기, 모듈 로드 시키기
   $ uname -a                                        # 커널버전 보기
   $ ls /lib/modules/2.2.7/net
          ne.o  rt8139.o
   $ /sbin/lsmod                                # 확실히 이부분이 올라와 있어야 한다
          ne, rt8139 Module
   $ modprobe ne io=0x300  irq=5                # 모듈을 로드 시키는 명령


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
1173 System/OS 해커스랩 깨기.. 후후.. ㅋㅋ file hooni 2013.04.23 18408
1172 Etc 플라스터(Plaster) 수업 내용 secret hooni 2016.05.24 0
1171 Develop 프로그램 문서 관리 (Doxygen) hooni 2013.04.23 16383
1170 Develop 프로그래밍에서 foo, bar 함수의 유래 file hooni 2013.06.25 21242
1169 Develop 프로그래밍 소스 관련 사이트.. hooni 2013.04.23 16483
1168 Develop 페이팔에서 돈 찾기 (Paypal withdraw) file hooni 2014.02.20 10953
1167 Etc 티스토리 테이블 html,css 구문 hooni 2013.11.03 15941
1166 System/OS 콘솔에서 패스워드 걸린 zip 압축하는 명령 hooni 2018.03.02 925
1165 System/OS 컴파일러 수업 자료(교재 : 컴파일러 입문) file hooni 2003.04.23 21964
1164 Develop 캘리포니아 운전면허 족보 file hooni 2017.06.12 722
1163 Etc 캘리포니아 운전면허 문제 file hooni 2017.07.22 956
1162 Develop 최근 논문 자료 (2011/01/03, 만현형한테 보낸거..) secret hooni 2013.04.23 10366
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98