Contents

조회 수 30013 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
22 System/OS [android] 초간단 HTTP, POST 전송 샘플 1 file hooni 2017.02.16 3445
21 System/OS SVN(Subversion) 설치와 설정 (sasl 인증 적용 포함) file hooni 2014.09.11 5663
20 System/OS SSH Passwordless Login Using SSH Keygen in 5 Easy Steps file hooni 2019.11.22 1384
19 System/OS RPA란? 어디에 어떻게 쓰이고 누가 만드나? file hooni 2020.01.28 1351
18 System/OS php.ini 설정 안됐을때.. ㅋㅋ hooni 2013.04.23 11639
17 System/OS OSI (Open Systems Interconnection) 개방형 시스템간 상호 접속 file hooni 2013.04.23 10785
16 System/OS OpenSSL로 ROOT CA 생성 및 SSL 인증서 발급하기 hooni 2017.10.28 1450
15 System/OS NAT와 DHCP에 대한 간단한 설명 hooni 2013.04.23 18328
14 System/OS Mac에서 Node.js 설치하기 file hooni 2018.09.28 4183
13 System/OS Mac OS X - Apache+PHP+MySQL 환경 서버 hooni 2013.04.25 31627
12 System/OS iptime 공유기 해킹 기술문서 4 file hooni 2015.01.01 1941
11 System/OS HTTPS와 SSL 인증서 file hooni 2014.03.11 7542
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 Next
/ 17